switchman 1.2.9 → 1.2.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dd5f72df8592b3efb7cc2e7719366b8df053e527
4
- data.tar.gz: 4458254cf9f9d965736323e1621c8b11d262bc1d
3
+ metadata.gz: dc2dfd339cd0bc006a3a5201bee157d982f3294a
4
+ data.tar.gz: 122345b29537d27f0b0dd5808b4f2881af26fa9d
5
5
  SHA512:
6
- metadata.gz: e42226c9cb67fd197902946e0f7be1c5a83970e213658e3abd0c7ecaf64122d3bb56be4c23be00751882d9c716ae39526bc60518d28f0426b844f8e7fe66c548
7
- data.tar.gz: bd6525f1a509381e817f8ae8dbd039a522034ee20cac4c763df3dc14e9b1ae035ad9d8f3d5de3a60bda3274039b4eec05c3f99790b26da48b4aaab0882a93e6a
6
+ metadata.gz: c59075ed736d45ecf0aabfc3f7e69eab51d7920d07a423b5acd5241cdb0bbbe42b78709a6e94032d17b7aa557535f0f717a56293a7a49d927e0db9a6bf970e04
7
+ data.tar.gz: 334d1fa1b0e4d1fc65aef700842597403627bfd1e6196e4987c4516ae9608637a74afbb5ded7a6e4db7c8cccd41abf9b82af91076d1de9932783263b70309f43
@@ -28,7 +28,7 @@ module Switchman
28
28
  end
29
29
 
30
30
  def ==(rhs)
31
- return true if rhs.is_a?(Shard) && rhs.default?
31
+ return true if rhs.is_a?(DefaultShard) || (rhs.is_a?(Shard) && rhs.default?)
32
32
  super
33
33
  end
34
34
 
@@ -1,3 +1,3 @@
1
1
  module Switchman
2
- VERSION = "1.2.9"
2
+ VERSION = "1.2.10"
3
3
  end
@@ -2,23 +2,17 @@ require "spec_helper"
2
2
 
3
3
  module Switchman
4
4
  describe DefaultShard do
5
- before(:all) do
6
- @user = User.create!
7
- end
8
-
9
- after(:all) do
10
- @user.destroy
11
- end
12
-
13
5
  context "sharding" do
14
6
  include RSpecHelper
15
7
 
16
8
  it "should be equivalent to a real default shard" do
17
9
  Shard.default.should be_is_a(Shard)
18
- @user.shard.should be_is_a(DefaultShard)
19
- @user.shard.should == Shard.default
20
- Shard.default.should == @user.shard
10
+ DefaultShard.send(:new).should == Shard.default
21
11
  end
22
12
  end
13
+
14
+ it "all defaultshards should be equivalent to each other" do
15
+ DefaultShard.send(:new).should == DefaultShard.send(:new)
16
+ end
23
17
  end
24
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: switchman
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.9
4
+ version: 1.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer
@@ -16,110 +16,110 @@ dependencies:
16
16
  name: railties
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - ">="
19
+ - - '>='
20
20
  - !ruby/object:Gem::Version
21
21
  version: '3.2'
22
- - - "<"
22
+ - - <
23
23
  - !ruby/object:Gem::Version
24
24
  version: '4.2'
25
25
  type: :runtime
26
26
  prerelease: false
27
27
  version_requirements: !ruby/object:Gem::Requirement
28
28
  requirements:
29
- - - ">="
29
+ - - '>='
30
30
  - !ruby/object:Gem::Version
31
31
  version: '3.2'
32
- - - "<"
32
+ - - <
33
33
  - !ruby/object:Gem::Version
34
34
  version: '4.2'
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: activerecord
37
37
  requirement: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ">="
39
+ - - '>='
40
40
  - !ruby/object:Gem::Version
41
41
  version: '3.2'
42
- - - "<"
42
+ - - <
43
43
  - !ruby/object:Gem::Version
44
44
  version: '4.2'
45
45
  type: :runtime
46
46
  prerelease: false
47
47
  version_requirements: !ruby/object:Gem::Requirement
48
48
  requirements:
49
- - - ">="
49
+ - - '>='
50
50
  - !ruby/object:Gem::Version
51
51
  version: '3.2'
52
- - - "<"
52
+ - - <
53
53
  - !ruby/object:Gem::Version
54
54
  version: '4.2'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: shackles
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.0.5
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.0.5
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: mysql2
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0.3'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.3'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: pg
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec-rails
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ~>
102
102
  - !ruby/object:Gem::Version
103
103
  version: '2.0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ~>
109
109
  - !ruby/object:Gem::Version
110
110
  version: '2.0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: sqlite3
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - '>='
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - '>='
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  description: Sharding
@@ -129,11 +129,9 @@ executables: []
129
129
  extensions: []
130
130
  extra_rdoc_files: []
131
131
  files:
132
- - Rakefile
133
132
  - app/models/switchman/shard.rb
134
133
  - db/migrate/20130328212039_create_switchman_shards.rb
135
134
  - db/migrate/20130328224244_create_default_shard.rb
136
- - lib/switchman.rb
137
135
  - lib/switchman/action_controller/caching.rb
138
136
  - lib/switchman/active_record/abstract_adapter.rb
139
137
  - lib/switchman/active_record/association.rb
@@ -160,15 +158,15 @@ files:
160
158
  - lib/switchman/sharded_instrumenter.rb
161
159
  - lib/switchman/test_helper.rb
162
160
  - lib/switchman/version.rb
161
+ - lib/switchman.rb
163
162
  - lib/tasks/switchman.rake
164
- - spec/dummy/Rakefile
163
+ - Rakefile
165
164
  - spec/dummy/app/models/appendage.rb
166
165
  - spec/dummy/app/models/digit.rb
167
166
  - spec/dummy/app/models/feature.rb
168
167
  - spec/dummy/app/models/mirror_user.rb
169
168
  - spec/dummy/app/models/root.rb
170
169
  - spec/dummy/app/models/user.rb
171
- - spec/dummy/config.ru
172
170
  - spec/dummy/config/application.rb
173
171
  - spec/dummy/config/boot.rb
174
172
  - spec/dummy/config/database.yml
@@ -182,6 +180,7 @@ files:
182
180
  - spec/dummy/config/initializers/session_store.rb
183
181
  - spec/dummy/config/initializers/wrap_parameters.rb
184
182
  - spec/dummy/config/routes.rb
183
+ - spec/dummy/config.ru
185
184
  - spec/dummy/db/development.sqlite3
186
185
  - spec/dummy/db/migrate/20130403132607_create_users.rb
187
186
  - spec/dummy/db/migrate/20130411202442_create_appendages.rb
@@ -192,6 +191,7 @@ files:
192
191
  - spec/dummy/db/migrate/20140219183820_create_roots.rb
193
192
  - spec/dummy/db/schema.rb
194
193
  - spec/dummy/log/development.log
194
+ - spec/dummy/Rakefile
195
195
  - spec/dummy/script/rails
196
196
  - spec/lib/action_controller/caching_spec.rb
197
197
  - spec/lib/active_record/abstract_adapter_spec.rb
@@ -224,17 +224,17 @@ require_paths:
224
224
  - lib
225
225
  required_ruby_version: !ruby/object:Gem::Requirement
226
226
  requirements:
227
- - - ">="
227
+ - - '>='
228
228
  - !ruby/object:Gem::Version
229
229
  version: '0'
230
230
  required_rubygems_version: !ruby/object:Gem::Requirement
231
231
  requirements:
232
- - - ">="
232
+ - - '>='
233
233
  - !ruby/object:Gem::Version
234
234
  version: '0'
235
235
  requirements: []
236
236
  rubyforge_project:
237
- rubygems_version: 2.3.0
237
+ rubygems_version: 2.0.14
238
238
  signing_key:
239
239
  specification_version: 4
240
240
  summary: Rails 3 sharding magic
@@ -292,4 +292,3 @@ test_files:
292
292
  - spec/lib/shackles_spec.rb
293
293
  - spec/models/shard_spec.rb
294
294
  - spec/spec_helper.rb
295
- has_rdoc: