switchman 1.11.5 → 1.11.6

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
- SHA256:
3
- metadata.gz: 6083a58473cad8269f0d2661c15708a904613b3d757dd2de0585e4ef404fc0e1
4
- data.tar.gz: 9a42fb4e9ace95194e0c1557fd717379e9a14de7d19ffd106d6ab5ec038c1a90
2
+ SHA1:
3
+ metadata.gz: 276ff26530f8df71c9dcde8e31daf275b4d44293
4
+ data.tar.gz: 303aaa066f3100aadbb847d0e9bf23dddc6c8a09
5
5
  SHA512:
6
- metadata.gz: 4ee490b1bc3a156aee2c7d8ba458a29a160e35172d4cc19b1529b48c6ffb6a87a436241d2b970617e243af1a0eb626d99d71ad9425da12dd1c649d102c521b95
7
- data.tar.gz: 24ccd7ef87aaed9533045258087c6c25fc23ecc5861248a9c8bad047355d97c1110ca4f3dccf860160d7f4417316850f4429af214b32ca70f849dab49f5996ee
6
+ metadata.gz: 9f908fbd8e426fa95282bd868f8780de4b8947a36d007e4d62c9a2c099700c30ec9e1b470145011da717f4dc89d6f7d2fbb972e411d92bff79e93eb2a5351955
7
+ data.tar.gz: 337b2a024196866320a585f0a6ca376ba7511f199c65e9c79551eb984f0148c40a2c3209b71bca917845a305dc09ed1543a7dc9af0d8469cc6e6856f3716be3f
File without changes
@@ -8,9 +8,10 @@ module Switchman
8
8
 
9
9
  payload = event.payload
10
10
 
11
- return if 'SCHEMA'.freeze == payload[:name]
11
+ return if ::ActiveRecord::LogSubscriber::IGNORE_PAYLOAD_NAMES.include?(payload[:name])
12
12
 
13
- name = '%s (%.1fms)'.freeze % [payload[:name], event.duration]
13
+ name = "#{payload[:name]} (#{event.duration.round(1)}ms)"
14
+ name = "CACHE #{name}" if payload[:cached]
14
15
  sql = payload[:sql].squeeze(' '.freeze)
15
16
  binds = nil
16
17
  shard = payload[:shard]
@@ -20,7 +21,10 @@ module Switchman
20
21
  if ::Rails.version < '5.0.3'
21
22
  binds = " " + payload[:binds].map { |attr| render_bind(attr) }.inspect
22
23
  else
23
- casted_params = type_casted_binds(payload[:binds], payload[:type_casted_binds])
24
+ args = ::Rails.version < '5.1.5' ?
25
+ [payload[:binds], payload[:type_casted_binds]] :
26
+ [payload[:type_casted_binds]]
27
+ casted_params = type_casted_binds(*args)
24
28
  binds = " " + payload[:binds].zip(casted_params).map { |attr, value|
25
29
  render_bind(attr, value)
26
30
  }.inspect
@@ -1,3 +1,3 @@
1
1
  module Switchman
2
- VERSION = "1.11.5"
2
+ VERSION = "1.11.6"
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.11.5
4
+ version: 1.11.6
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: 2018-01-23 00:00:00.000000000 Z
13
+ date: 2018-02-28 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.7.3
247
+ rubygems_version: 2.6.10
247
248
  signing_key:
248
249
  specification_version: 4
249
250
  summary: Rails 4 sharding magic