[ARVADOS] updated: 9700a3a646ea5e1d50e5525bd094e8eb90af8ce1
git at public.curoverse.com
git at public.curoverse.com
Wed Sep 24 21:58:26 EDT 2014
Summary of changes:
services/api/app/mailers/user_notifier.rb | 15 +++++++++++++++
.../api/app/views/user_notifier/account_is_setup.text.erb | 2 +-
services/api/config/application.default.yml | 6 ++++--
services/api/config/application.yml.example | 6 ------
4 files changed, 20 insertions(+), 9 deletions(-)
via 9700a3a646ea5e1d50e5525bd094e8eb90af8ce1 (commit)
via 8f3b2fc8dbe18a031fb7aa943b626a0f3932c3ec (commit)
from 3154ba6b56adb7a76bd5665c6c4c3326efea8eaa (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 9700a3a646ea5e1d50e5525bd094e8eb90af8ce1
Author: Ward Vandewege <ward at curoverse.com>
Date: Wed Sep 24 21:57:25 2014 -0400
API server: setting workbench_address is not required. This unbreaks the
docker build for the api server image.
refs #3038
diff --git a/services/api/config/application.default.yml b/services/api/config/application.default.yml
index ec07045..5526501 100644
--- a/services/api/config/application.default.yml
+++ b/services/api/config/application.default.yml
@@ -18,7 +18,8 @@ development:
local_modified: <%= '-modified' if `git status -s` %>
# Visitors to the API server will be redirected to the workbench
- workbench_address: ~
+ # By default, workbench_address is unset.
+ #workbench_address: https://workbench.local:3031/
production:
force_ssl: true
@@ -31,7 +32,8 @@ production:
assets.digest: true
# Visitors to the API server will be redirected to the workbench
- workbench_address: ~
+ # By default, workbench_address is unset.
+ #workbench_address: <%= "https://workbench." + `hostname`.strip %>
test:
force_ssl: false
diff --git a/services/api/config/application.yml.example b/services/api/config/application.yml.example
index ddbd23b..d6de1ff 100644
--- a/services/api/config/application.yml.example
+++ b/services/api/config/application.yml.example
@@ -15,18 +15,12 @@ development:
secret_token: ~
blob_signing_key: ~
- # Visitors to the API server will be redirected to the workbench.
- workbench_address: https://workbench.local:3031/
-
production:
# Mandatory site secrets. See application.default.yml for more info.
secret_token: ~
blob_signing_key: ~
uuid_prefix: bogus
- # Visitors to the API server will be redirected to the workbench.
- workbench_address: ~
-
test:
# Tests should be able to run without further configuration, but if you do
# want to change your local test configuration, this is where to do it.
commit 8f3b2fc8dbe18a031fb7aa943b626a0f3932c3ec
Author: Ward Vandewege <ward at curoverse.com>
Date: Wed Sep 24 21:42:10 2014 -0400
Protect the one place in the api server code where we assume the
workbench_address parameter is always set, it is in fact optional.
refs #3038
diff --git a/services/api/app/mailers/user_notifier.rb b/services/api/app/mailers/user_notifier.rb
index 759325a..1f9ad8c 100644
--- a/services/api/app/mailers/user_notifier.rb
+++ b/services/api/app/mailers/user_notifier.rb
@@ -1,8 +1,23 @@
class UserNotifier < ActionMailer::Base
+ include AbstractController::Callbacks
+
default from: Rails.configuration.user_notifier_email_from
+ before_filter :load_variables
def account_is_setup(user)
@user = user
mail(to: user.email, subject: 'Welcome to Curoverse')
end
+
+private
+ def load_variables
+ if Rails.configuration.respond_to?('workbench_address') and
+ not Rails.configuration.workbench_address.nil? and
+ not Rails.configuration.workbench_address.empty? then
+ @wb_address = Rails.configuration.workbench_address
+ else
+ @wb_address = '(Unfortunately, config.workbench_address is not set, please contact your site administrator)'
+ end
+ end
+
end
diff --git a/services/api/app/views/user_notifier/account_is_setup.text.erb b/services/api/app/views/user_notifier/account_is_setup.text.erb
index ba360c0..a7cca2f 100644
--- a/services/api/app/views/user_notifier/account_is_setup.text.erb
+++ b/services/api/app/views/user_notifier/account_is_setup.text.erb
@@ -7,7 +7,7 @@ Hi there,
Your Arvados account has been set up. You can log in with your Google account
associated with the e-mail address <%= @user.email %> at:
- <%= Rails.configuration.workbench_address %>
+ <%= @wb_address %>
Thanks,
The Arvados team.
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list