ast-crispr 7.1.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 05ae13bb69a13e18abc448a8110e77097c4b0fd2164bafc112a567a3ae2d093b
4
+ data.tar.gz: 53db14f94324400b9b5c241f95c72627e4cf01e38c96e23558f4ef5f3aac9724
5
+ SHA512:
6
+ metadata.gz: d119ab292bb613127b36e724397af8ef0872d97bbcedf2844359543be7327669e00dc8503c72a34f38d7353408583b857b2bd80cc953baba1c673cd0a34ebc15
7
+ data.tar.gz: 3f76e94932ba291330cb50bfda2092cbae91521bd3078c6e95e473903f2149e7d9f7cf4590c01b1ade31a33f7f7fc5e7d6a5c2bb1eeea0a01c2ef17c3039f6e7
checksums.yaml.gz.sig ADDED
Binary file
data/LICENSE.md ADDED
@@ -0,0 +1,13 @@
1
+ # License
2
+
3
+ This project is made available under the following licenses.
4
+ Choose the option that best fits your use case:
5
+
6
+ - [AGPL-3.0-only](https://github.com/structuredmerge/structuredmerge-ruby/blob/main/AGPL-3.0-only.md)
7
+ - [PolyForm-Small-Business-1.0.0](https://github.com/structuredmerge/structuredmerge-ruby/blob/main/PolyForm-Small-Business-1.0.0.md)
8
+
9
+ If none of the above licenses fit your use case, please [contact us](mailto:floss@galtzo.com) to discuss a custom commercial license.
10
+
11
+ ## Copyright Notice
12
+
13
+ - Required Notice: Copyright (c) 2026 Peter H. Boling
data/README.md ADDED
@@ -0,0 +1,310 @@
1
+ <a href="https://github.com/structuredmerge"><img alt="structuredmerge Logo by GitHub" src="https://github.com/structuredmerge.png?size=192" width="14%" align="right"/></a>
2
+
3
+ # 🧬 Ast::Crispr
4
+
5
+ [![Version][👽versioni]][👽version] [![Ruby Users Forum][✉️ruby-forum-top-img]][✉️ruby-forum] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: AGPL-3.0-only OR PolyForm-Small-Business-1.0.0][📄license-img]][📄license] [![Total downloads][👽dl-ranki]][👽dl-rank] [![CI Current][🚎11-c-wfi]][🚎11-c-wf]
6
+
7
+ `if ci_badges.map(&:color).detect { it != "green"}` ☝️ [let me know on Discord][✉️discord-invite] or [RubyForum][✉️ruby-forum], as I may have missed the notification.
8
+
9
+ ---
10
+
11
+ `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.
12
+
13
+ [![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 at ko-fi.com][🖇kofi-img]][🖇kofi]
14
+
15
+ <details markdown="1">
16
+ <summary>👣 How will this project approach the September 2025 hostile takeover of RubyGems? 🚑️</summary>
17
+
18
+ I've summarized my thoughts in [this blog post](https://dev.to/galtzo/hostile-takeover-of-rubygems-my-thoughts-5hlo).
19
+
20
+ </details>
21
+
22
+ ## 🌻 Synopsis <a href="https://discord.gg/3qme4XHNKN"><img alt="Galtzo FLOSS Logo by Aboling0, CC BY-SA 4.0" src="https://logos.galtzo.com/assets/images/galtzo-floss/avatar-128px.svg" width="8%" align="right"/></a> <a href="https://ruby-toolbox.com"><img alt="ruby-lang Logo, Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5" src="https://logos.galtzo.com/assets/images/ruby-lang/avatar-128px.svg" width="8%" align="right"/></a>
23
+
24
+ `ast-crispr` is the structured edit layer for StructuredMerge. It provides document contexts, owner selectors, replacement and deletion operations, structure profiles, and transport envelopes for making targeted edits through parser-backed owners instead of line-oriented string surgery.
25
+
26
+ ### Key Features
27
+
28
+ - Selector-driven replacement and deletion operations.
29
+ - Structure profiles that describe owner scopes, selector families, and payload kinds.
30
+ - Shared request/result objects for structured-edit transport and reporting.
31
+ - Adapter interface for language-specific CRISPR packages.
32
+ - Review-friendly metadata for explaining what was selected and why.
33
+
34
+ ## 💡 Info you can shake a stick at
35
+
36
+ | Tokens to Remember | [![Gem name][⛳️name-img]][⛳️gem-name] [![Gem namespace][⛳️namespace-img]][⛳️gem-namespace] |
37
+ |-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
38
+ | Works with MRI Ruby 4 | [![Ruby current Compat][💎ruby-c-i]][🚎11-c-wf]|
39
+ | Support & Community | [![Join Me on Daily.dev's RubyFriends][✉️ruby-friends-img]][✉️ruby-friends] [![Get help from RubyForum][✉️ruby-forum-img]][✉️ruby-forum] [![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] |
40
+ | 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] |
41
+ | 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] |
42
+ | Compliance | [![License: AGPL-3.0-only OR PolyForm-Small-Business-1.0.0][📄license-img]][📄license] [![Apache license compatibility: Category X][📄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] |
43
+ | 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] |
44
+ | 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] |
45
+ | `...` 💖 | [![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] |
46
+
47
+ ### Compatibility
48
+
49
+ Compatible with MRI Ruby 4.0.0+, and concordant releases of JRuby, and TruffleRuby.
50
+ CI workflows and Appraisals are generated for MRI Ruby 4.0.0+.
51
+ This test floor is configured by `ruby.test_minimum` in `.kettle-jem.yml` and
52
+ may be higher than the gem's runtime compatibility floor when legacy Rubies are
53
+ not practical for the current toolchain.
54
+
55
+ <a href="https://github.com/kettle-dev"><img alt="kettle-dev Logo by Aboling0, CC BY-SA 4.0" src="https://logos.galtzo.com/assets/images/kettle-dev/avatar-128px.svg" width="14%" align="right"/></a>
56
+
57
+ The _amazing_ test matrix is powered by the kettle-dev stack.
58
+
59
+ <details markdown="1">
60
+ <summary>How kettle-dev manages complexity in tests</summary>
61
+
62
+ | Gem | Source | Role | Total downloads |
63
+ |-----|--------|------|---------------------|
64
+ | [appraisal2](https://clickgems.clickhouse.com/dashboard/appraisal2) | [GitHub](https://github.com/appraisal-rb/appraisal2) | multi-dependency Appraisal matrix generation | [![Total downloads for appraisal2](https://img.shields.io/gem/dt/appraisal2.svg?style=flat-square)](https://clickgems.clickhouse.com/dashboard/appraisal2) |
65
+ | [appraisal2-rubocop](https://clickgems.clickhouse.com/dashboard/appraisal2-rubocop) | [GitHub](https://github.com/appraisal-rb/appraisal2-rubocop) | RuboCop Appraisal generator integration | [![Total downloads for appraisal2-rubocop](https://img.shields.io/gem/dt/appraisal2-rubocop.svg?style=flat-square)](https://clickgems.clickhouse.com/dashboard/appraisal2-rubocop) |
66
+ | [kettle-dev](https://clickgems.clickhouse.com/dashboard/kettle-dev) | [GitHub](https://github.com/kettle-dev/kettle-dev) | development, release, and CI workflow tooling | [![Total downloads for kettle-dev](https://img.shields.io/gem/dt/kettle-dev.svg?style=flat-square)](https://clickgems.clickhouse.com/dashboard/kettle-dev) |
67
+ | [kettle-jem](https://clickgems.clickhouse.com/dashboard/kettle-jem) | [GitHub](https://github.com/kettle-dev/kettle-jem) | Appraisals & CI workflow templates | [![Total downloads for kettle-jem](https://img.shields.io/gem/dt/kettle-jem.svg?style=flat-square)](https://clickgems.clickhouse.com/dashboard/kettle-jem) |
68
+ | [kettle-soup-cover](https://clickgems.clickhouse.com/dashboard/kettle-soup-cover) | [GitHub](https://github.com/kettle-dev/kettle-soup-cover) | SimpleCov coverage policy and reporting | [![Total downloads for kettle-soup-cover](https://img.shields.io/gem/dt/kettle-soup-cover.svg?style=flat-square)](https://clickgems.clickhouse.com/dashboard/kettle-soup-cover) |
69
+ | [kettle-test](https://clickgems.clickhouse.com/dashboard/kettle-test) | [GitHub](https://github.com/kettle-dev/kettle-test) | standard test runner and coverage harness | [![Total downloads for kettle-test](https://img.shields.io/gem/dt/kettle-test.svg?style=flat-square)](https://clickgems.clickhouse.com/dashboard/kettle-test) |
70
+ | [rubocop-lts](https://clickgems.clickhouse.com/dashboard/rubocop-lts) | [GitHub](https://github.com/rubocop-lts/rubocop-lts) | Ruby-version-aware linting | [![Total downloads for rubocop-lts](https://img.shields.io/gem/dt/rubocop-lts.svg?style=flat-square)](https://clickgems.clickhouse.com/dashboard/rubocop-lts) |
71
+ | [turbo_tests2](https://clickgems.clickhouse.com/dashboard/turbo_tests2) | [GitHub](https://github.com/galtzo-floss/turbo_tests2) | parallel test execution | [![Total downloads for turbo_tests2](https://img.shields.io/gem/dt/turbo_tests2.svg?style=flat-square)](https://clickgems.clickhouse.com/dashboard/turbo_tests2) |
72
+
73
+ </details>
74
+
75
+ ## ✨ Installation
76
+
77
+ Install the gem and add to the application's Gemfile by executing:
78
+
79
+ ```console
80
+ bundle add ast-crispr
81
+ ```
82
+
83
+ If bundler is not being used to manage dependencies, install the gem by executing:
84
+
85
+ ```console
86
+ gem install ast-crispr
87
+ ```
88
+
89
+ ## ⚙️ Configuration
90
+
91
+ `ast-crispr` itself is adapter-neutral. Configure it by choosing an adapter package, building a document context, and passing an owner selector to an operation.
92
+
93
+ ```ruby
94
+ require "ast/crispr"
95
+
96
+ selector = Ast::Crispr::OwnerSelector.new(
97
+ id: "example",
98
+ locate: ->(context) { context.structural_owners(owner_scope: :shared_default) },
99
+ )
100
+ ```
101
+
102
+ Adapter packages such as `ast-crispr-ruby-prism` and `ast-crispr-markdown-markly` provide ready-made selectors for real syntax trees.
103
+
104
+ ## 🔧 Basic Usage
105
+
106
+ Use an adapter package for concrete documents. A typical operation builds a document context, locates one owner, and replaces that owner's source range.
107
+
108
+ ```ruby
109
+ require "ast/crispr"
110
+ require "ast/crispr/markdown/markly"
111
+
112
+ target = Ast::Crispr::Markdown::Markly::Selectors.heading_section(
113
+ heading_text: "Configuration",
114
+ level: 2,
115
+ limit: { exactly: 1 },
116
+ )
117
+
118
+ result = Ast::Crispr::Replace.call(
119
+ content: File.read("README.md"),
120
+ target: target,
121
+ replacement: "## Configuration
122
+
123
+ Updated text.
124
+ ",
125
+ source_label: "README.md",
126
+ )
127
+
128
+ File.write("README.md", result.updated_content)
129
+ ```
130
+
131
+ ## 🔐 Security
132
+
133
+ See [SECURITY.md][🔐security].
134
+
135
+ ## 🤝 Contributing
136
+
137
+ If you need some ideas of where to help, you could work on adding more code coverage,
138
+ or if it is already 💯 (see [below](#code-coverage)) check [issues][🤝gh-issues] or [PRs][🤝gh-pulls],
139
+ or use the gem and think about how it could be better.
140
+
141
+ We [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] so if you make changes, remember to update it.
142
+
143
+ See [CONTRIBUTING.md][🤝contributing] for more detailed instructions.
144
+
145
+ ### Code Coverage
146
+
147
+ <details markdown="1">
148
+ <summary>Coverage service badges</summary>
149
+
150
+ </details>
151
+
152
+ ## 📌 Versioning
153
+
154
+ This library follows [![Semantic Versioning 2.0.0][📌semver-img]][📌semver] for its public API where practical.
155
+ For most applications, prefer the [Pessimistic Version Constraint][📌pvc] with two digits of precision.
156
+
157
+ For example:
158
+
159
+ ```ruby
160
+ spec.add_dependency("ast-crispr", "~> 7.0")
161
+ ```
162
+
163
+ <details markdown="1">
164
+ <summary>📌 Is "Platform Support" part of the public API? More details inside.</summary>
165
+
166
+ Dropping support for a platform can be a breaking change for affected users.
167
+ If a release changes supported platforms, it should be called out clearly in the changelog and versioned with that impact in mind.
168
+
169
+ To get a better understanding of how SemVer is intended to work over a project's lifetime,
170
+ read this article from the creator of SemVer:
171
+
172
+ - ["Major Version Numbers are Not Sacred"][📌major-versions-not-sacred]
173
+
174
+ </details>
175
+
176
+ See [CHANGELOG.md][📌changelog] for a list of releases.
177
+
178
+ ## 📄 License
179
+
180
+ The gem is available under the following licenses: [AGPL-3.0-only](https://github.com/structuredmerge/structuredmerge-ruby/blob/main/AGPL-3.0-only.md), [PolyForm-Small-Business-1.0.0](https://github.com/structuredmerge/structuredmerge-ruby/blob/main/PolyForm-Small-Business-1.0.0.md).
181
+ See [LICENSE.md][📄license] for details.
182
+
183
+ If none of the available licenses suit your use case, please [contact us](mailto:floss@galtzo.com) to discuss a custom commercial license.
184
+
185
+ [⛳liberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay&color=a51611&style=flat
186
+ [⛳liberapay-bottom-img]: https://img.shields.io/liberapay/goal/pboling.svg?style=for-the-badge&logo=liberapay&color=a51611
187
+ [⛳liberapay]: https://liberapay.com/pboling/donate
188
+ [🖇sponsor-img]: https://img.shields.io/badge/Sponsor_Me!-pboling.svg?style=social&logo=github
189
+ [🖇sponsor-bottom-img]: https://img.shields.io/badge/Sponsor_Me!-pboling-blue?style=for-the-badge&logo=github
190
+ [🖇sponsor]: https://github.com/sponsors/pboling
191
+ [🖇kofi-img]: https://img.shields.io/badge/ko--fi-%E2%9C%93-a51611.svg?style=flat
192
+ [🖇kofi]: https://ko-fi.com/pboling
193
+ [🖇buyme-small-img]: https://img.shields.io/badge/buy_me_a_coffee-%E2%9C%93-a51611.svg?style=flat
194
+ [🖇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
195
+ [🖇buyme]: https://www.buymeacoffee.com/pboling
196
+ [🖇paypal-img]: https://img.shields.io/badge/donate-paypal-a51611.svg?style=flat&logo=paypal
197
+ [🖇paypal-bottom-img]: https://img.shields.io/badge/donate-paypal-a51611.svg?style=for-the-badge&logo=paypal&color=0A0A0A
198
+ [🖇paypal]: https://www.paypal.com/paypalme/peterboling
199
+ [🖇floss-funding.dev]: https://floss-funding.dev
200
+ [🖇floss-funding-gem]: https://github.com/galtzo-floss/floss_funding
201
+ [✉️discord-invite]: https://discord.gg/3qme4XHNKN
202
+ [✉️discord-invite-img-ftb]: https://img.shields.io/discord/1373797679469170758?style=for-the-badge&logo=discord
203
+ [✉️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
204
+ [✉️ruby-friends]: https://app.daily.dev/squads/rubyfriends
205
+ [✉️ruby-forum-top-img]: https://img.shields.io/discourse/topics?server=https%3A%2F%2Fwww.rubyforum.org&style=flat&logo=discourse&label=Ruby%20Users%20Forum
206
+ [✉️ruby-forum-img]: https://img.shields.io/discourse/topics?server=https%3A%2F%2Fwww.rubyforum.org&style=for-the-badge&logo=discourse&label=Ruby%20Users%20Forum
207
+ [✉️ruby-forum]: https://www.rubyforum.org/tag/ast-crispr
208
+ [✇bundle-group-pattern]: https://gist.github.com/pboling/4564780
209
+ [⛳️gem-namespace]: https://github.com/structuredmerge/structuredmerge-ruby/tree/main/gems/ast-crispr
210
+ [⛳️namespace-img]: https://img.shields.io/badge/namespace-Ast::Crispr-3C2D2D.svg?style=square&logo=ruby&logoColor=white
211
+ [⛳️gem-name]: https://clickgems.clickhouse.com/dashboard/ast-crispr
212
+ [⛳️name-img]: https://img.shields.io/badge/name-ast--crispr-3C2D2D.svg?style=square&logo=rubygems&logoColor=red
213
+ [⛳️tag-img]: https://img.shields.io/github/tag/structuredmerge/structuredmerge-ruby.svg
214
+ [⛳️tag]: https://github.com/structuredmerge/structuredmerge-ruby/releases
215
+ [🚂maint-blog]: http://www.railsbling.com/tags/ast-crispr
216
+ [🚂maint-blog-img]: https://img.shields.io/badge/blog-railsbling-0093D0.svg?style=for-the-badge&logo=rubyonrails&logoColor=orange
217
+ [🚂maint-contact]: http://www.railsbling.com/contact
218
+ [🚂maint-contact-img]: https://img.shields.io/badge/Contact-Maintainer-0093D0.svg?style=flat&logo=rubyonrails&logoColor=red
219
+ [💖🖇linkedin]: http://www.linkedin.com/in/peterboling
220
+ [💖🖇linkedin-img]: https://img.shields.io/badge/LinkedIn-Profile-0B66C2?style=flat&logo=newjapanprowrestling
221
+ [💖✌️wellfound]: https://wellfound.com/u/peter-boling
222
+ [💖✌️wellfound-img]: https://img.shields.io/badge/peter--boling-orange?style=flat&logo=wellfound
223
+ [💖💲crunchbase]: https://www.crunchbase.com/person/peter-boling
224
+ [💖💲crunchbase-img]: https://img.shields.io/badge/peter--boling-purple?style=flat&logo=crunchbase
225
+ [💖🐘ruby-mast]: https://ruby.social/@galtzo
226
+ [💖🐘ruby-mast-img]: https://img.shields.io/mastodon/follow/109447111526622197?domain=https://ruby.social&style=flat&logo=mastodon&label=Ruby%20@galtzo
227
+ [💖🦋bluesky]: https://bsky.app/profile/galtzo.com
228
+ [💖🦋bluesky-img]: https://img.shields.io/badge/@galtzo.com-0285FF?style=flat&logo=bluesky&logoColor=white
229
+ [💖🌳linktree]: https://linktr.ee/galtzo
230
+ [💖🌳linktree-img]: https://img.shields.io/badge/galtzo-purple?style=flat&logo=linktree
231
+ [💖💁🏼‍♂️devto]: https://dev.to/galtzo
232
+ [💖💁🏼‍♂️devto-img]: https://img.shields.io/badge/dev.to-0A0A0A?style=flat&logo=devdotto&logoColor=white
233
+ [💖💁🏼‍♂️aboutme]: https://about.me/peter.boling
234
+ [💖💁🏼‍♂️aboutme-img]: https://img.shields.io/badge/about.me-0A0A0A?style=flat&logo=aboutme&logoColor=white
235
+ [💖🧊berg]: https://codeberg.org/pboling
236
+ [💖🐙hub]: https://github.org/pboling
237
+ [💖🛖hut]: https://sr.ht/~galtzo/
238
+ [💖🧪lab]: https://gitlab.com/pboling
239
+ [👨🏼‍🏫expsup-upwork]: https://www.upwork.com/freelancers/~014942e9b056abdf86?mp_source=share
240
+ [👨🏼‍🏫expsup-upwork-img]: https://img.shields.io/badge/UpWork-13544E?style=for-the-badge&logo=Upwork&logoColor=white
241
+ [👨🏼‍🏫expsup-codementor]: https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github
242
+ [👨🏼‍🏫expsup-codementor-img]: https://img.shields.io/badge/CodeMentor-Get_Help-1abc9c?style=for-the-badge&logo=CodeMentor&logoColor=white
243
+ [🏙️entsup-tidelift]: https://tidelift.com/subscription/pkg/rubygems-ast-crispr?utm_source=rubygems-ast-crispr&utm_medium=referral&utm_campaign=readme
244
+ [🏙️entsup-tidelift-img]: https://img.shields.io/badge/Tidelift_and_Sonar-Enterprise_Support-FD3456?style=for-the-badge&logo=sonar&logoColor=white
245
+ [🏙️entsup-tidelift-sonar]: https://blog.tidelift.com/tidelift-joins-sonar
246
+ [💁🏼‍♂️peterboling]: http://www.peterboling.com
247
+ [🚂railsbling]: http://www.railsbling.com
248
+ [📜src-gl-img]: https://img.shields.io/badge/GitLab-FBA326?style=for-the-badge&logo=Gitlab&logoColor=orange
249
+ [📜src-gl]: https://gitlab.com/structuredmerge/structuredmerge-ruby/-/tree/main/gems/ast-crispr
250
+ [📜src-cb-img]: https://img.shields.io/badge/CodeBerg-4893CC?style=for-the-badge&logo=CodeBerg&logoColor=blue
251
+ [📜src-cb]: https://codeberg.org/structuredmerge/structuredmerge-ruby/src/branch/main/gems/ast-crispr
252
+ [📜src-gh-img]: https://img.shields.io/badge/GitHub-238636?style=for-the-badge&logo=GitHub&logoColor=green
253
+ [📜src-gh]: https://github.com/structuredmerge/structuredmerge-ruby/tree/main/gems/ast-crispr
254
+ [📜docs-cr-rd-img]: https://img.shields.io/badge/RubyDoc-Current_Release-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white
255
+ [📜docs-head-rd-img]: https://img.shields.io/badge/YARD_on_Galtzo.com-HEAD-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white
256
+ [📜gl-wiki]: https://gitlab.com/structuredmerge/structuredmerge-ruby/-/wikis/home
257
+ [📜gh-wiki]: https://github.com/structuredmerge/structuredmerge-ruby/wiki
258
+ [📜gl-wiki-img]: https://img.shields.io/badge/wiki-gitlab-943CD2.svg?style=for-the-badge&logo=gitlab&logoColor=white
259
+ [📜gh-wiki-img]: https://img.shields.io/badge/wiki-github-943CD2.svg?style=for-the-badge&logo=github&logoColor=white
260
+ [👽dl-rank]: https://clickgems.clickhouse.com/dashboard/ast-crispr
261
+ [👽dl-ranki]: https://img.shields.io/gem/dt/ast-crispr.svg
262
+ [👽version]: https://clickgems.clickhouse.com/dashboard/ast-crispr
263
+ [👽versioni]: https://img.shields.io/gem/v/ast-crispr.svg
264
+ [🚎11-c-wf]: https://github.com/structuredmerge/structuredmerge-ruby/actions/workflows/current.yml
265
+ [🚎11-c-wfi]: https://github.com/structuredmerge/structuredmerge-ruby/actions/workflows/current.yml/badge.svg
266
+ [💎ruby-c-i]: https://img.shields.io/badge/Ruby-current-CC342D?style=for-the-badge&logo=ruby&logoColor=green
267
+ [🤝gh-issues]: https://github.com/structuredmerge/structuredmerge-ruby/issues
268
+ [🤝gh-pulls]: https://github.com/structuredmerge/structuredmerge-ruby/pulls
269
+ [🤝gl-issues]: https://gitlab.com/structuredmerge/structuredmerge-ruby/-/issues
270
+ [🤝gl-pulls]: https://gitlab.com/structuredmerge/structuredmerge-ruby/-/merge_requests
271
+ [🤝cb-issues]: https://codeberg.org/structuredmerge/structuredmerge-ruby/issues
272
+ [🤝cb-pulls]: https://codeberg.org/structuredmerge/structuredmerge-ruby/pulls
273
+ [🤝cb-donate]: https://donate.codeberg.org/
274
+ [🤝contributing]: https://github.com/structuredmerge/structuredmerge-ruby/blob/main/CONTRIBUTING.md
275
+ [🖐contrib-rocks]: https://contrib.rocks
276
+ [🖐contributors]: https://github.com/structuredmerge/structuredmerge-ruby/graphs/contributors
277
+ [🖐contributors-img]: https://contrib.rocks/image?repo=structuredmerge/structuredmerge-ruby
278
+ [🪇conduct]: https://github.com/structuredmerge/structuredmerge-ruby/blob/main/CODE_OF_CONDUCT.md
279
+ [🪇conduct-img]: https://img.shields.io/badge/Contributor_Covenant-2.1-259D6C.svg
280
+ [📌pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint
281
+ [📌semver]: https://semver.org/spec/v2.0.0.html
282
+ [📌semver-img]: https://img.shields.io/badge/semver-2.0.0-259D6C.svg?style=flat
283
+ [📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
284
+ [📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
285
+ [📌changelog]: https://github.com/structuredmerge/structuredmerge-ruby/blob/main/CHANGELOG.md
286
+ [📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
287
+ [📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-34495e.svg?style=flat
288
+ [📌gitmoji]: https://gitmoji.dev
289
+ [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
290
+ [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
291
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.844-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
292
+ [🔐security]: https://github.com/structuredmerge/structuredmerge-ruby/blob/main/SECURITY.md
293
+ [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
294
+ [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
295
+ [📄license]: LICENSE.md
296
+ [📄license-ref]: LICENSE.md
297
+ [📄license-img]: https://img.shields.io/badge/License-AGPL--3.0--only_OR_PolyForm--Small--Business--1.0.0-259D6C.svg
298
+ [📄license-compat]: https://www.apache.org/legal/resolved.html#category-x
299
+ [📄license-compat-img]: https://img.shields.io/badge/Apache_Incompatible:_Category_X-%E2%9C%97-C0392B.svg?style=flat&logo=Apache
300
+ [📄ilo-declaration]: https://www.ilo.org/declaration/lang--en/index.htm
301
+ [📄ilo-declaration-img]: https://img.shields.io/badge/ILO_Fundamental_Principles-✓-259D6C.svg?style=flat
302
+ [🚎yard-current]: http://rubydoc.info/gems/ast-crispr
303
+ [🚎yard-head]: https://ast-crispr.galtzo.com
304
+ [💎stone_checksums]: https://github.com/galtzo-floss/stone_checksums
305
+ [💎SHA_checksums]: https://gitlab.com/structuredmerge/structuredmerge-ruby/-/tree/main/checksums
306
+ [💎rlts]: https://github.com/rubocop-lts/rubocop-lts
307
+ [💎rlts-img]: https://img.shields.io/badge/code_style_&_linting-rubocop--lts-34495e.svg?plastic&logo=ruby&logoColor=white
308
+ [💎appraisal2]: https://github.com/appraisal-rb/appraisal2
309
+ [💎appraisal2-img]: https://img.shields.io/badge/appraised_by-appraisal2-34495e.svg?plastic&logo=ruby&logoColor=white
310
+ [💎d-in-dvcs]: https://railsbling.com/posts/dvcs/put_the_d_in_dvcs/
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.shared_examples('Ast::Crispr::DestinationProfile contract') do
4
+ it 'exposes the expected destination-resolution metadata' do
5
+ expect(destination_profile.resolution_kind).to(eq(expected_resolution_kind))
6
+ expect(destination_profile.resolution_family).to(eq(expected_resolution_family))
7
+ expect(destination_profile.known_resolution_kind?).to(eq(expected_known_resolution_kind))
8
+ expect(destination_profile.resolution_source).to(eq(expected_resolution_source))
9
+ expect(destination_profile.resolution_source_family).to(eq(expected_resolution_source_family))
10
+ expect(destination_profile.known_resolution_source?).to(eq(expected_known_resolution_source))
11
+ expect(destination_profile.anchor_boundary).to(eq(expected_anchor_boundary))
12
+ expect(destination_profile.anchor_boundary_family).to(eq(expected_anchor_boundary_family))
13
+ expect(destination_profile.known_anchor_boundary?).to(eq(expected_known_anchor_boundary))
14
+ expect(destination_profile.used_if_missing?).to(eq(expected_used_if_missing))
15
+ expect(destination_profile.append_fallback?).to(eq(expected_append_fallback))
16
+ expect(destination_profile.anchored?).to(eq(expected_destination_anchored))
17
+ expect(destination_profile.to_h).to(include(
18
+ resolution_kind: expected_resolution_kind,
19
+ resolution_family: expected_resolution_family,
20
+ known_resolution_kind: expected_known_resolution_kind,
21
+ resolution_source: expected_resolution_source,
22
+ resolution_source_family: expected_resolution_source_family,
23
+ known_resolution_source: expected_known_resolution_source,
24
+ anchor_boundary: expected_anchor_boundary,
25
+ anchor_boundary_family: expected_anchor_boundary_family,
26
+ known_anchor_boundary: expected_known_anchor_boundary,
27
+ used_if_missing: expected_used_if_missing,
28
+ append_fallback: expected_append_fallback,
29
+ anchored: expected_destination_anchored
30
+ ))
31
+ end
32
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.shared_examples('Ast::Crispr::MatchProfile contract') do
4
+ it 'exposes the expected match-boundary metadata' do
5
+ expect(match_profile.start_boundary).to(eq(expected_start_boundary))
6
+ expect(match_profile.start_boundary_family).to(eq(expected_start_boundary_family))
7
+ expect(match_profile.known_start_boundary?).to(eq(expected_known_start_boundary))
8
+ expect(match_profile.end_boundary).to(eq(expected_end_boundary))
9
+ expect(match_profile.end_boundary_family).to(eq(expected_end_boundary_family))
10
+ expect(match_profile.known_end_boundary?).to(eq(expected_known_end_boundary))
11
+ expect(match_profile.payload_kind).to(eq(expected_payload_kind))
12
+ expect(match_profile.payload_family).to(eq(expected_payload_family))
13
+ expect(match_profile.known_payload_kind?).to(eq(expected_known_payload_kind))
14
+ expect(match_profile.comment_anchored?).to(eq(expected_match_comment_anchored))
15
+ expect(match_profile.trailing_gap_extended?).to(eq(expected_trailing_gap_extended))
16
+ expect(match_profile.to_h).to(include(
17
+ start_boundary: expected_start_boundary,
18
+ start_boundary_family: expected_start_boundary_family,
19
+ known_start_boundary: expected_known_start_boundary,
20
+ end_boundary: expected_end_boundary,
21
+ end_boundary_family: expected_end_boundary_family,
22
+ known_end_boundary: expected_known_end_boundary,
23
+ payload_kind: expected_payload_kind,
24
+ payload_family: expected_payload_family,
25
+ known_payload_kind: expected_known_payload_kind,
26
+ comment_anchored: expected_match_comment_anchored,
27
+ trailing_gap_extended: expected_trailing_gap_extended
28
+ ))
29
+ end
30
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.shared_examples('Ast::Crispr::OperationProfile contract') do
4
+ it 'exposes the expected operation metadata' do
5
+ expect(operation_profile.operation_kind).to(eq(expected_operation_kind))
6
+ expect(operation_profile.operation_family).to(eq(expected_operation_family))
7
+ expect(operation_profile.known_operation_kind?).to(eq(expected_known_operation_kind))
8
+ expect(operation_profile.source_requirement).to(eq(expected_source_requirement))
9
+ expect(operation_profile.destination_requirement).to(eq(expected_destination_requirement))
10
+ expect(operation_profile.replacement_source).to(eq(expected_replacement_source))
11
+ expect(operation_profile.captures_source_text?).to(eq(expected_captures_source_text))
12
+ expect(operation_profile.supports_if_missing?).to(eq(expected_supports_if_missing))
13
+ expect(operation_profile.selects_source?).to(eq(expected_selects_source))
14
+ expect(operation_profile.requires_source?).to(eq(expected_requires_source))
15
+ expect(operation_profile.supports_destination?).to(eq(expected_supports_destination))
16
+ expect(operation_profile.requires_destination?).to(eq(expected_requires_destination))
17
+ expect(operation_profile.explicit_replacement?).to(eq(expected_explicit_replacement))
18
+ expect(operation_profile.may_reuse_captured_text?).to(eq(expected_may_reuse_captured_text))
19
+ expect(operation_profile.to_h).to(include(
20
+ operation_kind: expected_operation_kind,
21
+ operation_family: expected_operation_family,
22
+ known_operation_kind: expected_known_operation_kind,
23
+ source_requirement: expected_source_requirement,
24
+ destination_requirement: expected_destination_requirement,
25
+ replacement_source: expected_replacement_source,
26
+ captures_source_text: expected_captures_source_text,
27
+ supports_if_missing: expected_supports_if_missing
28
+ ))
29
+ end
30
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.shared_examples('Ast::Crispr::SelectionProfile contract') do
4
+ it 'exposes the expected selector-intent metadata' do
5
+ expect(selection_profile.owner_scope).to(eq(expected_selection_owner_scope))
6
+ expect(selection_profile.owner_selector).to(eq(expected_selection_owner_selector))
7
+ expect(selection_profile.owner_selector_family).to(eq(expected_selection_owner_selector_family))
8
+ expect(selection_profile.selector_kind).to(eq(expected_selector_kind))
9
+ expect(selection_profile.selection_intent).to(eq(expected_selection_intent))
10
+ expect(selection_profile.selection_intent_family).to(eq(expected_selection_intent_family))
11
+ expect(selection_profile.known_selection_intent?).to(eq(expected_known_selection_intent))
12
+ expect(selection_profile.comment_region).to(eq(expected_comment_region))
13
+ expect(selection_profile.include_trailing_gap).to(eq(expected_include_trailing_gap))
14
+ expect(selection_profile.comment_anchored?).to(eq(expected_comment_anchored))
15
+ expect(selection_profile.to_h).to(include(
16
+ owner_scope: expected_selection_owner_scope,
17
+ owner_selector: expected_selection_owner_selector,
18
+ owner_selector_family: expected_selection_owner_selector_family,
19
+ selector_kind: expected_selector_kind,
20
+ selection_intent: expected_selection_intent,
21
+ selection_intent_family: expected_selection_intent_family,
22
+ known_selection_intent: expected_known_selection_intent,
23
+ comment_region: expected_comment_region,
24
+ include_trailing_gap: expected_include_trailing_gap,
25
+ comment_anchored: expected_comment_anchored
26
+ ))
27
+ end
28
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.shared_examples('Ast::Crispr::StructureProfile contract') do
4
+ it 'exposes the expected structure-profile metadata' do
5
+ expect(profile.owner_scope).to(eq(expected_owner_scope))
6
+ expect(profile.owner_selector).to(eq(expected_owner_selector))
7
+ expect(profile.owner_selector_family).to(eq(expected_owner_selector_family))
8
+ expect(profile.known_owner_selector?).to(eq(expected_known_owner_selector))
9
+ expect(profile.supported_comment_regions).to(eq(expected_supported_comment_regions))
10
+ expect(profile.to_h).to(include(
11
+ owner_scope: expected_owner_scope,
12
+ owner_selector: expected_owner_selector,
13
+ owner_selector_family: expected_owner_selector_family,
14
+ known_owner_selector: expected_known_owner_selector,
15
+ supported_comment_regions: expected_supported_comment_regions
16
+ ))
17
+ end
18
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'rspec/shared_examples/structure_profile'
4
+ require_relative 'rspec/shared_examples/selection_profile'
5
+ require_relative 'rspec/shared_examples/operation_profile'
6
+ require_relative 'rspec/shared_examples/destination_profile'
7
+ require_relative 'rspec/shared_examples/match_profile'
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ast
4
+ module Crispr
5
+ # Version namespace for this gem.
6
+ module Version
7
+ # Current gem version.
8
+ VERSION = '7.1.1'
9
+ end
10
+ # Current gem version exposed at the traditional constant location.
11
+ VERSION = Version::VERSION # Traditional Constant Location
12
+ end
13
+ end