switchman 1.2.18 → 1.2.19

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: b7c3726cb894ba0769a10192f23f39e51d67d078
4
- data.tar.gz: af303da595234de7d4bc17c4ef1b7325611c16e6
3
+ metadata.gz: 19a3f6517d1330ac30ba3ee4cb67a853eae0329d
4
+ data.tar.gz: 0b0b176329a529aecf9213f1cee9ecc6bc244414
5
5
  SHA512:
6
- metadata.gz: 50c4dfed21e7668d1912ea2bcea4024ec5e3e8178abd7708e0d91a8cf6d3c3646f92a7498d62bd2653a39d555a3468a1b06626e67fe30f9dc01de5eaf199f85e
7
- data.tar.gz: 36e2c728ffa2ebf109aba024f3f6b0d8b3b4371a60aae9803c6b44972c6cfccd1e9c6d10c7b582f95fa61419a7054bc6113986f1ae3b490ecc053a63d582654e
6
+ metadata.gz: b3b5c37e80c26d5bc460028b153119f5a8f6629822e8c2f456340fa330283cfdb0c0dd30717d7859a1e2626ed07481a6529f51af480b3a3ee7c71054a5ef3a6c
7
+ data.tar.gz: 66bcccb82d7203664ad393886924c0e7a8f2ebb93379795292f0fd56397045129d23f10cbc3a86ac9d44b3b7f4e2aa3fdf577cf7a7322003699cb07fe1d8b88c
@@ -82,6 +82,8 @@ module Switchman
82
82
  end
83
83
  else
84
84
  def merge!(r)
85
+ return super unless r.is_a?(::ActiveRecord::Relation)
86
+
85
87
  # have to figure out shard stuff *before* conditions are merged
86
88
  final_shard_value, final_primary_shard, final_shard_source_value = shard_values_for_merge(r)
87
89
 
@@ -1,3 +1,3 @@
1
1
  module Switchman
2
- VERSION = "1.2.18"
2
+ VERSION = "1.2.19"
3
3
  end
@@ -21,7 +21,7 @@ module Switchman
21
21
  end
22
22
  servers = servers.split(',')
23
23
  conditions = ["database_server_id #{ "NOT " if negative }IN (?)", servers]
24
- conditions.first << " OR database_server_id IS NULL" if servers.include?(Rails.env) && !negative || !servers.include?(Rails.env) && negative
24
+ conditions.first << " OR database_server_id IS NULL" if servers.include?(::Rails.env) && !negative || !servers.include?(::Rails.env) && negative
25
25
  scope = scope.where(conditions)
26
26
  end
27
27
 
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.18
4
+ version: 1.2.19
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-09-10 00:00:00.000000000 Z
13
+ date: 2014-09-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: railties
@@ -390,7 +390,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
390
390
  version: '0'
391
391
  requirements: []
392
392
  rubyforge_project:
393
- rubygems_version: 2.3.0
393
+ rubygems_version: 2.2.2
394
394
  signing_key:
395
395
  specification_version: 4
396
396
  summary: Rails 3 sharding magic
@@ -603,4 +603,3 @@ test_files:
603
603
  - spec/lib/shackles_spec.rb
604
604
  - spec/models/shard_spec.rb
605
605
  - spec/spec_helper.rb
606
- has_rdoc: