snail_trail 1.1.0.rc.pre.1 → 1.1.0.rc.pre.2

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: 9615c601651c566fd33af08844a5aa454394269af10c4b955c95864ccf364963
4
- data.tar.gz: 4656e2e38cfb1ed9155ec37b676e46e4cd8533c5db54118c69e55177d95223d2
3
+ metadata.gz: c5ec3ffaaeca9313c98a9b0c08cc1bb3dcee2b707da5509bf78b0667590c451e
4
+ data.tar.gz: 23c20037610449f2813fc89dcf6ef5fe293418901d16d925868ba00174561d14
5
5
  SHA512:
6
- metadata.gz: 32cb46bf800abafcf3b16efd74ace9e398cf7cb366310ed48bdc2cd14ec375036543e3699d9f97359cfa4a2c42882c67d555fab442bfd93ae3902f54ff020547
7
- data.tar.gz: 3377f9f5af34d50de4dcaca784fb1b6d6cb8190801496418b02a7aefc7494801f92bac6172b5c0d83c13dd3b976f0dc285868c1fa24556f71d89dedb9cdb4ab6
6
+ metadata.gz: 52b06064da24bfb8b32665d518eda1819d1bd3aa1184aeee65a3732c000137dbe6b1a6f55f5cf23f4c165913e22f110a17ef7a0d9ed9c3cc15e4900f4dc62e46
7
+ data.tar.gz: bc1ffbb2fed4e7d35b9ef2c600a48143496d76d8801e040512c36416921a0773c8879493ddd49b64b6e91c0f23b3a555ec11a931b39190d33ea6acfa90f0836c
data/CHANGELOG.adoc CHANGED
@@ -1,3 +1,9 @@
1
- = 1.0.0
1
+ == 1.1.0
2
+
3
+ * Add ``performance_mode!``
4
+ ** This will wait to ``INSERT`` all versions until the transaction has finished
5
+ ** ``INSERT``s happen in batches of 1000 rows
6
+
7
+ == 1.0.0
2
8
 
3
9
  * Intial Release
@@ -61,7 +61,7 @@ module SnailTrail
61
61
  version = build_version_on_create(in_after_callback: true)
62
62
 
63
63
  if ::SnailTrail.request.performance_mode?
64
- ::SnailTrail.request.performance_mode_data << version.attributes
64
+ ::SnailTrail.request.performance_mode_data << version.attributes.symbolize_keys
65
65
  else
66
66
  begin
67
67
  version.save!
@@ -93,7 +93,7 @@ module SnailTrail
93
93
  version = @record.class.snail_trail.version_class.new(data)
94
94
 
95
95
  if ::SnailTrail.request.performance_mode?
96
- ::SnailTrail.request.performance_mode_data << version.attributes
96
+ ::SnailTrail.request.performance_mode_data << version.attributes.symbolize_keys
97
97
  else
98
98
  begin
99
99
  version.save!
@@ -129,7 +129,7 @@ module SnailTrail
129
129
  return unless version
130
130
 
131
131
  if ::SnailTrail.request.performance_mode?
132
- ::SnailTrail.request.performance_mode_data << version.attributes
132
+ ::SnailTrail.request.performance_mode_data << version.attributes.symbolize_keys
133
133
  else
134
134
  begin
135
135
  version.save!
@@ -160,8 +160,8 @@ module SnailTrail
160
160
  timestamp = Time.now.utc.strftime("%Y-%m-%d %H:%M:%S")
161
161
  datas.each do |d|
162
162
  add_transaction_id_to(d)
163
- d['created_at'] = timestamp
164
- d['event'] = "batch_#{d['event']}"
163
+ d[:created_at] = timestamp
164
+ d[:event] = "batch_#{d['event']}"
165
165
  end
166
166
 
167
167
  sql = ["INSERT INTO #{version.class.table_name} (#{datas.first.keys.join(", ")}) VALUES"]
@@ -12,7 +12,7 @@ module SnailTrail
12
12
  TINY = 0
13
13
 
14
14
  # Set PRE to nil unless it's a pre-release (beta, rc, etc.)
15
- PRE = 'rc.pre.1'
15
+ PRE = 'rc.pre.2'
16
16
 
17
17
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".").freeze
18
18
 
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.rc.pre.1
4
+ version: 1.1.0.rc.pre.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brands Insurance