snail_trail 1.1.1.rc.pre.1 → 1.2.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: 8e59f9280750f8f101e360a3367ec4c7679d9fcf0509664bbc1d78ba4bfa7cde
4
- data.tar.gz: ac8ed32aa5a1f76dde0eec78c708d7d650539fd2dc1845796d7e5540f2015976
3
+ metadata.gz: d318ee9074719077f6979b96a5f7623e39d8fab08a41846f2b261f2327a70c95
4
+ data.tar.gz: abf3db2a5b328f03d1c4996672000644e0ae9a0863540fd18106fc2b9eebfc67
5
5
  SHA512:
6
- metadata.gz: b7fa609d7dd5a58de01e08bd4a949fb5b9702688ead1f816e589e3f3a7a05101c579cac5f1410f8daefcbb68c27f4450ef75968c60fbbd59be2d71ad96870509
7
- data.tar.gz: f12644cf395577ac3e759462b5efb31e096a1239bdef55acbeb94c959e534b1fa06ba9e7e00146f8103e750563529033102ced690f79426adbee7bc08522eede
6
+ metadata.gz: c3bd824bb2c4cebd7ed1cf80ed13c1843dadab0584da6be004e4d7a1b1951ab21dd6227c57d5459a2b36ed327fe15b2a1ee4320ebfa861789d92ec497cef1c7e
7
+ data.tar.gz: 4c664aa0dc4ad0041deb0c2adb565de8d3c4e644b947d078fe92b8f460228cb01235694a29d72ca668288b0eb2981d6c72e9c8759dcb445000b8d12d30ed78f3
data/CHANGELOG.adoc CHANGED
@@ -1,3 +1,7 @@
1
+ == 1.2.0
2
+
3
+ * Sort by primary key instead of timestamp
4
+
1
5
  == 1.1.1
2
6
 
3
7
  * ``performance_mode!`` wasn't saving transaction IDs because it triggers once the transaction is closed
@@ -60,9 +60,7 @@ module SnailTrail
60
60
  # Defaults to using the primary key as the secondary sort order if
61
61
  # possible.
62
62
  def timestamp_sort_order(direction = "asc")
63
- [arel_table[:created_at].send(direction.downcase)].tap do |array|
64
- array << arel_table[primary_key].send(direction.downcase) if primary_key_is_int?
65
- end
63
+ [(arel_table[primary_key].send(direction.downcase) if primary_key_is_int?)].compact
66
64
  end
67
65
 
68
66
  # Given an attribute like `"name"`, query the `versions.object_changes`
@@ -8,11 +8,11 @@ module SnailTrail
8
8
  # People are encouraged to use `SnailTrail.gem_version` instead.
9
9
  module VERSION
10
10
  MAJOR = 1
11
- MINOR = 1
12
- TINY = 1
11
+ MINOR = 2
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 = nil
16
16
 
17
17
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".").freeze
18
18
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snail_trail
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1.rc.pre.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brands Insurance
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-16 00:00:00.000000000 Z
11
+ date: 2025-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -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: 1.3.1
416
+ version: '0'
417
417
  requirements: []
418
418
  rubygems_version: 3.4.10
419
419
  signing_key: