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 +5 -5
- data/db/shard_1708.sqlite3 +0 -0
- data/lib/switchman/active_record/log_subscriber.rb +7 -3
- data/lib/switchman/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 276ff26530f8df71c9dcde8e31daf275b4d44293
|
4
|
+
data.tar.gz: 303aaa066f3100aadbb847d0e9bf23dddc6c8a09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
11
|
+
return if ::ActiveRecord::LogSubscriber::IGNORE_PAYLOAD_NAMES.include?(payload[:name])
|
12
12
|
|
13
|
-
name =
|
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
|
-
|
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
|
data/lib/switchman/version.rb
CHANGED
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.
|
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-
|
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.
|
247
|
+
rubygems_version: 2.6.10
|
247
248
|
signing_key:
|
248
249
|
specification_version: 4
|
249
250
|
summary: Rails 4 sharding magic
|