switchman 1.2.34 → 1.2.35

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b3e573a9c3ed8ce40af24f79d883ef09c9616fe
4
- data.tar.gz: 88673ec555084d8e77269a67d742f80e3de233f1
3
+ metadata.gz: f57ef128744d2aff26dde580aac747cfb87d8023
4
+ data.tar.gz: de8662cb8530550ae45a9a4fdbb336cc72697118
5
5
  SHA512:
6
- metadata.gz: aa216be606b8eb43bcb53b59ab623528adba472fe4867aae9b94527cfce6bbb97c040a8c91f5425a73e927922dd020176a35d7d1249dbdd5cb2a7c0a20cbfa0c
7
- data.tar.gz: 4ea6ed350bad62f0ac1540a1cdb608e0fd1588e845c3afe694ad22c5080b2ea197fbefbb6a05e97554d309ba753e3afdf189e54e0bb20577548226a307ee23ca
6
+ metadata.gz: 060e61abe83142d07d485b13de1a425ba7dd988d74f3824a037f14ed907a1c79d3c955592f3d7ab64b5db422d36329303555d8d60164e03e6e6db4f9c650c2fa
7
+ data.tar.gz: 39a08de71d325ad177f321b6ee8bd2be610eb1f336c10865bd6f5fd3309a5b01d730363c5ee80ca5442f2a25d60ce28be8891c3ce11fb05cd6b2b9d174cd65db
@@ -374,10 +374,6 @@ module Switchman
374
374
  end
375
375
  end
376
376
 
377
- def primary?
378
- self == database_server.primary_shard
379
- end
380
-
381
377
  # takes an id-ish, and returns an integral id relative to
382
378
  # target_shard. returns any_id itself if it can't be interpreted
383
379
  def relative_id_for(any_id, source_shard, target_shard)
@@ -453,6 +449,10 @@ module Switchman
453
449
  @database_server = database_server
454
450
  end
455
451
 
452
+ def primary?
453
+ self == database_server.primary_shard
454
+ end
455
+
456
456
  def description
457
457
  [database_server.id, name].compact.join(':')
458
458
  end
@@ -29,7 +29,7 @@ module Switchman
29
29
  end
30
30
 
31
31
  def ==(rhs)
32
- return true if rhs.is_a?(DefaultShard) || (rhs.is_a?(Shard) && rhs.default?)
32
+ return true if rhs.is_a?(DefaultShard) || (rhs.is_a?(Shard) && rhs[:default])
33
33
  super
34
34
  end
35
35
 
@@ -1,3 +1,3 @@
1
1
  module Switchman
2
- VERSION = "1.2.34"
2
+ VERSION = "1.2.35"
3
3
  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.34
4
+ version: 1.2.35
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-05-11 00:00:00.000000000 Z
13
+ date: 2015-05-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: railties