ast-merge 2.0.3 → 2.0.5
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
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +66 -1
- data/README.md +1 -1
- data/lib/ast/merge/comment/block.rb +0 -3
- data/lib/ast/merge/comment/empty.rb +0 -2
- data/lib/ast/merge/comment/line.rb +0 -3
- data/lib/ast/merge/comment/parser.rb +0 -5
- data/lib/ast/merge/file_analyzable.rb +0 -2
- data/lib/ast/merge/freeze_node_base.rb +0 -2
- data/lib/ast/merge/node_typing.rb +0 -2
- data/lib/ast/merge/recipe/config.rb +0 -1
- data/lib/ast/merge/rspec/shared_examples/debug_logger.rb +9 -3
- data/lib/ast/merge/text/file_analysis.rb +0 -3
- data/lib/ast/merge/text/line_node.rb +0 -2
- data/lib/ast/merge/text/word_node.rb +0 -2
- data/lib/ast/merge/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +6 -6
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e16be7b53f49d2a1a96a2f47cd21963f3c257e316c9af6479355b2e16f502028
|
|
4
|
+
data.tar.gz: d07924b47b8f20f8cb6a5b73c3616db6bc1bbef6be52e7927e1be580bc22f40e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5e1dc52b4951bf79dbbc4e4806e00fd322cf88effd65324939770219c66bf204ad63d932f9be2c6777e693e08881bb93aee9ccda579de21d7f9c01a974115513
|
|
7
|
+
data.tar.gz: 0622e0110fb955d46a567f23831bd4aa823fc550229c31828514da51c2269730d0bdd59e808fbaa5f80eb134cdd0ebd4d1698da2eeaf7f62eb8b8a38dc8a1986
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,67 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [2.0.5] - 2025-12-31
|
|
34
|
+
|
|
35
|
+
- TAG: [v2.0.5][2.0.5t]
|
|
36
|
+
- COVERAGE: 91.68% -- 2379/2595 lines in 44 files
|
|
37
|
+
- BRANCH COVERAGE: 81.37% -- 782/961 branches in 44 files
|
|
38
|
+
- 98.82% documented
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- Comprehensive tests for `Ast::Merge::AstNode` and nested structs (Point, Location)
|
|
43
|
+
- Tests for `Ast::Merge::Comment::Style` class methods and instance methods
|
|
44
|
+
- Tests for `Ast::Merge::Comment::Line` including freeze marker detection
|
|
45
|
+
- Tests for `Ast::Merge::Comment::Block` including raw_content and children modes
|
|
46
|
+
- Tests for `Ast::Merge::Comment::Parser` edge cases (unclosed blocks, mixed content, auto-detection)
|
|
47
|
+
- Tests for `Ast::Merge::NavigableStatement` tree navigation methods
|
|
48
|
+
- Tests for `Ast::Merge::InjectionPoint` (start_line, end_line, inspect)
|
|
49
|
+
- Tests for `Ast::Merge::InjectionPointFinder` boundary options (boundary_type, boundary_text, boundary_matcher, boundary_same_or_shallower)
|
|
50
|
+
- Tests for `Ast::Merge::PartialTemplateMerger::Result` including injection_point and default values
|
|
51
|
+
- Tests for `Ast::Merge::PartialTemplateMerger` text pattern normalization (regex strings, plain strings)
|
|
52
|
+
- Tests for `Ast::Merge::PartialTemplateMerger` anchor normalization with level options
|
|
53
|
+
- Tests for `Ast::Merge::PartialTemplateMerger` unknown when_missing fallback behavior
|
|
54
|
+
- Tests for `Ast::Merge::PartialTemplateMerger` section boundary detection and replace_mode behavior
|
|
55
|
+
- Tests for `Ast::Merge::PartialTemplateMerger` unknown parser error handling
|
|
56
|
+
- Tests for `Ast::Merge::Recipe::Runner::Result` stats and error attributes
|
|
57
|
+
- Tests for `Ast::Merge::Recipe::Runner` actual file writes (non-dry-run mode)
|
|
58
|
+
- Tests for `Ast::Merge::Recipe::Runner` error handling (unreadable files, missing template)
|
|
59
|
+
- Tests for `Ast::Merge::Recipe::Runner` when_missing with append behavior
|
|
60
|
+
- Tests for `Ast::Merge::Recipe::Config` same_or_shallower boundary, replace_mode, level options
|
|
61
|
+
- Tests for `Ast::Merge::Recipe::Config` injection parsing with empty/nil/Regexp patterns
|
|
62
|
+
- Tests for `Ast::Merge::Recipe::Config` expand_targets with absolute patterns
|
|
63
|
+
- Tests for `Ast::Merge::Recipe::Preset` callable add_missing and node_typing
|
|
64
|
+
- Tests for `Ast::Merge::Recipe::Preset` script_loader caching
|
|
65
|
+
- Tests for `Ast::Merge::Recipe::ScriptLoader` syntax error handling
|
|
66
|
+
- Tests for `Ast::Merge::Recipe::ScriptLoader` absolute path resolution
|
|
67
|
+
- Tests for `Ast::Merge::ContentMatchRefiner` extract_node_type with typed nodes
|
|
68
|
+
- Tests for `Ast::Merge::ContentMatchRefiner` filter_nodes with node_types
|
|
69
|
+
|
|
70
|
+
### Changed
|
|
71
|
+
|
|
72
|
+
- tree_haver v3.2.1
|
|
73
|
+
- Internal files now use autoload instead of `require_relative` for consistency
|
|
74
|
+
|
|
75
|
+
## [2.0.4] - 2025-12-31
|
|
76
|
+
|
|
77
|
+
- TAG: [v2.0.4][2.0.4t]
|
|
78
|
+
- COVERAGE: 88.61% -- 2903/3276 lines in 53 files
|
|
79
|
+
- BRANCH COVERAGE: 67.90% -- 700/1031 branches in 53 files
|
|
80
|
+
- 98.82% documented
|
|
81
|
+
|
|
82
|
+
### Added
|
|
83
|
+
|
|
84
|
+
- Many more tests
|
|
85
|
+
|
|
86
|
+
### Fixed
|
|
87
|
+
|
|
88
|
+
- RSpec shared examples for `Ast::Merge::DebugLogger` now handle Ruby 4.0+ where benchmark is a bundled gem
|
|
89
|
+
- The `#time logs start and completion with timing` test now checks `BENCHMARK_AVAILABLE` constant
|
|
90
|
+
- When benchmark is available: expects full timing output with "Starting:", "Completed:", and `real_ms`
|
|
91
|
+
- When benchmark is unavailable: expects warning message about benchmark gem not being available
|
|
92
|
+
- Fixes CI failures on Ruby 4.0.0 for downstream gems (e.g., bash-merge) using the shared examples
|
|
93
|
+
|
|
33
94
|
## [2.0.3] - 2025-12-30
|
|
34
95
|
|
|
35
96
|
- TAG: [v2.0.3][2.0.3t]
|
|
@@ -298,7 +359,11 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
298
359
|
|
|
299
360
|
- Initial release
|
|
300
361
|
|
|
301
|
-
[Unreleased]: https://github.com/kettle-rb/ast-merge/compare/v2.0.
|
|
362
|
+
[Unreleased]: https://github.com/kettle-rb/ast-merge/compare/v2.0.5...HEAD
|
|
363
|
+
[2.0.5]: https://github.com/kettle-rb/ast-merge/compare/v2.0.4...v2.0.5
|
|
364
|
+
[2.0.5t]: https://github.com/kettle-rb/ast-merge/releases/tag/v2.0.5
|
|
365
|
+
[2.0.4]: https://github.com/kettle-rb/ast-merge/compare/v2.0.3...v2.0.4
|
|
366
|
+
[2.0.4t]: https://github.com/kettle-rb/ast-merge/releases/tag/v2.0.4
|
|
302
367
|
[2.0.3]: https://github.com/kettle-rb/ast-merge/compare/v2.0.2...v2.0.3
|
|
303
368
|
[2.0.3t]: https://github.com/kettle-rb/ast-merge/releases/tag/v2.0.3
|
|
304
369
|
[2.0.2]: https://github.com/kettle-rb/ast-merge/compare/v2.0.1...v2.0.2
|
data/README.md
CHANGED
|
@@ -1032,7 +1032,7 @@ Thanks for RTFM. ☺️
|
|
|
1032
1032
|
[📌gitmoji]: https://gitmoji.dev
|
|
1033
1033
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
1034
1034
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
1035
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-
|
|
1035
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-2.595-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
1036
1036
|
[🔐security]: SECURITY.md
|
|
1037
1037
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
1038
1038
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
|
@@ -108,9 +108,15 @@ RSpec.shared_examples("Ast::Merge::DebugLogger") do
|
|
|
108
108
|
|
|
109
109
|
it "#time logs start and completion with timing" do
|
|
110
110
|
output = capture(:stderr) { described_logger.time("test operation") { 42 } }
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
if Ast::Merge::DebugLogger::BENCHMARK_AVAILABLE
|
|
112
|
+
expect(output).to(include("Starting: test operation"))
|
|
113
|
+
expect(output).to(include("Completed: test operation"))
|
|
114
|
+
expect(output).to(match(/real_ms/))
|
|
115
|
+
else
|
|
116
|
+
expect(output).to(include("WARNING"))
|
|
117
|
+
expect(output).to(include("Benchmark gem not available"))
|
|
118
|
+
expect(output).to(include("test operation"))
|
|
119
|
+
end
|
|
114
120
|
end
|
|
115
121
|
|
|
116
122
|
it "#time returns the block result" do
|
data/lib/ast/merge/version.rb
CHANGED
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ast-merge
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter H. Boling
|
|
@@ -66,7 +66,7 @@ dependencies:
|
|
|
66
66
|
version: '3.2'
|
|
67
67
|
- - ">="
|
|
68
68
|
- !ruby/object:Gem::Version
|
|
69
|
-
version: 3.2.
|
|
69
|
+
version: 3.2.1
|
|
70
70
|
type: :runtime
|
|
71
71
|
prerelease: false
|
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -76,7 +76,7 @@ dependencies:
|
|
|
76
76
|
version: '3.2'
|
|
77
77
|
- - ">="
|
|
78
78
|
- !ruby/object:Gem::Version
|
|
79
|
-
version: 3.2.
|
|
79
|
+
version: 3.2.1
|
|
80
80
|
- !ruby/object:Gem::Dependency
|
|
81
81
|
name: kettle-dev
|
|
82
82
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -352,10 +352,10 @@ licenses:
|
|
|
352
352
|
- MIT
|
|
353
353
|
metadata:
|
|
354
354
|
homepage_uri: https://ast-merge.galtzo.com/
|
|
355
|
-
source_code_uri: https://github.com/kettle-rb/ast-merge/tree/v2.0.
|
|
356
|
-
changelog_uri: https://github.com/kettle-rb/ast-merge/blob/v2.0.
|
|
355
|
+
source_code_uri: https://github.com/kettle-rb/ast-merge/tree/v2.0.5
|
|
356
|
+
changelog_uri: https://github.com/kettle-rb/ast-merge/blob/v2.0.5/CHANGELOG.md
|
|
357
357
|
bug_tracker_uri: https://github.com/kettle-rb/ast-merge/issues
|
|
358
|
-
documentation_uri: https://www.rubydoc.info/gems/ast-merge/2.0.
|
|
358
|
+
documentation_uri: https://www.rubydoc.info/gems/ast-merge/2.0.5
|
|
359
359
|
funding_uri: https://github.com/sponsors/pboling
|
|
360
360
|
wiki_uri: https://github.com/kettle-rb/ast-merge/wiki
|
|
361
361
|
news_uri: https://www.railsbling.com/tags/ast-merge
|
metadata.gz.sig
CHANGED
|
Binary file
|