twobook 0.1.3 → 0.1.4

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
  SHA1:
3
- metadata.gz: 3e7b3f726a419064697871a5a4d6edbc04d4c46b
4
- data.tar.gz: 2acea4e8d2b534596920c47088cef37b45822b37
3
+ metadata.gz: 1a24a64d627cdb6db30fa977b6e9732f276a5ecf
4
+ data.tar.gz: e9af11d699ffa7906d644bcbf1a63b4ea7590a80
5
5
  SHA512:
6
- metadata.gz: 9717e95e05805617f6d39c91e0960659afa683e45c545d0298c3288fea0b84348d0c9ad58ff17e168b7ad2d3eb92c57c74f96ce1ae1fbd8946ca4520f10cbcb3
7
- data.tar.gz: d3de22647f48fd536e06a32b03346ddda3755c08638b31ac06a9a52daffdcb80bb7aa7b1c88ada55164259dfbd5836da334923193395fc490f184492b1e30a85
6
+ metadata.gz: 223c36c8fa96dea997bb7673c7204786a350bacc33c9dbd68547a0da21ebf3fa52847e71800e5090ba37c439eed9f35e76659c959666c8b380c207cd44e1f3d3
7
+ data.tar.gz: acab269393e0327d5242e092c21db53b0579853596143e49da8a29d4c4b465169678dfb72e1de5d8d7b5633b982e6a7f7a1db5cce2537e6291d8545bf41e4abe
@@ -2,6 +2,7 @@ module Twobook
2
2
  module Corrections
3
3
  def self.make_deletion(event, accounts, history, happened_at: Time.current)
4
4
  correct_history = history - [event]
5
+ correct_history.reject! { |historical_event| historical_event < event }
5
6
 
6
7
  snapshots = accounts.map do |a|
7
8
  Serialization.serialize_account(a, before_event: event, allow_empty: false)
@@ -19,6 +20,7 @@ module Twobook
19
20
  index = history.index(edited_event)
20
21
  correct_history = history.deep_dup
21
22
  correct_history[index] = edited_event
23
+ correct_history.reject! { |historical_event| historical_event < edited_event }
22
24
 
23
25
  snapshots = accounts.map do |a|
24
26
  Serialization.serialize_account(a, before_event: edited_event, allow_empty: false)
@@ -1,3 +1,3 @@
1
1
  module Twobook
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twobook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Parry