snail_trail 1.1.0.rc.pre.4 → 1.1.0
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6bb23d00a867f1171eebe3f2666175aea84ae7e1b96ae8fec1bb9f6612520d9
|
4
|
+
data.tar.gz: a38d58940070c970bef296118183d94413301631f9149fa63fbd318f8be86bf8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89d48ae77066c7d885b61f2b2998f8791664e900b7b08957635e765754c608c23ab26ed0bc7592592230b0f428b613b7d571c58c91eaff1b4d28d4d967fe2065
|
7
|
+
data.tar.gz: 311f8a01a376020a0cd4759061770b853db411c600ef1baf4ad2a703143e42f89d048d41d6f8dc6b02a30aae5fef22e6ef41a16eea2e0a8ce54d1e19cc34d33a
|
data/CHANGELOG.adoc
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
* Add ``performance_mode!``
|
4
4
|
** This will wait to ``INSERT`` all versions until the transaction has finished
|
5
5
|
** ``INSERT``s happen in batches of 1000 rows
|
6
|
+
** Called via ``SnailTrail.request.performance_mode!`` or ``before_action :set_snail_trail_performance_mode``
|
6
7
|
|
7
8
|
== 1.0.0
|
8
9
|
|
@@ -12,6 +12,7 @@ RSpec.configure do |config|
|
|
12
12
|
SnailTrail.enabled = false
|
13
13
|
SnailTrail.request.enabled = true
|
14
14
|
SnailTrail.request.whodunnit = nil
|
15
|
+
SnailTrail.request.performance_mode = nil
|
15
16
|
SnailTrail.request.controller_info = {} if defined?(Rails) && defined?(RSpec::Rails)
|
16
17
|
end
|
17
18
|
|
@@ -131,12 +131,12 @@ module SnailTrail
|
|
131
131
|
|
132
132
|
r.snail_trail.record_performance_data
|
133
133
|
|
134
|
-
::SnailTrail.request.
|
134
|
+
::SnailTrail.request.clear_performance_mode_data
|
135
135
|
end
|
136
136
|
|
137
137
|
@model_class.after_rollback do
|
138
138
|
::SnailTrail.request.clear_transaction_id
|
139
|
-
::SnailTrail.request.
|
139
|
+
::SnailTrail.request.clear_performance_mode_data
|
140
140
|
end
|
141
141
|
end
|
142
142
|
|
data/lib/snail_trail/request.rb
CHANGED
@@ -129,17 +129,20 @@ module SnailTrail
|
|
129
129
|
self.performance_mode = true
|
130
130
|
end
|
131
131
|
|
132
|
-
def
|
133
|
-
self.
|
134
|
-
|
132
|
+
def clear_performance_mode_data
|
133
|
+
self.performance_mode_data =
|
134
|
+
if performance_mode?
|
135
|
+
[]
|
136
|
+
end
|
135
137
|
end
|
136
138
|
|
137
139
|
def performance_mode= val
|
138
140
|
store[:performance_mode] = !!val
|
139
141
|
|
140
|
-
|
141
|
-
|
142
|
-
|
142
|
+
self.performance_mode_data =
|
143
|
+
if performance_mode?
|
144
|
+
[]
|
145
|
+
end
|
143
146
|
|
144
147
|
performance_mode?
|
145
148
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snail_trail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brands Insurance
|
@@ -411,9 +411,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
411
411
|
version: 3.2.0
|
412
412
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
413
413
|
requirements:
|
414
|
-
- - "
|
414
|
+
- - ">="
|
415
415
|
- !ruby/object:Gem::Version
|
416
|
-
version:
|
416
|
+
version: '0'
|
417
417
|
requirements: []
|
418
418
|
rubygems_version: 3.4.10
|
419
419
|
signing_key:
|