prism-merge 2.0.2 → 2.0.3

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: f43aef831e7dd032d7607b541bcc542cb2899514150346632084148b167dc0a5
4
- data.tar.gz: 104a80156b7b15d02c8b7f5b237998a4d4c225f22f7d108c46642ddea7e6c51e
3
+ metadata.gz: '058627bf3c8cc38b58815faddda8774645a25a06f8dd00116fac3c5368cad1f4'
4
+ data.tar.gz: 75eb6d7b4db6fe1774e45964bada3c2b3396d4d4efb8b5c8813d4f52b07ce120
5
5
  SHA512:
6
- metadata.gz: 425c404b3e0396b5db166b0c4e2fca941af3f6b6d0727ece8b0cd19bc60f9901883d587dee4a90c43356b6fa4b6b98d841fbf791785fb410662d72df0e7c5d2b
7
- data.tar.gz: eb666082134afb97479cd8dd020baa6b8ef45b489d0b8c3a4df8ad6e19e8100d53cba60d48c930d7ed43ce8830bf2ec5b309fc432a24dfb5440c1fa9eb9a9b7f
6
+ metadata.gz: 84b86d2c1052489cb9deef903966a1f2c5bdb3523efa93e88e5cd3cc7df5bc52838910b328790e6106e6904ae0df9356d3c54b28aa8e724a95f8210ff014d228
7
+ data.tar.gz: f67161e7e0500d7f1c819a0ba9ec6e459fb46cd3da8a05dfe386c245f0fcfaf56912cb22675d3c4547cd0cc98a66aae26023939f7453c13df16202acd0000a3b
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,22 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [2.0.3] - 2026-02-22
34
+
35
+ - TAG: [v2.0.3][2.0.3t]
36
+ - COVERAGE: 98.81% -- 829/839 lines in 12 files
37
+ - BRANCH COVERAGE: 85.71% -- 456/532 branches in 12 files
38
+ - 93.51% documented
39
+
40
+ ### Fixed
41
+
42
+ - Fix blank lines between blocks being stripped during recursive body merging.
43
+ `merge_node_body_recursively` assembled its output (opening line, merged body,
44
+ closing `end`) without emitting the trailing blank line that separates
45
+ consecutive blocks. `add_node_to_result` already handles this for non-recursive
46
+ nodes, but the recursive path was missing the same logic. Now emits a trailing
47
+ blank line after the closing `end` when the source has one.
48
+
33
49
  ## [2.0.2] - 2026-02-22
34
50
 
35
51
  - TAG: [v2.0.2][2.0.2t]
@@ -338,7 +354,9 @@ Please file a bug if you notice a violation of semantic versioning.
338
354
 
339
355
  - Initial release
340
356
 
341
- [Unreleased]: https://github.com/kettle-rb/prism-merge/compare/v2.0.2...HEAD
357
+ [Unreleased]: https://github.com/kettle-rb/prism-merge/compare/v2.0.3...HEAD
358
+ [2.0.3]: https://github.com/kettle-rb/prism-merge/compare/v2.0.2...v2.0.3
359
+ [2.0.3t]: https://github.com/kettle-rb/prism-merge/releases/tag/v2.0.3
342
360
  [2.0.2]: https://github.com/kettle-rb/prism-merge/compare/v2.0.1...v2.0.2
343
361
  [2.0.2t]: https://github.com/kettle-rb/prism-merge/releases/tag/v2.0.2
344
362
  [2.0.1]: https://github.com/kettle-rb/prism-merge/compare/v2.0.0...v2.0.1
data/README.md CHANGED
@@ -1564,7 +1564,7 @@ Thanks for RTFM. ☺️
1564
1564
  [📌gitmoji]: https://gitmoji.dev
1565
1565
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
1566
1566
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
1567
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.833-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
1567
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.839-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
1568
1568
  [🔐security]: SECURITY.md
1569
1569
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
1570
1570
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
@@ -1000,6 +1000,17 @@ module Prism
1000
1000
  template_line: (node_preference == :template) ? source_node.location.end_line : nil,
1001
1001
  dest_line: (node_preference == :destination) ? source_node.location.end_line : nil,
1002
1002
  )
1003
+
1004
+ # Add trailing blank line if needed for separation (same logic as add_node_to_result)
1005
+ trailing_line = source_node.location.end_line + 1
1006
+ trailing_content = source_analysis.line_at(trailing_line)
1007
+ if trailing_content && trailing_content.strip.empty?
1008
+ if node_preference == :template
1009
+ @result.add_line("", decision: decision, template_line: trailing_line)
1010
+ else
1011
+ @result.add_line("", decision: decision, dest_line: trailing_line)
1012
+ end
1013
+ end
1003
1014
  end
1004
1015
 
1005
1016
  # Extracts the body content of a node (without declaration and closing 'end').
@@ -5,7 +5,7 @@ module Prism
5
5
  # Version information for Prism::Merge
6
6
  module Version
7
7
  # Current version of the prism-merge gem
8
- VERSION = "2.0.2"
8
+ VERSION = "2.0.3"
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: prism-merge
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -314,10 +314,10 @@ licenses:
314
314
  - MIT
315
315
  metadata:
316
316
  homepage_uri: https://prism-merge.galtzo.com/
317
- source_code_uri: https://github.com/kettle-rb/prism-merge/tree/v2.0.2
318
- changelog_uri: https://github.com/kettle-rb/prism-merge/blob/v2.0.2/CHANGELOG.md
317
+ source_code_uri: https://github.com/kettle-rb/prism-merge/tree/v2.0.3
318
+ changelog_uri: https://github.com/kettle-rb/prism-merge/blob/v2.0.3/CHANGELOG.md
319
319
  bug_tracker_uri: https://github.com/kettle-rb/prism-merge/issues
320
- documentation_uri: https://www.rubydoc.info/gems/prism-merge/2.0.2
320
+ documentation_uri: https://www.rubydoc.info/gems/prism-merge/2.0.3
321
321
  funding_uri: https://github.com/sponsors/pboling
322
322
  wiki_uri: https://github.com/kettle-rb/prism-merge/wiki
323
323
  news_uri: https://www.railsbling.com/tags/prism-merge
metadata.gz.sig CHANGED
Binary file