paper_trail_diff 0.4.0 → 0.5.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 +20 -0
- data/README.md +56 -2
- data/lib/paper_trail_diff/analysis_batch.rb +74 -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 +131 -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 +49 -33
- data/lib/paper_trail_diff/timeline_builder.rb +3 -3
- data/lib/paper_trail_diff/timeline_range.rb +9 -2
- data/lib/paper_trail_diff/traversal_preparer.rb +40 -0
- data/lib/paper_trail_diff/version.rb +1 -1
- data/lib/paper_trail_diff.rb +36 -5
- data/sig/generated/paper_trail_diff/analysis_batch.rbs +42 -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 +62 -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 +16 -7
- data/sig/generated/paper_trail_diff/timeline_builder.rbs +2 -2
- data/sig/generated/paper_trail_diff/timeline_range.rbs +6 -2
- data/sig/generated/paper_trail_diff/traversal_preparer.rbs +22 -0
- data/sig/generated/paper_trail_diff.rbs +13 -3
- metadata +14 -4
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Generated from lib/paper_trail_diff/traversal_preparer.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module PaperTrailDiff
|
|
4
|
+
# Checks that a model can be traversed before any reconstruction starts, and
|
|
5
|
+
# that association tracking is actually available when history is involved.
|
|
6
|
+
class TraversalPreparer
|
|
7
|
+
# : (tree: AssociationTree, traversal: AssociationTraversal) -> void
|
|
8
|
+
def initialize: (tree: AssociationTree, traversal: AssociationTraversal) -> void
|
|
9
|
+
|
|
10
|
+
# : (untyped, historical: bool) -> void
|
|
11
|
+
def call: (untyped, historical: bool) -> void
|
|
12
|
+
|
|
13
|
+
private
|
|
14
|
+
|
|
15
|
+
@traversal: AssociationTraversal
|
|
16
|
+
|
|
17
|
+
@tree: AssociationTree
|
|
18
|
+
|
|
19
|
+
# : () -> void
|
|
20
|
+
def ensure_association_tracking!: () -> void
|
|
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
|
|
@@ -19,13 +21,21 @@ module PaperTrailDiff
|
|
|
19
21
|
def self.timeline: (untyped, ?from: untyped, ?to: untyped, ?within: untyped, ?associations: Array[String | Symbol], ?ignore: ignore_option) -> 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) -> 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]
|
|
24
28
|
|
|
25
29
|
# Builds an endpoint diff and root-checkpoint timeline while normalizing each version once.
|
|
26
30
|
# : (untyped, ?from: untyped, ?to: untyped, ?within: untyped, ?associations: Array[String | Symbol], ?ignore: ignore_option, ?activity: bool) -> Analysis
|
|
27
31
|
def self.analyze: (untyped, ?from: untyped, ?to: untyped, ?within: untyped, ?associations: Array[String | Symbol], ?ignore: ignore_option, ?activity: bool) -> Analysis
|
|
28
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) -> Hash[identity, Analysis]
|
|
37
|
+
def self.analyze_many: (Array[untyped], ?within: untyped, ?associations: Array[String | Symbol], ?ignore: ignore_option, ?activity: bool) -> Hash[identity, Analysis]
|
|
38
|
+
|
|
29
39
|
# Returns the association macros this release can normalize.
|
|
30
40
|
# : () -> Array[Symbol]
|
|
31
41
|
def self.supported_association_macros: () -> 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.5.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
|
|
@@ -106,6 +110,7 @@ files:
|
|
|
106
110
|
- lib/paper_trail_diff/traversal.rb
|
|
107
111
|
- lib/paper_trail_diff/traversal_emitter.rb
|
|
108
112
|
- lib/paper_trail_diff/traversal_entry.rb
|
|
113
|
+
- lib/paper_trail_diff/traversal_preparer.rb
|
|
109
114
|
- lib/paper_trail_diff/value_objects.rb
|
|
110
115
|
- lib/paper_trail_diff/version.rb
|
|
111
116
|
- lib/paper_trail_diff/version_association_candidate_scope.rb
|
|
@@ -133,9 +138,13 @@ files:
|
|
|
133
138
|
- sig/generated/paper_trail_diff/activity_timeline_builder.rbs
|
|
134
139
|
- sig/generated/paper_trail_diff/activity_version_collector.rbs
|
|
135
140
|
- sig/generated/paper_trail_diff/analysis.rbs
|
|
141
|
+
- sig/generated/paper_trail_diff/analysis_batch.rbs
|
|
136
142
|
- sig/generated/paper_trail_diff/association_diff_traversal.rbs
|
|
137
143
|
- sig/generated/paper_trail_diff/association_discovery.rbs
|
|
138
144
|
- sig/generated/paper_trail_diff/association_traversal.rbs
|
|
145
|
+
- sig/generated/paper_trail_diff/batch_boundary_resolver.rbs
|
|
146
|
+
- sig/generated/paper_trail_diff/batched_root_analyzer.rbs
|
|
147
|
+
- sig/generated/paper_trail_diff/batched_root_versions.rbs
|
|
139
148
|
- sig/generated/paper_trail_diff/branch_snapshot_refresher.rbs
|
|
140
149
|
- sig/generated/paper_trail_diff/collection_comparator.rbs
|
|
141
150
|
- sig/generated/paper_trail_diff/collection_identity_index.rbs
|
|
@@ -174,6 +183,7 @@ files:
|
|
|
174
183
|
- sig/generated/paper_trail_diff/traversal.rbs
|
|
175
184
|
- sig/generated/paper_trail_diff/traversal_emitter.rbs
|
|
176
185
|
- sig/generated/paper_trail_diff/traversal_entry.rbs
|
|
186
|
+
- sig/generated/paper_trail_diff/traversal_preparer.rbs
|
|
177
187
|
- sig/generated/paper_trail_diff/value_objects.rbs
|
|
178
188
|
- sig/generated/paper_trail_diff/version.rbs
|
|
179
189
|
- sig/generated/paper_trail_diff/version_association_candidate_scope.rbs
|
|
@@ -184,11 +194,11 @@ licenses:
|
|
|
184
194
|
metadata:
|
|
185
195
|
allowed_push_host: https://rubygems.org
|
|
186
196
|
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.
|
|
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
|
|
189
199
|
homepage_uri: https://github.com/aheathwilliams/paper_trail_diff
|
|
190
200
|
rubygems_mfa_required: 'true'
|
|
191
|
-
source_code_uri: https://github.com/aheathwilliams/paper_trail_diff/tree/v0.
|
|
201
|
+
source_code_uri: https://github.com/aheathwilliams/paper_trail_diff/tree/v0.5.0
|
|
192
202
|
rdoc_options: []
|
|
193
203
|
require_paths:
|
|
194
204
|
- lib
|