[ARVADOS] updated: b58df61f4c9e0c8e6115414aa488d03b6b6ca632
git at public.curoverse.com
git at public.curoverse.com
Wed Mar 12 23:43:01 EDT 2014
Summary of changes:
services/api/app/models/user.rb | 2 +-
services/api/config/application.default.yml | 17 ++++++++++++++++-
services/api/config/application.rb | 26 --------------------------
services/api/config/application.yml.example | 10 +---------
4 files changed, 18 insertions(+), 37 deletions(-)
via b58df61f4c9e0c8e6115414aa488d03b6b6ca632 (commit)
via eead9f3ed1b62d57ffd808d822c04ff8be06aab0 (commit)
from 7f60d6154322259117543c1e156b200585a90546 (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 b58df61f4c9e0c8e6115414aa488d03b6b6ca632
Author: Tom Clegg <tom at curoverse.com>
Date: Wed Mar 12 18:11:15 2014 -0400
Fix configured uuid_prefix and force_ssl getting overwritten by application.rb
diff --git a/services/api/config/application.default.yml b/services/api/config/application.default.yml
index 11dcc54..ad95f04 100644
--- a/services/api/config/application.default.yml
+++ b/services/api/config/application.default.yml
@@ -85,3 +85,17 @@ common:
# server, which uses openid against Google's servers, so in that case this
# should be an address associated with a Google account.
auto_admin_user: false
+
+ ## Set Time.zone default to the specified zone and make Active
+ ## Record auto-convert to this zone. Run "rake -D time" for a list
+ ## of tasks for finding time zone names. Default is UTC.
+ #time_zone: Central Time (US & Canada)
+
+ ## Default encoding used in templates for Ruby 1.9.
+ encoding: utf-8
+
+ # Enable the asset pipeline
+ assets.enabled: true
+
+ # Version of your assets, change this if you want to expire all your assets
+ assets.version: "1.0"
diff --git a/services/api/config/application.rb b/services/api/config/application.rb
index 2f331ee..24648a9 100644
--- a/services/api/config/application.rb
+++ b/services/api/config/application.rb
@@ -26,37 +26,11 @@ module Server
# Activate observers that should always be running.
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
- # config.time_zone = 'Central Time (US & Canada)'
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
- # Configure the default encoding used in templates for Ruby 1.9.
- config.encoding = "utf-8"
-
# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]
-
- # Enable the asset pipeline
- config.assets.enabled = true
-
- # Version of your assets, change this if you want to expire all your assets
- config.assets.version = '1.0'
-
- config.force_ssl = true
-
- def config.uuid_prefix(x=nil)
- if x and @uuid_prefix
- raise "uuid_prefix was already set to #{@uuid_prefix}"
- end
- @uuid_prefix ||= Digest::MD5.hexdigest(x || `hostname`.strip).to_i(16).to_s(36)[-5..-1]
- end
- def config.uuid_prefix=(x)
- @uuid_prefix = x
- end
end
-
end
commit eead9f3ed1b62d57ffd808d822c04ff8be06aab0
Author: Tom Clegg <tom at curoverse.com>
Date: Wed Mar 12 18:10:32 2014 -0400
Remove some stumbling blocks in default/example configs
diff --git a/services/api/app/models/user.rb b/services/api/app/models/user.rb
index a85a63d..0896571 100644
--- a/services/api/app/models/user.rb
+++ b/services/api/app/models/user.rb
@@ -124,7 +124,7 @@ class User < ArvadosModel
end
def check_auto_admin
- if User.where("uuid not like '%-000000000000000'").where(:is_admin => true).count == 0 and not Rails.configuration.auto_admin_user.nil?
+ if User.where("uuid not like '%-000000000000000'").where(:is_admin => true).count == 0 and Rails.configuration.auto_admin_user
if current_user.email == Rails.configuration.auto_admin_user
self.is_admin = true
self.is_active = true
diff --git a/services/api/config/application.default.yml b/services/api/config/application.default.yml
index 36eedb4..11dcc54 100644
--- a/services/api/config/application.default.yml
+++ b/services/api/config/application.default.yml
@@ -39,6 +39,7 @@ test:
action_mailer.delivery_method: :test
active_support.deprecation: :stderr
active_record.mass_assignment_sanitizer: :strict
+ uuid_prefix: zzzzz
common:
secret_token: ~
@@ -83,4 +84,4 @@ common:
# In the default configuration, authentication happens through the Arvados SSO
# server, which uses openid against Google's servers, so in that case this
# should be an address associated with a Google account.
- auto_admin_user: ~
+ auto_admin_user: false
diff --git a/services/api/config/application.yml.example b/services/api/config/application.yml.example
index c48308d..60193ce 100644
--- a/services/api/config/application.yml.example
+++ b/services/api/config/application.yml.example
@@ -25,17 +25,9 @@ production:
Net::HTTP.get(URI("http://169.254.169.254/latest/meta-data/#{iface}-ipv4")).match(/^[\d\.]+$/)[0]
end << '172.16.0.23'
%>
- # You must customize these. See application.default.yml for information.
- compute_node_ami: ~
- compute_node_ec2_tag_enable: ~
- compute_node_domain: ~
- compute_node_spot_bid: ~
test:
uuid_prefix: zzzzz
+ secret_token: <%= rand(2**512).to_s(36) %>
common:
- secret_token: ~
- compute_node_nameservers:
- - 192.168.0.1
- - 172.16.0.1
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list