ar-octopus 0.4.0 → 0.5.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.
Files changed (77) hide show
  1. data/.gitignore +11 -0
  2. data/.travis.yml +22 -0
  3. data/Appraisals +18 -0
  4. data/Gemfile +3 -12
  5. data/README.mkdn +63 -24
  6. data/Rakefile +70 -92
  7. data/ar-octopus.gemspec +25 -198
  8. data/lib/ar-octopus.rb +1 -0
  9. data/lib/octopus.rb +73 -25
  10. data/lib/octopus/association.rb +6 -5
  11. data/lib/octopus/association_collection.rb +58 -4
  12. data/lib/octopus/has_and_belongs_to_many_association.rb +4 -4
  13. data/lib/octopus/logger.rb +9 -4
  14. data/lib/octopus/migration.rb +155 -50
  15. data/lib/octopus/model.rb +98 -34
  16. data/lib/octopus/proxy.rb +124 -53
  17. data/lib/octopus/rails2/association.rb +46 -93
  18. data/lib/octopus/rails2/persistence.rb +1 -1
  19. data/lib/octopus/rails2/scope.rb +17 -0
  20. data/lib/octopus/rails3.1/singular_association.rb +34 -0
  21. data/lib/octopus/rails3.2/persistence.rb +12 -0
  22. data/lib/octopus/rails3/abstract_adapter.rb +39 -0
  23. data/lib/octopus/rails3/arel.rb +5 -5
  24. data/lib/octopus/rails3/log_subscriber.rb +22 -0
  25. data/lib/octopus/rails3/persistence.rb +10 -5
  26. data/lib/octopus/railtie.rb +13 -0
  27. data/lib/octopus/scope_proxy.rb +22 -16
  28. data/lib/octopus/version.rb +3 -0
  29. data/lib/tasks/octopus.rake +20 -0
  30. data/sample_app/Gemfile +2 -2
  31. data/sample_app/config/initializers/inflections.rb +1 -1
  32. data/sample_app/config/initializers/secret_token.rb +1 -1
  33. data/sample_app/db/migrate/20100720172730_create_items.rb +1 -1
  34. data/sample_app/db/migrate/20100720210335_create_sample_users.rb +1 -1
  35. data/sample_app/db/seeds.rb +1 -1
  36. data/sample_app/features/migrate.feature +12 -12
  37. data/sample_app/features/seed.feature +3 -3
  38. data/sample_app/features/step_definitions/web_steps.rb +5 -5
  39. data/sample_app/features/support/env.rb +8 -8
  40. data/sample_app/lib/tasks/cucumber.rake +2 -2
  41. data/sample_app/public/javascripts/effects.js +1 -1
  42. data/spec/config/shards.yml +38 -28
  43. data/spec/migrations/11_add_field_in_all_slaves.rb +1 -1
  44. data/spec/migrations/12_create_users_using_block.rb +2 -2
  45. data/spec/migrations/13_create_users_using_block_and_using.rb +2 -2
  46. data/spec/migrations/14_create_users_on_shards_of_a_group_with_versions.rb +11 -0
  47. data/spec/migrations/1_create_users_on_master.rb +1 -1
  48. data/spec/migrations/2_create_users_on_canada.rb +1 -1
  49. data/spec/migrations/3_create_users_on_both_shards.rb +1 -1
  50. data/spec/migrations/4_create_users_on_shards_of_a_group.rb +1 -1
  51. data/spec/migrations/5_create_users_on_multiples_groups.rb +1 -1
  52. data/spec/migrations/6_raise_exception_with_invalid_shard_name.rb +1 -1
  53. data/spec/migrations/7_raise_exception_with_invalid_multiple_shard_names.rb +1 -1
  54. data/spec/migrations/8_raise_exception_with_invalid_group_name.rb +1 -1
  55. data/spec/migrations/9_raise_exception_with_multiple_invalid_group_names.rb +1 -1
  56. data/spec/octopus/association_spec.rb +88 -70
  57. data/spec/octopus/log_subscriber_spec.rb +22 -0
  58. data/spec/octopus/logger_spec.rb +28 -15
  59. data/spec/octopus/migration_spec.rb +47 -43
  60. data/spec/octopus/model_spec.rb +179 -13
  61. data/spec/octopus/octopus_spec.rb +26 -4
  62. data/spec/octopus/proxy_spec.rb +61 -23
  63. data/spec/octopus/{replication_specs.rb → replication_spec.rb} +33 -26
  64. data/spec/octopus/scope_proxy_spec.rb +3 -3
  65. data/spec/octopus/sharded_spec.rb +9 -9
  66. data/spec/spec_helper.rb +10 -12
  67. data/spec/support/active_record/connection_adapters/modify_config_adapter.rb +17 -0
  68. data/spec/support/database_connection.rb +2 -0
  69. data/spec/{database_models.rb → support/database_models.rb} +27 -2
  70. data/spec/support/octopus_helper.rb +50 -0
  71. data/spec/tasks/octopus.rake_spec.rb +36 -0
  72. metadata +188 -169
  73. data/Gemfile.lock +0 -68
  74. data/lib/octopus/rails3/association.rb +0 -112
  75. data/spec/database_connection.rb +0 -4
  76. data/spec/octopus/controller_spec.rb +0 -34
  77. data/spec/octopus_helper.rb +0 -37
@@ -0,0 +1,2 @@
1
+ ActiveRecord::Base.establish_connection(:adapter => "mysql", :database => "octopus_shard_1", :username => "root", :password => "")
2
+ ActiveRecord::Base.logger = Logger.new(File.open('database.log', 'a'))
@@ -1,5 +1,15 @@
1
+ # Rails 3.1 needs to do some introspection around the base class, which requires
2
+ # the model be a descendent of ActiveRecord::Base.
3
+ class BlankModel < ActiveRecord::Base; end;
4
+
1
5
  #The user class is just sharded, not replicated
2
6
  class User < ActiveRecord::Base
7
+ if Octopus.rails32? || Octopus.rails31?
8
+ scope :thiago, {:conditions => {:name => "Thiago"}}
9
+ else
10
+ named_scope :thiago, {:conditions => {:name => "Thiago"}}
11
+ end
12
+
3
13
  def awesome_queries
4
14
  Octopus.using(:canada) do
5
15
  User.create(:name => "teste")
@@ -21,7 +31,7 @@ end
21
31
 
22
32
  #This class sets its own connection
23
33
  class CustomConnection < ActiveRecord::Base
24
- octopus_establish_connection(:adapter => "mysql2", :database => "octopus_shard2", :username => "root", :password => "")
34
+ octopus_establish_connection(:adapter => "mysql", :database => "octopus_shard_2", :username => "root", :password => "")
25
35
  end
26
36
 
27
37
  #This items belongs to a client
@@ -73,5 +83,20 @@ end
73
83
 
74
84
 
75
85
  class Bacon < ActiveRecord::Base
76
- octopus_set_table_name "yummy"
86
+ set_table_name "yummy"
87
+ end
88
+
89
+ class Cheese < ActiveRecord::Base
90
+ set_table_name { "yummy" }
91
+ end
92
+
93
+ if Octopus.rails32?
94
+ class Ham < ActiveRecord::Base
95
+ self.table_name = "yummy"
96
+ end
97
+ end
98
+
99
+ #This class sets its own connection
100
+ class Advert < ActiveRecord::Base
101
+ establish_connection(:adapter => "postgresql", :database => "octopus_shard_1", :username => ENV["POSTGRES_USER"] || "postgres", :password => "")
77
102
  end
@@ -0,0 +1,50 @@
1
+ module OctopusHelper
2
+ def self.clean_all_shards(shards)
3
+ if shards.nil?
4
+ shards = BlankModel.using(:master).connection.instance_variable_get(:@shards).keys
5
+ end
6
+
7
+ shards.each do |shard_symbol|
8
+ ['schema_migrations', 'users', 'clients', 'cats', 'items', 'keyboards', 'computers', 'permissions_roles', 'roles', 'permissions', 'assignments', 'projects', 'programmers', "yummy", 'adverts'].each do |tables|
9
+ BlankModel.using(shard_symbol).connection.execute("DELETE FROM #{tables}")
10
+ end
11
+ end
12
+ end
13
+
14
+ def self.clean_connection_proxy()
15
+ Thread.current["octopus.current_model"] = nil
16
+ Thread.current["octopus.current_shard"] = nil
17
+ Thread.current["octopus.current_group"] = nil
18
+ Thread.current["octopus.block"] = nil
19
+ Thread.current["octopus.last_current_shard"] = nil
20
+
21
+ ActiveRecord::Base.send(:class_variable_set, '@@connection_proxy', nil)
22
+ end
23
+
24
+ def self.migrating_to_version(version, &block)
25
+ migrations_root = File.expand_path(File.join(File.dirname(__FILE__), '..', 'migrations'))
26
+
27
+ begin
28
+ ActiveRecord::Migrator.run(:up, migrations_root, version)
29
+ yield
30
+ ensure
31
+ ActiveRecord::Migrator.run(:down, migrations_root, version)
32
+ end
33
+ end
34
+
35
+ def self.using_environment(environment, &block)
36
+ begin
37
+ set_octopus_env(environment.to_s)
38
+ clean_connection_proxy()
39
+ yield
40
+ ensure
41
+ set_octopus_env('octopus')
42
+ clean_connection_proxy()
43
+ end
44
+ end
45
+
46
+ def self.set_octopus_env(env)
47
+ Octopus.instance_variable_set(:@config, nil)
48
+ Octopus.stub!(:env).and_return(env)
49
+ end
50
+ end
@@ -0,0 +1,36 @@
1
+ require "spec_helper"
2
+ require "rake"
3
+
4
+ describe "octopus.rake" do
5
+ before do
6
+ load File.expand_path("../../../lib/tasks/octopus.rake", __FILE__)
7
+ Rake::Task.define_task(:environment)
8
+ end
9
+
10
+ describe "octopus:copy_schema_versions" do
11
+ class SchemaMigration < ActiveRecord::Base; end
12
+
13
+ before do
14
+ Rake::Task["octopus:copy_schema_versions"].reenable
15
+
16
+ path = File.expand_path("../../migrations", __FILE__)
17
+ if Octopus.rails31? || Octopus.rails32?
18
+ ActiveRecord::Migrator.migrations_paths = [path]
19
+ else
20
+ ActiveRecord::Migrator.stub(:migrations_path => path)
21
+ end
22
+ end
23
+
24
+ it "assumes each shard migrated to the current master version" do
25
+ SchemaMigration.create(:version => 1)
26
+ SchemaMigration.create(:version => 2)
27
+ SchemaMigration.create(:version => 3)
28
+
29
+ Rake::Task["octopus:copy_schema_versions"].invoke
30
+
31
+ ActiveRecord::Base.connection.shard_names.each do |shard_name|
32
+ Octopus.using(shard_name) { ActiveRecord::Migrator.get_all_versions }.should == [1, 2, 3]
33
+ end
34
+ end
35
+ end
36
+ end
metadata CHANGED
@@ -1,182 +1,184 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ar-octopus
3
- version: !ruby/object:Gem::Version
4
- hash: 15
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.5.0
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 4
9
- - 0
10
- version: 0.4.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Thiago Pradi
14
9
  - Mike Perham
10
+ - Gabriel Sobrinho
15
11
  autorequire:
16
12
  bindir: bin
17
13
  cert_chain: []
18
-
19
- date: 2011-07-03 00:00:00 -03:00
20
- default_executable:
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
23
- prerelease: false
24
- version_requirements: &id001 !ruby/object:Gem::Requirement
14
+ date: 2013-05-07 00:00:00.000000000 Z
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: activerecord
18
+ requirement: !ruby/object:Gem::Requirement
25
19
  none: false
26
- requirements:
27
- - - "="
28
- - !ruby/object:Gem::Version
29
- hash: 11
30
- segments:
31
- - 3
32
- - 0
33
- - 6
34
- version: 3.0.6
20
+ requirements:
21
+ - - ! '>='
22
+ - !ruby/object:Gem::Version
23
+ version: 2.3.0
35
24
  type: :runtime
36
- requirement: *id001
37
- name: activerecord
38
- - !ruby/object:Gem::Dependency
39
25
  prerelease: false
40
- version_requirements: &id002 !ruby/object:Gem::Requirement
26
+ version_requirements: !ruby/object:Gem::Requirement
41
27
  none: false
42
- requirements:
43
- - - "="
44
- - !ruby/object:Gem::Version
45
- hash: 11
46
- segments:
47
- - 3
48
- - 0
49
- - 6
50
- version: 3.0.6
28
+ requirements:
29
+ - - ! '>='
30
+ - !ruby/object:Gem::Version
31
+ version: 2.3.0
32
+ - !ruby/object:Gem::Dependency
33
+ name: activesupport
34
+ requirement: !ruby/object:Gem::Requirement
35
+ none: false
36
+ requirements:
37
+ - - ! '>='
38
+ - !ruby/object:Gem::Version
39
+ version: 2.3.0
51
40
  type: :runtime
52
- requirement: *id002
53
- name: actionpack
54
- - !ruby/object:Gem::Dependency
55
41
  prerelease: false
56
- version_requirements: &id003 !ruby/object:Gem::Requirement
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ none: false
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: 2.3.0
48
+ - !ruby/object:Gem::Dependency
49
+ name: rake
50
+ requirement: !ruby/object:Gem::Requirement
57
51
  none: false
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- hash: 62196421
62
- segments:
63
- - 2
64
- - 0
65
- - 0
66
- - beta
67
- - 19
68
- version: 2.0.0.beta.19
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: 0.8.7
69
56
  type: :development
70
- requirement: *id003
71
- name: rspec
72
- - !ruby/object:Gem::Dependency
73
57
  prerelease: false
74
- version_requirements: &id004 !ruby/object:Gem::Requirement
58
+ version_requirements: !ruby/object:Gem::Requirement
75
59
  none: false
76
- requirements:
77
- - - ">="
78
- - !ruby/object:Gem::Version
79
- hash: 3
80
- segments:
81
- - 0
82
- version: "0"
60
+ requirements:
61
+ - - ! '>='
62
+ - !ruby/object:Gem::Version
63
+ version: 0.8.7
64
+ - !ruby/object:Gem::Dependency
65
+ name: rspec
66
+ requirement: !ruby/object:Gem::Requirement
67
+ none: false
68
+ requirements:
69
+ - - ! '>='
70
+ - !ruby/object:Gem::Version
71
+ version: 2.0.0
83
72
  type: :development
84
- requirement: *id004
85
- name: mysql2
86
- - !ruby/object:Gem::Dependency
87
73
  prerelease: false
88
- version_requirements: &id005 !ruby/object:Gem::Requirement
74
+ version_requirements: !ruby/object:Gem::Requirement
89
75
  none: false
90
- requirements:
91
- - - ">="
92
- - !ruby/object:Gem::Version
93
- hash: 59
94
- segments:
95
- - 0
96
- - 9
97
- - 0
98
- version: 0.9.0
76
+ requirements:
77
+ - - ! '>='
78
+ - !ruby/object:Gem::Version
79
+ version: 2.0.0
80
+ - !ruby/object:Gem::Dependency
81
+ name: mysql
82
+ requirement: !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - '='
86
+ - !ruby/object:Gem::Version
87
+ version: 2.8.1
99
88
  type: :development
100
- requirement: *id005
89
+ prerelease: false
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ none: false
92
+ requirements:
93
+ - - '='
94
+ - !ruby/object:Gem::Version
95
+ version: 2.8.1
96
+ - !ruby/object:Gem::Dependency
101
97
  name: pg
102
- - !ruby/object:Gem::Dependency
98
+ requirement: !ruby/object:Gem::Requirement
99
+ none: false
100
+ requirements:
101
+ - - ! '>='
102
+ - !ruby/object:Gem::Version
103
+ version: 0.11.0
104
+ type: :development
103
105
  prerelease: false
104
- version_requirements: &id006 !ruby/object:Gem::Requirement
106
+ version_requirements: !ruby/object:Gem::Requirement
105
107
  none: false
106
- requirements:
107
- - - ">="
108
- - !ruby/object:Gem::Version
109
- hash: 25
110
- segments:
111
- - 1
112
- - 3
113
- - 1
114
- version: 1.3.1
108
+ requirements:
109
+ - - ! '>='
110
+ - !ruby/object:Gem::Version
111
+ version: 0.11.0
112
+ - !ruby/object:Gem::Dependency
113
+ name: sqlite3
114
+ requirement: !ruby/object:Gem::Requirement
115
+ none: false
116
+ requirements:
117
+ - - ! '>='
118
+ - !ruby/object:Gem::Version
119
+ version: 1.3.4
115
120
  type: :development
116
- requirement: *id006
117
- name: sqlite3-ruby
118
- - !ruby/object:Gem::Dependency
119
121
  prerelease: false
120
- version_requirements: &id007 !ruby/object:Gem::Requirement
122
+ version_requirements: !ruby/object:Gem::Requirement
123
+ none: false
124
+ requirements:
125
+ - - ! '>='
126
+ - !ruby/object:Gem::Version
127
+ version: 1.3.4
128
+ - !ruby/object:Gem::Dependency
129
+ name: pry
130
+ requirement: !ruby/object:Gem::Requirement
121
131
  none: false
122
- requirements:
123
- - - ">="
124
- - !ruby/object:Gem::Version
125
- hash: 7
126
- segments:
127
- - 1
128
- - 4
129
- version: "1.4"
132
+ requirements:
133
+ - - ! '>='
134
+ - !ruby/object:Gem::Version
135
+ version: '0'
130
136
  type: :development
131
- requirement: *id007
132
- name: jeweler
133
- - !ruby/object:Gem::Dependency
134
137
  prerelease: false
135
- version_requirements: &id008 !ruby/object:Gem::Requirement
138
+ version_requirements: !ruby/object:Gem::Requirement
136
139
  none: false
137
- requirements:
138
- - - ">="
139
- - !ruby/object:Gem::Version
140
- hash: 5
141
- segments:
142
- - 2
143
- - 3
144
- version: "2.3"
140
+ requirements:
141
+ - - ! '>='
142
+ - !ruby/object:Gem::Version
143
+ version: '0'
144
+ - !ruby/object:Gem::Dependency
145
+ name: appraisal
146
+ requirement: !ruby/object:Gem::Requirement
147
+ none: false
148
+ requirements:
149
+ - - ! '>='
150
+ - !ruby/object:Gem::Version
151
+ version: 0.3.8
145
152
  type: :development
146
- requirement: *id008
147
- name: actionpack
148
- - !ruby/object:Gem::Dependency
149
153
  prerelease: false
150
- version_requirements: &id009 !ruby/object:Gem::Requirement
154
+ version_requirements: !ruby/object:Gem::Requirement
151
155
  none: false
152
- requirements:
153
- - - ">="
154
- - !ruby/object:Gem::Version
155
- hash: 5
156
- segments:
157
- - 2
158
- - 3
159
- version: "2.3"
160
- type: :runtime
161
- requirement: *id009
162
- name: activerecord
163
- description: This gem allows you to use sharded databases with ActiveRecord. this also provides a interface for replication and for running migrations with multiples shards.
164
- email: tchandy@gmail.com
156
+ requirements:
157
+ - - ! '>='
158
+ - !ruby/object:Gem::Version
159
+ version: 0.3.8
160
+ description: This gem allows you to use sharded databases with ActiveRecord. This
161
+ also provides a interface for replication and for running migrations with multiples
162
+ shards.
163
+ email:
164
+ - tchandy@gmail.com
165
+ - mperham@gmail.com
166
+ - gabriel.sobrinho@gmail.com
165
167
  executables: []
166
-
167
168
  extensions: []
168
-
169
- extra_rdoc_files:
170
- - README.mkdn
171
- files:
169
+ extra_rdoc_files: []
170
+ files:
171
+ - .gitignore
172
172
  - .rspec
173
+ - .travis.yml
174
+ - Appraisals
173
175
  - Gemfile
174
- - Gemfile.lock
175
176
  - README.mkdn
176
177
  - Rakefile
177
178
  - TODO.txt
178
179
  - ar-octopus.gemspec
179
180
  - init.rb
181
+ - lib/ar-octopus.rb
180
182
  - lib/octopus.rb
181
183
  - lib/octopus/association.rb
182
184
  - lib/octopus/association_collection.rb
@@ -187,10 +189,17 @@ files:
187
189
  - lib/octopus/proxy.rb
188
190
  - lib/octopus/rails2/association.rb
189
191
  - lib/octopus/rails2/persistence.rb
192
+ - lib/octopus/rails2/scope.rb
193
+ - lib/octopus/rails3.1/singular_association.rb
194
+ - lib/octopus/rails3.2/persistence.rb
195
+ - lib/octopus/rails3/abstract_adapter.rb
190
196
  - lib/octopus/rails3/arel.rb
191
- - lib/octopus/rails3/association.rb
197
+ - lib/octopus/rails3/log_subscriber.rb
192
198
  - lib/octopus/rails3/persistence.rb
199
+ - lib/octopus/railtie.rb
193
200
  - lib/octopus/scope_proxy.rb
201
+ - lib/octopus/version.rb
202
+ - lib/tasks/octopus.rake
194
203
  - rails/init.rb
195
204
  - sample_app/.gitignore
196
205
  - sample_app/.rspec
@@ -258,12 +267,11 @@ files:
258
267
  - sample_app/test/test_helper.rb
259
268
  - sample_app/vendor/plugins/.gitkeep
260
269
  - spec/config/shards.yml
261
- - spec/database_connection.rb
262
- - spec/database_models.rb
263
270
  - spec/migrations/10_create_users_using_replication.rb
264
271
  - spec/migrations/11_add_field_in_all_slaves.rb
265
272
  - spec/migrations/12_create_users_using_block.rb
266
273
  - spec/migrations/13_create_users_using_block_and_using.rb
274
+ - spec/migrations/14_create_users_on_shards_of_a_group_with_versions.rb
267
275
  - spec/migrations/1_create_users_on_master.rb
268
276
  - spec/migrations/2_create_users_on_canada.rb
269
277
  - spec/migrations/3_create_users_on_both_shards.rb
@@ -274,58 +282,65 @@ files:
274
282
  - spec/migrations/8_raise_exception_with_invalid_group_name.rb
275
283
  - spec/migrations/9_raise_exception_with_multiple_invalid_group_names.rb
276
284
  - spec/octopus/association_spec.rb
277
- - spec/octopus/controller_spec.rb
285
+ - spec/octopus/log_subscriber_spec.rb
278
286
  - spec/octopus/logger_spec.rb
279
287
  - spec/octopus/migration_spec.rb
280
288
  - spec/octopus/model_spec.rb
281
289
  - spec/octopus/octopus_spec.rb
282
290
  - spec/octopus/proxy_spec.rb
283
- - spec/octopus/replication_specs.rb
291
+ - spec/octopus/replication_spec.rb
284
292
  - spec/octopus/scope_proxy_spec.rb
285
293
  - spec/octopus/sharded_spec.rb
286
- - spec/octopus_helper.rb
287
294
  - spec/spec_helper.rb
288
- has_rdoc: true
289
- homepage: http://github.com/tchandy/octopus
295
+ - spec/support/active_record/connection_adapters/modify_config_adapter.rb
296
+ - spec/support/database_connection.rb
297
+ - spec/support/database_models.rb
298
+ - spec/support/octopus_helper.rb
299
+ - spec/tasks/octopus.rake_spec.rb
300
+ homepage: https://github.com/tchandy/octopus
290
301
  licenses: []
302
+ post_install_message: ! 'Important: If you are upgrading from < Octopus 0.5.0 you
303
+ need to run:
304
+
305
+ $ rake octopus:copy_schema_versions
291
306
 
292
- post_install_message:
293
- rdoc_options: []
294
307
 
295
- require_paths:
308
+ Octopus now stores schema version information in each shard and migrations will
309
+ not work properly unless this task is invoked.'
310
+ rdoc_options: []
311
+ require_paths:
296
312
  - lib
297
- required_ruby_version: !ruby/object:Gem::Requirement
313
+ required_ruby_version: !ruby/object:Gem::Requirement
298
314
  none: false
299
- requirements:
300
- - - ">="
301
- - !ruby/object:Gem::Version
302
- hash: 3
303
- segments:
315
+ requirements:
316
+ - - ! '>='
317
+ - !ruby/object:Gem::Version
318
+ version: '0'
319
+ segments:
304
320
  - 0
305
- version: "0"
306
- required_rubygems_version: !ruby/object:Gem::Requirement
321
+ hash: 1814625454077145936
322
+ required_rubygems_version: !ruby/object:Gem::Requirement
307
323
  none: false
308
- requirements:
309
- - - ">="
310
- - !ruby/object:Gem::Version
311
- hash: 3
312
- segments:
324
+ requirements:
325
+ - - ! '>='
326
+ - !ruby/object:Gem::Version
327
+ version: '0'
328
+ segments:
313
329
  - 0
314
- version: "0"
330
+ hash: 1814625454077145936
315
331
  requirements: []
316
-
317
332
  rubyforge_project:
318
- rubygems_version: 1.4.2
333
+ rubygems_version: 1.8.24
319
334
  signing_key:
320
335
  specification_version: 3
321
336
  summary: Easy Database Sharding for ActiveRecord
322
- test_files:
323
- - spec/database_connection.rb
324
- - spec/database_models.rb
337
+ test_files:
338
+ - spec/config/shards.yml
325
339
  - spec/migrations/10_create_users_using_replication.rb
326
340
  - spec/migrations/11_add_field_in_all_slaves.rb
327
341
  - spec/migrations/12_create_users_using_block.rb
328
342
  - spec/migrations/13_create_users_using_block_and_using.rb
343
+ - spec/migrations/14_create_users_on_shards_of_a_group_with_versions.rb
329
344
  - spec/migrations/1_create_users_on_master.rb
330
345
  - spec/migrations/2_create_users_on_canada.rb
331
346
  - spec/migrations/3_create_users_on_both_shards.rb
@@ -336,14 +351,18 @@ test_files:
336
351
  - spec/migrations/8_raise_exception_with_invalid_group_name.rb
337
352
  - spec/migrations/9_raise_exception_with_multiple_invalid_group_names.rb
338
353
  - spec/octopus/association_spec.rb
339
- - spec/octopus/controller_spec.rb
354
+ - spec/octopus/log_subscriber_spec.rb
340
355
  - spec/octopus/logger_spec.rb
341
356
  - spec/octopus/migration_spec.rb
342
357
  - spec/octopus/model_spec.rb
343
358
  - spec/octopus/octopus_spec.rb
344
359
  - spec/octopus/proxy_spec.rb
345
- - spec/octopus/replication_specs.rb
360
+ - spec/octopus/replication_spec.rb
346
361
  - spec/octopus/scope_proxy_spec.rb
347
362
  - spec/octopus/sharded_spec.rb
348
- - spec/octopus_helper.rb
349
363
  - spec/spec_helper.rb
364
+ - spec/support/active_record/connection_adapters/modify_config_adapter.rb
365
+ - spec/support/database_connection.rb
366
+ - spec/support/database_models.rb
367
+ - spec/support/octopus_helper.rb
368
+ - spec/tasks/octopus.rake_spec.rb