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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87b2cf66d0fbccf11852ffad3a967f7b470473a31e47af2e87fab99e57f54d23
4
- data.tar.gz: 8472ce9175eb6fb14e29bcb4f65775d6557d40206ec5c763800012cf70ff7178
3
+ metadata.gz: e16be7b53f49d2a1a96a2f47cd21963f3c257e316c9af6479355b2e16f502028
4
+ data.tar.gz: d07924b47b8f20f8cb6a5b73c3616db6bc1bbef6be52e7927e1be580bc22f40e
5
5
  SHA512:
6
- metadata.gz: 7149ffb09a690608f382f63e9cff91bd85ceb25518b6744cc4617c638fe0acc4bd3a96de17f047c72161a5e4836b615e1721e550e34eee998916ab78b82df380
7
- data.tar.gz: 0b5b63b49be561c75027767dd850a692d31a047e000aa2404cc83df27bc4304a6d047e434e2402ddf1ffaed63a5044ea60f515b80959284b6faa52222da8e7fa
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.3...HEAD
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-3.272-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
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
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../ast_node"
4
- require_relative "style"
5
-
6
3
  module Ast
7
4
  module Merge
8
5
  module Comment
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../ast_node"
4
-
5
3
  module Ast
6
4
  module Merge
7
5
  module Comment
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../ast_node"
4
- require_relative "style"
5
-
6
3
  module Ast
7
4
  module Merge
8
5
  module Comment
@@ -1,10 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "style"
4
- require_relative "line"
5
- require_relative "empty"
6
- require_relative "block"
7
-
8
3
  module Ast
9
4
  module Merge
10
5
  module Comment
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "freezable"
4
-
5
3
  module Ast
6
4
  module Merge
7
5
  # Mixin module for file analysis classes across all *-merge gems.
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "freezable"
4
-
5
3
  module Ast
6
4
  module Merge
7
5
  # Base class for freeze block nodes in AST merge libraries.
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "freezable"
4
-
5
3
  module Ast
6
4
  module Merge
7
5
  # Provides node type wrapping support for SmartMerger implementations.
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "yaml"
4
- require_relative "preset"
5
4
 
6
5
  module Ast
7
6
  module Merge
@@ -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
- expect(output).to(include("Starting: test operation"))
112
- expect(output).to(include("Completed: test operation"))
113
- expect(output).to(match(/real_ms/))
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
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "line_node"
4
- require_relative "word_node"
5
-
6
3
  module Ast
7
4
  module Merge
8
5
  module Text
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../ast_node"
4
-
5
3
  module Ast
6
4
  module Merge
7
5
  module Text
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../ast_node"
4
-
5
3
  module Ast
6
4
  module Merge
7
5
  module Text
@@ -5,7 +5,7 @@ module Ast
5
5
  # Version information for Ast::Merge
6
6
  module Version
7
7
  # Current version of the ast-merge gem
8
- VERSION = "2.0.3"
8
+ VERSION = "2.0.5"
9
9
  end
10
10
  VERSION = Version::VERSION # traditional location
11
11
  end
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.3
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.0
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.0
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.3
356
- changelog_uri: https://github.com/kettle-rb/ast-merge/blob/v2.0.3/CHANGELOG.md
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.3
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