flex_columns 1.0.0
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 -0
 - data/.gitignore +18 -0
 - data/.travis.yml +38 -0
 - data/Gemfile +17 -0
 - data/LICENSE.txt +22 -0
 - data/README.md +124 -0
 - data/Rakefile +6 -0
 - data/flex_columns.gemspec +72 -0
 - data/lib/flex_columns.rb +15 -0
 - data/lib/flex_columns/active_record/base.rb +57 -0
 - data/lib/flex_columns/contents/column_data.rb +376 -0
 - data/lib/flex_columns/contents/flex_column_contents_base.rb +188 -0
 - data/lib/flex_columns/definition/field_definition.rb +316 -0
 - data/lib/flex_columns/definition/field_set.rb +89 -0
 - data/lib/flex_columns/definition/flex_column_contents_class.rb +327 -0
 - data/lib/flex_columns/errors.rb +236 -0
 - data/lib/flex_columns/has_flex_columns.rb +187 -0
 - data/lib/flex_columns/including/include_flex_columns.rb +179 -0
 - data/lib/flex_columns/util/dynamic_methods_module.rb +86 -0
 - data/lib/flex_columns/util/string_utils.rb +31 -0
 - data/lib/flex_columns/version.rb +4 -0
 - data/spec/flex_columns/helpers/database_helper.rb +174 -0
 - data/spec/flex_columns/helpers/exception_helpers.rb +20 -0
 - data/spec/flex_columns/helpers/system_helpers.rb +47 -0
 - data/spec/flex_columns/system/basic_system_spec.rb +245 -0
 - data/spec/flex_columns/system/bulk_system_spec.rb +153 -0
 - data/spec/flex_columns/system/compression_system_spec.rb +218 -0
 - data/spec/flex_columns/system/custom_methods_system_spec.rb +120 -0
 - data/spec/flex_columns/system/delegation_system_spec.rb +175 -0
 - data/spec/flex_columns/system/dynamism_system_spec.rb +158 -0
 - data/spec/flex_columns/system/error_handling_system_spec.rb +117 -0
 - data/spec/flex_columns/system/including_system_spec.rb +285 -0
 - data/spec/flex_columns/system/json_alias_system_spec.rb +171 -0
 - data/spec/flex_columns/system/performance_system_spec.rb +218 -0
 - data/spec/flex_columns/system/postgres_json_column_type_system_spec.rb +85 -0
 - data/spec/flex_columns/system/types_system_spec.rb +93 -0
 - data/spec/flex_columns/system/unknown_fields_system_spec.rb +126 -0
 - data/spec/flex_columns/system/validations_system_spec.rb +111 -0
 - data/spec/flex_columns/unit/active_record/base_spec.rb +32 -0
 - data/spec/flex_columns/unit/contents/column_data_spec.rb +520 -0
 - data/spec/flex_columns/unit/contents/flex_column_contents_base_spec.rb +253 -0
 - data/spec/flex_columns/unit/definition/field_definition_spec.rb +617 -0
 - data/spec/flex_columns/unit/definition/field_set_spec.rb +142 -0
 - data/spec/flex_columns/unit/definition/flex_column_contents_class_spec.rb +733 -0
 - data/spec/flex_columns/unit/errors_spec.rb +297 -0
 - data/spec/flex_columns/unit/has_flex_columns_spec.rb +365 -0
 - data/spec/flex_columns/unit/including/include_flex_columns_spec.rb +144 -0
 - data/spec/flex_columns/unit/util/dynamic_methods_module_spec.rb +105 -0
 - data/spec/flex_columns/unit/util/string_utils_spec.rb +23 -0
 - metadata +286 -0
 
| 
         @@ -0,0 +1,144 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'flex_columns'
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            describe FlexColumns::Including::IncludeFlexColumns do
         
     | 
| 
      
 4 
     | 
    
         
            +
              before :each do
         
     | 
| 
      
 5 
     | 
    
         
            +
                @klass = Class.new { include FlexColumns::Including::IncludeFlexColumns }
         
     | 
| 
      
 6 
     | 
    
         
            +
              end
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
              describe "#_flex_column_object_for" do
         
     | 
| 
      
 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 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                it "should raise an error if there is no appropriate association" do
         
     | 
| 
      
 25 
     | 
    
         
            +
                  allow(@klass).to receive(:_flex_column_is_included_from).with(:foo).and_return(nil)
         
     | 
| 
      
 26 
     | 
    
         
            +
                  allow(@klass).to receive(:name).with().and_return("klassname")
         
     | 
| 
      
 27 
     | 
    
         
            +
                  instance = @klass.new
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
                  lambda { instance._flex_column_object_for(:foo) }.should raise_error(FlexColumns::Errors::NoSuchColumnError, /klassname.*foo/i)
         
     | 
| 
      
 30 
     | 
    
         
            +
                end
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                it "should invoke the right method on the right object if the association is already there" do
         
     | 
| 
      
 33 
     | 
    
         
            +
                  allow(@klass).to receive(:_flex_column_is_included_from).with(:colname).and_return(:assocname)
         
     | 
| 
      
 34 
     | 
    
         
            +
                  instance = @klass.new
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
                  association_object = double("association_object")
         
     | 
| 
      
 37 
     | 
    
         
            +
                  allow(instance).to receive(:assocname).with().and_return(association_object)
         
     | 
| 
      
 38 
     | 
    
         
            +
                  allow(association_object).to receive(:colname).and_return(:baz)
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
                  instance._flex_column_object_for(:colname).should == :baz
         
     | 
| 
      
 41 
     | 
    
         
            +
                end
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
                it "should create the associated object if necessary" do
         
     | 
| 
      
 44 
     | 
    
         
            +
                  allow(@klass).to receive(:_flex_column_is_included_from).with(:colname).and_return(:assocname)
         
     | 
| 
      
 45 
     | 
    
         
            +
                  instance = @klass.new
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
                  association_object = double("association_object")
         
     | 
| 
      
 48 
     | 
    
         
            +
                  allow(instance).to receive(:assocname).with().and_return(nil)
         
     | 
| 
      
 49 
     | 
    
         
            +
                  allow(instance).to receive(:build_assocname).with().and_return(association_object)
         
     | 
| 
      
 50 
     | 
    
         
            +
                  allow(association_object).to receive(:colname).and_return(:baz)
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
                  instance._flex_column_object_for(:colname).should == :baz
         
     | 
| 
      
 53 
     | 
    
         
            +
                end
         
     | 
| 
      
 54 
     | 
    
         
            +
              end
         
     | 
| 
      
 55 
     | 
    
         
            +
             
     | 
| 
      
 56 
     | 
    
         
            +
              it "should return a singular DynamicMethodsModule on _flex_columns_include_flex_columns_dynamic_methods_module" do
         
     | 
| 
      
 57 
     | 
    
         
            +
                dmm = double("dmm")
         
     | 
| 
      
 58 
     | 
    
         
            +
                expect(FlexColumns::Util::DynamicMethodsModule).to receive(:new).once.with(@klass, :FlexColumnsIncludedColumnsMethods).and_return(dmm)
         
     | 
| 
      
 59 
     | 
    
         
            +
                @klass._flex_columns_include_flex_columns_dynamic_methods_module.should be(dmm)
         
     | 
| 
      
 60 
     | 
    
         
            +
                @klass._flex_columns_include_flex_columns_dynamic_methods_module.should be(dmm)
         
     | 
| 
      
 61 
     | 
    
         
            +
              end
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
              describe "#include_flex_columns_from" do
         
     | 
| 
      
 64 
     | 
    
         
            +
                before :each do
         
     | 
| 
      
 65 
     | 
    
         
            +
                  @assoc1 = double("assoc1")
         
     | 
| 
      
 66 
     | 
    
         
            +
                  allow(@assoc1).to receive(:name).with().and_return(:assoc1)
         
     | 
| 
      
 67 
     | 
    
         
            +
                  allow(@assoc1).to receive(:macro).with().and_return(:has_one)
         
     | 
| 
      
 68 
     | 
    
         
            +
                  @assoc2 = double("assoc2")
         
     | 
| 
      
 69 
     | 
    
         
            +
                  allow(@assoc2).to receive(:name).with().and_return(:assoc2)
         
     | 
| 
      
 70 
     | 
    
         
            +
                  allow(@assoc2).to receive(:macro).with().and_return(:belongs_to)
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
                  allow(@klass).to receive(:reflect_on_association).with(:assoc1).and_return(@assoc1)
         
     | 
| 
      
 73 
     | 
    
         
            +
                  allow(@klass).to receive(:reflect_on_association).with(:assoc2).and_return(@assoc2)
         
     | 
| 
      
 74 
     | 
    
         
            +
             
     | 
| 
      
 75 
     | 
    
         
            +
                  allow(@klass).to receive(:reflect_on_all_associations).with().and_return([ @assoc1, @assoc2 ])
         
     | 
| 
      
 76 
     | 
    
         
            +
                end
         
     | 
| 
      
 77 
     | 
    
         
            +
             
     | 
| 
      
 78 
     | 
    
         
            +
                it "should validate its options properly" do
         
     | 
| 
      
 79 
     | 
    
         
            +
                  lambda { @klass.include_flex_columns_from(:foo, :bar => :baz) }.should raise_error(ArgumentError)
         
     | 
| 
      
 80 
     | 
    
         
            +
                  lambda { @klass.include_flex_columns_from(:foo, :prefix => 123) }.should raise_error(ArgumentError)
         
     | 
| 
      
 81 
     | 
    
         
            +
                  lambda { @klass.include_flex_columns_from(:foo, :visibility => :bonk) }.should raise_error(ArgumentError)
         
     | 
| 
      
 82 
     | 
    
         
            +
                  lambda { @klass.include_flex_columns_from(:foo, :delegate => :yes) }.should raise_error(ArgumentError)
         
     | 
| 
      
 83 
     | 
    
         
            +
                end
         
     | 
| 
      
 84 
     | 
    
         
            +
             
     | 
| 
      
 85 
     | 
    
         
            +
                it "should raise if there is no such association" do
         
     | 
| 
      
 86 
     | 
    
         
            +
                  allow(@klass).to receive(:reflect_on_association).with(:foo).and_return(nil)
         
     | 
| 
      
 87 
     | 
    
         
            +
                  lambda { @klass.include_flex_columns_from(:foo) }.should raise_error(ArgumentError, /foo.*assoc1.*assoc2/mi)
         
     | 
| 
      
 88 
     | 
    
         
            +
                end
         
     | 
| 
      
 89 
     | 
    
         
            +
             
     | 
| 
      
 90 
     | 
    
         
            +
                it "should raise if the association is of the wrong type" do
         
     | 
| 
      
 91 
     | 
    
         
            +
                  allow(@assoc1).to receive(:macro).with().and_return(:has_many)
         
     | 
| 
      
 92 
     | 
    
         
            +
                  lambda { @klass.include_flex_columns_from(:assoc1) }.should raise_error(ArgumentError, /assoc1.*has_many/mi)
         
     | 
| 
      
 93 
     | 
    
         
            +
                end
         
     | 
| 
      
 94 
     | 
    
         
            +
             
     | 
| 
      
 95 
     | 
    
         
            +
                it "should raise if the target class does not respond to #has_any_flex_columns?" do
         
     | 
| 
      
 96 
     | 
    
         
            +
                  association_class = double("association_class")
         
     | 
| 
      
 97 
     | 
    
         
            +
                  allow(association_class).to receive(:name).with().and_return("acname")
         
     | 
| 
      
 98 
     | 
    
         
            +
                  allow(@assoc2).to receive(:klass).with().and_return(association_class)
         
     | 
| 
      
 99 
     | 
    
         
            +
                  allow(association_class).to receive(:respond_to?).with(:has_any_flex_columns?).and_return(false)
         
     | 
| 
      
 100 
     | 
    
         
            +
             
     | 
| 
      
 101 
     | 
    
         
            +
                  lambda { @klass.include_flex_columns_from(:assoc2) }.should raise_error(ArgumentError, /assoc2.*acname/mi)
         
     | 
| 
      
 102 
     | 
    
         
            +
                end
         
     | 
| 
      
 103 
     | 
    
         
            +
             
     | 
| 
      
 104 
     | 
    
         
            +
                it "should raise if the target class returns false from #has_any_flex_columns?" do
         
     | 
| 
      
 105 
     | 
    
         
            +
                  association_class = double("association_class")
         
     | 
| 
      
 106 
     | 
    
         
            +
                  allow(association_class).to receive(:name).with().and_return("acname")
         
     | 
| 
      
 107 
     | 
    
         
            +
                  allow(@assoc2).to receive(:klass).with().and_return(association_class)
         
     | 
| 
      
 108 
     | 
    
         
            +
                  allow(association_class).to receive(:has_any_flex_columns?).with().and_return(false)
         
     | 
| 
      
 109 
     | 
    
         
            +
             
     | 
| 
      
 110 
     | 
    
         
            +
                  lambda { @klass.include_flex_columns_from(:assoc2) }.should raise_error(ArgumentError, /assoc2.*acname/mi)
         
     | 
| 
      
 111 
     | 
    
         
            +
                end
         
     | 
| 
      
 112 
     | 
    
         
            +
             
     | 
| 
      
 113 
     | 
    
         
            +
                it "should call through to the target flex-column class with provided options" do
         
     | 
| 
      
 114 
     | 
    
         
            +
                  dmm = double("dmm")
         
     | 
| 
      
 115 
     | 
    
         
            +
                  expect(FlexColumns::Util::DynamicMethodsModule).to receive(:new).once.with(@klass, :FlexColumnsIncludedColumnsMethods).and_return(dmm)
         
     | 
| 
      
 116 
     | 
    
         
            +
             
     | 
| 
      
 117 
     | 
    
         
            +
                  ac1 = double("ac1")
         
     | 
| 
      
 118 
     | 
    
         
            +
                  allow(@assoc1).to receive(:klass).with().and_return(ac1)
         
     | 
| 
      
 119 
     | 
    
         
            +
                  allow(ac1).to receive(:has_any_flex_columns?).with().and_return(true)
         
     | 
| 
      
 120 
     | 
    
         
            +
                  allow(ac1).to receive(:_all_flex_column_names).with().and_return([ :ac1fc1, :ac1fc2 ])
         
     | 
| 
      
 121 
     | 
    
         
            +
             
     | 
| 
      
 122 
     | 
    
         
            +
                  ac1fc1_fcc = double("ac1fc1_fcc")
         
     | 
| 
      
 123 
     | 
    
         
            +
                  expect(ac1fc1_fcc).to receive(:include_fields_into).once.ordered.with(dmm, :assoc1, @klass, :prefix => 'abz', :delegate => false, :visibility => :private)
         
     | 
| 
      
 124 
     | 
    
         
            +
                  allow(ac1).to receive(:_flex_column_class_for).with(:ac1fc1).and_return(ac1fc1_fcc)
         
     | 
| 
      
 125 
     | 
    
         
            +
                  ac1fc2_fcc = double("ac1fc2_fcc")
         
     | 
| 
      
 126 
     | 
    
         
            +
                  expect(ac1fc2_fcc).to receive(:include_fields_into).once.ordered.with(dmm, :assoc1, @klass, :prefix => 'abz', :delegate => false, :visibility => :private)
         
     | 
| 
      
 127 
     | 
    
         
            +
                  allow(ac1).to receive(:_flex_column_class_for).with(:ac1fc2).and_return(ac1fc2_fcc)
         
     | 
| 
      
 128 
     | 
    
         
            +
             
     | 
| 
      
 129 
     | 
    
         
            +
                  ac2 = double("ac2")
         
     | 
| 
      
 130 
     | 
    
         
            +
                  allow(@assoc2).to receive(:klass).with().and_return(ac2)
         
     | 
| 
      
 131 
     | 
    
         
            +
                  allow(ac2).to receive(:has_any_flex_columns?).with().and_return(true)
         
     | 
| 
      
 132 
     | 
    
         
            +
                  allow(ac2).to receive(:_all_flex_column_names).with().and_return([ :ac2fc1, :ac2fc2 ])
         
     | 
| 
      
 133 
     | 
    
         
            +
             
     | 
| 
      
 134 
     | 
    
         
            +
                  ac2fc1_fcc = double("ac2fc1_fcc")
         
     | 
| 
      
 135 
     | 
    
         
            +
                  expect(ac2fc1_fcc).to receive(:include_fields_into).once.ordered.with(dmm, :assoc2, @klass, :prefix => 'abz', :delegate => false, :visibility => :private)
         
     | 
| 
      
 136 
     | 
    
         
            +
                  allow(ac2).to receive(:_flex_column_class_for).with(:ac2fc1).and_return(ac2fc1_fcc)
         
     | 
| 
      
 137 
     | 
    
         
            +
                  ac2fc2_fcc = double("ac2fc2_fcc")
         
     | 
| 
      
 138 
     | 
    
         
            +
                  expect(ac2fc2_fcc).to receive(:include_fields_into).once.ordered.with(dmm, :assoc2, @klass, :prefix => 'abz', :delegate => false, :visibility => :private)
         
     | 
| 
      
 139 
     | 
    
         
            +
                  allow(ac2).to receive(:_flex_column_class_for).with(:ac2fc2).and_return(ac2fc2_fcc)
         
     | 
| 
      
 140 
     | 
    
         
            +
             
     | 
| 
      
 141 
     | 
    
         
            +
                  @klass.include_flex_columns_from(:assoc1, :assoc2, :prefix => 'abz', :delegate => false, :visibility => :private)
         
     | 
| 
      
 142 
     | 
    
         
            +
                end
         
     | 
| 
      
 143 
     | 
    
         
            +
              end
         
     | 
| 
      
 144 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,105 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'flex_columns'
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            describe FlexColumns::Util::DynamicMethodsModule do
         
     | 
| 
      
 4 
     | 
    
         
            +
              before :each do
         
     | 
| 
      
 5 
     | 
    
         
            +
                @target_class = Class.new
         
     | 
| 
      
 6 
     | 
    
         
            +
                @target_class_name = "FCUDMMSpec_#{rand(1_000_000_000)}"
         
     | 
| 
      
 7 
     | 
    
         
            +
                ::Object.const_set(@target_class_name, @target_class)
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                @target_class.name.should == @target_class_name
         
     | 
| 
      
 10 
     | 
    
         
            +
              end
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
              def klass
         
     | 
| 
      
 13 
     | 
    
         
            +
                FlexColumns::Util::DynamicMethodsModule
         
     | 
| 
      
 14 
     | 
    
         
            +
              end
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
              it "should validate its arguments to #initialize correctly" do
         
     | 
| 
      
 17 
     | 
    
         
            +
                lambda { klass.new(@target_class, :foo) }.should raise_error(NameError)
         
     | 
| 
      
 18 
     | 
    
         
            +
                lambda { klass.new(Module.new, :Foo) }.should raise_error(ArgumentError)
         
     | 
| 
      
 19 
     | 
    
         
            +
                lambda { klass.new(@target_class, 123) }.should raise_error(ArgumentError)
         
     | 
| 
      
 20 
     | 
    
         
            +
              end
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
              it "should blow up if something else is already bound to the target class" do
         
     | 
| 
      
 23 
     | 
    
         
            +
                @target_class.const_set(:SpecDmm, :binding_conflict)
         
     | 
| 
      
 24 
     | 
    
         
            +
                lambda { klass.new(@target_class, :SpecDmm) }.should raise_error(NameError, /specdmm/i)
         
     | 
| 
      
 25 
     | 
    
         
            +
              end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
              it "should run any code passed as a block into the constructor" do
         
     | 
| 
      
 28 
     | 
    
         
            +
                instance = klass.new(@target_class, :SpecDmm) do
         
     | 
| 
      
 29 
     | 
    
         
            +
                  def bar
         
     | 
| 
      
 30 
     | 
    
         
            +
                    "bar!!"
         
     | 
| 
      
 31 
     | 
    
         
            +
                  end
         
     | 
| 
      
 32 
     | 
    
         
            +
                end
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                target_instance = @target_class.new
         
     | 
| 
      
 35 
     | 
    
         
            +
                target_instance.bar.should == "bar!!"
         
     | 
| 
      
 36 
     | 
    
         
            +
              end
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
              context "with a valid instance" do
         
     | 
| 
      
 39 
     | 
    
         
            +
                before :each do
         
     | 
| 
      
 40 
     | 
    
         
            +
                  @instance = klass.new(@target_class, :SpecDmm)
         
     | 
| 
      
 41 
     | 
    
         
            +
                end
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
                it "should bind itself to the correct constant name in the target class" do
         
     | 
| 
      
 44 
     | 
    
         
            +
                  @target_class.const_get(:SpecDmm).should be(@instance)
         
     | 
| 
      
 45 
     | 
    
         
            +
                end
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
                it "should end up named correctly" do
         
     | 
| 
      
 48 
     | 
    
         
            +
                  @instance.name.should == "#{@target_class_name}::SpecDmm"
         
     | 
| 
      
 49 
     | 
    
         
            +
                end
         
     | 
| 
      
 50 
     | 
    
         
            +
             
     | 
| 
      
 51 
     | 
    
         
            +
                it "should include itself in the target class" do
         
     | 
| 
      
 52 
     | 
    
         
            +
                  @target_class.included_modules.include?(@instance).should be
         
     | 
| 
      
 53 
     | 
    
         
            +
                end
         
     | 
| 
      
 54 
     | 
    
         
            +
             
     | 
| 
      
 55 
     | 
    
         
            +
                it "should define new methods, and remove them all with #remove_all_methods!" do
         
     | 
| 
      
 56 
     | 
    
         
            +
                  target_instance = @target_class.new
         
     | 
| 
      
 57 
     | 
    
         
            +
                  target_instance.respond_to?(:foo).should_not be
         
     | 
| 
      
 58 
     | 
    
         
            +
                  target_instance.respond_to?(:bar).should_not be
         
     | 
| 
      
 59 
     | 
    
         
            +
                  lambda { target_instance.foo }.should raise_error(NoMethodError)
         
     | 
| 
      
 60 
     | 
    
         
            +
                  lambda { target_instance.bar }.should raise_error(NoMethodError)
         
     | 
| 
      
 61 
     | 
    
         
            +
             
     | 
| 
      
 62 
     | 
    
         
            +
                  @instance.define_method(:foo) { |*args, &block| args.join("FOO") + (block.try(:call) || '') }
         
     | 
| 
      
 63 
     | 
    
         
            +
                  @instance.define_method(:bar) { |*args, &block| args.join("BAR") + (block.try(:call) || '') }
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
                  target_instance.respond_to?(:foo).should be
         
     | 
| 
      
 66 
     | 
    
         
            +
                  target_instance.respond_to?(:bar).should be
         
     | 
| 
      
 67 
     | 
    
         
            +
             
     | 
| 
      
 68 
     | 
    
         
            +
                  (target_instance.foo(1, 2, 3) { "XX" }).should == "1FOO2FOO3XX"
         
     | 
| 
      
 69 
     | 
    
         
            +
                  (target_instance.bar(3, 4, 5) { "YY" }).should == "3BAR4BAR5YY"
         
     | 
| 
      
 70 
     | 
    
         
            +
             
     | 
| 
      
 71 
     | 
    
         
            +
                  @instance.remove_all_methods!
         
     | 
| 
      
 72 
     | 
    
         
            +
                  target_instance.respond_to?(:foo).should_not be
         
     | 
| 
      
 73 
     | 
    
         
            +
                  target_instance.respond_to?(:bar).should_not be
         
     | 
| 
      
 74 
     | 
    
         
            +
                  lambda { target_instance.foo }.should raise_error(NoMethodError)
         
     | 
| 
      
 75 
     | 
    
         
            +
                  lambda { target_instance.bar }.should raise_error(NoMethodError)
         
     | 
| 
      
 76 
     | 
    
         
            +
             
     | 
| 
      
 77 
     | 
    
         
            +
                  @instance.define_method(:foo) { |*args, &block| (block.try(:call) || '') + args.join("f") }
         
     | 
| 
      
 78 
     | 
    
         
            +
                  @instance.define_method(:bar) { |*args, &block| (block.try(:call) || '') + args.join("b") }
         
     | 
| 
      
 79 
     | 
    
         
            +
             
     | 
| 
      
 80 
     | 
    
         
            +
                  target_instance.respond_to?(:foo).should be
         
     | 
| 
      
 81 
     | 
    
         
            +
                  target_instance.respond_to?(:bar).should be
         
     | 
| 
      
 82 
     | 
    
         
            +
             
     | 
| 
      
 83 
     | 
    
         
            +
                  (target_instance.foo(1, 2, 3) { "aa" }).should == "aa1f2f3"
         
     | 
| 
      
 84 
     | 
    
         
            +
                  (target_instance.bar(3, 4, 5) { "zz" }).should == "zz3b4b5"
         
     | 
| 
      
 85 
     | 
    
         
            +
                end
         
     | 
| 
      
 86 
     | 
    
         
            +
             
     | 
| 
      
 87 
     | 
    
         
            +
                it "should let you make methods private, without using #send" do
         
     | 
| 
      
 88 
     | 
    
         
            +
                  target_instance = @target_class.new
         
     | 
| 
      
 89 
     | 
    
         
            +
                  target_instance.respond_to?(:foo).should_not be
         
     | 
| 
      
 90 
     | 
    
         
            +
                  target_instance.respond_to?(:bar).should_not be
         
     | 
| 
      
 91 
     | 
    
         
            +
                  lambda { target_instance.foo }.should raise_error(NoMethodError)
         
     | 
| 
      
 92 
     | 
    
         
            +
                  lambda { target_instance.bar }.should raise_error(NoMethodError)
         
     | 
| 
      
 93 
     | 
    
         
            +
             
     | 
| 
      
 94 
     | 
    
         
            +
                  @instance.define_method(:foo) { "foo!" }
         
     | 
| 
      
 95 
     | 
    
         
            +
                  @instance.define_method(:bar) { "bar!" }
         
     | 
| 
      
 96 
     | 
    
         
            +
                  @instance.private(:bar)
         
     | 
| 
      
 97 
     | 
    
         
            +
             
     | 
| 
      
 98 
     | 
    
         
            +
                  target_instance.respond_to?(:foo).should be
         
     | 
| 
      
 99 
     | 
    
         
            +
                  target_instance.respond_to?(:bar).should_not be
         
     | 
| 
      
 100 
     | 
    
         
            +
                  target_instance.foo.should == "foo!"
         
     | 
| 
      
 101 
     | 
    
         
            +
                  lambda { target_instance.bar }.should raise_error(NoMethodError)
         
     | 
| 
      
 102 
     | 
    
         
            +
                  target_instance.send(:bar).should == "bar!"
         
     | 
| 
      
 103 
     | 
    
         
            +
                end
         
     | 
| 
      
 104 
     | 
    
         
            +
              end
         
     | 
| 
      
 105 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,23 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'flex_columns'
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            describe FlexColumns::Util::StringUtils do
         
     | 
| 
      
 4 
     | 
    
         
            +
              def klass
         
     | 
| 
      
 5 
     | 
    
         
            +
                FlexColumns::Util::StringUtils
         
     | 
| 
      
 6 
     | 
    
         
            +
              end
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
              it "should return its input for nil or short strings" do
         
     | 
| 
      
 9 
     | 
    
         
            +
                klass.abbreviated_string(nil).should == nil
         
     | 
| 
      
 10 
     | 
    
         
            +
                klass.abbreviated_string("").should == ""
         
     | 
| 
      
 11 
     | 
    
         
            +
                klass.abbreviated_string("    ").should == "    "
         
     | 
| 
      
 12 
     | 
    
         
            +
                klass.abbreviated_string("abc").should == "abc"
         
     | 
| 
      
 13 
     | 
    
         
            +
                klass.abbreviated_string("a" * 100).should == "a" * 100
         
     | 
| 
      
 14 
     | 
    
         
            +
              end
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
              it "should abbreviate long strings in the middle" do
         
     | 
| 
      
 17 
     | 
    
         
            +
                s = ("a" * 48) + ("b" * 5) + ("c" * 48)
         
     | 
| 
      
 18 
     | 
    
         
            +
                klass.abbreviated_string(s).should == ("a" * 48) + "..." + ("c" * 48)
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                s = ("a" * 100_000) + "XX" + ("c" * 48)
         
     | 
| 
      
 21 
     | 
    
         
            +
                klass.abbreviated_string(s).should == ("a" * 48) + "..." + ("c" * 48)
         
     | 
| 
      
 22 
     | 
    
         
            +
              end
         
     | 
| 
      
 23 
     | 
    
         
            +
            end
         
     | 
    
        metadata
    ADDED
    
    | 
         @@ -0,0 +1,286 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification
         
     | 
| 
      
 2 
     | 
    
         
            +
            name: flex_columns
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.0.0
         
     | 
| 
      
 5 
     | 
    
         
            +
            platform: ruby
         
     | 
| 
      
 6 
     | 
    
         
            +
            authors:
         
     | 
| 
      
 7 
     | 
    
         
            +
            - Andrew Geweke
         
     | 
| 
      
 8 
     | 
    
         
            +
            autorequire: 
         
     | 
| 
      
 9 
     | 
    
         
            +
            bindir: bin
         
     | 
| 
      
 10 
     | 
    
         
            +
            cert_chain: []
         
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2013-12-22 00:00:00.000000000 Z
         
     | 
| 
      
 12 
     | 
    
         
            +
            dependencies:
         
     | 
| 
      
 13 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 14 
     | 
    
         
            +
              name: json
         
     | 
| 
      
 15 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 16 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 17 
     | 
    
         
            +
                - - '>='
         
     | 
| 
      
 18 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 19 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 20 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 21 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 22 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 23 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 24 
     | 
    
         
            +
                - - '>='
         
     | 
| 
      
 25 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 26 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 27 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 28 
     | 
    
         
            +
              name: bundler
         
     | 
| 
      
 29 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 30 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 31 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 33 
     | 
    
         
            +
                    version: '1.3'
         
     | 
| 
      
 34 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 35 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 36 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 37 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 38 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 39 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 40 
     | 
    
         
            +
                    version: '1.3'
         
     | 
| 
      
 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'
         
     | 
| 
      
 48 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 49 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 50 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 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'
         
     | 
| 
      
 62 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 63 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 64 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 65 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 66 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 67 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 68 
     | 
    
         
            +
                    version: '2.14'
         
     | 
| 
      
 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'
         
     | 
| 
      
 104 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 105 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 106 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 107 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 108 
     | 
    
         
            +
                - - '>='
         
     | 
| 
      
 109 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 110 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 111 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 112 
     | 
    
         
            +
              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 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 123 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 124 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 125 
     | 
    
         
            +
                - - '>='
         
     | 
| 
      
 126 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 127 
     | 
    
         
            +
                    version: '3.0'
         
     | 
| 
      
 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'
         
     | 
| 
      
 138 
     | 
    
         
            +
                - - <=
         
     | 
| 
      
 139 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 140 
     | 
    
         
            +
                    version: 4.99.99
         
     | 
| 
      
 141 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 142 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 143 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 144 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 145 
     | 
    
         
            +
                - - '>='
         
     | 
| 
      
 146 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 147 
     | 
    
         
            +
                    version: '3.0'
         
     | 
| 
      
 148 
     | 
    
         
            +
                - - <=
         
     | 
| 
      
 149 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 150 
     | 
    
         
            +
                    version: 4.99.99
         
     | 
| 
      
 151 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 152 
     | 
    
         
            +
              name: activerecord-import
         
     | 
| 
      
 153 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 154 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 155 
     | 
    
         
            +
                - - '>='
         
     | 
| 
      
 156 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 157 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 158 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 159 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 160 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 161 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 162 
     | 
    
         
            +
                - - '>='
         
     | 
| 
      
 163 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 164 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 165 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 166 
     | 
    
         
            +
              name: activerecord-jdbcmysql-adapter
         
     | 
| 
      
 167 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 168 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 169 
     | 
    
         
            +
                - - '>='
         
     | 
| 
      
 170 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 171 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 172 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 173 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 174 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 175 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 176 
     | 
    
         
            +
                - - '>='
         
     | 
| 
      
 177 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 178 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 179 
     | 
    
         
            +
            description: Schema-free, structured JSON storage inside a RDBMS.
         
     | 
| 
      
 180 
     | 
    
         
            +
            email:
         
     | 
| 
      
 181 
     | 
    
         
            +
            - andrew@geweke.org
         
     | 
| 
      
 182 
     | 
    
         
            +
            executables: []
         
     | 
| 
      
 183 
     | 
    
         
            +
            extensions: []
         
     | 
| 
      
 184 
     | 
    
         
            +
            extra_rdoc_files: []
         
     | 
| 
      
 185 
     | 
    
         
            +
            files:
         
     | 
| 
      
 186 
     | 
    
         
            +
            - .gitignore
         
     | 
| 
      
 187 
     | 
    
         
            +
            - .travis.yml
         
     | 
| 
      
 188 
     | 
    
         
            +
            - Gemfile
         
     | 
| 
      
 189 
     | 
    
         
            +
            - LICENSE.txt
         
     | 
| 
      
 190 
     | 
    
         
            +
            - README.md
         
     | 
| 
      
 191 
     | 
    
         
            +
            - Rakefile
         
     | 
| 
      
 192 
     | 
    
         
            +
            - flex_columns.gemspec
         
     | 
| 
      
 193 
     | 
    
         
            +
            - lib/flex_columns.rb
         
     | 
| 
      
 194 
     | 
    
         
            +
            - lib/flex_columns/active_record/base.rb
         
     | 
| 
      
 195 
     | 
    
         
            +
            - lib/flex_columns/contents/column_data.rb
         
     | 
| 
      
 196 
     | 
    
         
            +
            - lib/flex_columns/contents/flex_column_contents_base.rb
         
     | 
| 
      
 197 
     | 
    
         
            +
            - lib/flex_columns/definition/field_definition.rb
         
     | 
| 
      
 198 
     | 
    
         
            +
            - lib/flex_columns/definition/field_set.rb
         
     | 
| 
      
 199 
     | 
    
         
            +
            - lib/flex_columns/definition/flex_column_contents_class.rb
         
     | 
| 
      
 200 
     | 
    
         
            +
            - lib/flex_columns/errors.rb
         
     | 
| 
      
 201 
     | 
    
         
            +
            - lib/flex_columns/has_flex_columns.rb
         
     | 
| 
      
 202 
     | 
    
         
            +
            - lib/flex_columns/including/include_flex_columns.rb
         
     | 
| 
      
 203 
     | 
    
         
            +
            - lib/flex_columns/util/dynamic_methods_module.rb
         
     | 
| 
      
 204 
     | 
    
         
            +
            - lib/flex_columns/util/string_utils.rb
         
     | 
| 
      
 205 
     | 
    
         
            +
            - lib/flex_columns/version.rb
         
     | 
| 
      
 206 
     | 
    
         
            +
            - spec/flex_columns/helpers/database_helper.rb
         
     | 
| 
      
 207 
     | 
    
         
            +
            - spec/flex_columns/helpers/exception_helpers.rb
         
     | 
| 
      
 208 
     | 
    
         
            +
            - spec/flex_columns/helpers/system_helpers.rb
         
     | 
| 
      
 209 
     | 
    
         
            +
            - spec/flex_columns/system/basic_system_spec.rb
         
     | 
| 
      
 210 
     | 
    
         
            +
            - spec/flex_columns/system/bulk_system_spec.rb
         
     | 
| 
      
 211 
     | 
    
         
            +
            - spec/flex_columns/system/compression_system_spec.rb
         
     | 
| 
      
 212 
     | 
    
         
            +
            - spec/flex_columns/system/custom_methods_system_spec.rb
         
     | 
| 
      
 213 
     | 
    
         
            +
            - spec/flex_columns/system/delegation_system_spec.rb
         
     | 
| 
      
 214 
     | 
    
         
            +
            - spec/flex_columns/system/dynamism_system_spec.rb
         
     | 
| 
      
 215 
     | 
    
         
            +
            - spec/flex_columns/system/error_handling_system_spec.rb
         
     | 
| 
      
 216 
     | 
    
         
            +
            - spec/flex_columns/system/including_system_spec.rb
         
     | 
| 
      
 217 
     | 
    
         
            +
            - spec/flex_columns/system/json_alias_system_spec.rb
         
     | 
| 
      
 218 
     | 
    
         
            +
            - spec/flex_columns/system/performance_system_spec.rb
         
     | 
| 
      
 219 
     | 
    
         
            +
            - spec/flex_columns/system/postgres_json_column_type_system_spec.rb
         
     | 
| 
      
 220 
     | 
    
         
            +
            - spec/flex_columns/system/types_system_spec.rb
         
     | 
| 
      
 221 
     | 
    
         
            +
            - spec/flex_columns/system/unknown_fields_system_spec.rb
         
     | 
| 
      
 222 
     | 
    
         
            +
            - spec/flex_columns/system/validations_system_spec.rb
         
     | 
| 
      
 223 
     | 
    
         
            +
            - spec/flex_columns/unit/active_record/base_spec.rb
         
     | 
| 
      
 224 
     | 
    
         
            +
            - spec/flex_columns/unit/contents/column_data_spec.rb
         
     | 
| 
      
 225 
     | 
    
         
            +
            - spec/flex_columns/unit/contents/flex_column_contents_base_spec.rb
         
     | 
| 
      
 226 
     | 
    
         
            +
            - spec/flex_columns/unit/definition/field_definition_spec.rb
         
     | 
| 
      
 227 
     | 
    
         
            +
            - spec/flex_columns/unit/definition/field_set_spec.rb
         
     | 
| 
      
 228 
     | 
    
         
            +
            - spec/flex_columns/unit/definition/flex_column_contents_class_spec.rb
         
     | 
| 
      
 229 
     | 
    
         
            +
            - spec/flex_columns/unit/errors_spec.rb
         
     | 
| 
      
 230 
     | 
    
         
            +
            - spec/flex_columns/unit/has_flex_columns_spec.rb
         
     | 
| 
      
 231 
     | 
    
         
            +
            - spec/flex_columns/unit/including/include_flex_columns_spec.rb
         
     | 
| 
      
 232 
     | 
    
         
            +
            - spec/flex_columns/unit/util/dynamic_methods_module_spec.rb
         
     | 
| 
      
 233 
     | 
    
         
            +
            - spec/flex_columns/unit/util/string_utils_spec.rb
         
     | 
| 
      
 234 
     | 
    
         
            +
            homepage: https://github.com/ageweke/flex_columns
         
     | 
| 
      
 235 
     | 
    
         
            +
            licenses:
         
     | 
| 
      
 236 
     | 
    
         
            +
            - MIT
         
     | 
| 
      
 237 
     | 
    
         
            +
            metadata: {}
         
     | 
| 
      
 238 
     | 
    
         
            +
            post_install_message: 
         
     | 
| 
      
 239 
     | 
    
         
            +
            rdoc_options: []
         
     | 
| 
      
 240 
     | 
    
         
            +
            require_paths:
         
     | 
| 
      
 241 
     | 
    
         
            +
            - lib
         
     | 
| 
      
 242 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 243 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 244 
     | 
    
         
            +
              - - '>='
         
     | 
| 
      
 245 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 246 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 247 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 248 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 249 
     | 
    
         
            +
              - - '>='
         
     | 
| 
      
 250 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 251 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 252 
     | 
    
         
            +
            requirements: []
         
     | 
| 
      
 253 
     | 
    
         
            +
            rubyforge_project: 
         
     | 
| 
      
 254 
     | 
    
         
            +
            rubygems_version: 2.1.11
         
     | 
| 
      
 255 
     | 
    
         
            +
            signing_key: 
         
     | 
| 
      
 256 
     | 
    
         
            +
            specification_version: 4
         
     | 
| 
      
 257 
     | 
    
         
            +
            summary: Schema-free, structured JSON storage inside a RDBMS.
         
     | 
| 
      
 258 
     | 
    
         
            +
            test_files:
         
     | 
| 
      
 259 
     | 
    
         
            +
            - spec/flex_columns/helpers/database_helper.rb
         
     | 
| 
      
 260 
     | 
    
         
            +
            - spec/flex_columns/helpers/exception_helpers.rb
         
     | 
| 
      
 261 
     | 
    
         
            +
            - spec/flex_columns/helpers/system_helpers.rb
         
     | 
| 
      
 262 
     | 
    
         
            +
            - spec/flex_columns/system/basic_system_spec.rb
         
     | 
| 
      
 263 
     | 
    
         
            +
            - spec/flex_columns/system/bulk_system_spec.rb
         
     | 
| 
      
 264 
     | 
    
         
            +
            - spec/flex_columns/system/compression_system_spec.rb
         
     | 
| 
      
 265 
     | 
    
         
            +
            - spec/flex_columns/system/custom_methods_system_spec.rb
         
     | 
| 
      
 266 
     | 
    
         
            +
            - spec/flex_columns/system/delegation_system_spec.rb
         
     | 
| 
      
 267 
     | 
    
         
            +
            - spec/flex_columns/system/dynamism_system_spec.rb
         
     | 
| 
      
 268 
     | 
    
         
            +
            - spec/flex_columns/system/error_handling_system_spec.rb
         
     | 
| 
      
 269 
     | 
    
         
            +
            - spec/flex_columns/system/including_system_spec.rb
         
     | 
| 
      
 270 
     | 
    
         
            +
            - spec/flex_columns/system/json_alias_system_spec.rb
         
     | 
| 
      
 271 
     | 
    
         
            +
            - spec/flex_columns/system/performance_system_spec.rb
         
     | 
| 
      
 272 
     | 
    
         
            +
            - spec/flex_columns/system/postgres_json_column_type_system_spec.rb
         
     | 
| 
      
 273 
     | 
    
         
            +
            - spec/flex_columns/system/types_system_spec.rb
         
     | 
| 
      
 274 
     | 
    
         
            +
            - spec/flex_columns/system/unknown_fields_system_spec.rb
         
     | 
| 
      
 275 
     | 
    
         
            +
            - spec/flex_columns/system/validations_system_spec.rb
         
     | 
| 
      
 276 
     | 
    
         
            +
            - spec/flex_columns/unit/active_record/base_spec.rb
         
     | 
| 
      
 277 
     | 
    
         
            +
            - spec/flex_columns/unit/contents/column_data_spec.rb
         
     | 
| 
      
 278 
     | 
    
         
            +
            - spec/flex_columns/unit/contents/flex_column_contents_base_spec.rb
         
     | 
| 
      
 279 
     | 
    
         
            +
            - spec/flex_columns/unit/definition/field_definition_spec.rb
         
     | 
| 
      
 280 
     | 
    
         
            +
            - spec/flex_columns/unit/definition/field_set_spec.rb
         
     | 
| 
      
 281 
     | 
    
         
            +
            - spec/flex_columns/unit/definition/flex_column_contents_class_spec.rb
         
     | 
| 
      
 282 
     | 
    
         
            +
            - spec/flex_columns/unit/errors_spec.rb
         
     | 
| 
      
 283 
     | 
    
         
            +
            - spec/flex_columns/unit/has_flex_columns_spec.rb
         
     | 
| 
      
 284 
     | 
    
         
            +
            - spec/flex_columns/unit/including/include_flex_columns_spec.rb
         
     | 
| 
      
 285 
     | 
    
         
            +
            - spec/flex_columns/unit/util/dynamic_methods_module_spec.rb
         
     | 
| 
      
 286 
     | 
    
         
            +
            - spec/flex_columns/unit/util/string_utils_spec.rb
         
     |