paper_trail_diff 0.4.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +44 -0
- data/README.md +120 -3
- data/lib/paper_trail_diff/activity_root_steps.rb +9 -7
- data/lib/paper_trail_diff/activity_timeline_builder.rb +15 -8
- data/lib/paper_trail_diff/analysis.rb +19 -5
- data/lib/paper_trail_diff/analysis_batch.rb +92 -0
- data/lib/paper_trail_diff/batch_boundary_resolver.rb +137 -0
- data/lib/paper_trail_diff/batched_root_analyzer.rb +50 -0
- data/lib/paper_trail_diff/batched_root_versions.rb +149 -0
- data/lib/paper_trail_diff/comparison_batch.rb +37 -13
- data/lib/paper_trail_diff/historical_snapshot_store.rb +3 -7
- data/lib/paper_trail_diff/paper_trail_adapter.rb +70 -47
- data/lib/paper_trail_diff/root_version_plan.rb +86 -0
- data/lib/paper_trail_diff/root_version_selection.rb +131 -0
- data/lib/paper_trail_diff/time_activity_timeline_builder.rb +25 -13
- data/lib/paper_trail_diff/time_version_range.rb +19 -24
- data/lib/paper_trail_diff/timeline_builder.rb +21 -18
- data/lib/paper_trail_diff/timeline_range.rb +37 -6
- data/lib/paper_trail_diff/traversal_preparer.rb +40 -0
- data/lib/paper_trail_diff/version.rb +1 -1
- data/lib/paper_trail_diff/version_range.rb +45 -5
- data/lib/paper_trail_diff/version_scope_filter.rb +37 -0
- data/lib/paper_trail_diff.rb +54 -12
- data/sig/generated/paper_trail_diff/activity_root_steps.rbs +2 -2
- data/sig/generated/paper_trail_diff/activity_timeline_builder.rbs +6 -2
- data/sig/generated/paper_trail_diff/analysis.rbs +13 -4
- data/sig/generated/paper_trail_diff/analysis_batch.rbs +49 -0
- data/sig/generated/paper_trail_diff/batch_boundary_resolver.rbs +62 -0
- data/sig/generated/paper_trail_diff/batched_root_analyzer.rbs +28 -0
- data/sig/generated/paper_trail_diff/batched_root_versions.rbs +69 -0
- data/sig/generated/paper_trail_diff/comparison_batch.rbs +15 -0
- data/sig/generated/paper_trail_diff/historical_snapshot_store.rbs +0 -1
- data/sig/generated/paper_trail_diff/paper_trail_adapter.rbs +24 -15
- data/sig/generated/paper_trail_diff/root_version_plan.rbs +56 -0
- data/sig/generated/paper_trail_diff/root_version_selection.rbs +77 -0
- data/sig/generated/paper_trail_diff/time_activity_timeline_builder.rbs +9 -4
- data/sig/generated/paper_trail_diff/time_version_range.rbs +7 -9
- data/sig/generated/paper_trail_diff/timeline_builder.rbs +6 -6
- data/sig/generated/paper_trail_diff/timeline_range.rbs +15 -2
- data/sig/generated/paper_trail_diff/traversal_preparer.rbs +22 -0
- data/sig/generated/paper_trail_diff/version_range.rbs +17 -2
- data/sig/generated/paper_trail_diff/version_scope_filter.rbs +22 -0
- data/sig/generated/paper_trail_diff.rbs +17 -7
- metadata +20 -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
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
# Generated from lib/paper_trail_diff.rb with RBS::Inline
|
|
2
2
|
|
|
3
|
-
# Structured version comparison for PaperTrail.
|
|
3
|
+
# Structured version comparison for PaperTrail. Each method is a thin,
|
|
4
|
+
# documented entry point, so this reads as an API listing rather than logic.
|
|
4
5
|
module PaperTrailDiff
|
|
6
|
+
# rubocop:disable Metrics/ModuleLength
|
|
5
7
|
DEFAULT_IGNORED_ATTRIBUTES: untyped
|
|
6
8
|
|
|
7
9
|
SUPPORTED_ASSOCIATION_MACROS: untyped
|
|
@@ -15,16 +17,24 @@ module PaperTrailDiff
|
|
|
15
17
|
def self.compare_many: (Array[comparison_input], ?associations: Array[String | Symbol], ?ignore: ignore_option, ?reload_live_endpoints: bool) -> comparison_results
|
|
16
18
|
|
|
17
19
|
# Compares every adjacent reconstructed state in an inclusive version range.
|
|
18
|
-
# : (untyped, ?from: untyped, ?to: untyped, ?within: untyped, ?associations: Array[String | Symbol], ?ignore: ignore_option) -> Array[Step]
|
|
19
|
-
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]
|
|
20
22
|
|
|
21
23
|
# Compares adjacent root and selected-descendant activity boundaries.
|
|
22
|
-
#
|
|
23
|
-
|
|
24
|
+
# `reload_live_endpoints:` applies only when `to:` is a current record; the
|
|
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, ?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]
|
|
24
28
|
|
|
25
29
|
# Builds an endpoint diff and root-checkpoint timeline while normalizing each version once.
|
|
26
|
-
# : (untyped, ?from: untyped, ?to: untyped, ?within: untyped, ?associations: Array[String | Symbol], ?ignore: ignore_option, ?activity: bool) -> Analysis
|
|
27
|
-
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
|
+
|
|
33
|
+
# Analyzes many roots over one shared time window, preparing their selected
|
|
34
|
+
# history once for the batch instead of once per record. Roots with no
|
|
35
|
+
# versions in the window return an empty `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]
|
|
28
38
|
|
|
29
39
|
# Returns the association macros this release can normalize.
|
|
30
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.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alex Williams
|
|
@@ -65,9 +65,13 @@ files:
|
|
|
65
65
|
- lib/paper_trail_diff/activity_timeline_builder.rb
|
|
66
66
|
- lib/paper_trail_diff/activity_version_collector.rb
|
|
67
67
|
- lib/paper_trail_diff/analysis.rb
|
|
68
|
+
- lib/paper_trail_diff/analysis_batch.rb
|
|
68
69
|
- lib/paper_trail_diff/association_diff_traversal.rb
|
|
69
70
|
- lib/paper_trail_diff/association_discovery.rb
|
|
70
71
|
- lib/paper_trail_diff/association_traversal.rb
|
|
72
|
+
- lib/paper_trail_diff/batch_boundary_resolver.rb
|
|
73
|
+
- lib/paper_trail_diff/batched_root_analyzer.rb
|
|
74
|
+
- lib/paper_trail_diff/batched_root_versions.rb
|
|
71
75
|
- lib/paper_trail_diff/branch_snapshot_refresher.rb
|
|
72
76
|
- lib/paper_trail_diff/collection_comparator.rb
|
|
73
77
|
- lib/paper_trail_diff/collection_identity_index.rb
|
|
@@ -92,6 +96,8 @@ files:
|
|
|
92
96
|
- lib/paper_trail_diff/prepared_history.rb
|
|
93
97
|
- lib/paper_trail_diff/prepared_history_loader.rb
|
|
94
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
|
|
95
101
|
- lib/paper_trail_diff/snapshot.rb
|
|
96
102
|
- lib/paper_trail_diff/snapshot_normalizer.rb
|
|
97
103
|
- lib/paper_trail_diff/snapshot_traversal.rb
|
|
@@ -106,10 +112,12 @@ files:
|
|
|
106
112
|
- lib/paper_trail_diff/traversal.rb
|
|
107
113
|
- lib/paper_trail_diff/traversal_emitter.rb
|
|
108
114
|
- lib/paper_trail_diff/traversal_entry.rb
|
|
115
|
+
- lib/paper_trail_diff/traversal_preparer.rb
|
|
109
116
|
- lib/paper_trail_diff/value_objects.rb
|
|
110
117
|
- lib/paper_trail_diff/version.rb
|
|
111
118
|
- lib/paper_trail_diff/version_association_candidate_scope.rb
|
|
112
119
|
- lib/paper_trail_diff/version_range.rb
|
|
120
|
+
- lib/paper_trail_diff/version_scope_filter.rb
|
|
113
121
|
- sig/generated/paper_trail_diff.rbs
|
|
114
122
|
- sig/generated/paper_trail_diff/activity_belongs_to_event_applier.rbs
|
|
115
123
|
- sig/generated/paper_trail_diff/activity_boundary.rbs
|
|
@@ -133,9 +141,13 @@ files:
|
|
|
133
141
|
- sig/generated/paper_trail_diff/activity_timeline_builder.rbs
|
|
134
142
|
- sig/generated/paper_trail_diff/activity_version_collector.rbs
|
|
135
143
|
- sig/generated/paper_trail_diff/analysis.rbs
|
|
144
|
+
- sig/generated/paper_trail_diff/analysis_batch.rbs
|
|
136
145
|
- sig/generated/paper_trail_diff/association_diff_traversal.rbs
|
|
137
146
|
- sig/generated/paper_trail_diff/association_discovery.rbs
|
|
138
147
|
- sig/generated/paper_trail_diff/association_traversal.rbs
|
|
148
|
+
- sig/generated/paper_trail_diff/batch_boundary_resolver.rbs
|
|
149
|
+
- sig/generated/paper_trail_diff/batched_root_analyzer.rbs
|
|
150
|
+
- sig/generated/paper_trail_diff/batched_root_versions.rbs
|
|
139
151
|
- sig/generated/paper_trail_diff/branch_snapshot_refresher.rbs
|
|
140
152
|
- sig/generated/paper_trail_diff/collection_comparator.rbs
|
|
141
153
|
- sig/generated/paper_trail_diff/collection_identity_index.rbs
|
|
@@ -160,6 +172,8 @@ files:
|
|
|
160
172
|
- sig/generated/paper_trail_diff/prepared_history.rbs
|
|
161
173
|
- sig/generated/paper_trail_diff/prepared_history_loader.rbs
|
|
162
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
|
|
163
177
|
- sig/generated/paper_trail_diff/snapshot.rbs
|
|
164
178
|
- sig/generated/paper_trail_diff/snapshot_normalizer.rbs
|
|
165
179
|
- sig/generated/paper_trail_diff/snapshot_traversal.rbs
|
|
@@ -174,21 +188,23 @@ files:
|
|
|
174
188
|
- sig/generated/paper_trail_diff/traversal.rbs
|
|
175
189
|
- sig/generated/paper_trail_diff/traversal_emitter.rbs
|
|
176
190
|
- sig/generated/paper_trail_diff/traversal_entry.rbs
|
|
191
|
+
- sig/generated/paper_trail_diff/traversal_preparer.rbs
|
|
177
192
|
- sig/generated/paper_trail_diff/value_objects.rbs
|
|
178
193
|
- sig/generated/paper_trail_diff/version.rbs
|
|
179
194
|
- sig/generated/paper_trail_diff/version_association_candidate_scope.rbs
|
|
180
195
|
- sig/generated/paper_trail_diff/version_range.rbs
|
|
196
|
+
- sig/generated/paper_trail_diff/version_scope_filter.rbs
|
|
181
197
|
homepage: https://github.com/aheathwilliams/paper_trail_diff
|
|
182
198
|
licenses:
|
|
183
199
|
- MIT
|
|
184
200
|
metadata:
|
|
185
201
|
allowed_push_host: https://rubygems.org
|
|
186
202
|
bug_tracker_uri: https://github.com/aheathwilliams/paper_trail_diff/issues
|
|
187
|
-
changelog_uri: https://github.com/aheathwilliams/paper_trail_diff/blob/v0.
|
|
188
|
-
documentation_uri: https://github.com/aheathwilliams/paper_trail_diff/blob/v0.
|
|
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
|
|
189
205
|
homepage_uri: https://github.com/aheathwilliams/paper_trail_diff
|
|
190
206
|
rubygems_mfa_required: 'true'
|
|
191
|
-
source_code_uri: https://github.com/aheathwilliams/paper_trail_diff/tree/v0.
|
|
207
|
+
source_code_uri: https://github.com/aheathwilliams/paper_trail_diff/tree/v0.6.0
|
|
192
208
|
rdoc_options: []
|
|
193
209
|
require_paths:
|
|
194
210
|
- lib
|