brick 1.0.10 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cfc0c2e81700a407de1fe154d337dd83d756a29fba0914db5eeb1974198720d2
4
- data.tar.gz: 0051e6b4fe55d1e9f4cc4614aabd941a6947f66af5ac41f35725df594217fd2d
3
+ metadata.gz: 513e7f88a3dc5ac0f198308e3d82b6f3990af72d5b7b628d83863d887ab50ee2
4
+ data.tar.gz: 845340d554fcfad33d1d841a3098fcf93aaae96dd426c17256cefbe103dd1997
5
5
  SHA512:
6
- metadata.gz: 445acf196541b17429bb7c5f93b64ebd51cc4c3b1fcc4cec7fcb43cca6e47ed86a027bc0010b3053a763414809a390509d9da9c296c4eab85bbd794a3553ba90
7
- data.tar.gz: 110cd25429c21410effe398a61c4284876d49e222267987e0c5e0e09b5ab8e84bd4991fbd36257077f5178fa3fcba661970162e574744c2f8d2b80ec4a1e2d51
6
+ metadata.gz: 87f4c91911e83770c025c36945bec40c191b73a539a94bf5188738b01b516df0347f20f3710d9cca8f392dfcc32b2df68413309edddedc13dfff8d47ca99efa6
7
+ data.tar.gz: e357a73bd2f5d6371a3d92344cd5635f458f332b2027d66851e068cd3f833f7fffd3ff6dc2a51d48bc2b9b9696d14a5ff999ea5a626341d14ff90286b4a19836
data/lib/brick/config.rb CHANGED
@@ -84,7 +84,7 @@ module Brick
84
84
  end
85
85
 
86
86
  def model_descrips
87
- @mutex.synchronize { @model_descrips }
87
+ @mutex.synchronize { @model_descrips ||= {} }
88
88
  end
89
89
 
90
90
  def model_descrips=(descrips)
@@ -382,7 +382,6 @@ class Object
382
382
  end
383
383
 
384
384
  def _brick_get_hm_assoc_name(relation, hm_assoc)
385
- binding.pry if hm_assoc.nil?
386
385
  if relation[:hm_counts][hm_assoc[:assoc_name]]&.> 1
387
386
  [ActiveSupport::Inflector.pluralize(hm_assoc[:alternate_name]), true]
388
387
  else
@@ -532,10 +531,12 @@ module ActiveRecord::ConnectionHandling
532
531
  end
533
532
  end
534
533
 
535
- puts "Classes that can be built from tables:"
534
+ puts "\nClasses that can be built from tables:"
536
535
  relations.select { |_k, v| !v.key?(:isView) }.keys.each { |k| puts ActiveSupport::Inflector.singularize(k).camelize }
537
- puts "Classes that can be built from views:"
538
- relations.select { |_k, v| v.key?(:isView) }.keys.each { |k| puts ActiveSupport::Inflector.singularize(k).camelize }
536
+ unless (views = relations.select { |_k, v| v.key?(:isView) }).empty?
537
+ puts "\nClasses that can be built from views:"
538
+ views.keys.each { |k| puts ActiveSupport::Inflector.singularize(k).camelize }
539
+ end
539
540
  # pp relations; nil
540
541
 
541
542
  # relations.keys.each { |k| ActiveSupport::Inflector.singularize(k).camelize.constantize }
@@ -5,7 +5,7 @@ module Brick
5
5
  module VERSION
6
6
  MAJOR = 1
7
7
  MINOR = 0
8
- TINY = 10
8
+ TINY = 11
9
9
 
10
10
  # PRE is nil unless it's a pre-release (beta, RC, etc.)
11
11
  PRE = nil
@@ -124,7 +124,7 @@ module Brick
124
124
  # # part of a has_many :through association.) If you want to use different exclusion columns than our defaults
125
125
  # # then this setting resets that list. For instance, here is an override that is useful in the Sakila sample
126
126
  # # database:
127
- # Brick.metadata_columns = ['last_updated']
127
+ # Brick.metadata_columns = ['last_update']
128
128
 
129
129
  # # A simple DSL is available to allow more user-friendly display of objects. Normally a user object might be shown
130
130
  # # as its first non-metadata column, or if that is not available then something like \"User #45\" where 45 is that
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brick
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lorin Thwaits