switchman 1.9.8 → 1.9.9

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: 8b4460b9eec1a0ed73fcfa4b7ac97f96347d9777
4
- data.tar.gz: 50f3fe16b1cd257ca95625e8deae16bef4a8fc26
3
+ metadata.gz: 09324e1b1e1fcd309435237928b346a70ddb9f8f
4
+ data.tar.gz: 22ba223386b76f2db5050e6945bc5d10e08fd214
5
5
  SHA512:
6
- metadata.gz: efbe63e6d3c157c180c031f274a2b13e9c2034b56242dcd8c7b81aa37c99037f24fe8412556fb80bf5e85e2d378661b8954827f41f534fe55bff8da0660e376d
7
- data.tar.gz: 182383aea02d23c5c80dd80d6673c55e14f3530d67be70a8046d160586b0bf92395217c7eccfd657e0540f701c167be26b6b1e8d6a0d2efd268ead17c176536c
6
+ metadata.gz: bf742c8bc094cc536f8cdfc2893f033d6a476bd51e16e1c556c996f3f0fbc0517ee884b4fef81cbb00e5c5692b45b481eccf6f3b2335fe1a631d224b95db7191
7
+ data.tar.gz: 96887f3a05ace152c42682f9c7b2dc64f426ee622d8cb63c8a6db82f5d17b110cbd9a2a260e1a65d53ef2a5bf3bd3fee20b21781705fa9e4bceb9a78284873a9
File without changes
@@ -104,18 +104,22 @@ module Switchman
104
104
  end
105
105
  end
106
106
 
107
+ def scope_class
108
+ ::Rails.version >= '5' ? self.class : self.class.base_class
109
+ end
110
+
107
111
  def save(*args)
108
112
  @shard_set_in_stone = true
109
- self.class.shard(shard, :implicit).scoping { super }
113
+ scope_class.shard(shard, :implicit).scoping { super }
110
114
  end
111
115
 
112
116
  def save!(*args)
113
117
  @shard_set_in_stone = true
114
- self.class.shard(shard, :implicit).scoping { super }
118
+ scope_class.shard(shard, :implicit).scoping { super }
115
119
  end
116
120
 
117
121
  def destroy
118
- self.class.shard(shard, :implicit).scoping { super }
122
+ scope_class.shard(shard, :implicit).scoping { super }
119
123
  end
120
124
 
121
125
  def clone
@@ -1,3 +1,3 @@
1
1
  module Switchman
2
- VERSION = "1.9.8"
2
+ VERSION = "1.9.9"
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.9.8
4
+ version: 1.9.9
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: 2017-04-03 00:00:00.000000000 Z
13
+ date: 2017-04-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: railties
@@ -177,6 +177,7 @@ files:
177
177
  - db/migrate/20130328212039_create_switchman_shards.rb
178
178
  - db/migrate/20130328224244_create_default_shard.rb
179
179
  - db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
180
+ - db/shard_1708.sqlite3
180
181
  - lib/switchman.rb
181
182
  - lib/switchman/action_controller/caching.rb
182
183
  - lib/switchman/active_record/abstract_adapter.rb
@@ -243,7 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
244
  version: '0'
244
245
  requirements: []
245
246
  rubyforge_project:
246
- rubygems_version: 2.6.10
247
+ rubygems_version: 2.5.1
247
248
  signing_key:
248
249
  specification_version: 4
249
250
  summary: Rails 4 sharding magic