prism-merge 1.0.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.
data/README.md ADDED
@@ -0,0 +1,987 @@
1
+ | 📍 NOTE |
2
+ |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
3
+ | RubyGems (the [GitHub org][rubygems-org], not the website) [suffered][draper-security] a [hostile takeover][ellen-takeover] in September 2025. |
4
+ | Ultimately [4 maintainers][simi-removed] were [hard removed][martin-removed] and a reason has been given for only 1 of those, while 2 others resigned in protest. |
5
+ | It is a [complicated story][draper-takeover] which is difficult to [parse quickly][draper-lies]. |
6
+ | Simply put - there was active policy for adding or removing maintainers/owners of [rubygems][rubygems-maint-policy] and [bundler][bundler-maint-policy], and those [policies were not followed][policy-fail]. |
7
+ | I'm adding notes like this to gems because I [don't condone theft][draper-theft] of repositories or gems from their rightful owners. |
8
+ | If a similar theft happened with my repos/gems, I'd hope some would stand up for me. |
9
+ | Disenfranchised former-maintainers have started [gem.coop][gem-coop]. |
10
+ | Once available I will publish there exclusively; unless RubyCentral makes amends with the community. |
11
+ | The ["Technology for Humans: Joel Draper"][reinteractive-podcast] podcast episode by [reinteractive][reinteractive] is the most cogent summary I'm aware of. |
12
+ | See [here][gem-naming], [here][gem-coop] and [here][martin-ann] for more info on what comes next. |
13
+ | What I'm doing: A (WIP) proposal for [bundler/gem scopes][gem-scopes], and a (WIP) proposal for a federated [gem server][gem-server]. |
14
+
15
+ [rubygems-org]: https://github.com/rubygems/
16
+ [draper-security]: https://joel.drapper.me/p/ruby-central-security-measures/
17
+ [draper-takeover]: https://joel.drapper.me/p/ruby-central-takeover/
18
+ [ellen-takeover]: https://pup-e.com/blog/goodbye-rubygems/
19
+ [simi-removed]: https://www.reddit.com/r/ruby/s/gOk42POCaV
20
+ [martin-removed]: https://bsky.app/profile/martinemde.com/post/3m3occezxxs2q
21
+ [draper-lies]: https://joel.drapper.me/p/ruby-central-fact-check/
22
+ [draper-theft]: https://joel.drapper.me/p/ruby-central/
23
+ [reinteractive]: https://reinteractive.com/ruby-on-rails
24
+ [gem-coop]: https://gem.coop
25
+ [gem-naming]: https://github.com/gem-coop/gem.coop/issues/12
26
+ [martin-ann]: https://martinemde.com/2025/10/05/announcing-gem-coop.html
27
+ [gem-scopes]: https://github.com/galtzo-floss/bundle-namespace
28
+ [gem-server]: https://github.com/galtzo-floss/gem-server
29
+ [reinteractive-podcast]: https://youtu.be/_H4qbtC5qzU?si=BvuBU90R2wAqD2E6
30
+ [bundler-maint-policy]: https://github.com/ruby/rubygems/blob/b1ab33a3d52310a84d16b193991af07f5a6a07c0/doc/bundler/playbooks/TEAM_CHANGES.md
31
+ [rubygems-maint-policy]: https://github.com/ruby/rubygems/blob/b1ab33a3d52310a84d16b193991af07f5a6a07c0/doc/rubygems/POLICIES.md?plain=1#L187-L196
32
+ [policy-fail]: https://www.reddit.com/r/ruby/comments/1ove9vp/rubycentral_hates_this_one_fact/
33
+
34
+ [![Galtzo FLOSS Logo by Aboling0, CC BY-SA 4.0][🖼️galtzo-i]][🖼️galtzo-discord] [![ruby-lang Logo, Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5][🖼️ruby-lang-i]][🖼️ruby-lang] [![kettle-rb Logo by Aboling0, CC BY-SA 4.0][🖼️kettle-rb-i]][🖼️kettle-rb]
35
+
36
+ [🖼️galtzo-i]: https://logos.galtzo.com/assets/images/galtzo-floss/avatar-192px.svg
37
+ [🖼️galtzo-discord]: https://discord.gg/3qme4XHNKN
38
+ [🖼️ruby-lang-i]: https://logos.galtzo.com/assets/images/ruby-lang/avatar-192px.svg
39
+ [🖼️ruby-lang]: https://www.ruby-lang.org/
40
+ [🖼️kettle-rb-i]: https://logos.galtzo.com/assets/images/kettle-rb/avatar-192px.svg
41
+ [🖼️kettle-rb]: https://github.com/kettle-rb
42
+
43
+ # ☯️ Prism::Merge
44
+
45
+ [![Version][👽versioni]][👽version] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: MIT][📄license-img]][📄license-ref] [![Downloads Rank][👽dl-ranki]][👽dl-rank] [![Open Source Helpers][👽oss-helpi]][👽oss-help] [![CodeCov Test Coverage][🏀codecovi]][🏀codecov] [![Coveralls Test Coverage][🏀coveralls-img]][🏀coveralls] [![QLTY Test Coverage][🏀qlty-covi]][🏀qlty-cov] [![QLTY Maintainability][🏀qlty-mnti]][🏀qlty-mnt] [![CI Heads][🚎3-hd-wfi]][🚎3-hd-wf] [![CI Runtime Dependencies @ HEAD][🚎12-crh-wfi]][🚎12-crh-wf] [![CI Current][🚎11-c-wfi]][🚎11-c-wf] [![CI Truffle Ruby][🚎9-t-wfi]][🚎9-t-wf] [![CI JRuby][🚎10-j-wfi]][🚎10-j-wf] [![Deps Locked][🚎13-🔒️-wfi]][🚎13-🔒️-wf] [![Deps Unlocked][🚎14-🔓️-wfi]][🚎14-🔓️-wf] [![CI Supported][🚎6-s-wfi]][🚎6-s-wf] [![CI Legacy][🚎4-lg-wfi]][🚎4-lg-wf] [![CI Unsupported][🚎7-us-wfi]][🚎7-us-wf] [![CI Test Coverage][🚎2-cov-wfi]][🚎2-cov-wf] [![CI Style][🚎5-st-wfi]][🚎5-st-wf] [![CodeQL][🖐codeQL-img]][🖐codeQL] [![Apache SkyWalking Eyes License Compatibility Check][🚎15-🪪-wfi]][🚎15-🪪-wf]
46
+
47
+ `if ci_badges.map(&:color).detect { it != "green"}` ☝️ [let me know][🖼️galtzo-discord], as I may have missed the [discord notification][🖼️galtzo-discord].
48
+
49
+ ---
50
+
51
+ `if ci_badges.map(&:color).all? { it == "green"}` 👇️ send money so I can do more of this. FLOSS maintenance is now my full-time job.
52
+
53
+ [![OpenCollective Backers][🖇osc-backers-i]][🖇osc-backers] [![OpenCollective Sponsors][🖇osc-sponsors-i]][🖇osc-sponsors] [![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor] [![Liberapay Goal Progress][⛳liberapay-img]][⛳liberapay] [![Donate on PayPal][🖇paypal-img]][🖇paypal] [![Buy me a coffee][🖇buyme-small-img]][🖇buyme] [![Donate on Polar][🖇polar-img]][🖇polar] [![Donate at ko-fi.com][🖇kofi-img]][🖇kofi]
54
+
55
+ ## 🌻 Synopsis
56
+
57
+ Prism::Merge is a standalone Ruby module that intelligently merges two versions of a Ruby file using Prism AST analysis. It's like a smart "git merge" specifically designed for Ruby code. I wrote this to aid in my comprehensive gem templating tool [kettle-dev](https://github.com/kettle-rb/kettle-dev).
58
+
59
+ ### Key Features
60
+
61
+ - **AST-Aware**: Uses Prism parser to understand Ruby structure
62
+ - **Intelligent**: Matches nodes by structural signatures
63
+ - **Comment-Preserving**: Comments are properly attached to relevant nodes and/or placement
64
+ - **Freeze Block Support**: Respects `kettle-dev:freeze` markers for template merge control
65
+ - **Full Provenance**: Tracks origin of every line
66
+ - **Customizable**: Supports custom signature generators
67
+ - **Standalone**: No dependencies other than `prism`
68
+
69
+ ### Example
70
+
71
+ ```ruby
72
+ require "prism/merge"
73
+
74
+ template = File.read("template.rb")
75
+ destination = File.read("destination.rb")
76
+
77
+ merger = Prism::Merge::SmartMerger.new(template, destination)
78
+ result = merger.merge
79
+
80
+ File.write("merged.rb", result)
81
+ ```
82
+
83
+ ## 💡 Info you can shake a stick at
84
+
85
+ | Tokens to Remember | [![Gem name][⛳️name-img]][⛳️gem-name] [![Gem namespace][⛳️namespace-img]][⛳️gem-namespace] |
86
+ |-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
87
+ | Works with JRuby | ![JRuby 9.1 Compat][💎jruby-9.1i] ![JRuby 9.2 Compat][💎jruby-9.2i] ![JRuby 9.3 Compat][💎jruby-9.3i] <br/> [![JRuby 9.4 Compat][💎jruby-9.4i]][🚎10-j-wf] [![JRuby 10.0 Compat][💎jruby-c-i]][🚎11-c-wf] [![JRuby HEAD Compat][💎jruby-headi]][🚎3-hd-wf] |
88
+ | Works with Truffle Ruby | ![Truffle Ruby 22.3 Compat][💎truby-22.3i] ![Truffle Ruby 23.0 Compat][💎truby-23.0i] <br/> [![Truffle Ruby 23.1 Compat][💎truby-23.1i]][🚎9-t-wf] [![Truffle Ruby 24.1 Compat][💎truby-c-i]][🚎11-c-wf] |
89
+ | Works with MRI Ruby 3 | [![Ruby 3.2 Compat][💎ruby-3.2i]][🚎6-s-wf] [![Ruby 3.3 Compat][💎ruby-3.3i]][🚎6-s-wf] [![Ruby 3.4 Compat][💎ruby-c-i]][🚎11-c-wf] [![Ruby HEAD Compat][💎ruby-headi]][🚎3-hd-wf] |
90
+ | Support & Community | [![Join Me on Daily.dev's RubyFriends][✉️ruby-friends-img]][✉️ruby-friends] [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite] [![Get help from me on Upwork][👨🏼‍🏫expsup-upwork-img]][👨🏼‍🏫expsup-upwork] [![Get help from me on Codementor][👨🏼‍🏫expsup-codementor-img]][👨🏼‍🏫expsup-codementor] |
91
+ | Source | [![Source on GitLab.com][📜src-gl-img]][📜src-gl] [![Source on CodeBerg.org][📜src-cb-img]][📜src-cb] [![Source on Github.com][📜src-gh-img]][📜src-gh] [![The best SHA: dQw4w9WgXcQ!][🧮kloc-img]][🧮kloc] |
92
+ | Documentation | [![Current release on RubyDoc.info][📜docs-cr-rd-img]][🚎yard-current] [![YARD on Galtzo.com][📜docs-head-rd-img]][🚎yard-head] [![Maintainer Blog][🚂maint-blog-img]][🚂maint-blog] [![GitLab Wiki][📜gl-wiki-img]][📜gl-wiki] [![GitHub Wiki][📜gh-wiki-img]][📜gh-wiki] |
93
+ | Compliance | [![License: MIT][📄license-img]][📄license-ref] [![Compatible with Apache Software Projects: Verified by SkyWalking Eyes][📄license-compat-img]][📄license-compat] [![📄ilo-declaration-img]][📄ilo-declaration] [![Security Policy][🔐security-img]][🔐security] [![Contributor Covenant 2.1][🪇conduct-img]][🪇conduct] [![SemVer 2.0.0][📌semver-img]][📌semver] |
94
+ | Style | [![Enforced Code Style Linter][💎rlts-img]][💎rlts] [![Keep-A-Changelog 1.0.0][📗keep-changelog-img]][📗keep-changelog] [![Gitmoji Commits][📌gitmoji-img]][📌gitmoji] [![Compatibility appraised by: appraisal2][💎appraisal2-img]][💎appraisal2] |
95
+ | Maintainer 🎖️ | [![Follow Me on LinkedIn][💖🖇linkedin-img]][💖🖇linkedin] [![Follow Me on Ruby.Social][💖🐘ruby-mast-img]][💖🐘ruby-mast] [![Follow Me on Bluesky][💖🦋bluesky-img]][💖🦋bluesky] [![Contact Maintainer][🚂maint-contact-img]][🚂maint-contact] [![My technical writing][💖💁🏼‍♂️devto-img]][💖💁🏼‍♂️devto] |
96
+ | `...` 💖 | [![Find Me on WellFound:][💖✌️wellfound-img]][💖✌️wellfound] [![Find Me on CrunchBase][💖💲crunchbase-img]][💖💲crunchbase] [![My LinkTree][💖🌳linktree-img]][💖🌳linktree] [![More About Me][💖💁🏼‍♂️aboutme-img]][💖💁🏼‍♂️aboutme] [🧊][💖🧊berg] [🐙][💖🐙hub] [🛖][💖🛖hut] [🧪][💖🧪lab] |
97
+
98
+ ### Compatibility
99
+
100
+ Compatible with MRI Ruby 3.2.0+, and concordant releases of JRuby, and TruffleRuby.
101
+
102
+ | 🚚 _Amazing_ test matrix was brought to you by | 🔎 appraisal2 🔎 and the color 💚 green 💚 |
103
+ |------------------------------------------------|--------------------------------------------------------|
104
+ | 👟 Check it out! | ✨ [github.com/appraisal-rb/appraisal2][💎appraisal2] ✨ |
105
+
106
+ ### Federated DVCS
107
+
108
+ <details markdown="1">
109
+ <summary>Find this repo on federated forges (Coming soon!)</summary>
110
+
111
+ | Federated [DVCS][💎d-in-dvcs] Repository | Status | Issues | PRs | Wiki | CI | Discussions |
112
+ |-------------------------------------------------|-----------------------------------------------------------------------|---------------------------|--------------------------|---------------------------|--------------------------|------------------------------|
113
+ | 🧪 [kettle-rb/prism-merge on GitLab][📜src-gl] | The Truth | [💚][🤝gl-issues] | [💚][🤝gl-pulls] | [💚][📜gl-wiki] | 🐭 Tiny Matrix | ➖ |
114
+ | 🧊 [kettle-rb/prism-merge on CodeBerg][📜src-cb] | An Ethical Mirror ([Donate][🤝cb-donate]) | [💚][🤝cb-issues] | [💚][🤝cb-pulls] | ➖ | ⭕️ No Matrix | ➖ |
115
+ | 🐙 [kettle-rb/prism-merge on GitHub][📜src-gh] | Another Mirror | [💚][🤝gh-issues] | [💚][🤝gh-pulls] | [💚][📜gh-wiki] | 💯 Full Matrix | [💚][gh-discussions] |
116
+ | 🎮️ [Discord Server][✉️discord-invite] | [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite] | [Let's][✉️discord-invite] | [talk][✉️discord-invite] | [about][✉️discord-invite] | [this][✉️discord-invite] | [library!][✉️discord-invite] |
117
+
118
+ </details>
119
+
120
+ [gh-discussions]: https://github.com/kettle-rb/prism-merge/discussions
121
+
122
+ ### Enterprise Support [![Tidelift](https://tidelift.com/badges/package/rubygems/prism-merge)](https://tidelift.com/subscription/pkg/rubygems-prism-merge?utm_source=rubygems-prism-merge&utm_medium=referral&utm_campaign=readme)
123
+
124
+ Available as part of the Tidelift Subscription.
125
+
126
+ <details markdown="1">
127
+ <summary>Need enterprise-level guarantees?</summary>
128
+
129
+ The maintainers of this and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use.
130
+
131
+ [![Get help from me on Tidelift][🏙️entsup-tidelift-img]][🏙️entsup-tidelift]
132
+
133
+ - 💡Subscribe for support guarantees covering _all_ your FLOSS dependencies
134
+ - 💡Tidelift is part of [Sonar][🏙️entsup-tidelift-sonar]
135
+ - 💡Tidelift pays maintainers to maintain the software you depend on!<br/>📊`@`Pointy Haired Boss: An [enterprise support][🏙️entsup-tidelift] subscription is "[never gonna let you down][🧮kloc]", and *supports* open source maintainers
136
+
137
+ Alternatively:
138
+
139
+ - [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite]
140
+ - [![Get help from me on Upwork][👨🏼‍🏫expsup-upwork-img]][👨🏼‍🏫expsup-upwork]
141
+ - [![Get help from me on Codementor][👨🏼‍🏫expsup-codementor-img]][👨🏼‍🏫expsup-codementor]
142
+
143
+ </details>
144
+
145
+ ## ✨ Installation
146
+
147
+ Install the gem and add to the application's Gemfile by executing:
148
+
149
+ ```console
150
+ bundle add prism-merge
151
+ ```
152
+
153
+ If bundler is not being used to manage dependencies, install the gem by executing:
154
+
155
+ ```console
156
+ gem install prism-merge
157
+ ```
158
+
159
+ ### 🔒 Secure Installation
160
+
161
+ <details markdown="1">
162
+ <summary>For Medium or High Security Installations</summary>
163
+
164
+ This gem is cryptographically signed, and has verifiable [SHA-256 and SHA-512][💎SHA_checksums] checksums by
165
+ [stone_checksums][💎stone_checksums]. Be sure the gem you install hasn’t been tampered with
166
+ by following the instructions below.
167
+
168
+ Add my public key (if you haven’t already, expires 2045-04-29) as a trusted certificate:
169
+
170
+ ```console
171
+ gem cert --add <(curl -Ls https://raw.github.com/galtzo-floss/certs/main/pboling.pem)
172
+ ```
173
+
174
+ You only need to do that once. Then proceed to install with:
175
+
176
+ ```console
177
+ gem install prism-merge -P HighSecurity
178
+ ```
179
+
180
+ The `HighSecurity` trust profile will verify signed gems, and not allow the installation of unsigned dependencies.
181
+
182
+ If you want to up your security game full-time:
183
+
184
+ ```console
185
+ bundle config set --global trust-policy MediumSecurity
186
+ ```
187
+
188
+ `MediumSecurity` instead of `HighSecurity` is necessary if not all the gems you use are signed.
189
+
190
+ NOTE: Be prepared to track down certs for signed gems and add them the same way you added mine.
191
+
192
+ </details>
193
+
194
+ ## ⚙️ Configuration
195
+
196
+ Prism::Merge works out of the box with zero configuration, but offers customization options for advanced use cases.
197
+
198
+ ### Signature Match Preference
199
+
200
+ Control which version to use when nodes have matching signatures but different content:
201
+
202
+ ```ruby
203
+ # Use template version (for version files, configs where template has updates)
204
+ merger = Prism::Merge::SmartMerger.new(
205
+ template,
206
+ destination,
207
+ signature_match_preference: :template,
208
+ )
209
+
210
+ # Use destination version (for Appraisals, configs with customizations)
211
+ merger = Prism::Merge::SmartMerger.new(
212
+ template,
213
+ destination,
214
+ signature_match_preference: :destination, # This is the default
215
+ )
216
+ ```
217
+
218
+ **When to use each:**
219
+
220
+ - **`:template`** - Template contains canonical/updated values
221
+ - Version files (`VERSION = "2.0.0"` should replace `VERSION = "1.0.0"`)
222
+ - Configuration updates (`API_ENDPOINT` should be updated)
223
+ - Conditional bodies (`if ENV["DEBUG"]` should use template's implementation)
224
+
225
+ - **`:destination`** (default) - Destination contains customizations
226
+ - Appraisals files (destination has project-specific gem versions)
227
+ - Project-specific configurations
228
+ - Custom implementations
229
+
230
+ ### Template-Only Nodes
231
+
232
+ Control whether to add nodes that only exist in the template:
233
+
234
+ ```ruby
235
+ # Add template-only nodes (for merging new features/constants)
236
+ merger = Prism::Merge::SmartMerger.new(
237
+ template,
238
+ destination,
239
+ add_template_only_nodes: true,
240
+ )
241
+
242
+ # Skip template-only nodes (for templates with placeholder content)
243
+ merger = Prism::Merge::SmartMerger.new(
244
+ template,
245
+ destination,
246
+ add_template_only_nodes: false, # This is the default
247
+ )
248
+ ```
249
+
250
+ **When to use each:**
251
+
252
+ - **`true`** - Template has new content to add
253
+ - New constants (`NAME = "myapp"` should be added to destination)
254
+ - New methods/classes from template
255
+ - Required configuration options
256
+
257
+ - **`false`** (default) - Template has placeholder/example content
258
+ - Appraisals templates with ruby version blocks not in destination
259
+ - Example configurations that shouldn't be added
260
+ - Template-only nodes would create unwanted additions
261
+
262
+ ### Combined Configuration
263
+
264
+ For different merge scenarios:
265
+
266
+ ```ruby
267
+ # Scenario 1: Version file merge (template wins, add new constants)
268
+ merger = Prism::Merge::SmartMerger.new(
269
+ template_content,
270
+ dest_content,
271
+ signature_match_preference: :template,
272
+ add_template_only_nodes: true,
273
+ )
274
+ # Result: VERSION updated to template value, NAME constant added
275
+
276
+ # Scenario 2: Appraisals merge (destination wins, skip template-only blocks)
277
+ merger = Prism::Merge::SmartMerger.new(
278
+ template_content,
279
+ dest_content,
280
+ signature_match_preference: :destination, # default
281
+ add_template_only_nodes: false, # default
282
+ )
283
+ # Result: Destination gem versions preserved, template-only ruby blocks skipped
284
+
285
+ # Scenario 3: Config merge (mix and match)
286
+ merger = Prism::Merge::SmartMerger.new(
287
+ template_content,
288
+ dest_content,
289
+ signature_match_preference: :destination, # Keep custom values
290
+ add_template_only_nodes: true, # But add new required configs
291
+ )
292
+ # Result: Existing configs keep destination values, new configs added from template
293
+ ```
294
+
295
+ ### Custom Signature Generator
296
+
297
+ By default, Prism::Merge uses intelligent structural signatures to match nodes:
298
+ - **Conditionals** (`if`/`unless`) are matched by their condition only
299
+ - **Assignments** (constants, variables) are matched by their name only
300
+ - **Method calls** are matched by name and arguments (not block body)
301
+ - **Other nodes** are matched by class and full source code
302
+
303
+ You can provide a custom signature generator to control matching behavior:
304
+
305
+ ```ruby
306
+ signature_generator = lambda do |node|
307
+ case node
308
+ when Prism::CallNode
309
+ # Match method calls by name only, ignoring arguments
310
+ [:call, node.name]
311
+ when Prism::DefNode
312
+ # Match method definitions by name and parameters
313
+ [:def, node.name, node.parameters&.slice]
314
+ when Prism::ClassNode
315
+ # Match classes by name
316
+ [:class, node.constant_path.slice]
317
+ else
318
+ # Default matching
319
+ [node.class.name.split("::").last.to_sym, node.slice]
320
+ end
321
+ end
322
+
323
+ merger = Prism::Merge::SmartMerger.new(
324
+ template_content,
325
+ destination_content,
326
+ signature_generator: signature_generator,
327
+ signature_match_preference: :template,
328
+ add_template_only_nodes: true,
329
+ )
330
+ ```
331
+
332
+ ### Freeze Blocks
333
+
334
+ Protect sections in the destination file from being overwritten by the template using freeze markers:
335
+
336
+ ```ruby
337
+ # In your destination.rb file
338
+ # kettle-dev:freeze
339
+ gem "custom-gem", path: "../custom"
340
+ # Add any custom configuration you want to preserve
341
+ # kettle-dev:unfreeze
342
+ ```
343
+
344
+ Freeze blocks are **always preserved** from the destination file during merge, regardless of template content.
345
+
346
+ ### Integration with Existing Systems
347
+
348
+ If you're integrating with an existing system that has its own signature logic:
349
+
350
+ ```ruby
351
+ # Use your existing signature function
352
+ my_signature_func = ->(node) { MySystem.calculate_signature(node) }
353
+
354
+ merger = Prism::Merge::SmartMerger.new(
355
+ template,
356
+ destination,
357
+ signature_generator: my_signature_func,
358
+ )
359
+ ```
360
+
361
+ ## 🔧 Basic Usage
362
+
363
+ ### Simple Merge
364
+
365
+ The most basic usage merges two Ruby files:
366
+
367
+ ```ruby
368
+ require "prism/merge"
369
+
370
+ template = File.read("template.rb")
371
+ destination = File.read("destination.rb")
372
+
373
+ merger = Prism::Merge::SmartMerger.new(template, destination)
374
+ result = merger.merge
375
+
376
+ File.write("merged.rb", result)
377
+ ```
378
+
379
+ ### Understanding the Merge
380
+
381
+ Prism::Merge intelligently combines files by:
382
+
383
+ 1. **Finding Anchors**: Identifies matching sections between files
384
+ 2. **Detecting Boundaries**: Locates areas where files differ
385
+ 3. **Resolving Conflicts**: Uses structural signatures to merge differences
386
+ 4. **Preserving Context**: Maintains comments and freeze blocks
387
+
388
+ Example:
389
+
390
+ ```ruby
391
+ # template.rb
392
+ VERSION = "2.0.0"
393
+
394
+ def greet(name)
395
+ puts "Hello, #{name}!"
396
+ end
397
+
398
+ # destination.rb
399
+ VERSION = "1.0.0"
400
+
401
+ def greet(name)
402
+ puts "Hello, #{name}!"
403
+ end
404
+
405
+ def custom_method
406
+ # This is destination-only
407
+ end
408
+
409
+ # After merge:
410
+ # - VERSION from template (2.0.0) replaces destination (1.0.0)
411
+ # - greet method matches, template version kept
412
+ # - custom_method is preserved (destination-only)
413
+ ```
414
+
415
+ ### With Debug Information
416
+
417
+ Get detailed information about merge decisions:
418
+
419
+ ```ruby
420
+ merger = Prism::Merge::SmartMerger.new(template, destination)
421
+ debug_result = merger.merge_with_debug
422
+
423
+ puts debug_result[:content] # Final merged content
424
+ puts debug_result[:statistics] # Decision counts
425
+ puts debug_result[:debug] # Line-by-line provenance
426
+ ```
427
+
428
+ The debug output shows:
429
+
430
+ ```ruby
431
+ debug_result[:statistics]
432
+ # => {
433
+ # kept_template: 42, # Lines from template (no conflict)
434
+ # kept_destination: 8, # Lines from destination (no conflict)
435
+ # replaced: 5, # Template replaced matching destination
436
+ # appended: 3, # Destination-only content added
437
+ # freeze_block: 2 # Lines from freeze blocks
438
+ # }
439
+ ```
440
+
441
+ ### Error Handling
442
+
443
+ Prism::Merge raises exceptions when files have syntax errors:
444
+
445
+ ```ruby
446
+ begin
447
+ merger = Prism::Merge::SmartMerger.new(template, destination)
448
+ result = merger.merge
449
+ rescue Prism::Merge::TemplateParseError => e
450
+ puts "Template has syntax errors"
451
+ puts "Content: #{e.content}"
452
+ puts "Parse errors: #{e.parse_result.errors}"
453
+ rescue Prism::Merge::DestinationParseError => e
454
+ puts "Destination has syntax errors"
455
+ puts "Content: #{e.content}"
456
+ puts "Parse errors: #{e.parse_result.errors}"
457
+ end
458
+ ```
459
+
460
+ ### Validating Before Merge
461
+
462
+ Check if files are valid before attempting a merge:
463
+
464
+ ```ruby
465
+ template_analysis = Prism::Merge::FileAnalysis.new(template_content)
466
+ dest_analysis = Prism::Merge::FileAnalysis.new(dest_content)
467
+
468
+ if template_analysis.valid? && dest_analysis.valid?
469
+ merger = Prism::Merge::SmartMerger.new(template_content, dest_content)
470
+ result = merger.merge
471
+ else
472
+ puts "Files have syntax errors" unless template_analysis.valid?
473
+ puts "Cannot merge"
474
+ end
475
+ ```
476
+
477
+ ### Working with Freeze Blocks
478
+
479
+ Protect custom sections from template updates:
480
+
481
+ ```ruby
482
+ # destination.rb
483
+ class MyApp
484
+ # kettle-dev:freeze
485
+ CUSTOM_CONFIG = {
486
+ api_key: ENV.fetch("API_KEY"),
487
+ endpoint: "https://custom.example.com",
488
+ }
489
+ # kettle-dev:unfreeze
490
+
491
+ VERSION = "1.0.0"
492
+ end
493
+
494
+ # template.rb
495
+ class MyApp
496
+ CUSTOM_CONFIG = {} # Template wants to reset this
497
+
498
+ VERSION = "2.0.0"
499
+ end
500
+
501
+ # After merge, CUSTOM_CONFIG keeps destination values
502
+ # but VERSION is updated to 2.0.0
503
+ ```
504
+
505
+ ### Advanced: Inspect Merge Components
506
+
507
+ For debugging or understanding the merge process:
508
+
509
+ ```ruby
510
+ # Analyze files separately
511
+ template_analysis = Prism::Merge::FileAnalysis.new(template)
512
+ dest_analysis = Prism::Merge::FileAnalysis.new(destination)
513
+
514
+ puts "Template statements: #{template_analysis.statements.length}"
515
+ puts "Template freeze blocks: #{template_analysis.freeze_blocks.length}"
516
+
517
+ # See what anchors and boundaries are found
518
+ aligner = Prism::Merge::FileAligner.new(template_analysis, dest_analysis)
519
+ boundaries = aligner.align
520
+
521
+ puts "Anchors (matching sections): #{aligner.anchors.length}"
522
+ aligner.anchors.each do |anchor|
523
+ puts " Lines #{anchor.template_start}-#{anchor.template_end} match"
524
+ end
525
+
526
+ puts "Boundaries (differences): #{boundaries.length}"
527
+ boundaries.each do |boundary|
528
+ puts " Template #{boundary.template_range} vs Dest #{boundary.dest_range}"
529
+ end
530
+ ```
531
+
532
+ ### Integration Example
533
+
534
+ Use Prism::Merge in your own templating system:
535
+
536
+ ```ruby
537
+ class MyTemplateEngine
538
+ def merge_ruby_file(template_path, destination_path)
539
+ template = File.read(template_path)
540
+ destination = File.exist?(destination_path) ? File.read(destination_path) : ""
541
+
542
+ merger = Prism::Merge::SmartMerger.new(template, destination)
543
+ merged_content = merger.merge
544
+
545
+ File.write(destination_path, merged_content)
546
+
547
+ # Return statistics for reporting
548
+ debug_result = merger.merge_with_debug
549
+ debug_result[:statistics]
550
+ rescue Prism::Merge::Error => e
551
+ puts "Merge failed: #{e.message}"
552
+ # Fall back to template only
553
+ File.write(destination_path, template)
554
+ nil
555
+ end
556
+ end
557
+ ```
558
+
559
+ ### Testing Your Merges
560
+
561
+ Example RSpec test:
562
+
563
+ ```ruby
564
+ require "prism/merge"
565
+
566
+ RSpec.describe("Ruby file merging") do
567
+ it "updates VERSION from template" do
568
+ template = <<~RUBY
569
+ VERSION = "2.0.0"
570
+ def hello; end
571
+ RUBY
572
+
573
+ destination = <<~RUBY
574
+ VERSION = "1.0.0"
575
+ def hello; end
576
+ def custom; end
577
+ RUBY
578
+
579
+ merger = Prism::Merge::SmartMerger.new(template, destination)
580
+ result = merger.merge
581
+
582
+ # Template version wins
583
+ expect(result).to(include('VERSION = "2.0.0"'))
584
+ # Destination-only method preserved
585
+ expect(result).to(include("def custom"))
586
+ end
587
+
588
+ it "preserves freeze blocks" do
589
+ template = <<~RUBY
590
+ CONFIG = {}
591
+ RUBY
592
+
593
+ destination = <<~RUBY
594
+ # kettle-dev:freeze
595
+ CONFIG = { key: "secret" }
596
+ # kettle-dev:unfreeze
597
+ RUBY
598
+
599
+ merger = Prism::Merge::SmartMerger.new(template, destination)
600
+ result = merger.merge
601
+
602
+ # Freeze block content preserved
603
+ expect(result).to(include('CONFIG = { key: "secret" }'))
604
+ end
605
+ end
606
+ ```
607
+
608
+ ## 🦷 FLOSS Funding
609
+
610
+ While kettle-rb tools are free software and will always be, the project would benefit immensely from some funding.
611
+ Raising a monthly budget of... "dollars" would make the project more sustainable.
612
+
613
+ We welcome both individual and corporate sponsors! We also offer a
614
+ wide array of funding channels to account for your preferences
615
+ (although currently [Open Collective][🖇osc] is our preferred funding platform).
616
+
617
+ **If you're working in a company that's making significant use of kettle-rb tools we'd
618
+ appreciate it if you suggest to your company to become a kettle-rb sponsor.**
619
+
620
+ You can support the development of kettle-rb tools via
621
+ [GitHub Sponsors][🖇sponsor],
622
+ [Liberapay][⛳liberapay],
623
+ [PayPal][🖇paypal],
624
+ [Open Collective][🖇osc]
625
+ and [Tidelift][🏙️entsup-tidelift].
626
+
627
+ | 📍 NOTE |
628
+ |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
629
+ | If doing a sponsorship in the form of donation is problematic for your company <br/> from an accounting standpoint, we'd recommend the use of Tidelift, <br/> where you can get a support-like subscription instead. |
630
+
631
+ ### Open Collective for Individuals
632
+
633
+ Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/kettle-rb#backer)]
634
+
635
+ NOTE: [kettle-readme-backers][kettle-readme-backers] updates this list every day, automatically.
636
+
637
+ <!-- OPENCOLLECTIVE-INDIVIDUALS:START -->
638
+ No backers yet. Be the first!
639
+ <!-- OPENCOLLECTIVE-INDIVIDUALS:END -->
640
+
641
+ ### Open Collective for Organizations
642
+
643
+ Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/kettle-rb#sponsor)]
644
+
645
+ NOTE: [kettle-readme-backers][kettle-readme-backers] updates this list every day, automatically.
646
+
647
+ <!-- OPENCOLLECTIVE-ORGANIZATIONS:START -->
648
+ No sponsors yet. Be the first!
649
+ <!-- OPENCOLLECTIVE-ORGANIZATIONS:END -->
650
+
651
+ [kettle-readme-backers]: https://github.com/kettle-rb/prism-merge/blob/main/exe/kettle-readme-backers
652
+
653
+ ### Another way to support open-source
654
+
655
+ I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈‍ cats).
656
+
657
+ If you work at a company that uses my work, please encourage them to support me as a corporate sponsor. My work on gems you use might show up in `bundle fund`.
658
+
659
+ I’m developing a new library, [floss_funding][🖇floss-funding-gem], designed to empower open-source developers like myself to get paid for the work we do, in a sustainable way. Please give it a look.
660
+
661
+ **[Floss-Funding.dev][🖇floss-funding.dev]: 👉️ No network calls. 👉️ No tracking. 👉️ No oversight. 👉️ Minimal crypto hashing. 💡 Easily disabled nags**
662
+
663
+ [![OpenCollective Backers][🖇osc-backers-i]][🖇osc-backers] [![OpenCollective Sponsors][🖇osc-sponsors-i]][🖇osc-sponsors] [![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor] [![Liberapay Goal Progress][⛳liberapay-img]][⛳liberapay] [![Donate on PayPal][🖇paypal-img]][🖇paypal] [![Buy me a coffee][🖇buyme-small-img]][🖇buyme] [![Donate on Polar][🖇polar-img]][🖇polar] [![Donate to my FLOSS efforts at ko-fi.com][🖇kofi-img]][🖇kofi] [![Donate to my FLOSS efforts using Patreon][🖇patreon-img]][🖇patreon]
664
+
665
+ ## 🔐 Security
666
+
667
+ See [SECURITY.md][🔐security].
668
+
669
+ ## 🤝 Contributing
670
+
671
+ If you need some ideas of where to help, you could work on adding more code coverage,
672
+ or if it is already 💯 (see [below](#code-coverage)) check [reek](REEK), [issues][🤝gh-issues], or [PRs][🤝gh-pulls],
673
+ or use the gem and think about how it could be better.
674
+
675
+ We [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] so if you make changes, remember to update it.
676
+
677
+ See [CONTRIBUTING.md][🤝contributing] for more detailed instructions.
678
+
679
+ ### 🚀 Release Instructions
680
+
681
+ See [CONTRIBUTING.md][🤝contributing].
682
+
683
+ ### Code Coverage
684
+
685
+ [![Coverage Graph][🏀codecov-g]][🏀codecov]
686
+
687
+ [![Coveralls Test Coverage][🏀coveralls-img]][🏀coveralls]
688
+
689
+ [![QLTY Test Coverage][🏀qlty-covi]][🏀qlty-cov]
690
+
691
+ ### 🪇 Code of Conduct
692
+
693
+ Everyone interacting with this project's codebases, issue trackers,
694
+ chat rooms and mailing lists agrees to follow the [![Contributor Covenant 2.1][🪇conduct-img]][🪇conduct].
695
+
696
+ ## 🌈 Contributors
697
+
698
+ [![Contributors][🖐contributors-img]][🖐contributors]
699
+
700
+ Made with [contributors-img][🖐contrib-rocks].
701
+
702
+ Also see GitLab Contributors: [https://gitlab.com/kettle-rb/prism-merge/-/graphs/main][🚎contributors-gl]
703
+
704
+ <details>
705
+ <summary>⭐️ Star History</summary>
706
+
707
+ <a href="https://star-history.com/#kettle-rb/prism-merge&Date">
708
+ <picture>
709
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=kettle-rb/prism-merge&type=Date&theme=dark" />
710
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=kettle-rb/prism-merge&type=Date" />
711
+ <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=kettle-rb/prism-merge&type=Date" />
712
+ </picture>
713
+ </a>
714
+
715
+ </details>
716
+
717
+ ## 📌 Versioning
718
+
719
+ This Library adheres to [![Semantic Versioning 2.0.0][📌semver-img]][📌semver].
720
+ Violations of this scheme should be reported as bugs.
721
+ Specifically, if a minor or patch version is released that breaks backward compatibility,
722
+ a new version should be immediately released that restores compatibility.
723
+ Breaking changes to the public API will only be introduced with new major versions.
724
+
725
+ > dropping support for a platform is both obviously and objectively a breaking change <br/>
726
+ >—Jordan Harband ([@ljharb](https://github.com/ljharb), maintainer of SemVer) [in SemVer issue 716][📌semver-breaking]
727
+
728
+ I understand that policy doesn't work universally ("exceptions to every rule!"),
729
+ but it is the policy here.
730
+ As such, in many cases it is good to specify a dependency on this library using
731
+ the [Pessimistic Version Constraint][📌pvc] with two digits of precision.
732
+
733
+ For example:
734
+
735
+ ```ruby
736
+ spec.add_dependency("prism-merge", "~> 1.0")
737
+ ```
738
+
739
+ <details markdown="1">
740
+ <summary>📌 Is "Platform Support" part of the public API? More details inside.</summary>
741
+
742
+ SemVer should, IMO, but doesn't explicitly, say that dropping support for specific Platforms
743
+ is a *breaking change* to an API, and for that reason the bike shedding is endless.
744
+
745
+ To get a better understanding of how SemVer is intended to work over a project's lifetime,
746
+ read this article from the creator of SemVer:
747
+
748
+ - ["Major Version Numbers are Not Sacred"][📌major-versions-not-sacred]
749
+
750
+ </details>
751
+
752
+ See [CHANGELOG.md][📌changelog] for a list of releases.
753
+
754
+ ## 📄 License
755
+
756
+ The gem is available as open source under the terms of
757
+ the [MIT License][📄license] [![License: MIT][📄license-img]][📄license-ref].
758
+ See [LICENSE.txt][📄license] for the official [Copyright Notice][📄copyright-notice-explainer].
759
+
760
+ ### © Copyright
761
+
762
+ <ul>
763
+ <li>
764
+ Copyright (c) 2025 Peter H. Boling, of
765
+ <a href="https://discord.gg/3qme4XHNKN">
766
+ Galtzo.com
767
+ <picture>
768
+ <img src="https://logos.galtzo.com/assets/images/galtzo-floss/avatar-128px-blank.svg" alt="Galtzo.com Logo (Wordless) by Aboling0, CC BY-SA 4.0" width="24">
769
+ </picture>
770
+ </a>, and prism-merge contributors.
771
+ </li>
772
+ </ul>
773
+
774
+ ## 🤑 A request for help
775
+
776
+ Maintainers have teeth and need to pay their dentists.
777
+ After getting laid off in an RIF in March, and encountering difficulty finding a new one,
778
+ I began spending most of my time building open source tools.
779
+ I'm hoping to be able to pay for my kids' health insurance this month,
780
+ so if you value the work I am doing, I need your support.
781
+ Please consider sponsoring me or the project.
782
+
783
+ To join the community or get help 👇️ Join the Discord.
784
+
785
+ [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite]
786
+
787
+ To say "thanks!" ☝️ Join the Discord or 👇️ send money.
788
+
789
+ [![Sponsor kettle-rb/prism-merge on Open Source Collective][🖇osc-all-bottom-img]][🖇osc] 💌 [![Sponsor me on GitHub Sponsors][🖇sponsor-bottom-img]][🖇sponsor] 💌 [![Sponsor me on Liberapay][⛳liberapay-bottom-img]][⛳liberapay] 💌 [![Donate on PayPal][🖇paypal-bottom-img]][🖇paypal]
790
+
791
+ ### Please give the project a star ⭐ ♥.
792
+
793
+ Thanks for RTFM. ☺️
794
+
795
+ [⛳liberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay&color=a51611&style=flat
796
+ [⛳liberapay-bottom-img]: https://img.shields.io/liberapay/goal/pboling.svg?style=for-the-badge&logo=liberapay&color=a51611
797
+ [⛳liberapay]: https://liberapay.com/pboling/donate
798
+ [🖇osc-all-img]: https://img.shields.io/opencollective/all/kettle-rb
799
+ [🖇osc-sponsors-img]: https://img.shields.io/opencollective/sponsors/kettle-rb
800
+ [🖇osc-backers-img]: https://img.shields.io/opencollective/backers/kettle-rb
801
+ [🖇osc-backers]: https://opencollective.com/kettle-rb#backer
802
+ [🖇osc-backers-i]: https://opencollective.com/kettle-rb/backers/badge.svg?style=flat
803
+ [🖇osc-sponsors]: https://opencollective.com/kettle-rb#sponsor
804
+ [🖇osc-sponsors-i]: https://opencollective.com/kettle-rb/sponsors/badge.svg?style=flat
805
+ [🖇osc-all-bottom-img]: https://img.shields.io/opencollective/all/kettle-rb?style=for-the-badge
806
+ [🖇osc-sponsors-bottom-img]: https://img.shields.io/opencollective/sponsors/kettle-rb?style=for-the-badge
807
+ [🖇osc-backers-bottom-img]: https://img.shields.io/opencollective/backers/kettle-rb?style=for-the-badge
808
+ [🖇osc]: https://opencollective.com/kettle-rb
809
+ [🖇sponsor-img]: https://img.shields.io/badge/Sponsor_Me!-pboling.svg?style=social&logo=github
810
+ [🖇sponsor-bottom-img]: https://img.shields.io/badge/Sponsor_Me!-pboling-blue?style=for-the-badge&logo=github
811
+ [🖇sponsor]: https://github.com/sponsors/pboling
812
+ [🖇polar-img]: https://img.shields.io/badge/polar-donate-a51611.svg?style=flat
813
+ [🖇polar]: https://polar.sh/pboling
814
+ [🖇kofi-img]: https://img.shields.io/badge/ko--fi-%E2%9C%93-a51611.svg?style=flat
815
+ [🖇kofi]: https://ko-fi.com/O5O86SNP4
816
+ [🖇patreon-img]: https://img.shields.io/badge/patreon-donate-a51611.svg?style=flat
817
+ [🖇patreon]: https://patreon.com/galtzo
818
+ [🖇buyme-small-img]: https://img.shields.io/badge/buy_me_a_coffee-%E2%9C%93-a51611.svg?style=flat
819
+ [🖇buyme-img]: https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20latte&emoji=&slug=pboling&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff
820
+ [🖇buyme]: https://www.buymeacoffee.com/pboling
821
+ [🖇paypal-img]: https://img.shields.io/badge/donate-paypal-a51611.svg?style=flat&logo=paypal
822
+ [🖇paypal-bottom-img]: https://img.shields.io/badge/donate-paypal-a51611.svg?style=for-the-badge&logo=paypal&color=0A0A0A
823
+ [🖇paypal]: https://www.paypal.com/paypalme/peterboling
824
+ [🖇floss-funding.dev]: https://floss-funding.dev
825
+ [🖇floss-funding-gem]: https://github.com/galtzo-floss/floss_funding
826
+ [✉️discord-invite]: https://discord.gg/3qme4XHNKN
827
+ [✉️discord-invite-img-ftb]: https://img.shields.io/discord/1373797679469170758?style=for-the-badge&logo=discord
828
+ [✉️ruby-friends-img]: https://img.shields.io/badge/daily.dev-%F0%9F%92%8E_Ruby_Friends-0A0A0A?style=for-the-badge&logo=dailydotdev&logoColor=white
829
+ [✉️ruby-friends]: https://app.daily.dev/squads/rubyfriends
830
+
831
+ [✇bundle-group-pattern]: https://gist.github.com/pboling/4564780
832
+ [⛳️gem-namespace]: https://github.com/kettle-rb/prism-merge
833
+ [⛳️namespace-img]: https://img.shields.io/badge/namespace-Prism::Merge-3C2D2D.svg?style=square&logo=ruby&logoColor=white
834
+ [⛳️gem-name]: https://bestgems.org/gems/prism-merge
835
+ [⛳️name-img]: https://img.shields.io/badge/name-prism--merge-3C2D2D.svg?style=square&logo=rubygems&logoColor=red
836
+ [⛳️tag-img]: https://img.shields.io/github/tag/kettle-rb/prism-merge.svg
837
+ [⛳️tag]: http://github.com/kettle-rb/prism-merge/releases
838
+ [🚂maint-blog]: http://www.railsbling.com/tags/prism-merge
839
+ [🚂maint-blog-img]: https://img.shields.io/badge/blog-railsbling-0093D0.svg?style=for-the-badge&logo=rubyonrails&logoColor=orange
840
+ [🚂maint-contact]: http://www.railsbling.com/contact
841
+ [🚂maint-contact-img]: https://img.shields.io/badge/Contact-Maintainer-0093D0.svg?style=flat&logo=rubyonrails&logoColor=red
842
+ [💖🖇linkedin]: http://www.linkedin.com/in/peterboling
843
+ [💖🖇linkedin-img]: https://img.shields.io/badge/PeterBoling-LinkedIn-0B66C2?style=flat&logo=newjapanprowrestling
844
+ [💖✌️wellfound]: https://wellfound.com/u/peter-boling
845
+ [💖✌️wellfound-img]: https://img.shields.io/badge/peter--boling-orange?style=flat&logo=wellfound
846
+ [💖💲crunchbase]: https://www.crunchbase.com/person/peter-boling
847
+ [💖💲crunchbase-img]: https://img.shields.io/badge/peter--boling-purple?style=flat&logo=crunchbase
848
+ [💖🐘ruby-mast]: https://ruby.social/@galtzo
849
+ [💖🐘ruby-mast-img]: https://img.shields.io/mastodon/follow/109447111526622197?domain=https://ruby.social&style=flat&logo=mastodon&label=Ruby%20@galtzo
850
+ [💖🦋bluesky]: https://bsky.app/profile/galtzo.com
851
+ [💖🦋bluesky-img]: https://img.shields.io/badge/@galtzo.com-0285FF?style=flat&logo=bluesky&logoColor=white
852
+ [💖🌳linktree]: https://linktr.ee/galtzo
853
+ [💖🌳linktree-img]: https://img.shields.io/badge/galtzo-purple?style=flat&logo=linktree
854
+ [💖💁🏼‍♂️devto]: https://dev.to/galtzo
855
+ [💖💁🏼‍♂️devto-img]: https://img.shields.io/badge/dev.to-0A0A0A?style=flat&logo=devdotto&logoColor=white
856
+ [💖💁🏼‍♂️aboutme]: https://about.me/peter.boling
857
+ [💖💁🏼‍♂️aboutme-img]: https://img.shields.io/badge/about.me-0A0A0A?style=flat&logo=aboutme&logoColor=white
858
+ [💖🧊berg]: https://codeberg.org/pboling
859
+ [💖🐙hub]: https://github.org/pboling
860
+ [💖🛖hut]: https://sr.ht/~galtzo/
861
+ [💖🧪lab]: https://gitlab.com/pboling
862
+ [👨🏼‍🏫expsup-upwork]: https://www.upwork.com/freelancers/~014942e9b056abdf86?mp_source=share
863
+ [👨🏼‍🏫expsup-upwork-img]: https://img.shields.io/badge/UpWork-13544E?style=for-the-badge&logo=Upwork&logoColor=white
864
+ [👨🏼‍🏫expsup-codementor]: https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github
865
+ [👨🏼‍🏫expsup-codementor-img]: https://img.shields.io/badge/CodeMentor-Get_Help-1abc9c?style=for-the-badge&logo=CodeMentor&logoColor=white
866
+ [🏙️entsup-tidelift]: https://tidelift.com/subscription/pkg/rubygems-prism-merge?utm_source=rubygems-prism-merge&utm_medium=referral&utm_campaign=readme
867
+ [🏙️entsup-tidelift-img]: https://img.shields.io/badge/Tidelift_and_Sonar-Enterprise_Support-FD3456?style=for-the-badge&logo=sonar&logoColor=white
868
+ [🏙️entsup-tidelift-sonar]: https://blog.tidelift.com/tidelift-joins-sonar
869
+ [💁🏼‍♂️peterboling]: http://www.peterboling.com
870
+ [🚂railsbling]: http://www.railsbling.com
871
+ [📜src-gl-img]: https://img.shields.io/badge/GitLab-FBA326?style=for-the-badge&logo=Gitlab&logoColor=orange
872
+ [📜src-gl]: https://gitlab.com/kettle-rb/prism-merge/
873
+ [📜src-cb-img]: https://img.shields.io/badge/CodeBerg-4893CC?style=for-the-badge&logo=CodeBerg&logoColor=blue
874
+ [📜src-cb]: https://codeberg.org/kettle-rb/prism-merge
875
+ [📜src-gh-img]: https://img.shields.io/badge/GitHub-238636?style=for-the-badge&logo=Github&logoColor=green
876
+ [📜src-gh]: https://github.com/kettle-rb/prism-merge
877
+ [📜docs-cr-rd-img]: https://img.shields.io/badge/RubyDoc-Current_Release-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white
878
+ [📜docs-head-rd-img]: https://img.shields.io/badge/YARD_on_Galtzo.com-HEAD-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white
879
+ [📜gl-wiki]: https://gitlab.com/kettle-rb/prism-merge/-/wikis/home
880
+ [📜gh-wiki]: https://github.com/kettle-rb/prism-merge/wiki
881
+ [📜gl-wiki-img]: https://img.shields.io/badge/wiki-examples-943CD2.svg?style=for-the-badge&logo=gitlab&logoColor=white
882
+ [📜gh-wiki-img]: https://img.shields.io/badge/wiki-examples-943CD2.svg?style=for-the-badge&logo=github&logoColor=white
883
+ [👽dl-rank]: https://bestgems.org/gems/prism-merge
884
+ [👽dl-ranki]: https://img.shields.io/gem/rd/prism-merge.svg
885
+ [👽oss-help]: https://www.codetriage.com/kettle-rb/prism-merge
886
+ [👽oss-helpi]: https://www.codetriage.com/kettle-rb/prism-merge/badges/users.svg
887
+ [👽version]: https://bestgems.org/gems/prism-merge
888
+ [👽versioni]: https://img.shields.io/gem/v/prism-merge.svg
889
+ [🏀qlty-mnt]: https://qlty.sh/gh/kettle-rb/projects/prism-merge
890
+ [🏀qlty-mnti]: https://qlty.sh/gh/kettle-rb/projects/prism-merge/maintainability.svg
891
+ [🏀qlty-cov]: https://qlty.sh/gh/kettle-rb/projects/prism-merge/metrics/code?sort=coverageRating
892
+ [🏀qlty-covi]: https://qlty.sh/gh/kettle-rb/projects/prism-merge/coverage.svg
893
+ [🏀codecov]: https://codecov.io/gh/kettle-rb/prism-merge
894
+ [🏀codecovi]: https://codecov.io/gh/kettle-rb/prism-merge/graph/badge.svg
895
+ [🏀coveralls]: https://coveralls.io/github/kettle-rb/prism-merge?branch=main
896
+ [🏀coveralls-img]: https://coveralls.io/repos/github/kettle-rb/prism-merge/badge.svg?branch=main
897
+ [🖐codeQL]: https://github.com/kettle-rb/prism-merge/security/code-scanning
898
+ [🖐codeQL-img]: https://github.com/kettle-rb/prism-merge/actions/workflows/codeql-analysis.yml/badge.svg
899
+ [🚎2-cov-wf]: https://github.com/kettle-rb/prism-merge/actions/workflows/coverage.yml
900
+ [🚎2-cov-wfi]: https://github.com/kettle-rb/prism-merge/actions/workflows/coverage.yml/badge.svg
901
+ [🚎3-hd-wf]: https://github.com/kettle-rb/prism-merge/actions/workflows/heads.yml
902
+ [🚎3-hd-wfi]: https://github.com/kettle-rb/prism-merge/actions/workflows/heads.yml/badge.svg
903
+ [🚎4-lg-wf]: https://github.com/kettle-rb/prism-merge/actions/workflows/legacy.yml
904
+ [🚎4-lg-wfi]: https://github.com/kettle-rb/prism-merge/actions/workflows/legacy.yml/badge.svg
905
+ [🚎5-st-wf]: https://github.com/kettle-rb/prism-merge/actions/workflows/style.yml
906
+ [🚎5-st-wfi]: https://github.com/kettle-rb/prism-merge/actions/workflows/style.yml/badge.svg
907
+ [🚎6-s-wf]: https://github.com/kettle-rb/prism-merge/actions/workflows/supported.yml
908
+ [🚎6-s-wfi]: https://github.com/kettle-rb/prism-merge/actions/workflows/supported.yml/badge.svg
909
+ [🚎7-us-wf]: https://github.com/kettle-rb/prism-merge/actions/workflows/unsupported.yml
910
+ [🚎7-us-wfi]: https://github.com/kettle-rb/prism-merge/actions/workflows/unsupported.yml/badge.svg
911
+ [🚎8-ho-wf]: https://github.com/kettle-rb/prism-merge/actions/workflows/hoary.yml
912
+ [🚎8-ho-wfi]: https://github.com/kettle-rb/prism-merge/actions/workflows/hoary.yml/badge.svg
913
+ [🚎9-t-wf]: https://github.com/kettle-rb/prism-merge/actions/workflows/truffle.yml
914
+ [🚎9-t-wfi]: https://github.com/kettle-rb/prism-merge/actions/workflows/truffle.yml/badge.svg
915
+ [🚎10-j-wf]: https://github.com/kettle-rb/prism-merge/actions/workflows/jruby.yml
916
+ [🚎10-j-wfi]: https://github.com/kettle-rb/prism-merge/actions/workflows/jruby.yml/badge.svg
917
+ [🚎11-c-wf]: https://github.com/kettle-rb/prism-merge/actions/workflows/current.yml
918
+ [🚎11-c-wfi]: https://github.com/kettle-rb/prism-merge/actions/workflows/current.yml/badge.svg
919
+ [🚎12-crh-wf]: https://github.com/kettle-rb/prism-merge/actions/workflows/dep-heads.yml
920
+ [🚎12-crh-wfi]: https://github.com/kettle-rb/prism-merge/actions/workflows/dep-heads.yml/badge.svg
921
+ [🚎13-🔒️-wf]: https://github.com/kettle-rb/prism-merge/actions/workflows/locked_deps.yml
922
+ [🚎13-🔒️-wfi]: https://github.com/kettle-rb/prism-merge/actions/workflows/locked_deps.yml/badge.svg
923
+ [🚎14-🔓️-wf]: https://github.com/kettle-rb/prism-merge/actions/workflows/unlocked_deps.yml
924
+ [🚎14-🔓️-wfi]: https://github.com/kettle-rb/prism-merge/actions/workflows/unlocked_deps.yml/badge.svg
925
+ [🚎15-🪪-wf]: https://github.com/kettle-rb/prism-merge/actions/workflows/license-eye.yml
926
+ [🚎15-🪪-wfi]: https://github.com/kettle-rb/prism-merge/actions/workflows/license-eye.yml/badge.svg
927
+ [💎ruby-3.2i]: https://img.shields.io/badge/Ruby-3.2-CC342D?style=for-the-badge&logo=ruby&logoColor=white
928
+ [💎ruby-3.3i]: https://img.shields.io/badge/Ruby-3.3-CC342D?style=for-the-badge&logo=ruby&logoColor=white
929
+ [💎ruby-c-i]: https://img.shields.io/badge/Ruby-current-CC342D?style=for-the-badge&logo=ruby&logoColor=green
930
+ [💎ruby-headi]: https://img.shields.io/badge/Ruby-HEAD-CC342D?style=for-the-badge&logo=ruby&logoColor=blue
931
+ [💎truby-22.3i]: https://img.shields.io/badge/Truffle_Ruby-22.3_(%F0%9F%9A%ABCI)-AABBCC?style=for-the-badge&logo=ruby&logoColor=pink
932
+ [💎truby-23.0i]: https://img.shields.io/badge/Truffle_Ruby-23.0_(%F0%9F%9A%ABCI)-AABBCC?style=for-the-badge&logo=ruby&logoColor=pink
933
+ [💎truby-23.1i]: https://img.shields.io/badge/Truffle_Ruby-23.1-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
934
+ [💎truby-c-i]: https://img.shields.io/badge/Truffle_Ruby-current-34BCB1?style=for-the-badge&logo=ruby&logoColor=green
935
+ [💎truby-headi]: https://img.shields.io/badge/Truffle_Ruby-HEAD-34BCB1?style=for-the-badge&logo=ruby&logoColor=blue
936
+ [💎jruby-9.1i]: https://img.shields.io/badge/JRuby-9.1_(%F0%9F%9A%ABCI)-AABBCC?style=for-the-badge&logo=ruby&logoColor=red
937
+ [💎jruby-9.2i]: https://img.shields.io/badge/JRuby-9.2_(%F0%9F%9A%ABCI)-AABBCC?style=for-the-badge&logo=ruby&logoColor=red
938
+ [💎jruby-9.3i]: https://img.shields.io/badge/JRuby-9.3_(%F0%9F%9A%ABCI)-AABBCC?style=for-the-badge&logo=ruby&logoColor=red
939
+ [💎jruby-9.4i]: https://img.shields.io/badge/JRuby-9.4-FBE742?style=for-the-badge&logo=ruby&logoColor=red
940
+ [💎jruby-c-i]: https://img.shields.io/badge/JRuby-current-FBE742?style=for-the-badge&logo=ruby&logoColor=green
941
+ [💎jruby-headi]: https://img.shields.io/badge/JRuby-HEAD-FBE742?style=for-the-badge&logo=ruby&logoColor=blue
942
+ [🤝gh-issues]: https://github.com/kettle-rb/prism-merge/issues
943
+ [🤝gh-pulls]: https://github.com/kettle-rb/prism-merge/pulls
944
+ [🤝gl-issues]: https://gitlab.com/kettle-rb/prism-merge/-/issues
945
+ [🤝gl-pulls]: https://gitlab.com/kettle-rb/prism-merge/-/merge_requests
946
+ [🤝cb-issues]: https://codeberg.org/kettle-rb/prism-merge/issues
947
+ [🤝cb-pulls]: https://codeberg.org/kettle-rb/prism-merge/pulls
948
+ [🤝cb-donate]: https://donate.codeberg.org/
949
+ [🤝contributing]: CONTRIBUTING.md
950
+ [🏀codecov-g]: https://codecov.io/gh/kettle-rb/prism-merge/graphs/tree.svg
951
+ [🖐contrib-rocks]: https://contrib.rocks
952
+ [🖐contributors]: https://github.com/kettle-rb/prism-merge/graphs/contributors
953
+ [🖐contributors-img]: https://contrib.rocks/image?repo=kettle-rb/prism-merge
954
+ [🚎contributors-gl]: https://gitlab.com/kettle-rb/prism-merge/-/graphs/main
955
+ [🪇conduct]: CODE_OF_CONDUCT.md
956
+ [🪇conduct-img]: https://img.shields.io/badge/Contributor_Covenant-2.1-259D6C.svg
957
+ [📌pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint
958
+ [📌semver]: https://semver.org/spec/v2.0.0.html
959
+ [📌semver-img]: https://img.shields.io/badge/semver-2.0.0-259D6C.svg?style=flat
960
+ [📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
961
+ [📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
962
+ [📌changelog]: CHANGELOG.md
963
+ [📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
964
+ [📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-34495e.svg?style=flat
965
+ [📌gitmoji]: https://gitmoji.dev
966
+ [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
967
+ [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
968
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.636-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
969
+ [🔐security]: SECURITY.md
970
+ [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
971
+ [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
972
+ [📄license]: LICENSE.txt
973
+ [📄license-ref]: https://opensource.org/licenses/MIT
974
+ [📄license-img]: https://img.shields.io/badge/License-MIT-259D6C.svg
975
+ [📄license-compat]: https://dev.to/galtzo/how-to-check-license-compatibility-41h0
976
+ [📄license-compat-img]: https://img.shields.io/badge/Apache_Compatible:_Category_A-%E2%9C%93-259D6C.svg?style=flat&logo=Apache
977
+ [📄ilo-declaration]: https://www.ilo.org/declaration/lang--en/index.htm
978
+ [📄ilo-declaration-img]: https://img.shields.io/badge/ILO_Fundamental_Principles-✓-259D6C.svg?style=flat
979
+ [🚎yard-current]: http://rubydoc.info/gems/prism-merge
980
+ [🚎yard-head]: https://prism-merge.galtzo.com
981
+ [💎stone_checksums]: https://github.com/galtzo-floss/stone_checksums
982
+ [💎SHA_checksums]: https://gitlab.com/kettle-rb/prism-merge/-/tree/main/checksums
983
+ [💎rlts]: https://github.com/rubocop-lts/rubocop-lts
984
+ [💎rlts-img]: https://img.shields.io/badge/code_style_&_linting-rubocop--lts-34495e.svg?plastic&logo=ruby&logoColor=white
985
+ [💎appraisal2]: https://github.com/appraisal-rb/appraisal2
986
+ [💎appraisal2-img]: https://img.shields.io/badge/appraised_by-appraisal2-34495e.svg?plastic&logo=ruby&logoColor=white
987
+ [💎d-in-dvcs]: https://railsbling.com/posts/dvcs/put_the_d_in_dvcs/