paper_trail_diff 0.5.0 → 0.6.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.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/README.md +64 -1
  4. data/lib/paper_trail_diff/activity_root_steps.rb +9 -7
  5. data/lib/paper_trail_diff/activity_timeline_builder.rb +15 -8
  6. data/lib/paper_trail_diff/analysis.rb +19 -5
  7. data/lib/paper_trail_diff/analysis_batch.rb +28 -10
  8. data/lib/paper_trail_diff/batched_root_analyzer.rb +9 -9
  9. data/lib/paper_trail_diff/batched_root_versions.rb +48 -30
  10. data/lib/paper_trail_diff/paper_trail_adapter.rb +25 -18
  11. data/lib/paper_trail_diff/root_version_plan.rb +86 -0
  12. data/lib/paper_trail_diff/root_version_selection.rb +131 -0
  13. data/lib/paper_trail_diff/time_activity_timeline_builder.rb +25 -13
  14. data/lib/paper_trail_diff/time_version_range.rb +19 -24
  15. data/lib/paper_trail_diff/timeline_builder.rb +21 -18
  16. data/lib/paper_trail_diff/timeline_range.rb +31 -7
  17. data/lib/paper_trail_diff/version.rb +1 -1
  18. data/lib/paper_trail_diff/version_range.rb +45 -5
  19. data/lib/paper_trail_diff/version_scope_filter.rb +37 -0
  20. data/lib/paper_trail_diff.rb +24 -13
  21. data/sig/generated/paper_trail_diff/activity_root_steps.rbs +2 -2
  22. data/sig/generated/paper_trail_diff/activity_timeline_builder.rbs +6 -2
  23. data/sig/generated/paper_trail_diff/analysis.rbs +13 -4
  24. data/sig/generated/paper_trail_diff/analysis_batch.rbs +13 -6
  25. data/sig/generated/paper_trail_diff/batched_root_analyzer.rbs +4 -4
  26. data/sig/generated/paper_trail_diff/batched_root_versions.rbs +21 -14
  27. data/sig/generated/paper_trail_diff/paper_trail_adapter.rbs +10 -10
  28. data/sig/generated/paper_trail_diff/root_version_plan.rbs +56 -0
  29. data/sig/generated/paper_trail_diff/root_version_selection.rbs +77 -0
  30. data/sig/generated/paper_trail_diff/time_activity_timeline_builder.rbs +9 -4
  31. data/sig/generated/paper_trail_diff/time_version_range.rbs +7 -9
  32. data/sig/generated/paper_trail_diff/timeline_builder.rbs +6 -6
  33. data/sig/generated/paper_trail_diff/timeline_range.rbs +11 -2
  34. data/sig/generated/paper_trail_diff/version_range.rbs +17 -2
  35. data/sig/generated/paper_trail_diff/version_scope_filter.rbs +22 -0
  36. data/sig/generated/paper_trail_diff.rbs +8 -8
  37. metadata +10 -4
@@ -0,0 +1,22 @@
1
+ # Generated from lib/paper_trail_diff/version_scope_filter.rb with RBS::Inline
2
+
3
+ module PaperTrailDiff
4
+ # Applies a caller's version filter to a range, naming which of its versions
5
+ # count as selected mutations. The unfiltered versions stay available to the
6
+ # caller, because the one that reveals the last selected mutation is drawn
7
+ # from them.
8
+ class VersionScopeFilter
9
+ # : (untyped) -> void
10
+ def initialize: (untyped) -> void
11
+
12
+ # : (untyped, Array[untyped]) -> Array[untyped]
13
+ def call: (untyped, Array[untyped]) -> Array[untyped]
14
+
15
+ private
16
+
17
+ @scope: untyped
18
+
19
+ # : (untyped) -> untyped
20
+ def validated: (untyped) -> untyped
21
+ end
22
+ end
@@ -17,24 +17,24 @@ module PaperTrailDiff
17
17
  def self.compare_many: (Array[comparison_input], ?associations: Array[String | Symbol], ?ignore: ignore_option, ?reload_live_endpoints: bool) -> comparison_results
18
18
 
19
19
  # Compares every adjacent reconstructed state in an inclusive version range.
20
- # : (untyped, ?from: untyped, ?to: untyped, ?within: untyped, ?associations: Array[String | Symbol], ?ignore: ignore_option) -> Array[Step]
21
- def self.timeline: (untyped, ?from: untyped, ?to: untyped, ?within: untyped, ?associations: Array[String | Symbol], ?ignore: ignore_option) -> Array[Step]
20
+ # : (untyped, ?from: untyped, ?to: untyped, ?within: untyped, ?associations: Array[String | Symbol], ?ignore: ignore_option, ?version_scope: untyped) -> Array[Step]
21
+ def self.timeline: (untyped, ?from: untyped, ?to: untyped, ?within: untyped, ?associations: Array[String | Symbol], ?ignore: ignore_option, ?version_scope: untyped) -> Array[Step]
22
22
 
23
23
  # Compares adjacent root and selected-descendant activity boundaries.
24
24
  # `reload_live_endpoints:` applies only when `to:` is a current record; the
25
25
  # other range forms never read live state.
26
- # : (untyped, ?from: untyped, ?to: untyped, ?within: untyped, ?associations: Array[String | Symbol], ?ignore: ignore_option, ?reload_live_endpoints: bool) -> Array[ActivityStep]
27
- def self.activity_timeline: (untyped, ?from: untyped, ?to: untyped, ?within: untyped, ?associations: Array[String | Symbol], ?ignore: ignore_option, ?reload_live_endpoints: bool) -> Array[ActivityStep]
26
+ # : (untyped, ?from: untyped, ?to: untyped, ?within: untyped, ?associations: Array[String | Symbol], ?ignore: ignore_option, ?reload_live_endpoints: bool, ?version_scope: untyped) -> Array[ActivityStep]
27
+ def self.activity_timeline: (untyped, ?from: untyped, ?to: untyped, ?within: untyped, ?associations: Array[String | Symbol], ?ignore: ignore_option, ?reload_live_endpoints: bool, ?version_scope: untyped) -> Array[ActivityStep]
28
28
 
29
29
  # Builds an endpoint diff and root-checkpoint timeline while normalizing each version once.
30
- # : (untyped, ?from: untyped, ?to: untyped, ?within: untyped, ?associations: Array[String | Symbol], ?ignore: ignore_option, ?activity: bool) -> Analysis
31
- def self.analyze: (untyped, ?from: untyped, ?to: untyped, ?within: untyped, ?associations: Array[String | Symbol], ?ignore: ignore_option, ?activity: bool) -> Analysis
30
+ # : (untyped, ?from: untyped, ?to: untyped, ?within: untyped, ?associations: Array[String | Symbol], ?ignore: ignore_option, ?activity: bool, ?version_scope: untyped) -> Analysis
31
+ def self.analyze: (untyped, ?from: untyped, ?to: untyped, ?within: untyped, ?associations: Array[String | Symbol], ?ignore: ignore_option, ?activity: bool, ?version_scope: untyped) -> Analysis
32
32
 
33
33
  # Analyzes many roots over one shared time window, preparing their selected
34
34
  # history once for the batch instead of once per record. Roots with no
35
35
  # versions in the window return an empty `Analysis`.
36
- # : (Array[untyped], ?within: untyped, ?associations: Array[String | Symbol], ?ignore: ignore_option, ?activity: bool) -> Hash[identity, Analysis]
37
- def self.analyze_many: (Array[untyped], ?within: untyped, ?associations: Array[String | Symbol], ?ignore: ignore_option, ?activity: bool) -> Hash[identity, Analysis]
36
+ # : (Array[untyped], ?within: untyped, ?associations: Array[String | Symbol], ?ignore: ignore_option, ?activity: bool, ?version_scope: untyped) -> Hash[identity, Analysis]
37
+ def self.analyze_many: (Array[untyped], ?within: untyped, ?associations: Array[String | Symbol], ?ignore: ignore_option, ?activity: bool, ?version_scope: untyped) -> Hash[identity, Analysis]
38
38
 
39
39
  # Returns the association macros this release can normalize.
40
40
  # : () -> Array[Symbol]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paper_trail_diff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Williams
@@ -96,6 +96,8 @@ files:
96
96
  - lib/paper_trail_diff/prepared_history.rb
97
97
  - lib/paper_trail_diff/prepared_history_loader.rb
98
98
  - lib/paper_trail_diff/prepared_record_index.rb
99
+ - lib/paper_trail_diff/root_version_plan.rb
100
+ - lib/paper_trail_diff/root_version_selection.rb
99
101
  - lib/paper_trail_diff/snapshot.rb
100
102
  - lib/paper_trail_diff/snapshot_normalizer.rb
101
103
  - lib/paper_trail_diff/snapshot_traversal.rb
@@ -115,6 +117,7 @@ files:
115
117
  - lib/paper_trail_diff/version.rb
116
118
  - lib/paper_trail_diff/version_association_candidate_scope.rb
117
119
  - lib/paper_trail_diff/version_range.rb
120
+ - lib/paper_trail_diff/version_scope_filter.rb
118
121
  - sig/generated/paper_trail_diff.rbs
119
122
  - sig/generated/paper_trail_diff/activity_belongs_to_event_applier.rbs
120
123
  - sig/generated/paper_trail_diff/activity_boundary.rbs
@@ -169,6 +172,8 @@ files:
169
172
  - sig/generated/paper_trail_diff/prepared_history.rbs
170
173
  - sig/generated/paper_trail_diff/prepared_history_loader.rbs
171
174
  - sig/generated/paper_trail_diff/prepared_record_index.rbs
175
+ - sig/generated/paper_trail_diff/root_version_plan.rbs
176
+ - sig/generated/paper_trail_diff/root_version_selection.rbs
172
177
  - sig/generated/paper_trail_diff/snapshot.rbs
173
178
  - sig/generated/paper_trail_diff/snapshot_normalizer.rbs
174
179
  - sig/generated/paper_trail_diff/snapshot_traversal.rbs
@@ -188,17 +193,18 @@ files:
188
193
  - sig/generated/paper_trail_diff/version.rbs
189
194
  - sig/generated/paper_trail_diff/version_association_candidate_scope.rbs
190
195
  - sig/generated/paper_trail_diff/version_range.rbs
196
+ - sig/generated/paper_trail_diff/version_scope_filter.rbs
191
197
  homepage: https://github.com/aheathwilliams/paper_trail_diff
192
198
  licenses:
193
199
  - MIT
194
200
  metadata:
195
201
  allowed_push_host: https://rubygems.org
196
202
  bug_tracker_uri: https://github.com/aheathwilliams/paper_trail_diff/issues
197
- changelog_uri: https://github.com/aheathwilliams/paper_trail_diff/blob/v0.5.0/CHANGELOG.md
198
- documentation_uri: https://github.com/aheathwilliams/paper_trail_diff/blob/v0.5.0/README.md
203
+ changelog_uri: https://github.com/aheathwilliams/paper_trail_diff/blob/v0.6.0/CHANGELOG.md
204
+ documentation_uri: https://github.com/aheathwilliams/paper_trail_diff/blob/v0.6.0/README.md
199
205
  homepage_uri: https://github.com/aheathwilliams/paper_trail_diff
200
206
  rubygems_mfa_required: 'true'
201
- source_code_uri: https://github.com/aheathwilliams/paper_trail_diff/tree/v0.5.0
207
+ source_code_uri: https://github.com/aheathwilliams/paper_trail_diff/tree/v0.6.0
202
208
  rdoc_options: []
203
209
  require_paths:
204
210
  - lib