low_card_tables 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
- ---
2
- SHA1:
3
- metadata.gz: d7c2ebbfc8004ec52dcffbae127d9b17dadf62cb
4
- data.tar.gz: f8b2f393e3a18649a01b8d53baefd0101e879c17
5
- SHA512:
6
- metadata.gz: d37e5bddb60b90c475b6a33a42979f15ebc88fc78f6581856b6d2f971370c175d7fdc10000981027c5660f3fd709e1075160f88f2255106a9dd577b16454abc7
7
- data.tar.gz: 312b865016ead5b60440bed7a9cb80b7aed32c110eb87847062570e7f86ba59e8f3f688270b39a0e675af8d9603cd650e34fd0adc5b27d4414285692b65d6da7
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MTlmZmY0NDI1ZDJhNmY4Yzg4YjNmMmE4ZmQ1OWJkZTc3YjUzMjc1NA==
5
+ data.tar.gz: !binary |-
6
+ NTM5ZjFjOGZhYmMwNDVkYmI4YTUyNjQ1NmI4ZjM4NDZmZmJhNzA5Mg==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ YTBlNTdkODc3NzdhMDU1MDA1N2JjNjAzM2RmZjRjM2NiYTI3OTVlNzgzNjgx
10
+ OGM2ODQ4MmJlNDhkOTRiZGJiNGIzZjFmNzc5MzVjNGQyMzI3MWVmODA3NjA0
11
+ ZWViNzE0YjQ3YTExMjg4YWE1MzAwZTI0MWFmZWNjOGQxNjUxYmY=
12
+ data.tar.gz: !binary |-
13
+ NTUxNzgwODA1NmY0NzljOGY4ZDViY2NkMjFhOTYyZTFkOTVlNzRlMzU3NWE1
14
+ MGM5MWY4ZWQzMWI3NmZhNzgwNjBlYjdhZDllNTk4OGMzNGRkMDhkNDQ3MzM3
15
+ MTRmNTE3NTM0OTcyMzA1ZWRhNWUxNjcxYzQzODFjN2I2M2FjMmE=
data/.travis.yml CHANGED
@@ -2,7 +2,8 @@ rvm:
2
2
  - "1.8.7"
3
3
  - "1.9.3"
4
4
  - "2.0.0"
5
- - "jruby-1.7.6"
5
+ - "2.1.2"
6
+ - "jruby-1.7.12"
6
7
  env:
7
8
  # Sadly, Travis seems to have a version of SQLite < 3.7.11 installed on many of its workers;
8
9
  # this prevents activerecord-import from working, since those versions of the SQLite engine
@@ -14,12 +15,15 @@ env:
14
15
  - LOW_CARD_TABLES_AR_TEST_VERSION=3.1.12 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=mysql
15
16
  - LOW_CARD_TABLES_AR_TEST_VERSION=3.1.12 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=postgres
16
17
  # - LOW_CARD_TABLES_AR_TEST_VERSION=3.1.12 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=sqlite
17
- - LOW_CARD_TABLES_AR_TEST_VERSION=3.2.15 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=mysql
18
- - LOW_CARD_TABLES_AR_TEST_VERSION=3.2.15 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=postgres
19
- # - LOW_CARD_TABLES_AR_TEST_VERSION=3.2.15 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=sqlite
20
- - LOW_CARD_TABLES_AR_TEST_VERSION=4.0.1 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=mysql
21
- - LOW_CARD_TABLES_AR_TEST_VERSION=4.0.1 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=postgres
22
- # - LOW_CARD_TABLES_AR_TEST_VERSION=4.0.1 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=sqlite
18
+ - LOW_CARD_TABLES_AR_TEST_VERSION=3.2.19 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=mysql
19
+ - LOW_CARD_TABLES_AR_TEST_VERSION=3.2.19 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=postgres
20
+ # - LOW_CARD_TABLES_AR_TEST_VERSION=3.2.19 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=sqlite
21
+ - LOW_CARD_TABLES_AR_TEST_VERSION=4.0.8 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=mysql
22
+ - LOW_CARD_TABLES_AR_TEST_VERSION=4.0.8 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=postgres
23
+ # - LOW_CARD_TABLES_AR_TEST_VERSION=4.0.8 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=sqlite
24
+ - LOW_CARD_TABLES_AR_TEST_VERSION=4.1.4 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=mysql
25
+ - LOW_CARD_TABLES_AR_TEST_VERSION=4.1.4 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=postgres
26
+ # - LOW_CARD_TABLES_AR_TEST_VERSION=4.1.4 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=sqlite
23
27
  before_script:
24
28
  - export JRUBY_OPTS="-J-Xmx256m -J-Xms256m $JRUBY_OPTS"
25
29
  - mysql -e 'create database myapp_test;'
@@ -28,32 +32,48 @@ matrix:
28
32
  exclude:
29
33
  # ActiveRecord 4.x doesn't support Ruby 1.8.7
30
34
  - rvm: 1.8.7
31
- env: LOW_CARD_TABLES_AR_TEST_VERSION=4.0.1 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=mysql
35
+ env: LOW_CARD_TABLES_AR_TEST_VERSION=4.0.8 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=mysql
32
36
  - rvm: 1.8.7
33
- env: LOW_CARD_TABLES_AR_TEST_VERSION=4.0.1 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=postgres
37
+ env: LOW_CARD_TABLES_AR_TEST_VERSION=4.0.8 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=postgres
34
38
  - rvm: 1.8.7
35
- env: LOW_CARD_TABLES_AR_TEST_VERSION=4.0.1 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=sqlite
36
- # There's a bug in ActiveRecord 3.1.x that makes it incompatible with Ruby 2.0
39
+ env: LOW_CARD_TABLES_AR_TEST_VERSION=4.0.8 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=sqlite
40
+ - rvm: 1.8.7
41
+ env: LOW_CARD_TABLES_AR_TEST_VERSION=4.1.4 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=mysql
42
+ - rvm: 1.8.7
43
+ env: LOW_CARD_TABLES_AR_TEST_VERSION=4.1.4 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=postgres
44
+ - rvm: 1.8.7
45
+ env: LOW_CARD_TABLES_AR_TEST_VERSION=4.1.4 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=sqlite
46
+ # There's a bug in ActiveRecord 3.1.x that makes it incompatible with Ruby 2.x
37
47
  - rvm: 2.0.0
38
48
  env: LOW_CARD_TABLES_AR_TEST_VERSION=3.1.12 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=mysql
39
49
  - rvm: 2.0.0
40
50
  env: LOW_CARD_TABLES_AR_TEST_VERSION=3.1.12 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=postgres
41
51
  - rvm: 2.0.0
42
52
  env: LOW_CARD_TABLES_AR_TEST_VERSION=3.1.12 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=sqlite
53
+ - rvm: 2.1.2
54
+ env: LOW_CARD_TABLES_AR_TEST_VERSION=3.1.12 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=mysql
55
+ - rvm: 2.1.2
56
+ env: LOW_CARD_TABLES_AR_TEST_VERSION=3.1.12 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=postgres
57
+ - rvm: 2.1.2
58
+ env: LOW_CARD_TABLES_AR_TEST_VERSION=3.1.12 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=sqlite
43
59
  # The activerecord-import gem currently doesn't support JRuby JDBC adapters with anything but MySQL
44
- - rvm: jruby-1.7.6
60
+ - rvm: jruby-1.7.12
45
61
  env: LOW_CARD_TABLES_AR_TEST_VERSION=3.0.20 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=postgres
46
- - rvm: jruby-1.7.6
62
+ - rvm: jruby-1.7.12
47
63
  env: LOW_CARD_TABLES_AR_TEST_VERSION=3.1.12 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=postgres
48
- - rvm: jruby-1.7.6
49
- env: LOW_CARD_TABLES_AR_TEST_VERSION=3.2.15 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=postgres
50
- - rvm: jruby-1.7.6
51
- env: LOW_CARD_TABLES_AR_TEST_VERSION=4.0.1 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=postgres
52
- - rvm: jruby-1.7.6
64
+ - rvm: jruby-1.7.12
65
+ env: LOW_CARD_TABLES_AR_TEST_VERSION=3.2.19 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=postgres
66
+ - rvm: jruby-1.7.12
67
+ env: LOW_CARD_TABLES_AR_TEST_VERSION=4.0.8 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=postgres
68
+ - rvm: jruby-1.7.12
69
+ env: LOW_CARD_TABLES_AR_TEST_VERSION=4.1.4 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=postgres
70
+ - rvm: jruby-1.7.12
53
71
  env: LOW_CARD_TABLES_AR_TEST_VERSION=3.0.20 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=sqlite
54
- - rvm: jruby-1.7.6
72
+ - rvm: jruby-1.7.12
55
73
  env: LOW_CARD_TABLES_AR_TEST_VERSION=3.1.12 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=sqlite
56
- - rvm: jruby-1.7.6
57
- env: LOW_CARD_TABLES_AR_TEST_VERSION=3.2.15 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=sqlite
58
- - rvm: jruby-1.7.6
59
- env: LOW_CARD_TABLES_AR_TEST_VERSION=4.0.1 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=sqlite
74
+ - rvm: jruby-1.7.12
75
+ env: LOW_CARD_TABLES_AR_TEST_VERSION=3.2.19 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=sqlite
76
+ - rvm: jruby-1.7.12
77
+ env: LOW_CARD_TABLES_AR_TEST_VERSION=4.0.8 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=sqlite
78
+ - rvm: jruby-1.7.12
79
+ env: LOW_CARD_TABLES_AR_TEST_VERSION=4.1.4 LOW_CARD_TABLES_TRAVIS_CI_DATABASE_TYPE=sqlite
data/CHANGES.md ADDED
@@ -0,0 +1,6 @@
1
+ # `low_card_tables` Changelog
2
+
3
+ ## 1.0.1, <pending>
4
+
5
+ * Fixed an issue where you couldn't migrate a low-card column into existence with a migration &mdash; because if you
6
+ declared a low-card column that didn't exist, you'd immediately receive an error. Now this works properly.
data/README.md CHANGED
@@ -6,7 +6,11 @@ future expansion, separate analysis, and other (non-Rails) tools than actual bit
6
6
  has few distinct values in the table; boolean fields are one example, but any `enum`-style fields are great candidates
7
7
  for use.
8
8
 
9
- Greatly improve scalability and maintainability of your database tables by breaking out columns containing few distinct values (e.g., booleans and other flags) into a separate table that's transparently referenced and used. Supports Rails 3.0.x, 3.1.x, 3.2.x, and 4.0.x, running on Ruby 1.8.7, 1.9.3, and 2.0.0 with MySQL, PostgreSQL, and Sqlite. (JRuby is supported, but only with MySQL, because `low_card_tables` depends on the `activerecord-import` gem, and it currently does not have JRuby support for anything but MySQL.) Adding support for other databases is trivial.
9
+ Combined with [`flex_columns`](https://github.com/ageweke/flex_columns), allows a RDBMS to represent a wide
10
+ variety of data efficiently and with a great deal of flexibility &mdash; build your projects rapidly and effectively
11
+ while relying on the most reliable, manageable, proven data engines out there.
12
+
13
+ Greatly improve scalability and maintainability of your database tables by breaking out columns containing few distinct values (e.g., booleans and other flags) into a separate table that's transparently referenced and used. Supports Rails 3.0.x, 3.1.x, 3.2.x, 4.0.x, and 4.1.x, running on Ruby 1.8.7, 1.9.3, 2.0.0, and 2.1.2 with MySQL, PostgreSQL, and Sqlite. (JRuby is supported, but only with MySQL, because `low_card_tables` depends on the `activerecord-import` gem, and it currently does not have JRuby support for anything but MySQL.) Adding support for other databases is trivial.
10
14
 
11
15
  `low_card_tables` is the successor to similar, but more primitive, systems that have been in place at very large commercial websites serving tens of millions of pages a day, and in database tables with hundreds of millions of rows. The predecessor systems were extremely successful and reliable &mdash; hence the desire to evolve this into an open-source gem.
12
16
 
@@ -111,19 +111,15 @@ module LowCardTables
111
111
 
112
112
  out = out.to_s if out.kind_of?(Symbol)
113
113
 
114
- column = model_class.columns.detect { |c| c.name.strip.downcase == out.strip.downcase }
115
- unless column
116
- raise ArgumentError, %{You said that #{model_class} has_low_card_table :#{association_name}, and we
117
- have a foreign-key column name of #{out.inspect}, but #{model_class} doesn't seem
118
- to have a column named that at all. Did you misspell it? Or perhaps something else is wrong?
119
-
120
- The model class has these columns: #{model_class.columns.map(&:name).sort.join(", ")}}
121
- end
122
-
123
114
  out
124
115
  end
125
116
  end
126
117
 
118
+ # Does the foreign-key column we have defined actually exist on this class?
119
+ def foreign_key_column_exists?
120
+ !! model_class.columns.detect { |c| c.name.strip.downcase == foreign_key_column_name.strip.downcase }
121
+ end
122
+
127
123
  # When a low-card table has a column removed, it will typically have duplicate rows; these duplicate rows are
128
124
  # then deleted. But then referring tables need to be updated. This method gets called at that point, with a map
129
125
  # of <winner row> => <array of loser rows>, and the +collapsing_update_scheme+ declared by this referring
@@ -148,6 +144,8 @@ The model class has these columns: #{model_class.columns.map(&:name).sort.join("
148
144
  # LowCardTables::HasLowCardTable::Base#low_card_update_foreign_keys!, which is primarily invoked by a
149
145
  # +:before_save+ filter and alternatively can be invoked manually.
150
146
  def update_foreign_key!(model_instance)
147
+ return unless foreign_key_column_exists?
148
+
151
149
  hash = { }
152
150
 
153
151
  low_card_object = model_instance._low_card_objects_manager.object_for(self)
@@ -1,4 +1,4 @@
1
1
  # Defines the current version of +low_card_tables+.
2
2
  module LowCardTables
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
@@ -44,7 +44,7 @@ Gem::Specification.new do |s|
44
44
 
45
45
  ar_import_version = case ar_version
46
46
  when nil then nil
47
- when 'master', /^4\.0\./ then '~> 0.4.1'
47
+ when 'master', /^4\.0\./, /^4\.1\./ then '~> 0.4.1'
48
48
  when /^3\.0\./ then '~> 0.2.11'
49
49
  when /^3\.1\./, /^3\.2\./ then '~> 0.3.1'
50
50
  else raise "Don't know what activerecord-import version to require for activerecord version #{ar_version.inspect}!"
@@ -156,6 +156,7 @@ describe "LowCardTables bulk operations" do
156
156
  after :each do
157
157
  migrate do
158
158
  drop_table :lctables_spec_bulk_defaults rescue nil
159
+ drop_table :lctables_spec_users_defaults rescue nil
159
160
  end
160
161
  end
161
162
 
@@ -108,6 +108,71 @@ describe "LowCardTables migration support" do
108
108
  @user3_again.respond_to?(:donation_level=).should_not be
109
109
  end
110
110
 
111
+ it "should not fail if a low-card table or column doesn't exist (presumably because it hasn't been migrated in yet)" do
112
+ tn = @table_name
113
+ migrate do
114
+ drop_table tn rescue nil
115
+
116
+ drop_table :lctables_spec_users rescue nil
117
+ create_table :lctables_spec_users do |t|
118
+ t.string :name, :null => false
119
+ end
120
+ end
121
+
122
+ define_model_class(:UserStatus, @table_name) { is_low_card_table }
123
+ define_model_class(:User, :lctables_spec_users) { has_low_card_table :status }
124
+
125
+ user1 = ::User.create!(:name => 'User1')
126
+ user1_again = ::User.find(user1.id)
127
+
128
+ user1_again.name.should == user1.name
129
+ end
130
+
131
+ it "should allow you to migrate in a low-card table and column and then everything should work" do
132
+ tn = @table_name
133
+ migrate do
134
+ drop_table tn rescue nil
135
+
136
+ drop_table :lctables_spec_users rescue nil
137
+ create_table :lctables_spec_users do |t|
138
+ t.string :name, :null => false
139
+ end
140
+ end
141
+
142
+ define_model_class(:UserStatus, @table_name) { is_low_card_table }
143
+ define_model_class(:User, :lctables_spec_users) { has_low_card_table :status }
144
+
145
+ user1 = ::User.create!(:name => 'User1')
146
+ user1_again = ::User.find(user1.id)
147
+
148
+ user1_again.name.should == user1.name
149
+
150
+ migrate do
151
+ create_table tn, :low_card => true do |t|
152
+ t.boolean :deleted, :null => false
153
+ t.boolean :deceased
154
+ t.string :gender, :null => false
155
+ t.integer :donation_level
156
+ end
157
+
158
+ add_column :lctables_spec_users, :user_status_id, :integer, :limit => 2
159
+ end
160
+
161
+ ::User.reset_column_information
162
+
163
+ user2 = ::User.create!(:name => 'User2', :deleted => false, :deceased => true, :gender => 'something', :donation_level => 4)
164
+ user2.deleted.should == false
165
+ user2.deceased.should == true
166
+ user2.gender.should == 'something'
167
+ user2.donation_level.should == 4
168
+
169
+ user2_again = ::User.find(user2.id)
170
+ user2_again.deleted.should == false
171
+ user2_again.deceased.should == true
172
+ user2_again.gender.should == 'something'
173
+ user2_again.donation_level.should == 4
174
+ end
175
+
111
176
  it "should automatically add a unique index in migrations if explicitly told it's a low-card table" do
112
177
  tn = @table_name
113
178
  migrate do
@@ -592,6 +657,13 @@ describe "LowCardTables migration support" do
592
657
  ::ActiveSupport::Notifications.subscribe('sql.active_record', @collector)
593
658
  end
594
659
 
660
+ after :each do
661
+ migrate do
662
+ drop_table :lctables_spec_admins rescue nil
663
+ drop_table :lctables_spec_guests rescue nil
664
+ end
665
+ end
666
+
595
667
  it "should not attempt to update any associated tables if a column is removed and told not to, but should still collapse IDs (#{remove_column_type})" do
596
668
  tn = @table_name
597
669
 
@@ -61,21 +61,6 @@ describe LowCardTables::HasLowCardTable::LowCardAssociation do
61
61
  end
62
62
  end
63
63
 
64
- it "should fail instantiation if the foreign key specified isn't a column" do
65
- lambda do
66
- LowCardTables::HasLowCardTable::LowCardAssociation.new(@model_class, :foobar,
67
- { :class => ModelClassNameAscName, :foreign_key => :bogus_id })
68
- end.should raise_error(ArgumentError, /bogus_id/i)
69
- end
70
-
71
- it "should fail instantiation if the foreign key inferred isn't a column" do
72
- allow(@col3).to receive(:name).and_return("whatever")
73
- lambda do
74
- LowCardTables::HasLowCardTable::LowCardAssociation.new(@model_class, :foobar,
75
- { :class => ModelClassNameAscName })
76
- end.should raise_error(ArgumentError, /model_class_name_foobar_id/i)
77
- end
78
-
79
64
  it "should fail instantiation if the class inferred can't be found" do
80
65
  allow(@col3).to receive(:name).and_return("model_class_name_yohoho_id")
81
66
  lambda do
@@ -119,6 +104,22 @@ describe LowCardTables::HasLowCardTable::LowCardAssociation do
119
104
  end
120
105
  end
121
106
 
107
+ describe "#foreign_key_column_exists?" do
108
+ it "should return false if the column doesn't exist" do
109
+ class ModelClassNameFoobar; end
110
+ allow(ModelClassNameFoobar).to receive(:is_low_card_table?).and_return(true)
111
+ expect(ModelClassNameFoobar).to receive(:low_card_referred_to_by).once.with(@model_class)
112
+ instance = LowCardTables::HasLowCardTable::LowCardAssociation.new(@model_class, :foobar, { })
113
+ expect(instance.foreign_key_column_exists?).to eq(false)
114
+ end
115
+
116
+ it "should return true if the column does exist" do
117
+ expect(ModelClassNameAscName).to receive(:low_card_referred_to_by).once.with(@model_class)
118
+ instance = LowCardTables::HasLowCardTable::LowCardAssociation.new(@model_class, :asc_name, { })
119
+ expect(instance.foreign_key_column_exists?).to eq(true)
120
+ end
121
+ end
122
+
122
123
  describe "#delegated_method_names" do
123
124
  def check_delegated_method_names(options, expected_results)
124
125
  expect(ModelClassNameAscName).to receive(:low_card_referred_to_by).once.with(@model_class)
metadata CHANGED
@@ -1,99 +1,178 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: low_card_tables
3
- version: !ruby/object:Gem::Version
4
- version: 1.0.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
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
- date: 2013-12-03 00:00:00 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
11
+ date: 2014-07-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
- prerelease: false
17
- requirement: &id001 !ruby/object:Gem::Requirement
18
- requirements:
19
- - &id002
20
- - ">="
21
- - !ruby/object:Gem::Version
22
- version: "0"
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ! '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
23
20
  type: :development
24
- version_requirements: *id001
25
- - !ruby/object:Gem::Dependency
26
- name: rake
27
21
  prerelease: false
28
- requirement: &id003 !ruby/object:Gem::Requirement
29
- requirements:
30
- - *id002
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: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
31
34
  type: :development
32
- version_requirements: *id003
33
- - !ruby/object:Gem::Dependency
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
34
42
  name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '2.14'
48
+ type: :development
35
49
  prerelease: false
36
- requirement: &id004 !ruby/object:Gem::Requirement
37
- requirements:
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
38
52
  - - ~>
39
- - !ruby/object:Gem::Version
40
- version: "2.14"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.14'
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: pry-debugger
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ! '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
41
76
  type: :development
42
- version_requirements: *id004
43
- - !ruby/object:Gem::Dependency
44
- name: activerecord
45
77
  prerelease: false
46
- requirement: &id005 !ruby/object:Gem::Requirement
47
- requirements:
48
- - - ">="
49
- - !ruby/object:Gem::Version
50
- version: "3.0"
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-stack_explorer
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: activerecord
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ! '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '3.0'
51
104
  - - <=
52
- - !ruby/object:Gem::Version
105
+ - !ruby/object:Gem::Version
53
106
  version: 4.99.99
54
107
  type: :runtime
55
- version_requirements: *id005
56
- - !ruby/object:Gem::Dependency
57
- name: activesupport
58
108
  prerelease: false
59
- requirement: &id006 !ruby/object:Gem::Requirement
60
- requirements:
61
- - - ">="
62
- - !ruby/object:Gem::Version
63
- version: "3.0"
109
+ version_requirements: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - ! '>='
112
+ - !ruby/object:Gem::Version
113
+ version: '3.0'
114
+ - - <=
115
+ - !ruby/object:Gem::Version
116
+ version: 4.99.99
117
+ - !ruby/object:Gem::Dependency
118
+ name: activesupport
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ! '>='
122
+ - !ruby/object:Gem::Version
123
+ version: '3.0'
64
124
  - - <=
65
- - !ruby/object:Gem::Version
125
+ - !ruby/object:Gem::Version
66
126
  version: 4.99.99
67
127
  type: :runtime
68
- version_requirements: *id006
69
- - !ruby/object:Gem::Dependency
70
- name: activerecord-import
71
128
  prerelease: false
72
- requirement: &id007 !ruby/object:Gem::Requirement
73
- requirements:
74
- - *id002
129
+ version_requirements: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - ! '>='
132
+ - !ruby/object:Gem::Version
133
+ version: '3.0'
134
+ - - <=
135
+ - !ruby/object:Gem::Version
136
+ version: 4.99.99
137
+ - !ruby/object:Gem::Dependency
138
+ name: activerecord-import
139
+ requirement: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - ! '>='
142
+ - !ruby/object:Gem::Version
143
+ version: '0'
75
144
  type: :runtime
76
- version_requirements: *id007
77
- - !ruby/object:Gem::Dependency
78
- name: mysql2
79
145
  prerelease: false
80
- requirement: &id008 !ruby/object:Gem::Requirement
81
- requirements:
82
- - *id002
146
+ version_requirements: !ruby/object:Gem::Requirement
147
+ requirements:
148
+ - - ! '>='
149
+ - !ruby/object:Gem::Version
150
+ version: '0'
151
+ - !ruby/object:Gem::Dependency
152
+ name: mysql2
153
+ requirement: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - ! '>='
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
83
158
  type: :development
84
- version_requirements: *id008
85
- description: "\"Bitfields for ActiveRecord\": store low-cardinality columns in a separate table for vastly more flexibility and better performance."
86
- email:
159
+ prerelease: false
160
+ version_requirements: !ruby/object:Gem::Requirement
161
+ requirements:
162
+ - - ! '>='
163
+ - !ruby/object:Gem::Version
164
+ version: '0'
165
+ description: ! '"Bitfields for ActiveRecord": store low-cardinality columns in a separate
166
+ table for vastly more flexibility and better performance.'
167
+ email:
87
168
  - andrew@geweke.org
88
169
  executables: []
89
-
90
170
  extensions: []
91
-
92
171
  extra_rdoc_files: []
93
-
94
- files:
172
+ files:
95
173
  - .gitignore
96
174
  - .travis.yml
175
+ - CHANGES.md
97
176
  - Gemfile
98
177
  - LICENSE
99
178
  - README.md
@@ -152,29 +231,34 @@ files:
152
231
  - spec/low_card_tables/unit/low_card_table/row_manager_spec.rb
153
232
  - spec/low_card_tables/unit/low_card_table/table_unique_index_spec.rb
154
233
  homepage: https://github.com/ageweke/low_card_tables
155
- licenses:
234
+ licenses:
156
235
  - MIT
157
236
  metadata: {}
158
-
159
237
  post_install_message:
160
238
  rdoc_options: []
161
-
162
- require_paths:
239
+ require_paths:
163
240
  - lib
164
- required_ruby_version: !ruby/object:Gem::Requirement
165
- requirements:
166
- - *id002
167
- required_rubygems_version: !ruby/object:Gem::Requirement
168
- requirements:
169
- - *id002
241
+ required_ruby_version: !ruby/object:Gem::Requirement
242
+ requirements:
243
+ - - ! '>='
244
+ - !ruby/object:Gem::Version
245
+ version: '0'
246
+ required_rubygems_version: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - ! '>='
249
+ - !ruby/object:Gem::Version
250
+ version: '0'
170
251
  requirements: []
171
-
172
252
  rubyforge_project:
173
- rubygems_version: 2.0.13
253
+ rubygems_version: 2.2.2
174
254
  signing_key:
175
255
  specification_version: 4
176
- summary: "\"Bitfields for ActiveRecord\": instead of storing multiple columns with low cardinality (few distinct values) directly in a table, which results in performance and maintainability problems, break them out into a separate table with almost zero overhead. Trivially add new columns without migrating a main, enormous table. Query on combinations of values very efficiently."
177
- test_files:
256
+ summary: ! '"Bitfields for ActiveRecord": instead of storing multiple columns with
257
+ low cardinality (few distinct values) directly in a table, which results in performance
258
+ and maintainability problems, break them out into a separate table with almost zero
259
+ overhead. Trivially add new columns without migrating a main, enormous table. Query
260
+ on combinations of values very efficiently.'
261
+ test_files:
178
262
  - spec/low_card_tables/helpers/database_helper.rb
179
263
  - spec/low_card_tables/helpers/query_spy_helper.rb
180
264
  - spec/low_card_tables/helpers/system_helpers.rb