ar-octopus 0.6.0 → 0.6.1
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.
- data/.gitignore +1 -1
- data/.travis.yml +7 -6
- data/README.mkdn +1 -1
- data/Rakefile +21 -1
- data/gemfiles/rails30.gemfile +8 -0
- data/gemfiles/rails31.gemfile +7 -0
- data/gemfiles/rails32.gemfile +7 -0
- data/lib/octopus.rb +4 -1
- data/lib/octopus/model.rb +15 -0
- data/lib/octopus/version.rb +1 -1
- data/sample_app/Gemfile +9 -10
- data/sample_app/README.rdoc +261 -0
- data/sample_app/Rakefile +2 -2
- data/sample_app/app/assets/images/rails.png +0 -0
- data/sample_app/app/assets/javascripts/application.js +15 -0
- data/sample_app/app/assets/stylesheets/application.css +13 -0
- data/sample_app/app/mailers/.gitkeep +0 -0
- data/sample_app/app/models/.gitkeep +0 -0
- data/sample_app/config/application.rb +30 -14
- data/sample_app/config/boot.rb +3 -10
- data/sample_app/config/database.yml +18 -15
- data/sample_app/config/environments/development.rb +22 -4
- data/sample_app/config/environments/production.rb +35 -14
- data/sample_app/config/environments/test.rb +13 -8
- data/sample_app/config/initializers/inflections.rb +5 -0
- data/sample_app/config/initializers/secret_token.rb +1 -1
- data/sample_app/config/initializers/session_store.rb +3 -3
- data/sample_app/config/initializers/wrap_parameters.rb +14 -0
- data/sample_app/config/locales/en.yml +1 -1
- data/sample_app/config/routes.rb +1 -1
- data/sample_app/db/schema.rb +7 -8
- data/sample_app/features/support/database.rb +13 -0
- data/sample_app/features/support/env.rb +43 -58
- data/sample_app/lib/assets/.gitkeep +0 -0
- data/sample_app/lib/tasks/cucumber.rake +15 -3
- data/sample_app/log/.gitkeep +0 -0
- data/sample_app/vendor/assets/javascripts/.gitkeep +0 -0
- data/sample_app/vendor/assets/stylesheets/.gitkeep +0 -0
- data/spec/octopus/association_spec.rb +1 -1
- data/spec/octopus/octopus_spec.rb +4 -4
- data/spec/octopus/proxy_spec.rb +40 -7
- data/spec/octopus/replication_spec.rb +1 -1
- data/spec/octopus/sharded_spec.rb +1 -1
- data/spec/spec_helper.rb +0 -2
- data/spec/support/database_models.rb +21 -0
- data/spec/support/octopus_helper.rb +7 -1
- metadata +175 -156
- data/sample_app/test/performance/browsing_test.rb +0 -9
- data/sample_app/test/test_helper.rb +0 -13
File without changes
|
@@ -14,19 +14,19 @@ begin
|
|
14
14
|
require 'cucumber/rake/task'
|
15
15
|
|
16
16
|
namespace :cucumber do
|
17
|
-
Cucumber::Rake::Task.new({:ok => '
|
17
|
+
Cucumber::Rake::Task.new({:ok => 'test:prepare'}, 'Run features that should pass') do |t|
|
18
18
|
t.binary = vendored_cucumber_bin # If nil, the gem's binary is used.
|
19
19
|
t.fork = true # You may get faster startup if you set this to false
|
20
20
|
t.profile = 'default'
|
21
21
|
end
|
22
22
|
|
23
|
-
Cucumber::Rake::Task.new({:wip => '
|
23
|
+
Cucumber::Rake::Task.new({:wip => 'test:prepare'}, 'Run features that are being worked on') do |t|
|
24
24
|
t.binary = vendored_cucumber_bin
|
25
25
|
t.fork = true # You may get faster startup if you set this to false
|
26
26
|
t.profile = 'wip'
|
27
27
|
end
|
28
28
|
|
29
|
-
Cucumber::Rake::Task.new({:rerun => '
|
29
|
+
Cucumber::Rake::Task.new({:rerun => 'test:prepare'}, 'Record failing features and run only them if any exist') do |t|
|
30
30
|
t.binary = vendored_cucumber_bin
|
31
31
|
t.fork = true # You may get faster startup if you set this to false
|
32
32
|
t.profile = 'rerun'
|
@@ -34,6 +34,12 @@ begin
|
|
34
34
|
|
35
35
|
desc 'Run all features'
|
36
36
|
task :all => [:ok, :wip]
|
37
|
+
|
38
|
+
task :statsetup do
|
39
|
+
require 'rails/code_statistics'
|
40
|
+
::STATS_DIRECTORIES << %w(Cucumber\ features features) if File.exist?('features')
|
41
|
+
::CodeStatistics::TEST_TYPES << "Cucumber features" if File.exist?('features')
|
42
|
+
end
|
37
43
|
end
|
38
44
|
desc 'Alias for cucumber:ok'
|
39
45
|
task :cucumber => 'cucumber:ok'
|
@@ -43,6 +49,12 @@ begin
|
|
43
49
|
task :features => :cucumber do
|
44
50
|
STDERR.puts "*** The 'features' task is deprecated. See rake -T cucumber ***"
|
45
51
|
end
|
52
|
+
|
53
|
+
# In case we don't have the generic Rails test:prepare hook, append a no-op task that we can depend upon.
|
54
|
+
task 'test:prepare' do
|
55
|
+
end
|
56
|
+
|
57
|
+
task :stats => 'cucumber:statsetup'
|
46
58
|
rescue LoadError
|
47
59
|
desc 'cucumber rake task not available (cucumber not installed)'
|
48
60
|
task :cucumber do
|
File without changes
|
File without changes
|
File without changes
|
@@ -57,7 +57,7 @@ describe Octopus::Association, :shards => [:brazil, :master, :canada] do
|
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
60
|
-
describe "when you have a N x N
|
60
|
+
describe "when you have a N x N relationship" do
|
61
61
|
before(:each) do
|
62
62
|
@brazil_role = Role.using(:brazil).create!(:name => "Brazil Role")
|
63
63
|
@master_role = Role.create!(:name => "Master Role")
|
@@ -8,7 +8,7 @@ describe Octopus, :shards => [] do
|
|
8
8
|
|
9
9
|
describe "when config file doesn't exist" do
|
10
10
|
before(:each) do
|
11
|
-
Octopus.stub
|
11
|
+
Octopus.stub(:directory).and_return('/tmp')
|
12
12
|
Octopus.instance_variable_set(:@config, nil)
|
13
13
|
end
|
14
14
|
|
@@ -68,7 +68,7 @@ describe Octopus, :shards => [] do
|
|
68
68
|
|
69
69
|
describe "#enabled?" do
|
70
70
|
before do
|
71
|
-
Rails =
|
71
|
+
Rails = double()
|
72
72
|
end
|
73
73
|
|
74
74
|
after do
|
@@ -76,13 +76,13 @@ describe Octopus, :shards => [] do
|
|
76
76
|
end
|
77
77
|
|
78
78
|
it "should be if octopus is configured and should hook into current environment" do
|
79
|
-
Rails.stub
|
79
|
+
Rails.stub(:env).and_return('production')
|
80
80
|
|
81
81
|
Octopus.should be_enabled
|
82
82
|
end
|
83
83
|
|
84
84
|
it "should not be if octopus should not hook into current environment" do
|
85
|
-
Rails.stub
|
85
|
+
Rails.stub(:env).and_return('staging')
|
86
86
|
|
87
87
|
Octopus.should_not be_enabled
|
88
88
|
end
|
data/spec/octopus/proxy_spec.rb
CHANGED
@@ -56,9 +56,10 @@ describe Octopus::Proxy do
|
|
56
56
|
after(:all) { OctopusHelper.set_octopus_env("octopus") }
|
57
57
|
|
58
58
|
it 'should not fail with missing adapter second time round' do
|
59
|
+
pending "This test was actually failing because of a typo in the error message."
|
59
60
|
Thread.current["octopus.current_shard"] = :modify_config_read
|
60
61
|
|
61
|
-
lambda { Octopus::Proxy.new(Octopus.config()) }.should_not raise_error
|
62
|
+
lambda { Octopus::Proxy.new(Octopus.config()) }.should_not raise_error
|
62
63
|
|
63
64
|
Thread.current["octopus.current_shard"] = nil
|
64
65
|
end
|
@@ -121,7 +122,7 @@ describe Octopus::Proxy do
|
|
121
122
|
|
122
123
|
describe "when you have a rails application" do
|
123
124
|
before(:each) do
|
124
|
-
Rails =
|
125
|
+
Rails = double()
|
125
126
|
OctopusHelper.set_octopus_env("octopus_rails")
|
126
127
|
end
|
127
128
|
|
@@ -133,7 +134,7 @@ describe Octopus::Proxy do
|
|
133
134
|
end
|
134
135
|
|
135
136
|
it "should initialize correctly octopus common variables for the environments" do
|
136
|
-
Rails.stub
|
137
|
+
Rails.stub(:env).and_return('staging')
|
137
138
|
Octopus.instance_variable_set(:@rails_env, nil)
|
138
139
|
Octopus.instance_variable_set(:@environments, nil)
|
139
140
|
Octopus.config()
|
@@ -144,7 +145,7 @@ describe Octopus::Proxy do
|
|
144
145
|
end
|
145
146
|
|
146
147
|
it "should initialize correctly the shards for the staging environment" do
|
147
|
-
Rails.stub
|
148
|
+
Rails.stub(:env).and_return('staging')
|
148
149
|
Octopus.instance_variable_set(:@rails_env, nil)
|
149
150
|
Octopus.instance_variable_set(:@environments, nil)
|
150
151
|
Octopus.config()
|
@@ -153,7 +154,7 @@ describe Octopus::Proxy do
|
|
153
154
|
end
|
154
155
|
|
155
156
|
it "should initialize correctly the shard octopus_shard value for logging" do
|
156
|
-
Rails.stub
|
157
|
+
Rails.stub(:env).and_return('staging')
|
157
158
|
Octopus.instance_variable_set(:@rails_env, nil)
|
158
159
|
Octopus.instance_variable_set(:@environments, nil)
|
159
160
|
Octopus.config()
|
@@ -162,7 +163,7 @@ describe Octopus::Proxy do
|
|
162
163
|
end
|
163
164
|
|
164
165
|
it "should initialize correctly the shards for the production environment" do
|
165
|
-
Rails.stub
|
166
|
+
Rails.stub(:env).and_return('production')
|
166
167
|
Octopus.instance_variable_set(:@rails_env, nil)
|
167
168
|
Octopus.instance_variable_set(:@environments, nil)
|
168
169
|
Octopus.config()
|
@@ -172,7 +173,7 @@ describe Octopus::Proxy do
|
|
172
173
|
|
173
174
|
describe "using the master connection", :shards => [:russia, :master] do
|
174
175
|
before(:each) do
|
175
|
-
Rails.stub
|
176
|
+
Rails.stub(:env).and_return('development')
|
176
177
|
end
|
177
178
|
|
178
179
|
it "should use the master connection" do
|
@@ -237,4 +238,36 @@ describe Octopus::Proxy do
|
|
237
238
|
end
|
238
239
|
end
|
239
240
|
end
|
241
|
+
|
242
|
+
if !Octopus.rails30? and !Octopus.rails31?
|
243
|
+
describe "saving multiple sharded objects at once" do
|
244
|
+
before :each do
|
245
|
+
@p = MmorpgPlayer.using(:alone_shard).create!(:player_name => 'Thiago')
|
246
|
+
end
|
247
|
+
|
248
|
+
subject { @p.save! }
|
249
|
+
|
250
|
+
context "when the objects are created with #new and saved one at a time" do
|
251
|
+
before :each do
|
252
|
+
@p.weapons.create!(:name => 'battleaxe', :hand => 'right')
|
253
|
+
@p.skills.create!(:name => 'smiting', :weapon => @p.weapons[0])
|
254
|
+
end
|
255
|
+
|
256
|
+
it "should save all associated objects on the correct shard" do
|
257
|
+
expect { subject }.to_not raise_error
|
258
|
+
end
|
259
|
+
end
|
260
|
+
|
261
|
+
context "when the objects are created with #new and saved at the same time" do
|
262
|
+
before :each do
|
263
|
+
@p.weapons.new(:name => 'battleaxe', :hand => 'right')
|
264
|
+
@p.skills.new(:name => 'smiting', :weapon => @p.weapons[0])
|
265
|
+
end
|
266
|
+
|
267
|
+
it "should save all associated objects on the correct shard" do
|
268
|
+
expect { subject }.to_not raise_error
|
269
|
+
end
|
270
|
+
end
|
271
|
+
end
|
272
|
+
end
|
240
273
|
end
|
@@ -45,7 +45,7 @@ end
|
|
45
45
|
|
46
46
|
describe "when the database is replicated and the entire application is replicated" do
|
47
47
|
before(:each) do
|
48
|
-
Octopus.stub
|
48
|
+
Octopus.stub(:env).and_return("production_fully_replicated")
|
49
49
|
OctopusHelper.clean_connection_proxy()
|
50
50
|
end
|
51
51
|
|
data/spec/spec_helper.rb
CHANGED
@@ -100,3 +100,24 @@ end
|
|
100
100
|
class Advert < ActiveRecord::Base
|
101
101
|
establish_connection(:adapter => "postgresql", :database => "octopus_shard_1", :username => ENV["POSTGRES_USER"] || "postgres", :password => "")
|
102
102
|
end
|
103
|
+
|
104
|
+
class MmorpgPlayer < ActiveRecord::Base
|
105
|
+
has_many :weapons
|
106
|
+
has_many :skills
|
107
|
+
end
|
108
|
+
|
109
|
+
class Weapon < ActiveRecord::Base
|
110
|
+
belongs_to :mmorpg_player, :inverse_of => :weapons
|
111
|
+
validates :hand, :uniqueness => { :scope => :mmorpg_player_id }
|
112
|
+
validates_presence_of :mmorpg_player
|
113
|
+
has_many :skills
|
114
|
+
end
|
115
|
+
|
116
|
+
class Skill < ActiveRecord::Base
|
117
|
+
belongs_to :weapon, :inverse_of => :skills
|
118
|
+
belongs_to :mmorpg_player, :inverse_of => :skills
|
119
|
+
|
120
|
+
validates_presence_of :weapon
|
121
|
+
validates_presence_of :mmorpg_player
|
122
|
+
validates :name, :uniqueness => { :scope => :mmorpg_player_id }
|
123
|
+
end
|
@@ -8,6 +8,12 @@ module OctopusHelper
|
|
8
8
|
['schema_migrations', 'users', 'clients', 'cats', 'items', 'keyboards', 'computers', 'permissions_roles', 'roles', 'permissions', 'assignments', 'projects', 'programmers', "yummy", 'adverts'].each do |tables|
|
9
9
|
BlankModel.using(shard_symbol).connection.execute("DELETE FROM #{tables}")
|
10
10
|
end
|
11
|
+
|
12
|
+
if shard_symbol == 'alone_shard'
|
13
|
+
['mmorpg_players', 'weapons', 'skills'].each do |table|
|
14
|
+
BlankModel.using(shard_symbol).connection.execute("DELETE FROM #{table}")
|
15
|
+
end
|
16
|
+
end
|
11
17
|
end
|
12
18
|
end
|
13
19
|
|
@@ -45,6 +51,6 @@ module OctopusHelper
|
|
45
51
|
|
46
52
|
def self.set_octopus_env(env)
|
47
53
|
Octopus.instance_variable_set(:@config, nil)
|
48
|
-
Octopus.stub
|
54
|
+
Octopus.stub(:env).and_return(env)
|
49
55
|
end
|
50
56
|
end
|
metadata
CHANGED
@@ -1,185 +1,191 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: ar-octopus
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 5
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 6
|
9
|
+
- 1
|
10
|
+
version: 0.6.1
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Thiago Pradi
|
9
14
|
- Mike Perham
|
10
15
|
- Gabriel Sobrinho
|
11
16
|
autorequire:
|
12
17
|
bindir: bin
|
13
18
|
cert_chain: []
|
14
|
-
|
15
|
-
|
16
|
-
|
19
|
+
|
20
|
+
date: 2013-09-30 00:00:00 Z
|
21
|
+
dependencies:
|
22
|
+
- !ruby/object:Gem::Dependency
|
17
23
|
name: activerecord
|
18
|
-
|
24
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
19
25
|
none: false
|
20
|
-
requirements:
|
21
|
-
- -
|
22
|
-
- !ruby/object:Gem::Version
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 7
|
30
|
+
segments:
|
31
|
+
- 3
|
32
|
+
- 0
|
33
|
+
- 0
|
23
34
|
version: 3.0.0
|
24
35
|
- - <
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
|
27
|
-
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
hash: 27
|
38
|
+
segments:
|
39
|
+
- 4
|
40
|
+
- 0
|
41
|
+
version: "4.0"
|
28
42
|
prerelease: false
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
- - ! '>='
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: 3.0.0
|
35
|
-
- - <
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '4.0'
|
38
|
-
- !ruby/object:Gem::Dependency
|
43
|
+
type: :runtime
|
44
|
+
requirement: *id001
|
45
|
+
- !ruby/object:Gem::Dependency
|
39
46
|
name: activesupport
|
40
|
-
|
47
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
41
48
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
49
|
+
requirements:
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
hash: 7
|
53
|
+
segments:
|
54
|
+
- 3
|
55
|
+
- 0
|
56
|
+
- 0
|
45
57
|
version: 3.0.0
|
46
58
|
- - <
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
|
49
|
-
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
hash: 27
|
61
|
+
segments:
|
62
|
+
- 4
|
63
|
+
- 0
|
64
|
+
version: "4.0"
|
50
65
|
prerelease: false
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
- - ! '>='
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: 3.0.0
|
57
|
-
- - <
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
version: '4.0'
|
60
|
-
- !ruby/object:Gem::Dependency
|
66
|
+
type: :runtime
|
67
|
+
requirement: *id002
|
68
|
+
- !ruby/object:Gem::Dependency
|
61
69
|
name: rake
|
62
|
-
|
70
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
63
71
|
none: false
|
64
|
-
requirements:
|
65
|
-
- -
|
66
|
-
- !ruby/object:Gem::Version
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
hash: 49
|
76
|
+
segments:
|
77
|
+
- 0
|
78
|
+
- 8
|
79
|
+
- 7
|
67
80
|
version: 0.8.7
|
68
|
-
type: :development
|
69
81
|
prerelease: false
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
- - ! '>='
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 0.8.7
|
76
|
-
- !ruby/object:Gem::Dependency
|
82
|
+
type: :development
|
83
|
+
requirement: *id003
|
84
|
+
- !ruby/object:Gem::Dependency
|
77
85
|
name: rspec
|
78
|
-
|
86
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
79
87
|
none: false
|
80
|
-
requirements:
|
81
|
-
- -
|
82
|
-
- !ruby/object:Gem::Version
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
hash: 15
|
92
|
+
segments:
|
93
|
+
- 2
|
94
|
+
- 0
|
95
|
+
- 0
|
83
96
|
version: 2.0.0
|
84
|
-
type: :development
|
85
97
|
prerelease: false
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
- - ! '>='
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
version: 2.0.0
|
92
|
-
- !ruby/object:Gem::Dependency
|
98
|
+
type: :development
|
99
|
+
requirement: *id004
|
100
|
+
- !ruby/object:Gem::Dependency
|
93
101
|
name: mysql2
|
94
|
-
|
102
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
95
103
|
none: false
|
96
|
-
requirements:
|
97
|
-
- -
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
|
100
|
-
|
104
|
+
requirements:
|
105
|
+
- - ">"
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
hash: 13
|
108
|
+
segments:
|
109
|
+
- 0
|
110
|
+
- 3
|
111
|
+
version: "0.3"
|
101
112
|
prerelease: false
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
- - ! '>'
|
106
|
-
- !ruby/object:Gem::Version
|
107
|
-
version: '0.3'
|
108
|
-
- !ruby/object:Gem::Dependency
|
113
|
+
type: :development
|
114
|
+
requirement: *id005
|
115
|
+
- !ruby/object:Gem::Dependency
|
109
116
|
name: pg
|
110
|
-
|
117
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
111
118
|
none: false
|
112
|
-
requirements:
|
113
|
-
- -
|
114
|
-
- !ruby/object:Gem::Version
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
hash: 51
|
123
|
+
segments:
|
124
|
+
- 0
|
125
|
+
- 11
|
126
|
+
- 0
|
115
127
|
version: 0.11.0
|
116
|
-
type: :development
|
117
128
|
prerelease: false
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
- - ! '>='
|
122
|
-
- !ruby/object:Gem::Version
|
123
|
-
version: 0.11.0
|
124
|
-
- !ruby/object:Gem::Dependency
|
129
|
+
type: :development
|
130
|
+
requirement: *id006
|
131
|
+
- !ruby/object:Gem::Dependency
|
125
132
|
name: sqlite3
|
126
|
-
|
133
|
+
version_requirements: &id007 !ruby/object:Gem::Requirement
|
127
134
|
none: false
|
128
|
-
requirements:
|
129
|
-
- -
|
130
|
-
- !ruby/object:Gem::Version
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
hash: 19
|
139
|
+
segments:
|
140
|
+
- 1
|
141
|
+
- 3
|
142
|
+
- 4
|
131
143
|
version: 1.3.4
|
132
|
-
type: :development
|
133
144
|
prerelease: false
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
- - ! '>='
|
138
|
-
- !ruby/object:Gem::Version
|
139
|
-
version: 1.3.4
|
140
|
-
- !ruby/object:Gem::Dependency
|
145
|
+
type: :development
|
146
|
+
requirement: *id007
|
147
|
+
- !ruby/object:Gem::Dependency
|
141
148
|
name: pry
|
142
|
-
|
149
|
+
version_requirements: &id008 !ruby/object:Gem::Requirement
|
143
150
|
none: false
|
144
|
-
requirements:
|
145
|
-
- -
|
146
|
-
- !ruby/object:Gem::Version
|
147
|
-
|
148
|
-
|
151
|
+
requirements:
|
152
|
+
- - ">="
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
hash: 3
|
155
|
+
segments:
|
156
|
+
- 0
|
157
|
+
version: "0"
|
149
158
|
prerelease: false
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
- - ! '>='
|
154
|
-
- !ruby/object:Gem::Version
|
155
|
-
version: '0'
|
156
|
-
- !ruby/object:Gem::Dependency
|
159
|
+
type: :development
|
160
|
+
requirement: *id008
|
161
|
+
- !ruby/object:Gem::Dependency
|
157
162
|
name: appraisal
|
158
|
-
|
163
|
+
version_requirements: &id009 !ruby/object:Gem::Requirement
|
159
164
|
none: false
|
160
|
-
requirements:
|
161
|
-
- -
|
162
|
-
- !ruby/object:Gem::Version
|
165
|
+
requirements:
|
166
|
+
- - ">="
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
hash: 3
|
169
|
+
segments:
|
170
|
+
- 0
|
171
|
+
- 3
|
172
|
+
- 8
|
163
173
|
version: 0.3.8
|
164
|
-
type: :development
|
165
174
|
prerelease: false
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
- !ruby/object:Gem::Version
|
171
|
-
version: 0.3.8
|
172
|
-
description: This gem allows you to use sharded databases with ActiveRecord. This
|
173
|
-
also provides a interface for replication and for running migrations with multiples
|
174
|
-
shards.
|
175
|
-
email:
|
175
|
+
type: :development
|
176
|
+
requirement: *id009
|
177
|
+
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.
|
178
|
+
email:
|
176
179
|
- tchandy@gmail.com
|
177
180
|
- mperham@gmail.com
|
178
181
|
- gabriel.sobrinho@gmail.com
|
179
182
|
executables: []
|
183
|
+
|
180
184
|
extensions: []
|
185
|
+
|
181
186
|
extra_rdoc_files: []
|
182
|
-
|
187
|
+
|
188
|
+
files:
|
183
189
|
- .gitignore
|
184
190
|
- .rspec
|
185
191
|
- .travis.yml
|
@@ -189,6 +195,9 @@ files:
|
|
189
195
|
- Rakefile
|
190
196
|
- TODO.txt
|
191
197
|
- ar-octopus.gemspec
|
198
|
+
- gemfiles/rails30.gemfile
|
199
|
+
- gemfiles/rails31.gemfile
|
200
|
+
- gemfiles/rails32.gemfile
|
192
201
|
- init.rb
|
193
202
|
- lib/ar-octopus.rb
|
194
203
|
- lib/octopus.rb
|
@@ -215,9 +224,15 @@ files:
|
|
215
224
|
- sample_app/Gemfile
|
216
225
|
- sample_app/Gemfile.lock
|
217
226
|
- sample_app/README
|
227
|
+
- sample_app/README.rdoc
|
218
228
|
- sample_app/Rakefile
|
229
|
+
- sample_app/app/assets/images/rails.png
|
230
|
+
- sample_app/app/assets/javascripts/application.js
|
231
|
+
- sample_app/app/assets/stylesheets/application.css
|
219
232
|
- sample_app/app/controllers/application_controller.rb
|
220
233
|
- sample_app/app/helpers/application_helper.rb
|
234
|
+
- sample_app/app/mailers/.gitkeep
|
235
|
+
- sample_app/app/models/.gitkeep
|
221
236
|
- sample_app/app/models/item.rb
|
222
237
|
- sample_app/app/models/user.rb
|
223
238
|
- sample_app/app/views/layouts/application.html.erb
|
@@ -236,6 +251,7 @@ files:
|
|
236
251
|
- sample_app/config/initializers/mime_types.rb
|
237
252
|
- sample_app/config/initializers/secret_token.rb
|
238
253
|
- sample_app/config/initializers/session_store.rb
|
254
|
+
- sample_app/config/initializers/wrap_parameters.rb
|
239
255
|
- sample_app/config/locales/en.yml
|
240
256
|
- sample_app/config/routes.rb
|
241
257
|
- sample_app/config/shards.yml
|
@@ -249,10 +265,13 @@ files:
|
|
249
265
|
- sample_app/features/seed.feature
|
250
266
|
- sample_app/features/step_definitions/seeds_steps.rb
|
251
267
|
- sample_app/features/step_definitions/web_steps.rb
|
268
|
+
- sample_app/features/support/database.rb
|
252
269
|
- sample_app/features/support/env.rb
|
253
270
|
- sample_app/features/support/paths.rb
|
271
|
+
- sample_app/lib/assets/.gitkeep
|
254
272
|
- sample_app/lib/tasks/.gitkeep
|
255
273
|
- sample_app/lib/tasks/cucumber.rake
|
274
|
+
- sample_app/log/.gitkeep
|
256
275
|
- sample_app/public/404.html
|
257
276
|
- sample_app/public/422.html
|
258
277
|
- sample_app/public/500.html
|
@@ -272,8 +291,8 @@ files:
|
|
272
291
|
- sample_app/spec/models/item_spec.rb
|
273
292
|
- sample_app/spec/models/user_spec.rb
|
274
293
|
- sample_app/spec/spec_helper.rb
|
275
|
-
- sample_app/
|
276
|
-
- sample_app/
|
294
|
+
- sample_app/vendor/assets/javascripts/.gitkeep
|
295
|
+
- sample_app/vendor/assets/stylesheets/.gitkeep
|
277
296
|
- sample_app/vendor/plugins/.gitkeep
|
278
297
|
- spec/config/shards.yml
|
279
298
|
- spec/migrations/10_create_users_using_replication.rb
|
@@ -307,42 +326,42 @@ files:
|
|
307
326
|
- spec/tasks/octopus.rake_spec.rb
|
308
327
|
homepage: https://github.com/tchandy/octopus
|
309
328
|
licenses: []
|
310
|
-
post_install_message: ! 'Important: If you are upgrading from < Octopus 0.5.0 you
|
311
|
-
need to run:
|
312
329
|
|
330
|
+
post_install_message: |-
|
331
|
+
Important: If you are upgrading from < Octopus 0.5.0 you need to run:
|
313
332
|
$ rake octopus:copy_schema_versions
|
314
|
-
|
315
|
-
|
316
|
-
Octopus now stores schema version information in each shard and migrations will
|
317
|
-
not work properly unless this task is invoked.'
|
333
|
+
|
334
|
+
Octopus now stores schema version information in each shard and migrations will not work properly unless this task is invoked.
|
318
335
|
rdoc_options: []
|
319
|
-
|
336
|
+
|
337
|
+
require_paths:
|
320
338
|
- lib
|
321
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
339
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
322
340
|
none: false
|
323
|
-
requirements:
|
324
|
-
- -
|
325
|
-
- !ruby/object:Gem::Version
|
326
|
-
|
327
|
-
segments:
|
341
|
+
requirements:
|
342
|
+
- - ">="
|
343
|
+
- !ruby/object:Gem::Version
|
344
|
+
hash: 3
|
345
|
+
segments:
|
328
346
|
- 0
|
329
|
-
|
330
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
347
|
+
version: "0"
|
348
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
331
349
|
none: false
|
332
|
-
requirements:
|
333
|
-
- -
|
334
|
-
- !ruby/object:Gem::Version
|
335
|
-
|
336
|
-
segments:
|
350
|
+
requirements:
|
351
|
+
- - ">="
|
352
|
+
- !ruby/object:Gem::Version
|
353
|
+
hash: 3
|
354
|
+
segments:
|
337
355
|
- 0
|
338
|
-
|
356
|
+
version: "0"
|
339
357
|
requirements: []
|
358
|
+
|
340
359
|
rubyforge_project:
|
341
|
-
rubygems_version: 1.8.
|
360
|
+
rubygems_version: 1.8.25
|
342
361
|
signing_key:
|
343
362
|
specification_version: 3
|
344
363
|
summary: Easy Database Sharding for ActiveRecord
|
345
|
-
test_files:
|
364
|
+
test_files:
|
346
365
|
- spec/config/shards.yml
|
347
366
|
- spec/migrations/10_create_users_using_replication.rb
|
348
367
|
- spec/migrations/11_add_field_in_all_slaves.rb
|