flex_columns 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -7
 - data/CHANGES.md +6 -0
 - data/lib/flex_columns/active_record/base.rb +15 -0
 - data/lib/flex_columns/has_flex_columns.rb +6 -12
 - data/lib/flex_columns/including/include_flex_columns.rb +3 -19
 - data/lib/flex_columns/version.rb +1 -1
 - data/spec/flex_columns/system/dynamism_system_spec.rb +11 -0
 - data/spec/flex_columns/unit/has_flex_columns_spec.rb +27 -32
 - data/spec/flex_columns/unit/including/include_flex_columns_spec.rb +4 -19
 - metadata +78 -154
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            ---
         
     | 
| 
       2 
     | 
    
         
            -
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
       5 
     | 
    
         
            -
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 1 
     | 
    
         
            +
            --- 
         
     | 
| 
      
 2 
     | 
    
         
            +
            SHA1: 
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 6beca81659e3d23049cba155f6991641af01d31e
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 5c476c72d15bd39871ae3e46bbab7b9d9b66d40c
         
     | 
| 
      
 5 
     | 
    
         
            +
            SHA512: 
         
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: e33340f20bc94ab8aa1e097a0533ea6e03ad019fe53f9dfee95dbf78997f3a450bb24f72118278f38cee8822bb4280398a9bd5d8439392f829e51c6de503dfc2
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 08aeb48a67d3b06146e9ccf1a39e210d55e0ade0f4a82ddbad1f7303d21cfe409831513bfc4b11533f7f418540f045ae362828ab10cc8f2d89ae6e421838382a
         
     | 
    
        data/CHANGES.md
    ADDED
    
    | 
         @@ -0,0 +1,6 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # `flex_columns` Changelog
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            ## 1.0.4, 2014-03-31
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            * Fixed an incompatibility with Rails 4.0.3 or 4.0.4 due to a change in the way ActiveRecord::Base#method missing works. The way we were handling this (by double-implementing `_flex_column_object_for` and trying to use `super` to delegate one to the other) was pretty gross, anyway; this fix is much more solid.
         
     | 
| 
      
 6 
     | 
    
         
            +
            * Fixed a problem where `flex_columns` would raise an exception if the underlying table didn't exist. This could cause problems trying to migrate a table into existence when its model already existed and declared a flex column.
         
     | 
| 
         @@ -12,6 +12,21 @@ module FlexColumns 
     | 
|
| 
       12 
12 
     | 
    
         
             
                module Base
         
     | 
| 
       13 
13 
     | 
    
         
             
                  extend ActiveSupport::Concern
         
     | 
| 
       14 
14 
     | 
    
         | 
| 
      
 15 
     | 
    
         
            +
                  # There are two ways you can end up with a flex-column object for a particular column name: either because your
         
     | 
| 
      
 16 
     | 
    
         
            +
                  # model class declared that column as a flex column directly, or because you included flex columns from a model
         
     | 
| 
      
 17 
     | 
    
         
            +
                  # that has that column declared as a flex column. This method allows us to dispatch to either, and correctly
         
     | 
| 
      
 18 
     | 
    
         
            +
                  # returns the 'owned' object in preference if necessary.
         
     | 
| 
      
 19 
     | 
    
         
            +
                  #
         
     | 
| 
      
 20 
     | 
    
         
            +
                  # We used to use some complex magic with +super+ and defined a method of this name both in
         
     | 
| 
      
 21 
     | 
    
         
            +
                  # FlexColumns::Including::IncludeFlexColumns and FlexColumns::HasFlexColumns, but Rails 4.0.3 or 4.0.4 broke that
         
     | 
| 
      
 22 
     | 
    
         
            +
                  # due to some rejiggery in ActiveRecord::Base#method_missing. This seems like a significantly cleaner approach
         
     | 
| 
      
 23 
     | 
    
         
            +
                  # anyway.
         
     | 
| 
      
 24 
     | 
    
         
            +
                  def _flex_column_object_for(column_name, create_if_needed = true)
         
     | 
| 
      
 25 
     | 
    
         
            +
                    return _flex_column_owned_object_for(column_name, create_if_needed) if respond_to?(:_flex_column_owned_object_for)
         
     | 
| 
      
 26 
     | 
    
         
            +
                    return _flex_column_included_object_for(column_name) if respond_to?(:_flex_column_included_object_for)
         
     | 
| 
      
 27 
     | 
    
         
            +
                    raise "FlexColumns: class #{self.class.name} seems to have no flex-column object for column #{column_name.inspect}, even though it internally asked for one; this is almost certainly a bug in the FlexColumns RubyGem. Please report it, and accept our apologies."
         
     | 
| 
      
 28 
     | 
    
         
            +
                  end
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
       15 
30 
     | 
    
         
             
                  module ClassMethods
         
     | 
| 
       16 
31 
     | 
    
         
             
                    # Does this class have any flex columns? FlexColumns::HasFlexColumns overrides this to return +true+.
         
     | 
| 
       17 
32 
     | 
    
         
             
                    def has_any_flex_columns?
         
     | 
| 
         @@ -45,18 +45,10 @@ module FlexColumns 
     | 
|
| 
       45 
45 
     | 
    
         
             
                # Returns the correct flex-column object for the given column name. This simply creates an instance of the
         
     | 
| 
       46 
46 
     | 
    
         
             
                # appropriate flex-column class, and saves it away so it will be returned again if someone requests the object for
         
     | 
| 
       47 
47 
     | 
    
         
             
                # the same column later.
         
     | 
| 
       48 
     | 
    
         
            -
                 
     | 
| 
       49 
     | 
    
         
            -
             
     | 
| 
       50 
     | 
    
         
            -
             
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
                  begin
         
     | 
| 
       53 
     | 
    
         
            -
                    return super(column_name)
         
     | 
| 
       54 
     | 
    
         
            -
                  rescue NoMethodError
         
     | 
| 
       55 
     | 
    
         
            -
                    # ok
         
     | 
| 
       56 
     | 
    
         
            -
                  rescue FlexColumns::Errors::NoSuchColumnError
         
     | 
| 
       57 
     | 
    
         
            -
                    # ok
         
     | 
| 
       58 
     | 
    
         
            -
                  end
         
     | 
| 
       59 
     | 
    
         
            -
             
     | 
| 
      
 48 
     | 
    
         
            +
                #
         
     | 
| 
      
 49 
     | 
    
         
            +
                # This method almost never gets invoked directly; instead, everything calls it via
         
     | 
| 
      
 50 
     | 
    
         
            +
                # FlexColumns::ActiveRecord::Base#_flex_column_object_for.
         
     | 
| 
      
 51 
     | 
    
         
            +
                def _flex_column_owned_object_for(column_name, create_if_needed = true)
         
     | 
| 
       60 
52 
     | 
    
         
             
                  column_name = self.class._flex_column_normalize_name(column_name)
         
     | 
| 
       61 
53 
     | 
    
         | 
| 
       62 
54 
     | 
    
         
             
                  out = _flex_column_objects[column_name]
         
     | 
| 
         @@ -185,6 +177,8 @@ it has flex columns named: #{_all_flex_column_names.sort_by(&:to_s).inspect}.} 
     | 
|
| 
       185 
177 
     | 
    
         
             
                  # FlexColumns::Definition::FlexColumnContentsClass#setup!, and so can contain any of the options that that method
         
     | 
| 
       186 
178 
     | 
    
         
             
                  # accepts. The block, if passed, will be evaluated in the context of the generated class.
         
     | 
| 
       187 
179 
     | 
    
         
             
                  def flex_column(flex_column_name, options = { }, &block)
         
     | 
| 
      
 180 
     | 
    
         
            +
                    return unless table_exists?
         
     | 
| 
      
 181 
     | 
    
         
            +
             
     | 
| 
       188 
182 
     | 
    
         
             
                    flex_column_name = _flex_column_normalize_name(flex_column_name)
         
     | 
| 
       189 
183 
     | 
    
         | 
| 
       190 
184 
     | 
    
         
             
                    new_class = Class.new(FlexColumns::Contents::FlexColumnContentsBase)
         
     | 
| 
         @@ -49,7 +49,8 @@ module FlexColumns 
     | 
|
| 
       49 
49 
     | 
    
         
             
                  # Make sure our ClassMethods module gets +extend+ed into any class that +include+s us.
         
     | 
| 
       50 
50 
     | 
    
         
             
                  extend ActiveSupport::Concern
         
     | 
| 
       51 
51 
     | 
    
         | 
| 
       52 
     | 
    
         
            -
                  # This is the method that gets called by generated delegated methods 
     | 
| 
      
 52 
     | 
    
         
            +
                  # This is the method that gets called by generated delegated methods via
         
     | 
| 
      
 53 
     | 
    
         
            +
                  # FlexColumns::ActiveRecord::Base#_flex_column_object_for, and called in order to retrieve the
         
     | 
| 
       53 
54 
     | 
    
         
             
                  # correct flex-column object for a column. In other words, the generated method User#background_color looks
         
     | 
| 
       54 
55 
     | 
    
         
             
                  # something like:
         
     | 
| 
       55 
56 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -57,24 +58,7 @@ module FlexColumns 
     | 
|
| 
       57 
58 
     | 
    
         
             
                  #       flex_column_object = _flex_column_object_for(:details)
         
     | 
| 
       58 
59 
     | 
    
         
             
                  #       flex_column_object.background_color
         
     | 
| 
       59 
60 
     | 
    
         
             
                  #     end
         
     | 
| 
       60 
     | 
    
         
            -
                   
     | 
| 
       61 
     | 
    
         
            -
                  # (We do this partially so that the exact same method definition works for UserDetail and for User; _i.e._,
         
     | 
| 
       62 
     | 
    
         
            -
                  # whether you're running on a class that itself has a flex column, or on a class that simply is including another
         
     | 
| 
       63 
     | 
    
         
            -
                  # class's flex columns, #_flex_column_object_for will get you the right object.)
         
     | 
| 
       64 
     | 
    
         
            -
                  #
         
     | 
| 
       65 
     | 
    
         
            -
                  # There's only one nasty case to deal with here: what if User has its own flex column +detail+? In such a case, we
         
     | 
| 
       66 
     | 
    
         
            -
                  # want to return the flex-column object that's defined for the column the class has itself, not for the one it's
         
     | 
| 
       67 
     | 
    
         
            -
                  # including.
         
     | 
| 
       68 
     | 
    
         
            -
                  def _flex_column_object_for(column_name)
         
     | 
| 
       69 
     | 
    
         
            -
                    # This is the "nasty case", above.
         
     | 
| 
       70 
     | 
    
         
            -
                    begin
         
     | 
| 
       71 
     | 
    
         
            -
                      return super(column_name)
         
     | 
| 
       72 
     | 
    
         
            -
                    rescue NoMethodError
         
     | 
| 
       73 
     | 
    
         
            -
                      # ok
         
     | 
| 
       74 
     | 
    
         
            -
                    rescue FlexColumns::Errors::NoSuchColumnError
         
     | 
| 
       75 
     | 
    
         
            -
                      # ok
         
     | 
| 
       76 
     | 
    
         
            -
                    end
         
     | 
| 
       77 
     | 
    
         
            -
             
     | 
| 
      
 61 
     | 
    
         
            +
                  def _flex_column_included_object_for(column_name)
         
     | 
| 
       78 
62 
     | 
    
         
             
                    # Fetch the association that this column is included from.
         
     | 
| 
       79 
63 
     | 
    
         
             
                    association = self.class._flex_column_is_included_from(column_name)
         
     | 
| 
       80 
64 
     | 
    
         | 
    
        data/lib/flex_columns/version.rb
    CHANGED
    
    
| 
         @@ -15,6 +15,17 @@ describe "FlexColumns basic operations" do 
     | 
|
| 
       15 
15 
     | 
    
         
             
                drop_standard_system_spec_tables!
         
     | 
| 
       16 
16 
     | 
    
         
             
              end
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
      
 18 
     | 
    
         
            +
              it "should not blow up if the underlying table doesn't exist" do
         
     | 
| 
      
 19 
     | 
    
         
            +
                class ::Foo < ::ActiveRecord::Base
         
     | 
| 
      
 20 
     | 
    
         
            +
                  self.table_name = 'flexcols_does_not_exist'
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
                  flex_column :foo do
         
     | 
| 
      
 23 
     | 
    
         
            +
                    field :att1
         
     | 
| 
      
 24 
     | 
    
         
            +
                    field :att2
         
     | 
| 
      
 25 
     | 
    
         
            +
                  end
         
     | 
| 
      
 26 
     | 
    
         
            +
                end
         
     | 
| 
      
 27 
     | 
    
         
            +
              end
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
       18 
29 
     | 
    
         
             
              it "should let you redefine flex columns, and obey the new settings" do
         
     | 
| 
       19 
30 
     | 
    
         
             
                class ::User < ::ActiveRecord::Base
         
     | 
| 
       20 
31 
     | 
    
         
             
                  self.table_name = 'flexcols_spec_users'
         
     | 
| 
         @@ -26,6 +26,14 @@ describe FlexColumns::HasFlexColumns do 
     | 
|
| 
       26 
26 
     | 
    
         
             
                    def before_save_calls
         
     | 
| 
       27 
27 
     | 
    
         
             
                      @_before_save_calls
         
     | 
| 
       28 
28 
     | 
    
         
             
                    end
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                    def table_exists?
         
     | 
| 
      
 31 
     | 
    
         
            +
                      true
         
     | 
| 
      
 32 
     | 
    
         
            +
                    end
         
     | 
| 
      
 33 
     | 
    
         
            +
                  end
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
                  def _flex_column_object_for(column_name, create_if_needed = true)
         
     | 
| 
      
 36 
     | 
    
         
            +
                    _flex_column_owned_object_for(column_name, create_if_needed)
         
     | 
| 
       29 
37 
     | 
    
         
             
                  end
         
     | 
| 
       30 
38 
     | 
    
         
             
                end
         
     | 
| 
       31 
39 
     | 
    
         | 
| 
         @@ -52,6 +60,11 @@ describe FlexColumns::HasFlexColumns do 
     | 
|
| 
       52 
60 
     | 
    
         
             
              end
         
     | 
| 
       53 
61 
     | 
    
         | 
| 
       54 
62 
     | 
    
         
             
              describe "#flex_column" do
         
     | 
| 
      
 63 
     | 
    
         
            +
                it "should do nothing if the table doesn't exist" do
         
     | 
| 
      
 64 
     | 
    
         
            +
                  allow(@klass).to receive(:table_exists?).with().and_return(false)
         
     | 
| 
      
 65 
     | 
    
         
            +
                  @klass.flex_column('foo')
         
     | 
| 
      
 66 
     | 
    
         
            +
                end
         
     | 
| 
      
 67 
     | 
    
         
            +
             
     | 
| 
       55 
68 
     | 
    
         
             
                it "should normalize the name of the column" do
         
     | 
| 
       56 
69 
     | 
    
         
             
                  fcc = double("fcc")
         
     | 
| 
       57 
70 
     | 
    
         
             
                  expect(Class).to receive(:new).once.with(FlexColumns::Contents::FlexColumnContentsBase).and_return(fcc)
         
     | 
| 
         @@ -225,7 +238,7 @@ describe FlexColumns::HasFlexColumns do 
     | 
|
| 
       225 
238 
     | 
    
         | 
| 
       226 
239 
     | 
    
         
             
                  fcc_foo_instance = double("fcc_foo_instance")
         
     | 
| 
       227 
240 
     | 
    
         
             
                  expect(@fcc_foo).to receive(:new).once.with(instance).and_return(fcc_foo_instance)
         
     | 
| 
       228 
     | 
    
         
            -
                  instance. 
     | 
| 
      
 241 
     | 
    
         
            +
                  instance._flex_column_owned_object_for(:foo).should be(fcc_foo_instance)
         
     | 
| 
       229 
242 
     | 
    
         
             
                  allow(fcc_foo_instance).to receive(:deserialized?).with().and_return(false)
         
     | 
| 
       230 
243 
     | 
    
         | 
| 
       231 
244 
     | 
    
         
             
                  expect(fcc_foo_instance).to receive(:before_validation!).once.with()
         
     | 
| 
         @@ -234,7 +247,7 @@ describe FlexColumns::HasFlexColumns do 
     | 
|
| 
       234 
247 
     | 
    
         | 
| 
       235 
248 
     | 
    
         
             
                  fcc_bar_instance = double("fcc_bar_instance")
         
     | 
| 
       236 
249 
     | 
    
         
             
                  expect(@fcc_bar).to receive(:new).once.with(instance).and_return(fcc_bar_instance)
         
     | 
| 
       237 
     | 
    
         
            -
                  instance. 
     | 
| 
      
 250 
     | 
    
         
            +
                  instance._flex_column_owned_object_for(:bar).should be(fcc_bar_instance)
         
     | 
| 
       238 
251 
     | 
    
         
             
                  allow(fcc_bar_instance).to receive(:deserialized?).with().and_return(true)
         
     | 
| 
       239 
252 
     | 
    
         | 
| 
       240 
253 
     | 
    
         
             
                  expect(fcc_foo_instance).to receive(:before_validation!).once.with()
         
     | 
| 
         @@ -257,7 +270,7 @@ describe FlexColumns::HasFlexColumns do 
     | 
|
| 
       257 
270 
     | 
    
         | 
| 
       258 
271 
     | 
    
         
             
                  fcc_foo_instance = double("fcc_foo_instance")
         
     | 
| 
       259 
272 
     | 
    
         
             
                  expect(@fcc_foo).to receive(:new).once.with(instance).and_return(fcc_foo_instance)
         
     | 
| 
       260 
     | 
    
         
            -
                  instance. 
     | 
| 
      
 273 
     | 
    
         
            +
                  instance._flex_column_owned_object_for(:foo).should be(fcc_foo_instance)
         
     | 
| 
       261 
274 
     | 
    
         
             
                  allow(@fcc_foo).to receive(:requires_serialization_on_save?).with(instance).and_return(false)
         
     | 
| 
       262 
275 
     | 
    
         | 
| 
       263 
276 
     | 
    
         
             
                  instance._flex_columns_before_save!
         
     | 
| 
         @@ -265,7 +278,7 @@ describe FlexColumns::HasFlexColumns do 
     | 
|
| 
       265 
278 
     | 
    
         | 
| 
       266 
279 
     | 
    
         
             
                  fcc_bar_instance = double("fcc_bar_instance")
         
     | 
| 
       267 
280 
     | 
    
         
             
                  expect(@fcc_bar).to receive(:new).once.with(instance).and_return(fcc_bar_instance)
         
     | 
| 
       268 
     | 
    
         
            -
                  instance. 
     | 
| 
      
 281 
     | 
    
         
            +
                  instance._flex_column_owned_object_for(:bar).should be(fcc_bar_instance)
         
     | 
| 
       269 
282 
     | 
    
         
             
                  allow(@fcc_bar).to receive(:requires_serialization_on_save?).with(instance).and_return(true)
         
     | 
| 
       270 
283 
     | 
    
         | 
| 
       271 
284 
     | 
    
         
             
                  expect(fcc_bar_instance).to receive(:before_save!).once.with()
         
     | 
| 
         @@ -323,14 +336,14 @@ describe FlexColumns::HasFlexColumns do 
     | 
|
| 
       323 
336 
     | 
    
         | 
| 
       324 
337 
     | 
    
         
             
                  fcc_foo_instance = double("fcc_foo_instance")
         
     | 
| 
       325 
338 
     | 
    
         
             
                  expect(@fcc_foo).to receive(:new).once.with(instance).and_return(fcc_foo_instance)
         
     | 
| 
       326 
     | 
    
         
            -
                  instance. 
     | 
| 
      
 339 
     | 
    
         
            +
                  instance._flex_column_owned_object_for(:foo).should be(fcc_foo_instance)
         
     | 
| 
       327 
340 
     | 
    
         | 
| 
       328 
341 
     | 
    
         
             
                  fcc_bar_instance = double("fcc_bar_instance")
         
     | 
| 
       329 
342 
     | 
    
         
             
                  expect(@fcc_bar).to receive(:new).once.with(instance).and_return(fcc_bar_instance)
         
     | 
| 
       330 
     | 
    
         
            -
                  instance. 
     | 
| 
      
 343 
     | 
    
         
            +
                  instance._flex_column_owned_object_for(:bar).should be(fcc_bar_instance)
         
     | 
| 
       331 
344 
     | 
    
         | 
| 
       332 
     | 
    
         
            -
                  instance. 
     | 
| 
       333 
     | 
    
         
            -
                  instance. 
     | 
| 
      
 345 
     | 
    
         
            +
                  instance._flex_column_owned_object_for(:foo).should be(fcc_foo_instance)
         
     | 
| 
      
 346 
     | 
    
         
            +
                  instance._flex_column_owned_object_for(' bAr ').should be(fcc_bar_instance)
         
     | 
| 
       334 
347 
     | 
    
         
             
                end
         
     | 
| 
       335 
348 
     | 
    
         | 
| 
       336 
349 
     | 
    
         
             
                it "should re-create flex-column objects on reload, and call super and return its value" do
         
     | 
| 
         @@ -350,14 +363,14 @@ describe FlexColumns::HasFlexColumns do 
     | 
|
| 
       350 
363 
     | 
    
         | 
| 
       351 
364 
     | 
    
         
             
                  fcc_foo_instance = double("fcc_foo_instance")
         
     | 
| 
       352 
365 
     | 
    
         
             
                  expect(@fcc_foo).to receive(:new).once.with(instance).and_return(fcc_foo_instance)
         
     | 
| 
       353 
     | 
    
         
            -
                  instance. 
     | 
| 
      
 366 
     | 
    
         
            +
                  instance._flex_column_owned_object_for(:foo).should be(fcc_foo_instance)
         
     | 
| 
       354 
367 
     | 
    
         | 
| 
       355 
368 
     | 
    
         
             
                  fcc_bar_instance = double("fcc_bar_instance")
         
     | 
| 
       356 
369 
     | 
    
         
             
                  expect(@fcc_bar).to receive(:new).once.with(instance).and_return(fcc_bar_instance)
         
     | 
| 
       357 
     | 
    
         
            -
                  instance. 
     | 
| 
      
 370 
     | 
    
         
            +
                  instance._flex_column_owned_object_for(:bar).should be(fcc_bar_instance)
         
     | 
| 
       358 
371 
     | 
    
         | 
| 
       359 
     | 
    
         
            -
                  instance. 
     | 
| 
       360 
     | 
    
         
            -
                  instance. 
     | 
| 
      
 372 
     | 
    
         
            +
                  instance._flex_column_owned_object_for(:foo).should be(fcc_foo_instance)
         
     | 
| 
      
 373 
     | 
    
         
            +
                  instance._flex_column_owned_object_for(:bar).should be(fcc_bar_instance)
         
     | 
| 
       361 
374 
     | 
    
         | 
| 
       362 
375 
     | 
    
         
             
                  instance.reloads.should == 0
         
     | 
| 
       363 
376 
     | 
    
         
             
                  instance.reload.should == :reload_return_yo
         
     | 
| 
         @@ -365,11 +378,11 @@ describe FlexColumns::HasFlexColumns do 
     | 
|
| 
       365 
378 
     | 
    
         | 
| 
       366 
379 
     | 
    
         
             
                  fcc_foo_instance_2 = double("fcc_foo_instance_2")
         
     | 
| 
       367 
380 
     | 
    
         
             
                  expect(@fcc_foo).to receive(:new).once.with(instance).and_return(fcc_foo_instance_2)
         
     | 
| 
       368 
     | 
    
         
            -
                  instance. 
     | 
| 
      
 381 
     | 
    
         
            +
                  instance._flex_column_owned_object_for(:foo).should be(fcc_foo_instance_2)
         
     | 
| 
       369 
382 
     | 
    
         | 
| 
       370 
383 
     | 
    
         
             
                  fcc_bar_instance_2 = double("fcc_bar_instance_2")
         
     | 
| 
       371 
384 
     | 
    
         
             
                  expect(@fcc_bar).to receive(:new).once.with(instance).and_return(fcc_bar_instance_2)
         
     | 
| 
       372 
     | 
    
         
            -
                  instance. 
     | 
| 
      
 385 
     | 
    
         
            +
                  instance._flex_column_owned_object_for(:bar).should be(fcc_bar_instance_2)
         
     | 
| 
       373 
386 
     | 
    
         
             
                end
         
     | 
| 
       374 
387 
     | 
    
         | 
| 
       375 
388 
     | 
    
         
             
                it "should tell you what flex-column names have been defined" do
         
     | 
| 
         @@ -407,22 +420,4 @@ describe FlexColumns::HasFlexColumns do 
     | 
|
| 
       407 
420 
     | 
    
         
             
                  @klass.create_flex_objects_from(:bar, [ nil, " JSON string " ]).should == [ fcc_bar_instance_1, fcc_bar_instance_2 ]
         
     | 
| 
       408 
421 
     | 
    
         
             
                end
         
     | 
| 
       409 
422 
     | 
    
         
             
              end
         
     | 
| 
       410 
     | 
    
         
            -
             
     | 
| 
       411 
     | 
    
         
            -
              describe "flex-column objects" do
         
     | 
| 
       412 
     | 
    
         
            -
                it "should prefer to just return super from _flex_column_object_for" do
         
     | 
| 
       413 
     | 
    
         
            -
                  superclass = Class.new do
         
     | 
| 
       414 
     | 
    
         
            -
                    def _flex_column_object_for(x)
         
     | 
| 
       415 
     | 
    
         
            -
                      "A_#{x}_Z"
         
     | 
| 
       416 
     | 
    
         
            -
                    end
         
     | 
| 
       417 
     | 
    
         
            -
                  end
         
     | 
| 
       418 
     | 
    
         
            -
             
     | 
| 
       419 
     | 
    
         
            -
                  subclass = Class.new(superclass)
         
     | 
| 
       420 
     | 
    
         
            -
                  allow(subclass).to receive(:before_validation).with(:_flex_columns_before_validation!)
         
     | 
| 
       421 
     | 
    
         
            -
                  allow(subclass).to receive(:before_save).with(:_flex_columns_before_save!)
         
     | 
| 
       422 
     | 
    
         
            -
                  subclass.send(:include, FlexColumns::HasFlexColumns)
         
     | 
| 
       423 
     | 
    
         
            -
             
     | 
| 
       424 
     | 
    
         
            -
                  instance = subclass.new
         
     | 
| 
       425 
     | 
    
         
            -
                  instance._flex_column_object_for(:foo).should == "A_foo_Z"
         
     | 
| 
       426 
     | 
    
         
            -
                end
         
     | 
| 
       427 
     | 
    
         
            -
              end
         
     | 
| 
       428 
423 
     | 
    
         
             
            end
         
     | 
| 
         @@ -5,28 +5,13 @@ describe FlexColumns::Including::IncludeFlexColumns do 
     | 
|
| 
       5 
5 
     | 
    
         
             
                @klass = Class.new { include FlexColumns::Including::IncludeFlexColumns }
         
     | 
| 
       6 
6 
     | 
    
         
             
              end
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
     | 
    
         
            -
              describe "# 
     | 
| 
       9 
     | 
    
         
            -
                it "should return the superclass value if it has one" do
         
     | 
| 
       10 
     | 
    
         
            -
                  superclass = Class.new do
         
     | 
| 
       11 
     | 
    
         
            -
                    def _flex_column_object_for(column_name)
         
     | 
| 
       12 
     | 
    
         
            -
                      "XX#{column_name}YY"
         
     | 
| 
       13 
     | 
    
         
            -
                    end
         
     | 
| 
       14 
     | 
    
         
            -
                  end
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
                  klass = Class.new(superclass) do
         
     | 
| 
       17 
     | 
    
         
            -
                    include FlexColumns::Including::IncludeFlexColumns
         
     | 
| 
       18 
     | 
    
         
            -
                  end
         
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
                  instance = klass.new
         
     | 
| 
       21 
     | 
    
         
            -
                  instance._flex_column_object_for("foobar").should == "XXfoobarYY"
         
     | 
| 
       22 
     | 
    
         
            -
                end
         
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
      
 8 
     | 
    
         
            +
              describe "#_flex_column_included_object_for" do
         
     | 
| 
       24 
9 
     | 
    
         
             
                it "should raise an error if there is no appropriate association" do
         
     | 
| 
       25 
10 
     | 
    
         
             
                  allow(@klass).to receive(:_flex_column_is_included_from).with(:foo).and_return(nil)
         
     | 
| 
       26 
11 
     | 
    
         
             
                  allow(@klass).to receive(:name).with().and_return("klassname")
         
     | 
| 
       27 
12 
     | 
    
         
             
                  instance = @klass.new
         
     | 
| 
       28 
13 
     | 
    
         | 
| 
       29 
     | 
    
         
            -
                  lambda { instance. 
     | 
| 
      
 14 
     | 
    
         
            +
                  lambda { instance._flex_column_included_object_for(:foo) }.should raise_error(FlexColumns::Errors::NoSuchColumnError, /klassname.*foo/i)
         
     | 
| 
       30 
15 
     | 
    
         
             
                end
         
     | 
| 
       31 
16 
     | 
    
         | 
| 
       32 
17 
     | 
    
         
             
                it "should invoke the right method on the right object if the association is already there" do
         
     | 
| 
         @@ -37,7 +22,7 @@ describe FlexColumns::Including::IncludeFlexColumns do 
     | 
|
| 
       37 
22 
     | 
    
         
             
                  allow(instance).to receive(:assocname).with().and_return(association_object)
         
     | 
| 
       38 
23 
     | 
    
         
             
                  allow(association_object).to receive(:colname).and_return(:baz)
         
     | 
| 
       39 
24 
     | 
    
         | 
| 
       40 
     | 
    
         
            -
                  instance. 
     | 
| 
      
 25 
     | 
    
         
            +
                  instance._flex_column_included_object_for(:colname).should == :baz
         
     | 
| 
       41 
26 
     | 
    
         
             
                end
         
     | 
| 
       42 
27 
     | 
    
         | 
| 
       43 
28 
     | 
    
         
             
                it "should create the associated object if necessary" do
         
     | 
| 
         @@ -49,7 +34,7 @@ describe FlexColumns::Including::IncludeFlexColumns do 
     | 
|
| 
       49 
34 
     | 
    
         
             
                  allow(instance).to receive(:build_assocname).with().and_return(association_object)
         
     | 
| 
       50 
35 
     | 
    
         
             
                  allow(association_object).to receive(:colname).and_return(:baz)
         
     | 
| 
       51 
36 
     | 
    
         | 
| 
       52 
     | 
    
         
            -
                  instance. 
     | 
| 
      
 37 
     | 
    
         
            +
                  instance._flex_column_included_object_for(:colname).should == :baz
         
     | 
| 
       53 
38 
     | 
    
         
             
                end
         
     | 
| 
       54 
39 
     | 
    
         
             
              end
         
     | 
| 
       55 
40 
     | 
    
         | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,176 +1,102 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            --- !ruby/object:Gem::Specification
         
     | 
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification 
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: flex_columns
         
     | 
| 
       3 
     | 
    
         
            -
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.0. 
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version 
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.0.4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
     | 
    
         
            -
            authors:
         
     | 
| 
      
 6 
     | 
    
         
            +
            authors: 
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Andrew Geweke
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2014-03-31 00:00:00 Z
         
     | 
| 
      
 13 
     | 
    
         
            +
            dependencies: 
         
     | 
| 
      
 14 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       14 
15 
     | 
    
         
             
              name: json
         
     | 
| 
       15 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       16 
     | 
    
         
            -
                requirements:
         
     | 
| 
       17 
     | 
    
         
            -
                - - '>='
         
     | 
| 
       18 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       19 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
       20 
     | 
    
         
            -
              type: :runtime
         
     | 
| 
       21 
16 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       22 
     | 
    
         
            -
               
     | 
| 
       23 
     | 
    
         
            -
                requirements:
         
     | 
| 
       24 
     | 
    
         
            -
                -  
     | 
| 
       25 
     | 
    
         
            -
                  -  
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
      
 17 
     | 
    
         
            +
              requirement: &id001 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 18 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 19 
     | 
    
         
            +
                - &id003 
         
     | 
| 
      
 20 
     | 
    
         
            +
                  - ">="
         
     | 
| 
      
 21 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 22 
     | 
    
         
            +
                    version: "0"
         
     | 
| 
      
 23 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 24 
     | 
    
         
            +
              version_requirements: *id001
         
     | 
| 
      
 25 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       28 
26 
     | 
    
         
             
              name: bundler
         
     | 
| 
       29 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       30 
     | 
    
         
            -
                requirements:
         
     | 
| 
       31 
     | 
    
         
            -
                - - ~>
         
     | 
| 
       32 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       33 
     | 
    
         
            -
                    version: '1.3'
         
     | 
| 
       34 
     | 
    
         
            -
              type: :development
         
     | 
| 
       35 
27 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       36 
     | 
    
         
            -
               
     | 
| 
       37 
     | 
    
         
            -
                requirements:
         
     | 
| 
      
 28 
     | 
    
         
            +
              requirement: &id002 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 29 
     | 
    
         
            +
                requirements: 
         
     | 
| 
       38 
30 
     | 
    
         
             
                - - ~>
         
     | 
| 
       39 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       40 
     | 
    
         
            -
                    version:  
     | 
| 
       41 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency
         
     | 
| 
       42 
     | 
    
         
            -
              name: rake
         
     | 
| 
       43 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       44 
     | 
    
         
            -
                requirements:
         
     | 
| 
       45 
     | 
    
         
            -
                - - '>='
         
     | 
| 
       46 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       47 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
      
 31 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 32 
     | 
    
         
            +
                    version: "1.3"
         
     | 
| 
       48 
33 
     | 
    
         
             
              type: :development
         
     | 
| 
      
 34 
     | 
    
         
            +
              version_requirements: *id002
         
     | 
| 
      
 35 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 36 
     | 
    
         
            +
              name: rake
         
     | 
| 
       49 
37 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       50 
     | 
    
         
            -
               
     | 
| 
       51 
     | 
    
         
            -
                requirements:
         
     | 
| 
       52 
     | 
    
         
            -
                -  
     | 
| 
       53 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       54 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
       55 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency
         
     | 
| 
       56 
     | 
    
         
            -
              name: rspec
         
     | 
| 
       57 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       58 
     | 
    
         
            -
                requirements:
         
     | 
| 
       59 
     | 
    
         
            -
                - - ~>
         
     | 
| 
       60 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       61 
     | 
    
         
            -
                    version: '2.14'
         
     | 
| 
      
 38 
     | 
    
         
            +
              requirement: &id004 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 39 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 40 
     | 
    
         
            +
                - *id003
         
     | 
| 
       62 
41 
     | 
    
         
             
              type: :development
         
     | 
| 
      
 42 
     | 
    
         
            +
              version_requirements: *id004
         
     | 
| 
      
 43 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 44 
     | 
    
         
            +
              name: rspec
         
     | 
| 
       63 
45 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       64 
     | 
    
         
            -
               
     | 
| 
       65 
     | 
    
         
            -
                requirements:
         
     | 
| 
      
 46 
     | 
    
         
            +
              requirement: &id005 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 47 
     | 
    
         
            +
                requirements: 
         
     | 
| 
       66 
48 
     | 
    
         
             
                - - ~>
         
     | 
| 
       67 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       68 
     | 
    
         
            -
                    version:  
     | 
| 
       69 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency
         
     | 
| 
       70 
     | 
    
         
            -
              name: pry
         
     | 
| 
       71 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       72 
     | 
    
         
            -
                requirements:
         
     | 
| 
       73 
     | 
    
         
            -
                - - '>='
         
     | 
| 
       74 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       75 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
       76 
     | 
    
         
            -
              type: :development
         
     | 
| 
       77 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       78 
     | 
    
         
            -
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       79 
     | 
    
         
            -
                requirements:
         
     | 
| 
       80 
     | 
    
         
            -
                - - '>='
         
     | 
| 
       81 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       82 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
       83 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency
         
     | 
| 
       84 
     | 
    
         
            -
              name: pry-debugger
         
     | 
| 
       85 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       86 
     | 
    
         
            -
                requirements:
         
     | 
| 
       87 
     | 
    
         
            -
                - - '>='
         
     | 
| 
       88 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       89 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
       90 
     | 
    
         
            -
              type: :development
         
     | 
| 
       91 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       92 
     | 
    
         
            -
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       93 
     | 
    
         
            -
                requirements:
         
     | 
| 
       94 
     | 
    
         
            -
                - - '>='
         
     | 
| 
       95 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       96 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
       97 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency
         
     | 
| 
       98 
     | 
    
         
            -
              name: pry-stack_explorer
         
     | 
| 
       99 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       100 
     | 
    
         
            -
                requirements:
         
     | 
| 
       101 
     | 
    
         
            -
                - - '>='
         
     | 
| 
       102 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       103 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
      
 49 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 50 
     | 
    
         
            +
                    version: "2.14"
         
     | 
| 
       104 
51 
     | 
    
         
             
              type: :development
         
     | 
| 
       105 
     | 
    
         
            -
               
     | 
| 
       106 
     | 
    
         
            -
             
     | 
| 
       107 
     | 
    
         
            -
                requirements:
         
     | 
| 
       108 
     | 
    
         
            -
                - - '>='
         
     | 
| 
       109 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       110 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
       111 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 52 
     | 
    
         
            +
              version_requirements: *id005
         
     | 
| 
      
 53 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       112 
54 
     | 
    
         
             
              name: activerecord
         
     | 
| 
       113 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       114 
     | 
    
         
            -
                requirements:
         
     | 
| 
       115 
     | 
    
         
            -
                - - '>='
         
     | 
| 
       116 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       117 
     | 
    
         
            -
                    version: '3.0'
         
     | 
| 
       118 
     | 
    
         
            -
                - - <=
         
     | 
| 
       119 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       120 
     | 
    
         
            -
                    version: 4.99.99
         
     | 
| 
       121 
     | 
    
         
            -
              type: :runtime
         
     | 
| 
       122 
55 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       123 
     | 
    
         
            -
               
     | 
| 
       124 
     | 
    
         
            -
                requirements:
         
     | 
| 
       125 
     | 
    
         
            -
                - -  
     | 
| 
       126 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       127 
     | 
    
         
            -
                    version:  
     | 
| 
       128 
     | 
    
         
            -
                - - <=
         
     | 
| 
       129 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       130 
     | 
    
         
            -
                    version: 4.99.99
         
     | 
| 
       131 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency
         
     | 
| 
       132 
     | 
    
         
            -
              name: activesupport
         
     | 
| 
       133 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       134 
     | 
    
         
            -
                requirements:
         
     | 
| 
       135 
     | 
    
         
            -
                - - '>='
         
     | 
| 
       136 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       137 
     | 
    
         
            -
                    version: '3.0'
         
     | 
| 
      
 56 
     | 
    
         
            +
              requirement: &id006 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 57 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 58 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 59 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 60 
     | 
    
         
            +
                    version: "3.0"
         
     | 
| 
       138 
61 
     | 
    
         
             
                - - <=
         
     | 
| 
       139 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 62 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
       140 
63 
     | 
    
         
             
                    version: 4.99.99
         
     | 
| 
       141 
64 
     | 
    
         
             
              type: :runtime
         
     | 
| 
      
 65 
     | 
    
         
            +
              version_requirements: *id006
         
     | 
| 
      
 66 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 67 
     | 
    
         
            +
              name: activesupport
         
     | 
| 
       142 
68 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       143 
     | 
    
         
            -
               
     | 
| 
       144 
     | 
    
         
            -
                requirements:
         
     | 
| 
       145 
     | 
    
         
            -
                - -  
     | 
| 
       146 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       147 
     | 
    
         
            -
                    version:  
     | 
| 
      
 69 
     | 
    
         
            +
              requirement: &id007 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 70 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 71 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 72 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 73 
     | 
    
         
            +
                    version: "3.0"
         
     | 
| 
       148 
74 
     | 
    
         
             
                - - <=
         
     | 
| 
       149 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 75 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
       150 
76 
     | 
    
         
             
                    version: 4.99.99
         
     | 
| 
       151 
     | 
    
         
            -
             
     | 
| 
      
 77 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 78 
     | 
    
         
            +
              version_requirements: *id007
         
     | 
| 
      
 79 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       152 
80 
     | 
    
         
             
              name: mysql2
         
     | 
| 
       153 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       154 
     | 
    
         
            -
                requirements:
         
     | 
| 
       155 
     | 
    
         
            -
                - - '>='
         
     | 
| 
       156 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       157 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
       158 
     | 
    
         
            -
              type: :development
         
     | 
| 
       159 
81 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       160 
     | 
    
         
            -
               
     | 
| 
       161 
     | 
    
         
            -
                requirements:
         
     | 
| 
       162 
     | 
    
         
            -
                -  
     | 
| 
       163 
     | 
    
         
            -
             
     | 
| 
       164 
     | 
    
         
            -
             
     | 
| 
      
 82 
     | 
    
         
            +
              requirement: &id008 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 83 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 84 
     | 
    
         
            +
                - *id003
         
     | 
| 
      
 85 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 86 
     | 
    
         
            +
              version_requirements: *id008
         
     | 
| 
       165 
87 
     | 
    
         
             
            description: Schema-free, structured JSON storage inside a RDBMS.
         
     | 
| 
       166 
     | 
    
         
            -
            email:
         
     | 
| 
      
 88 
     | 
    
         
            +
            email: 
         
     | 
| 
       167 
89 
     | 
    
         
             
            - andrew@geweke.org
         
     | 
| 
       168 
90 
     | 
    
         
             
            executables: []
         
     | 
| 
      
 91 
     | 
    
         
            +
             
     | 
| 
       169 
92 
     | 
    
         
             
            extensions: []
         
     | 
| 
      
 93 
     | 
    
         
            +
             
     | 
| 
       170 
94 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       171 
     | 
    
         
            -
             
     | 
| 
      
 95 
     | 
    
         
            +
             
     | 
| 
      
 96 
     | 
    
         
            +
            files: 
         
     | 
| 
       172 
97 
     | 
    
         
             
            - .gitignore
         
     | 
| 
       173 
98 
     | 
    
         
             
            - .travis.yml
         
     | 
| 
      
 99 
     | 
    
         
            +
            - CHANGES.md
         
     | 
| 
       174 
100 
     | 
    
         
             
            - Gemfile
         
     | 
| 
       175 
101 
     | 
    
         
             
            - LICENSE.txt
         
     | 
| 
       176 
102 
     | 
    
         
             
            - README.md
         
     | 
| 
         @@ -218,30 +144,29 @@ files: 
     | 
|
| 
       218 
144 
     | 
    
         
             
            - spec/flex_columns/unit/util/dynamic_methods_module_spec.rb
         
     | 
| 
       219 
145 
     | 
    
         
             
            - spec/flex_columns/unit/util/string_utils_spec.rb
         
     | 
| 
       220 
146 
     | 
    
         
             
            homepage: https://github.com/ageweke/flex_columns
         
     | 
| 
       221 
     | 
    
         
            -
            licenses:
         
     | 
| 
      
 147 
     | 
    
         
            +
            licenses: 
         
     | 
| 
       222 
148 
     | 
    
         
             
            - MIT
         
     | 
| 
       223 
149 
     | 
    
         
             
            metadata: {}
         
     | 
| 
      
 150 
     | 
    
         
            +
             
     | 
| 
       224 
151 
     | 
    
         
             
            post_install_message: 
         
     | 
| 
       225 
152 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       226 
     | 
    
         
            -
             
     | 
| 
      
 153 
     | 
    
         
            +
             
     | 
| 
      
 154 
     | 
    
         
            +
            require_paths: 
         
     | 
| 
       227 
155 
     | 
    
         
             
            - lib
         
     | 
| 
       228 
     | 
    
         
            -
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
       229 
     | 
    
         
            -
              requirements:
         
     | 
| 
       230 
     | 
    
         
            -
              -  
     | 
| 
       231 
     | 
    
         
            -
             
     | 
| 
       232 
     | 
    
         
            -
             
     | 
| 
       233 
     | 
    
         
            -
             
     | 
| 
       234 
     | 
    
         
            -
              requirements:
         
     | 
| 
       235 
     | 
    
         
            -
              - - '>='
         
     | 
| 
       236 
     | 
    
         
            -
                - !ruby/object:Gem::Version
         
     | 
| 
       237 
     | 
    
         
            -
                  version: '0'
         
     | 
| 
      
 156 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement 
         
     | 
| 
      
 157 
     | 
    
         
            +
              requirements: 
         
     | 
| 
      
 158 
     | 
    
         
            +
              - *id003
         
     | 
| 
      
 159 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement 
         
     | 
| 
      
 160 
     | 
    
         
            +
              requirements: 
         
     | 
| 
      
 161 
     | 
    
         
            +
              - *id003
         
     | 
| 
       238 
162 
     | 
    
         
             
            requirements: []
         
     | 
| 
      
 163 
     | 
    
         
            +
             
     | 
| 
       239 
164 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       240 
     | 
    
         
            -
            rubygems_version: 2. 
     | 
| 
      
 165 
     | 
    
         
            +
            rubygems_version: 2.0.14
         
     | 
| 
       241 
166 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       242 
167 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       243 
168 
     | 
    
         
             
            summary: Schema-free, structured JSON storage inside a RDBMS.
         
     | 
| 
       244 
     | 
    
         
            -
            test_files:
         
     | 
| 
      
 169 
     | 
    
         
            +
            test_files: 
         
     | 
| 
       245 
170 
     | 
    
         
             
            - spec/flex_columns/helpers/database_helper.rb
         
     | 
| 
       246 
171 
     | 
    
         
             
            - spec/flex_columns/helpers/exception_helpers.rb
         
     | 
| 
       247 
172 
     | 
    
         
             
            - spec/flex_columns/helpers/system_helpers.rb
         
     | 
| 
         @@ -270,4 +195,3 @@ test_files: 
     | 
|
| 
       270 
195 
     | 
    
         
             
            - spec/flex_columns/unit/including/include_flex_columns_spec.rb
         
     | 
| 
       271 
196 
     | 
    
         
             
            - spec/flex_columns/unit/util/dynamic_methods_module_spec.rb
         
     | 
| 
       272 
197 
     | 
    
         
             
            - spec/flex_columns/unit/util/string_utils_spec.rb
         
     | 
| 
       273 
     | 
    
         
            -
            has_rdoc: 
         
     |