switchman 1.2.29 → 1.2.30
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/switchman/active_record/base.rb +1 -1
- data/lib/switchman/active_record/connection_handler.rb +1 -1
- data/lib/switchman/active_record/connection_pool.rb +2 -2
- data/lib/switchman/active_record/postgresql_adapter.rb +1 -1
- data/lib/switchman/database_server.rb +1 -1
- data/lib/switchman/version.rb +1 -1
- data/spec/dummy/db/schema.rb +12 -12
- data/spec/dummy/db/shard_1746.sqlite3 +0 -0
- data/spec/dummy/log/development.log +49 -0
- data/spec/dummy/log/test.log +3533 -0
- data/spec/dummy/tmp/cache/386/6D0/shard%2F1759 +1 -0
- data/spec/dummy/tmp/cache/3B1/0B0/shard%2F11744 +1 -0
- data/spec/lib/active_record/base_spec.rb +7 -0
- data/spec/models/shard_spec.rb +1 -1
- metadata +9 -3
@@ -0,0 +1 @@
|
|
1
|
+
o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1426015087.963239:@value":nil
|
@@ -0,0 +1 @@
|
|
1
|
+
o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1426015087.778363:@value":nil
|
@@ -5,6 +5,13 @@ module Switchman
|
|
5
5
|
describe Base do
|
6
6
|
include RSpecHelper
|
7
7
|
|
8
|
+
describe "hash" do
|
9
|
+
it "should work with unsharded models" do
|
10
|
+
root = Root.create!
|
11
|
+
expect(root.hash).to eq root.id.hash
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
8
15
|
describe "to_param" do
|
9
16
|
it "should return nil if no id" do
|
10
17
|
user = User.new
|
data/spec/models/shard_spec.rb
CHANGED
@@ -257,7 +257,7 @@ module Switchman
|
|
257
257
|
shard.database_server = db
|
258
258
|
connection = mock()
|
259
259
|
connection.stubs(:open_transactions).returns(0)
|
260
|
-
connection.expects(:
|
260
|
+
connection.expects(:current_schemas).returns(['canvas', 'public']).once
|
261
261
|
connection.expects(:schema_search_path=).with(nil).once
|
262
262
|
connection.stubs(:shard).returns(Shard.default)
|
263
263
|
connection.expects(:shard=).with(shard)
|
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.
|
4
|
+
version: 1.2.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Cutrer
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-03-
|
13
|
+
date: 2015-03-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: railties
|
@@ -237,6 +237,7 @@ files:
|
|
237
237
|
- spec/dummy/db/shard_1679.sqlite3
|
238
238
|
- spec/dummy/db/shard_1703.sqlite3
|
239
239
|
- spec/dummy/db/shard_1721.sqlite3
|
240
|
+
- spec/dummy/db/shard_1746.sqlite3
|
240
241
|
- spec/dummy/db/shard_193.sqlite3
|
241
242
|
- spec/dummy/db/shard_23.sqlite3
|
242
243
|
- spec/dummy/db/shard_234.sqlite3
|
@@ -388,6 +389,7 @@ files:
|
|
388
389
|
- spec/dummy/tmp/cache/385/6C0/shard%2F1677
|
389
390
|
- spec/dummy/tmp/cache/386/6B0/shard%2F1498
|
390
391
|
- spec/dummy/tmp/cache/386/6C0/shard%2F1669
|
392
|
+
- spec/dummy/tmp/cache/386/6D0/shard%2F1759
|
391
393
|
- spec/dummy/tmp/cache/387/700/shard%2F1697
|
392
394
|
- spec/dummy/tmp/cache/3A4/EE0/shard%2F11101
|
393
395
|
- spec/dummy/tmp/cache/3A5/EA0/shard%2F10004
|
@@ -437,6 +439,7 @@ files:
|
|
437
439
|
- spec/dummy/tmp/cache/3B1/030/shard%2F10295
|
438
440
|
- spec/dummy/tmp/cache/3B1/040/shard%2F10466
|
439
441
|
- spec/dummy/tmp/cache/3B1/090/shard%2F10673
|
442
|
+
- spec/dummy/tmp/cache/3B1/0B0/shard%2F11744
|
440
443
|
- spec/dummy/tmp/cache/3B2/070/shard%2F10566
|
441
444
|
- spec/dummy/tmp/cache/3B2/0A0/shard%2F10917
|
442
445
|
- spec/dummy/tmp/cache/3B2/0D0/shard%2F11673
|
@@ -495,7 +498,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
495
498
|
version: '0'
|
496
499
|
requirements: []
|
497
500
|
rubyforge_project:
|
498
|
-
rubygems_version: 2.4.
|
501
|
+
rubygems_version: 2.4.4
|
499
502
|
signing_key:
|
500
503
|
specification_version: 4
|
501
504
|
summary: Rails 3 sharding magic
|
@@ -559,6 +562,7 @@ test_files:
|
|
559
562
|
- spec/dummy/db/shard_1679.sqlite3
|
560
563
|
- spec/dummy/db/shard_1703.sqlite3
|
561
564
|
- spec/dummy/db/shard_1721.sqlite3
|
565
|
+
- spec/dummy/db/shard_1746.sqlite3
|
562
566
|
- spec/dummy/db/shard_193.sqlite3
|
563
567
|
- spec/dummy/db/shard_23.sqlite3
|
564
568
|
- spec/dummy/db/shard_234.sqlite3
|
@@ -711,6 +715,7 @@ test_files:
|
|
711
715
|
- spec/dummy/tmp/cache/385/6C0/shard%2F1677
|
712
716
|
- spec/dummy/tmp/cache/386/6B0/shard%2F1498
|
713
717
|
- spec/dummy/tmp/cache/386/6C0/shard%2F1669
|
718
|
+
- spec/dummy/tmp/cache/386/6D0/shard%2F1759
|
714
719
|
- spec/dummy/tmp/cache/387/700/shard%2F1697
|
715
720
|
- spec/dummy/tmp/cache/3A4/EE0/shard%2F11101
|
716
721
|
- spec/dummy/tmp/cache/3A5/EA0/shard%2F10004
|
@@ -760,6 +765,7 @@ test_files:
|
|
760
765
|
- spec/dummy/tmp/cache/3B1/030/shard%2F10295
|
761
766
|
- spec/dummy/tmp/cache/3B1/040/shard%2F10466
|
762
767
|
- spec/dummy/tmp/cache/3B1/090/shard%2F10673
|
768
|
+
- spec/dummy/tmp/cache/3B1/0B0/shard%2F11744
|
763
769
|
- spec/dummy/tmp/cache/3B2/070/shard%2F10566
|
764
770
|
- spec/dummy/tmp/cache/3B2/0A0/shard%2F10917
|
765
771
|
- spec/dummy/tmp/cache/3B2/0D0/shard%2F11673
|