switchman 1.2.21 → 1.2.22

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1414081404.427915: @value" :nil
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry: @value{ I"id:ETiI" name;TI"switchman_test_shard_1308;TI"database_server_id;TI" test;TI" default;TF:@created_atf1416340687.633588:@expires_in0
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1414081469.619659: @value" :nil
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry: @value{ I"id:ETiI" name;TI"switchman_test_shard_1309;TI"database_server_id;TI"1;TI" default;TF:@created_atf1416340687.637134:@expires_in0
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry: @value:nil:@created_atf1416340825.499797:@expires_in0
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1414081543.038087: @value" :nil
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry: @value:nil:@created_atf1416340825.3265002:@expires_in0
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1414081469.370363: @value" :nil
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1414081404.522985: @value" :nil
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1414081543.168436: @value" :nil
@@ -46,6 +46,11 @@ module Switchman
46
46
  expect(Appendage.where(:id => @appendage2).pluck(:user_id)).to eq [@user2.local_id]
47
47
  end
48
48
  end
49
+
50
+ it "should post-uniq multi-shard" do
51
+ user3 = User.create!(name: 'user2')
52
+ expect(User.where(id: [@user1.id, @user2.id, user3.id]).uniq.pluck(:name).sort).to eq ["user1", "user2"]
53
+ end
49
54
  end
50
55
 
51
56
  describe "#execute_simple_calculation" do
@@ -28,7 +28,7 @@ module Switchman
28
28
  end
29
29
 
30
30
  it "should activate multiple shards if necessary" do
31
- User.where(:id => [@user1.id, @user2.id]).update_all(:name => 'a')
31
+ expect(User.where(:id => [@user1.id, @user2.id]).update_all(:name => 'a')).to eq 2
32
32
  expect(@user1.reload.name).to eq 'a'
33
33
  expect(@user2.reload.name).to eq 'a'
34
34
  end
@@ -101,7 +101,7 @@ module Switchman
101
101
  ::Shackles.activate(:slave) {}
102
102
  ::Shackles.activate(:custom) {}
103
103
  expected = Set.new([:master, :slave, :custom])
104
- (::Shackles.activated_environments & expected).should == expected
104
+ expect(::Shackles.activated_environments & expected).to eq expected
105
105
  end
106
106
 
107
107
  context "non-transactional" do
data/spec/spec_helper.rb CHANGED
@@ -14,6 +14,8 @@ RSpec.configure do |config|
14
14
  config.mock_with :mocha
15
15
 
16
16
  config.infer_spec_type_from_file_location!
17
+ config.raise_errors_for_deprecations!
18
+
17
19
  # If you're not using ActiveRecord, or you'd prefer not to run each of your
18
20
  # examples within a transaction, remove the following line or assign false
19
21
  # instead of true.
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.21
4
+ version: 1.2.22
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: 2014-10-22 00:00:00.000000000 Z
13
+ date: 2014-11-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: railties
@@ -203,6 +203,10 @@ files:
203
203
  - spec/dummy/db/shard_1173.sqlite3
204
204
  - spec/dummy/db/shard_120.sqlite3
205
205
  - spec/dummy/db/shard_1206.sqlite3
206
+ - spec/dummy/db/shard_1248.sqlite3
207
+ - spec/dummy/db/shard_1276.sqlite3
208
+ - spec/dummy/db/shard_1297.sqlite3
209
+ - spec/dummy/db/shard_1330.sqlite3
206
210
  - spec/dummy/db/shard_156.sqlite3
207
211
  - spec/dummy/db/shard_193.sqlite3
208
212
  - spec/dummy/db/shard_23.sqlite3
@@ -308,27 +312,37 @@ files:
308
312
  - spec/dummy/tmp/cache/379/500/shard%2F1116
309
313
  - spec/dummy/tmp/cache/379/520/shard%2F1215
310
314
  - spec/dummy/tmp/cache/379/530/shard%2F1224
315
+ - spec/dummy/tmp/cache/379/530/shard%2F1305
311
316
  - spec/dummy/tmp/cache/379/560/shard%2F1170
317
+ - spec/dummy/tmp/cache/379/560/shard%2F1251
312
318
  - spec/dummy/tmp/cache/37A/4E0/shard%2F1009
313
319
  - spec/dummy/tmp/cache/37A/510/shard%2F1036
314
320
  - spec/dummy/tmp/cache/37A/530/shard%2F1216
315
321
  - spec/dummy/tmp/cache/37A/540/shard%2F1225
322
+ - spec/dummy/tmp/cache/37A/540/shard%2F1306
316
323
  - spec/dummy/tmp/cache/37C/550/shard%2F1218
317
324
  - spec/dummy/tmp/cache/37C/560/shard%2F1065
318
325
  - spec/dummy/tmp/cache/37C/560/shard%2F1227
326
+ - spec/dummy/tmp/cache/37C/560/shard%2F1308
327
+ - spec/dummy/tmp/cache/37C/5A0/shard%2F1263
319
328
  - spec/dummy/tmp/cache/37D/560/shard%2F1219
320
329
  - spec/dummy/tmp/cache/37D/570/shard%2F1228
330
+ - spec/dummy/tmp/cache/37D/570/shard%2F1309
331
+ - spec/dummy/tmp/cache/37D/590/shard%2F1327
321
332
  - spec/dummy/tmp/cache/37E/570/shard%2F1139
322
333
  - spec/dummy/tmp/cache/37F/5A0/shard%2F1077
323
334
  - spec/dummy/tmp/cache/380/5B0/shard%2F1078
335
+ - spec/dummy/tmp/cache/380/600/shard%2F1285
324
336
  - spec/dummy/tmp/cache/381/5D0/shard%2F1169
325
337
  - spec/dummy/tmp/cache/381/5E0/shard%2F1097
338
+ - spec/dummy/tmp/cache/381/5E0/shard%2F1259
326
339
  - spec/dummy/tmp/cache/381/5F0/shard%2F1187
327
340
  - spec/dummy/tmp/cache/3A4/EE0/shard%2F11101
328
341
  - spec/dummy/tmp/cache/3A5/EA0/shard%2F10004
329
342
  - spec/dummy/tmp/cache/3A6/F40/shard%2F10410
330
343
  - spec/dummy/tmp/cache/3A7/F20/shard%2F11032
331
344
  - spec/dummy/tmp/cache/3A7/F30/shard%2F10231
345
+ - spec/dummy/tmp/cache/3A8/F70/shard%2F11312
332
346
  - spec/dummy/tmp/cache/3A8/F90/shard%2F10520
333
347
  - spec/dummy/tmp/cache/3A9/F40/shard%2F10062
334
348
  - spec/dummy/tmp/cache/3A9/F50/shard%2F11124
@@ -338,6 +352,7 @@ files:
338
352
  - spec/dummy/tmp/cache/3AA/FB0/shard%2F10441
339
353
  - spec/dummy/tmp/cache/3AA/FB0/shard%2F11170
340
354
  - spec/dummy/tmp/cache/3AA/FC0/shard%2F10612
355
+ - spec/dummy/tmp/cache/3AA/FC0/shard%2F11260
341
356
  - spec/dummy/tmp/cache/3AB/010/shard%2F10730
342
357
  - spec/dummy/tmp/cache/3AB/F30/shard%2F11009
343
358
  - spec/dummy/tmp/cache/3AB/F70/shard%2F10154
@@ -350,9 +365,11 @@ files:
350
365
  - spec/dummy/tmp/cache/3AD/FA0/shard%2F10246
351
366
  - spec/dummy/tmp/cache/3AE/060/shard%2F10751
352
367
  - spec/dummy/tmp/cache/3AE/090/shard%2F10940
368
+ - spec/dummy/tmp/cache/3AE/FD0/shard%2F11237
353
369
  - spec/dummy/tmp/cache/3AE/FF0/shard%2F10364
354
370
  - spec/dummy/tmp/cache/3AF/020/shard%2F11193
355
371
  - spec/dummy/tmp/cache/3AF/030/shard%2F10635
372
+ - spec/dummy/tmp/cache/3AF/030/shard%2F11283
356
373
  - spec/dummy/tmp/cache/3B0/FE0/shard%2F10177
357
374
  - spec/dummy/tmp/cache/3B0/FE0/shard%2F11149
358
375
  - spec/dummy/tmp/cache/3B1/000/shard%2F11078
@@ -411,7 +428,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
411
428
  version: '0'
412
429
  requirements: []
413
430
  rubyforge_project:
414
- rubygems_version: 2.4.2
431
+ rubygems_version: 2.2.2
415
432
  signing_key:
416
433
  specification_version: 4
417
434
  summary: Rails 3 sharding magic
@@ -456,6 +473,10 @@ test_files:
456
473
  - spec/dummy/db/shard_1173.sqlite3
457
474
  - spec/dummy/db/shard_120.sqlite3
458
475
  - spec/dummy/db/shard_1206.sqlite3
476
+ - spec/dummy/db/shard_1248.sqlite3
477
+ - spec/dummy/db/shard_1276.sqlite3
478
+ - spec/dummy/db/shard_1297.sqlite3
479
+ - spec/dummy/db/shard_1330.sqlite3
459
480
  - spec/dummy/db/shard_156.sqlite3
460
481
  - spec/dummy/db/shard_193.sqlite3
461
482
  - spec/dummy/db/shard_23.sqlite3
@@ -562,27 +583,37 @@ test_files:
562
583
  - spec/dummy/tmp/cache/379/500/shard%2F1116
563
584
  - spec/dummy/tmp/cache/379/520/shard%2F1215
564
585
  - spec/dummy/tmp/cache/379/530/shard%2F1224
586
+ - spec/dummy/tmp/cache/379/530/shard%2F1305
565
587
  - spec/dummy/tmp/cache/379/560/shard%2F1170
588
+ - spec/dummy/tmp/cache/379/560/shard%2F1251
566
589
  - spec/dummy/tmp/cache/37A/4E0/shard%2F1009
567
590
  - spec/dummy/tmp/cache/37A/510/shard%2F1036
568
591
  - spec/dummy/tmp/cache/37A/530/shard%2F1216
569
592
  - spec/dummy/tmp/cache/37A/540/shard%2F1225
593
+ - spec/dummy/tmp/cache/37A/540/shard%2F1306
570
594
  - spec/dummy/tmp/cache/37C/550/shard%2F1218
571
595
  - spec/dummy/tmp/cache/37C/560/shard%2F1065
572
596
  - spec/dummy/tmp/cache/37C/560/shard%2F1227
597
+ - spec/dummy/tmp/cache/37C/560/shard%2F1308
598
+ - spec/dummy/tmp/cache/37C/5A0/shard%2F1263
573
599
  - spec/dummy/tmp/cache/37D/560/shard%2F1219
574
600
  - spec/dummy/tmp/cache/37D/570/shard%2F1228
601
+ - spec/dummy/tmp/cache/37D/570/shard%2F1309
602
+ - spec/dummy/tmp/cache/37D/590/shard%2F1327
575
603
  - spec/dummy/tmp/cache/37E/570/shard%2F1139
576
604
  - spec/dummy/tmp/cache/37F/5A0/shard%2F1077
577
605
  - spec/dummy/tmp/cache/380/5B0/shard%2F1078
606
+ - spec/dummy/tmp/cache/380/600/shard%2F1285
578
607
  - spec/dummy/tmp/cache/381/5D0/shard%2F1169
579
608
  - spec/dummy/tmp/cache/381/5E0/shard%2F1097
609
+ - spec/dummy/tmp/cache/381/5E0/shard%2F1259
580
610
  - spec/dummy/tmp/cache/381/5F0/shard%2F1187
581
611
  - spec/dummy/tmp/cache/3A4/EE0/shard%2F11101
582
612
  - spec/dummy/tmp/cache/3A5/EA0/shard%2F10004
583
613
  - spec/dummy/tmp/cache/3A6/F40/shard%2F10410
584
614
  - spec/dummy/tmp/cache/3A7/F20/shard%2F11032
585
615
  - spec/dummy/tmp/cache/3A7/F30/shard%2F10231
616
+ - spec/dummy/tmp/cache/3A8/F70/shard%2F11312
586
617
  - spec/dummy/tmp/cache/3A8/F90/shard%2F10520
587
618
  - spec/dummy/tmp/cache/3A9/F40/shard%2F10062
588
619
  - spec/dummy/tmp/cache/3A9/F50/shard%2F11124
@@ -592,6 +623,7 @@ test_files:
592
623
  - spec/dummy/tmp/cache/3AA/FB0/shard%2F10441
593
624
  - spec/dummy/tmp/cache/3AA/FB0/shard%2F11170
594
625
  - spec/dummy/tmp/cache/3AA/FC0/shard%2F10612
626
+ - spec/dummy/tmp/cache/3AA/FC0/shard%2F11260
595
627
  - spec/dummy/tmp/cache/3AB/010/shard%2F10730
596
628
  - spec/dummy/tmp/cache/3AB/F30/shard%2F11009
597
629
  - spec/dummy/tmp/cache/3AB/F70/shard%2F10154
@@ -604,9 +636,11 @@ test_files:
604
636
  - spec/dummy/tmp/cache/3AD/FA0/shard%2F10246
605
637
  - spec/dummy/tmp/cache/3AE/060/shard%2F10751
606
638
  - spec/dummy/tmp/cache/3AE/090/shard%2F10940
639
+ - spec/dummy/tmp/cache/3AE/FD0/shard%2F11237
607
640
  - spec/dummy/tmp/cache/3AE/FF0/shard%2F10364
608
641
  - spec/dummy/tmp/cache/3AF/020/shard%2F11193
609
642
  - spec/dummy/tmp/cache/3AF/030/shard%2F10635
643
+ - spec/dummy/tmp/cache/3AF/030/shard%2F11283
610
644
  - spec/dummy/tmp/cache/3B0/FE0/shard%2F10177
611
645
  - spec/dummy/tmp/cache/3B0/FE0/shard%2F11149
612
646
  - spec/dummy/tmp/cache/3B1/000/shard%2F11078