[ARVADOS] updated: 9fb28073a1c7a140e44a20e0555028e9a9dbcf51

git at public.curoverse.com git at public.curoverse.com
Mon Apr 13 13:50:19 EDT 2015


Summary of changes:
 .../api/config/initializers/{zz_load_config.rb => load_config.rb} | 8 ++++++++
 .../{zz_preload_all_models.rb => preload_all_models.rb}           | 7 ++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)
 rename services/api/config/initializers/{zz_load_config.rb => load_config.rb} (84%)
 rename services/api/config/initializers/{zz_preload_all_models.rb => preload_all_models.rb} (55%)

       via  9fb28073a1c7a140e44a20e0555028e9a9dbcf51 (commit)
       via  3f016eae9d2431abfb8e8cc1cabdb1a494e49bf2 (commit)
       via  d72f3039300613487af606ce69e5b7b8b2c67027 (commit)
      from  cc133acd3b94cfdf6b0770f12c0a4ed6b458ef18 (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 9fb28073a1c7a140e44a20e0555028e9a9dbcf51
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Apr 13 13:49:04 2015 -0400

    5414: Rename zz_preload* to preload*; alphabetical names are not needed any more.

diff --git a/services/api/config/initializers/zz_preload_all_models.rb b/services/api/config/initializers/preload_all_models.rb
similarity index 100%
rename from services/api/config/initializers/zz_preload_all_models.rb
rename to services/api/config/initializers/preload_all_models.rb

commit 3f016eae9d2431abfb8e8cc1cabdb1a494e49bf2
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Apr 13 13:48:40 2015 -0400

    5414: Rename zz_load* to load*; alphabetical names are not needed any more.

diff --git a/services/api/config/initializers/zz_load_config.rb b/services/api/config/initializers/load_config.rb
similarity index 100%
rename from services/api/config/initializers/zz_load_config.rb
rename to services/api/config/initializers/load_config.rb
diff --git a/services/api/config/initializers/zz_preload_all_models.rb b/services/api/config/initializers/zz_preload_all_models.rb
index d5af524..7e26123 100644
--- a/services/api/config/initializers/zz_preload_all_models.rb
+++ b/services/api/config/initializers/zz_preload_all_models.rb
@@ -3,10 +3,10 @@
 # Config must be done before we load model class files; otherwise they
 # won't be able to use Rails.configuration.* to initialize their
 # classes.
-require_relative 'zz_load_config.rb'
+require_relative 'load_config.rb'
 
 if Rails.env == 'development'
   Dir.foreach("#{Rails.root}/app/models") do |model_file|
     require_dependency model_file if model_file.match /\.rb$/
-  end 
+  end
 end

commit d72f3039300613487af606ce69e5b7b8b2c67027
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Apr 13 13:47:03 2015 -0400

    5414: Control initializer load order using require_relative instead of alphabetical filenames.

diff --git a/services/api/config/initializers/zz_load_config.rb b/services/api/config/initializers/zz_load_config.rb
index 8b454b6..3b516da 100644
--- a/services/api/config/initializers/zz_load_config.rb
+++ b/services/api/config/initializers/zz_load_config.rb
@@ -1,3 +1,11 @@
+begin
+  # If secret_token.rb exists here, we need to load it first.
+  require_relative 'secret_token.rb'
+rescue LoadError
+  # Normally secret_token.rb is missing and the secret token is
+  # configured by application.yml (i.e., here!) instead.
+end
+
 $application_config = {}
 
 %w(application.default application).each do |cfgfile|
diff --git a/services/api/config/initializers/zz_preload_all_models.rb b/services/api/config/initializers/zz_preload_all_models.rb
index 1a76b72..d5af524 100644
--- a/services/api/config/initializers/zz_preload_all_models.rb
+++ b/services/api/config/initializers/zz_preload_all_models.rb
@@ -1,5 +1,10 @@
 # See http://aaronvb.com/articles/37-rails-caching-and-undefined-class-module
 
+# Config must be done before we load model class files; otherwise they
+# won't be able to use Rails.configuration.* to initialize their
+# classes.
+require_relative 'zz_load_config.rb'
+
 if Rails.env == 'development'
   Dir.foreach("#{Rails.root}/app/models") do |model_file|
     require_dependency model_file if model_file.match /\.rb$/

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list