[ARVADOS] updated: 1.1.4-245-ge7ea03c

Git user git at public.curoverse.com
Mon May 14 15:32:59 EDT 2018


Summary of changes:
 apps/workbench/app/models/arvados_base.rb     | 16 ++++++++--------
 apps/workbench/config/application.default.yml |  4 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)

       via  e7ea03c241257861568c53e9890bf40810bf8c5f (commit)
       via  dd1d4b52c786a63c1ed237a055d246a50a69c8d8 (commit)
      from  4f42ac359cf6fa9727bbc32a31df26717fd1f209 (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 e7ea03c241257861568c53e9890bf40810bf8c5f
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Mon May 14 15:32:26 2018 -0400

    12737: Rename config serve_static_assets to serve_static_files.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/apps/workbench/config/application.default.yml b/apps/workbench/config/application.default.yml
index 137bba0..0946a9d 100644
--- a/apps/workbench/config/application.default.yml
+++ b/apps/workbench/config/application.default.yml
@@ -66,7 +66,7 @@ production:
   eager_load: true
   consider_all_requests_local: false
   action_controller.perform_caching: true
-  serve_static_assets: false
+  serve_static_files: false
   assets.compile: false
   assets.digest: true
   i18n.fallbacks: true
@@ -88,7 +88,7 @@ production:
 test:
   cache_classes: true
   eager_load: false
-  serve_static_assets: true
+  serve_static_files: true
   static_cache_control: public, max-age=3600
   consider_all_requests_local: true
   action_controller.perform_caching: false

commit dd1d4b52c786a63c1ed237a055d246a50a69c8d8
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Mon May 14 15:32:23 2018 -0400

    12737: Fix serialized column setup.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/apps/workbench/app/models/arvados_base.rb b/apps/workbench/app/models/arvados_base.rb
index caeb9cb..e68cc89 100644
--- a/apps/workbench/app/models/arvados_base.rb
+++ b/apps/workbench/app/models/arvados_base.rb
@@ -61,11 +61,11 @@ class ArvadosBase < ActiveRecord::Base
   end
 
   def self.columns
-    return @columns if @columns.andand.any?
-    columns = []
+    return @discovered_columns if @discovered_columns.andand.any?
+    @discovered_columns = []
     @attribute_info ||= {}
     schema = arvados_api_client.discovery[:schemas][self.to_s.to_sym]
-    return columns if schema.nil?
+    return @discovered_columns if schema.nil?
     schema[:properties].each do |k, coldef|
       case k
       when :etag, :kind
@@ -73,10 +73,10 @@ class ArvadosBase < ActiveRecord::Base
       else
         if coldef[:type] == coldef[:type].downcase
           # boolean, integer, etc.
-          columns << column(k, coldef[:type].to_sym)
+          @discovered_columns << column(k, coldef[:type])
         else
           # Hash, Array
-          columns << column(k, :text)
+          @discovered_columns << column(k, coldef[:type])
           serialize k, coldef[:type].constantize
         end
         define_method k do
@@ -90,14 +90,14 @@ class ArvadosBase < ActiveRecord::Base
         @attribute_info[k] = coldef
       end
     end
-    @columns = columns
+    @discovered_columns
   end
 
   def self.column(name, sql_type = nil, default = nil, null = true)
-    if sql_type == :datetime
+    if sql_type == 'datetime'
       cast_type = "ActiveRecord::Type::DateTime".constantize.new
     else
-      cast_type = "ActiveRecord::Type::#{sql_type.to_s.camelize}".constantize.new
+      cast_type = ActiveRecord::Base.connection.lookup_cast_type(sql_type)
     end
     ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default, cast_type, sql_type.to_s, null)
   end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list