html-merge 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 +7 -0
- checksums.yaml.gz.sig +0 -0
- data/LICENSE.md +10 -0
- data/README.md +262 -0
- data/lib/html/merge/crispr_adapter.rb +66 -0
- data/lib/html/merge/version.rb +13 -0
- data/lib/html/merge.rb +257 -0
- data/sig/html/merge.rbs +18 -0
- data.tar.gz.sig +0 -0
- metadata +359 -0
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 9cb890950b99c62ec12767823ab88ab34b4410b9f4f84fb7d31e97700ee64ec0
|
|
4
|
+
data.tar.gz: 25226fc06808f7a1ff22b61abaf7da77fe65092389d83500cdb6a24f4d2a1821
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: b152307f494920e718a364fb0b0259eaf6e84837140bf12ed06e9e410209c2b1c31e0adbddd0c775ac27d0347df634aabb5fc98517601e5fbe95d4ca811d1171
|
|
7
|
+
data.tar.gz: ee0da4d4af6a087e5b0a24f2c864dc59ebb4ce6a87be14fb7985dbaed539d3334af5ac327762ff10cf0183b5fa43f0d5ed8ea2f36694b55cab07480eb7e63754
|
checksums.yaml.gz.sig
ADDED
|
Binary file
|
data/LICENSE.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# License
|
|
2
|
+
|
|
3
|
+
This project is made available under the following license.
|
|
4
|
+
Choose the option that best fits your use case:
|
|
5
|
+
|
|
6
|
+
- [MIT](https://github.com/structuredmerge/structuredmerge-ruby/blob/main/MIT.md)
|
|
7
|
+
|
|
8
|
+
## Copyright Notice
|
|
9
|
+
|
|
10
|
+
- Copyright (c) 2026 Peter H. Boling
|
data/README.md
ADDED
|
@@ -0,0 +1,262 @@
|
|
|
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
|
+
# 💎 Html::Merge
|
|
4
|
+
|
|
5
|
+
[![Version][👽versioni]][👽version] [![Ruby Users Forum][✉️ruby-forum-top-img]][✉️ruby-forum] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: MIT][📄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
|
+
## 💡 Info you can shake a stick at
|
|
25
|
+
|
|
26
|
+
| Tokens to Remember | [![Gem name][⛳️name-img]][⛳️gem-name] [![Gem namespace][⛳️namespace-img]][⛳️gem-namespace] |
|
|
27
|
+
|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
28
|
+
| Works with MRI Ruby 4 | [![Ruby current Compat][💎ruby-c-i]][🚎11-c-wf]|
|
|
29
|
+
| 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] |
|
|
30
|
+
| 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] |
|
|
31
|
+
| 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] |
|
|
32
|
+
| Compliance | [![License: MIT][📄license-img]][📄license] [![Apache license compatibility: Category A][📄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] |
|
|
33
|
+
| 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] |
|
|
34
|
+
| 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] |
|
|
35
|
+
| `...` 💖 | [![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] |
|
|
36
|
+
|
|
37
|
+
### Compatibility
|
|
38
|
+
|
|
39
|
+
Compatible with MRI Ruby 3.2.0+, and concordant releases of JRuby, and TruffleRuby.
|
|
40
|
+
CI workflows and Appraisals are generated for MRI Ruby 3.2.0+.
|
|
41
|
+
This test floor is configured by `ruby.test_minimum` in `.kettle-jem.yml` and
|
|
42
|
+
may be higher than the gem's runtime compatibility floor when legacy Rubies are
|
|
43
|
+
not practical for the current toolchain.
|
|
44
|
+
|
|
45
|
+
<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>
|
|
46
|
+
|
|
47
|
+
The _amazing_ test matrix is powered by the kettle-dev stack.
|
|
48
|
+
|
|
49
|
+
<details markdown="1">
|
|
50
|
+
<summary>How kettle-dev manages complexity in tests</summary>
|
|
51
|
+
|
|
52
|
+
| Gem | Source | Role | Total downloads |
|
|
53
|
+
|-----|--------|------|---------------------|
|
|
54
|
+
| [appraisal2](https://clickgems.clickhouse.com/dashboard/appraisal2) | [GitHub](https://github.com/appraisal-rb/appraisal2) | multi-dependency Appraisal matrix generation | [](https://clickgems.clickhouse.com/dashboard/appraisal2) |
|
|
55
|
+
| [appraisal2-rubocop](https://clickgems.clickhouse.com/dashboard/appraisal2-rubocop) | [GitHub](https://github.com/appraisal-rb/appraisal2-rubocop) | RuboCop Appraisal generator integration | [](https://clickgems.clickhouse.com/dashboard/appraisal2-rubocop) |
|
|
56
|
+
| [kettle-dev](https://clickgems.clickhouse.com/dashboard/kettle-dev) | [GitHub](https://github.com/kettle-dev/kettle-dev) | development, release, and CI workflow tooling | [](https://clickgems.clickhouse.com/dashboard/kettle-dev) |
|
|
57
|
+
| [kettle-jem](https://clickgems.clickhouse.com/dashboard/kettle-jem) | [GitHub](https://github.com/kettle-dev/kettle-jem) | Appraisals & CI workflow templates | [](https://clickgems.clickhouse.com/dashboard/kettle-jem) |
|
|
58
|
+
| [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 | [](https://clickgems.clickhouse.com/dashboard/kettle-soup-cover) |
|
|
59
|
+
| [kettle-test](https://clickgems.clickhouse.com/dashboard/kettle-test) | [GitHub](https://github.com/kettle-dev/kettle-test) | standard test runner and coverage harness | [](https://clickgems.clickhouse.com/dashboard/kettle-test) |
|
|
60
|
+
| [rubocop-lts](https://clickgems.clickhouse.com/dashboard/rubocop-lts) | [GitHub](https://github.com/rubocop-lts/rubocop-lts) | Ruby-version-aware linting | [](https://clickgems.clickhouse.com/dashboard/rubocop-lts) |
|
|
61
|
+
| [turbo_tests2](https://clickgems.clickhouse.com/dashboard/turbo_tests2) | [GitHub](https://github.com/galtzo-floss/turbo_tests2) | parallel test execution | [](https://clickgems.clickhouse.com/dashboard/turbo_tests2) |
|
|
62
|
+
|
|
63
|
+
</details>
|
|
64
|
+
|
|
65
|
+
## ✨ Installation
|
|
66
|
+
|
|
67
|
+
Install the gem and add to the application's Gemfile by executing:
|
|
68
|
+
|
|
69
|
+
```console
|
|
70
|
+
bundle add html-merge
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
|
74
|
+
|
|
75
|
+
```console
|
|
76
|
+
gem install html-merge
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## ⚙️ Configuration
|
|
80
|
+
|
|
81
|
+
## 🔧 Basic Usage
|
|
82
|
+
|
|
83
|
+
TODO: Write usage instructions here
|
|
84
|
+
|
|
85
|
+
## 🔐 Security
|
|
86
|
+
|
|
87
|
+
See [SECURITY.md][🔐security].
|
|
88
|
+
|
|
89
|
+
## 🤝 Contributing
|
|
90
|
+
|
|
91
|
+
If you need some ideas of where to help, you could work on adding more code coverage,
|
|
92
|
+
or if it is already 💯 (see [below](#code-coverage)) check [issues][🤝gh-issues] or [PRs][🤝gh-pulls],
|
|
93
|
+
or use the gem and think about how it could be better.
|
|
94
|
+
|
|
95
|
+
We [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] so if you make changes, remember to update it.
|
|
96
|
+
|
|
97
|
+
See [CONTRIBUTING.md][🤝contributing] for more detailed instructions.
|
|
98
|
+
|
|
99
|
+
### Code Coverage
|
|
100
|
+
|
|
101
|
+
<details markdown="1">
|
|
102
|
+
<summary>Coverage service badges</summary>
|
|
103
|
+
|
|
104
|
+
</details>
|
|
105
|
+
|
|
106
|
+
## 📌 Versioning
|
|
107
|
+
|
|
108
|
+
This library follows [![Semantic Versioning 2.0.0][📌semver-img]][📌semver] for its public API where practical.
|
|
109
|
+
For most applications, prefer the [Pessimistic Version Constraint][📌pvc] with two digits of precision.
|
|
110
|
+
|
|
111
|
+
For example:
|
|
112
|
+
|
|
113
|
+
```ruby
|
|
114
|
+
spec.add_dependency("html-merge", "~> 7.0")
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
<details markdown="1">
|
|
118
|
+
<summary>📌 Is "Platform Support" part of the public API? More details inside.</summary>
|
|
119
|
+
|
|
120
|
+
Dropping support for a platform can be a breaking change for affected users.
|
|
121
|
+
If a release changes supported platforms, it should be called out clearly in the changelog and versioned with that impact in mind.
|
|
122
|
+
|
|
123
|
+
To get a better understanding of how SemVer is intended to work over a project's lifetime,
|
|
124
|
+
read this article from the creator of SemVer:
|
|
125
|
+
|
|
126
|
+
- ["Major Version Numbers are Not Sacred"][📌major-versions-not-sacred]
|
|
127
|
+
|
|
128
|
+
</details>
|
|
129
|
+
|
|
130
|
+
See [CHANGELOG.md][📌changelog] for a list of releases.
|
|
131
|
+
|
|
132
|
+
## 📄 License
|
|
133
|
+
|
|
134
|
+
The gem is available as open source under the terms of
|
|
135
|
+
the [MIT](https://github.com/structuredmerge/structuredmerge-ruby/blob/main/MIT.md) [![License: MIT][📄license-img]][📄license-ref].
|
|
136
|
+
|
|
137
|
+
[⛳liberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay&color=a51611&style=flat
|
|
138
|
+
[⛳liberapay-bottom-img]: https://img.shields.io/liberapay/goal/pboling.svg?style=for-the-badge&logo=liberapay&color=a51611
|
|
139
|
+
[⛳liberapay]: https://liberapay.com/pboling/donate
|
|
140
|
+
[🖇sponsor-img]: https://img.shields.io/badge/Sponsor_Me!-pboling.svg?style=social&logo=github
|
|
141
|
+
[🖇sponsor-bottom-img]: https://img.shields.io/badge/Sponsor_Me!-pboling-blue?style=for-the-badge&logo=github
|
|
142
|
+
[🖇sponsor]: https://github.com/sponsors/pboling
|
|
143
|
+
[🖇kofi-img]: https://img.shields.io/badge/ko--fi-%E2%9C%93-a51611.svg?style=flat
|
|
144
|
+
[🖇kofi]: https://ko-fi.com/pboling
|
|
145
|
+
[🖇buyme-small-img]: https://img.shields.io/badge/buy_me_a_coffee-%E2%9C%93-a51611.svg?style=flat
|
|
146
|
+
[🖇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
|
|
147
|
+
[🖇buyme]: https://www.buymeacoffee.com/pboling
|
|
148
|
+
[🖇paypal-img]: https://img.shields.io/badge/donate-paypal-a51611.svg?style=flat&logo=paypal
|
|
149
|
+
[🖇paypal-bottom-img]: https://img.shields.io/badge/donate-paypal-a51611.svg?style=for-the-badge&logo=paypal&color=0A0A0A
|
|
150
|
+
[🖇paypal]: https://www.paypal.com/paypalme/peterboling
|
|
151
|
+
[🖇floss-funding.dev]: https://floss-funding.dev
|
|
152
|
+
[🖇floss-funding-gem]: https://github.com/galtzo-floss/floss_funding
|
|
153
|
+
[✉️discord-invite]: https://discord.gg/3qme4XHNKN
|
|
154
|
+
[✉️discord-invite-img-ftb]: https://img.shields.io/discord/1373797679469170758?style=for-the-badge&logo=discord
|
|
155
|
+
[✉️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
|
|
156
|
+
[✉️ruby-friends]: https://app.daily.dev/squads/rubyfriends
|
|
157
|
+
[✉️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
|
|
158
|
+
[✉️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
|
|
159
|
+
[✉️ruby-forum]: https://www.rubyforum.org/tag/structuredmerge
|
|
160
|
+
[✇bundle-group-pattern]: https://gist.github.com/pboling/4564780
|
|
161
|
+
[⛳️gem-namespace]: https://github.com/structuredmerge/structuredmerge-ruby/tree/main/gems/html-merge
|
|
162
|
+
[⛳️namespace-img]: https://img.shields.io/badge/namespace-Html::Merge-3C2D2D.svg?style=square&logo=ruby&logoColor=white
|
|
163
|
+
[⛳️gem-name]: https://clickgems.clickhouse.com/dashboard/html-merge
|
|
164
|
+
[⛳️name-img]: https://img.shields.io/badge/name-html--merge-3C2D2D.svg?style=square&logo=rubygems&logoColor=red
|
|
165
|
+
[⛳️tag-img]: https://img.shields.io/github/tag/structuredmerge/structuredmerge-ruby.svg
|
|
166
|
+
[⛳️tag]: https://github.com/structuredmerge/structuredmerge-ruby/releases
|
|
167
|
+
[🚂maint-blog]: http://www.railsbling.com/tags/html-merge
|
|
168
|
+
[🚂maint-blog-img]: https://img.shields.io/badge/blog-railsbling-0093D0.svg?style=for-the-badge&logo=rubyonrails&logoColor=orange
|
|
169
|
+
[🚂maint-contact]: http://www.railsbling.com/contact
|
|
170
|
+
[🚂maint-contact-img]: https://img.shields.io/badge/Contact-Maintainer-0093D0.svg?style=flat&logo=rubyonrails&logoColor=red
|
|
171
|
+
[💖🖇linkedin]: http://www.linkedin.com/in/peterboling
|
|
172
|
+
[💖🖇linkedin-img]: https://img.shields.io/badge/LinkedIn-Profile-0B66C2?style=flat&logo=newjapanprowrestling
|
|
173
|
+
[💖✌️wellfound]: https://wellfound.com/u/peter-boling
|
|
174
|
+
[💖✌️wellfound-img]: https://img.shields.io/badge/peter--boling-orange?style=flat&logo=wellfound
|
|
175
|
+
[💖💲crunchbase]: https://www.crunchbase.com/person/peter-boling
|
|
176
|
+
[💖💲crunchbase-img]: https://img.shields.io/badge/peter--boling-purple?style=flat&logo=crunchbase
|
|
177
|
+
[💖🐘ruby-mast]: https://ruby.social/@galtzo
|
|
178
|
+
[💖🐘ruby-mast-img]: https://img.shields.io/mastodon/follow/109447111526622197?domain=https://ruby.social&style=flat&logo=mastodon&label=Ruby%20@galtzo
|
|
179
|
+
[💖🦋bluesky]: https://bsky.app/profile/galtzo.com
|
|
180
|
+
[💖🦋bluesky-img]: https://img.shields.io/badge/@galtzo.com-0285FF?style=flat&logo=bluesky&logoColor=white
|
|
181
|
+
[💖🌳linktree]: https://linktr.ee/galtzo
|
|
182
|
+
[💖🌳linktree-img]: https://img.shields.io/badge/galtzo-purple?style=flat&logo=linktree
|
|
183
|
+
[💖💁🏼♂️devto]: https://dev.to/galtzo
|
|
184
|
+
[💖💁🏼♂️devto-img]: https://img.shields.io/badge/dev.to-0A0A0A?style=flat&logo=devdotto&logoColor=white
|
|
185
|
+
[💖💁🏼♂️aboutme]: https://about.me/peter.boling
|
|
186
|
+
[💖💁🏼♂️aboutme-img]: https://img.shields.io/badge/about.me-0A0A0A?style=flat&logo=aboutme&logoColor=white
|
|
187
|
+
[💖🧊berg]: https://codeberg.org/pboling
|
|
188
|
+
[💖🐙hub]: https://github.org/pboling
|
|
189
|
+
[💖🛖hut]: https://sr.ht/~galtzo/
|
|
190
|
+
[💖🧪lab]: https://gitlab.com/pboling
|
|
191
|
+
[👨🏼🏫expsup-upwork]: https://www.upwork.com/freelancers/~014942e9b056abdf86?mp_source=share
|
|
192
|
+
[👨🏼🏫expsup-upwork-img]: https://img.shields.io/badge/UpWork-13544E?style=for-the-badge&logo=Upwork&logoColor=white
|
|
193
|
+
[👨🏼🏫expsup-codementor]: https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github
|
|
194
|
+
[👨🏼🏫expsup-codementor-img]: https://img.shields.io/badge/CodeMentor-Get_Help-1abc9c?style=for-the-badge&logo=CodeMentor&logoColor=white
|
|
195
|
+
[🏙️entsup-tidelift]: https://tidelift.com/subscription/pkg/rubygems-html-merge?utm_source=rubygems-html-merge&utm_medium=referral&utm_campaign=readme
|
|
196
|
+
[🏙️entsup-tidelift-img]: https://img.shields.io/badge/Tidelift_and_Sonar-Enterprise_Support-FD3456?style=for-the-badge&logo=sonar&logoColor=white
|
|
197
|
+
[🏙️entsup-tidelift-sonar]: https://blog.tidelift.com/tidelift-joins-sonar
|
|
198
|
+
[💁🏼♂️peterboling]: http://www.peterboling.com
|
|
199
|
+
[🚂railsbling]: http://www.railsbling.com
|
|
200
|
+
[📜src-gl-img]: https://img.shields.io/badge/GitLab-FBA326?style=for-the-badge&logo=Gitlab&logoColor=orange
|
|
201
|
+
[📜src-gl]: https://gitlab.com/structuredmerge/structuredmerge-ruby/-/tree/main/gems/html-merge
|
|
202
|
+
[📜src-cb-img]: https://img.shields.io/badge/CodeBerg-4893CC?style=for-the-badge&logo=CodeBerg&logoColor=blue
|
|
203
|
+
[📜src-cb]: https://codeberg.org/structuredmerge/structuredmerge-ruby/src/branch/main/gems/html-merge
|
|
204
|
+
[📜src-gh-img]: https://img.shields.io/badge/GitHub-238636?style=for-the-badge&logo=GitHub&logoColor=green
|
|
205
|
+
[📜src-gh]: https://github.com/structuredmerge/structuredmerge-ruby/tree/main/gems/html-merge
|
|
206
|
+
[📜docs-cr-rd-img]: https://img.shields.io/badge/RubyDoc-Current_Release-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white
|
|
207
|
+
[📜docs-head-rd-img]: https://img.shields.io/badge/YARD_on_Galtzo.com-HEAD-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white
|
|
208
|
+
[📜gl-wiki]: https://gitlab.com/structuredmerge/structuredmerge-ruby/-/wikis/home
|
|
209
|
+
[📜gh-wiki]: https://github.com/structuredmerge/structuredmerge-ruby/wiki
|
|
210
|
+
[📜gl-wiki-img]: https://img.shields.io/badge/wiki-gitlab-943CD2.svg?style=for-the-badge&logo=gitlab&logoColor=white
|
|
211
|
+
[📜gh-wiki-img]: https://img.shields.io/badge/wiki-github-943CD2.svg?style=for-the-badge&logo=github&logoColor=white
|
|
212
|
+
[👽dl-rank]: https://clickgems.clickhouse.com/dashboard/html-merge
|
|
213
|
+
[👽dl-ranki]: https://img.shields.io/gem/dt/html-merge.svg
|
|
214
|
+
[👽version]: https://clickgems.clickhouse.com/dashboard/html-merge
|
|
215
|
+
[👽versioni]: https://img.shields.io/gem/v/html-merge.svg
|
|
216
|
+
[🚎11-c-wf]: https://github.com/structuredmerge/structuredmerge-ruby/actions/workflows/current.yml
|
|
217
|
+
[🚎11-c-wfi]: https://github.com/structuredmerge/structuredmerge-ruby/actions/workflows/current.yml/badge.svg
|
|
218
|
+
[💎ruby-c-i]: https://img.shields.io/badge/Ruby-current-CC342D?style=for-the-badge&logo=ruby&logoColor=green
|
|
219
|
+
[🤝gh-issues]: https://github.com/structuredmerge/structuredmerge-ruby/issues
|
|
220
|
+
[🤝gh-pulls]: https://github.com/structuredmerge/structuredmerge-ruby/pulls
|
|
221
|
+
[🤝gl-issues]: https://gitlab.com/structuredmerge/structuredmerge-ruby/-/issues
|
|
222
|
+
[🤝gl-pulls]: https://gitlab.com/structuredmerge/structuredmerge-ruby/-/merge_requests
|
|
223
|
+
[🤝cb-issues]: https://codeberg.org/structuredmerge/structuredmerge-ruby/issues
|
|
224
|
+
[🤝cb-pulls]: https://codeberg.org/structuredmerge/structuredmerge-ruby/pulls
|
|
225
|
+
[🤝cb-donate]: https://donate.codeberg.org/
|
|
226
|
+
[🤝contributing]: https://github.com/structuredmerge/structuredmerge-ruby/blob/main/CONTRIBUTING.md
|
|
227
|
+
[🖐contrib-rocks]: https://contrib.rocks
|
|
228
|
+
[🖐contributors]: https://github.com/structuredmerge/structuredmerge-ruby/graphs/contributors
|
|
229
|
+
[🖐contributors-img]: https://contrib.rocks/image?repo=structuredmerge/structuredmerge-ruby
|
|
230
|
+
[🪇conduct]: https://github.com/structuredmerge/structuredmerge-ruby/blob/main/CODE_OF_CONDUCT.md
|
|
231
|
+
[🪇conduct-img]: https://img.shields.io/badge/Contributor_Covenant-2.1-259D6C.svg
|
|
232
|
+
[📌pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint
|
|
233
|
+
[📌semver]: https://semver.org/spec/v2.0.0.html
|
|
234
|
+
[📌semver-img]: https://img.shields.io/badge/semver-2.0.0-259D6C.svg?style=flat
|
|
235
|
+
[📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
|
|
236
|
+
[📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
|
|
237
|
+
[📌changelog]: https://github.com/structuredmerge/structuredmerge-ruby/blob/main/CHANGELOG.md
|
|
238
|
+
[📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
|
|
239
|
+
[📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-34495e.svg?style=flat
|
|
240
|
+
[📌gitmoji]: https://gitmoji.dev
|
|
241
|
+
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
242
|
+
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
243
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.144-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
244
|
+
[🔐security]: https://github.com/structuredmerge/structuredmerge-ruby/blob/main/SECURITY.md
|
|
245
|
+
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
246
|
+
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
|
247
|
+
[📄license]: LICENSE.md
|
|
248
|
+
[📄license-ref]: https://github.com/structuredmerge/structuredmerge-ruby/blob/main/MIT.md
|
|
249
|
+
[📄license-img]: https://img.shields.io/badge/License-MIT-259D6C.svg
|
|
250
|
+
[📄license-compat]: https://www.apache.org/legal/resolved.html#category-a
|
|
251
|
+
[📄license-compat-img]: https://img.shields.io/badge/Apache_Compatible:_Category_A-%E2%9C%93-259D6C.svg?style=flat&logo=Apache
|
|
252
|
+
[📄ilo-declaration]: https://www.ilo.org/declaration/lang--en/index.htm
|
|
253
|
+
[📄ilo-declaration-img]: https://img.shields.io/badge/ILO_Fundamental_Principles-✓-259D6C.svg?style=flat
|
|
254
|
+
[🚎yard-current]: http://rubydoc.info/gems/html-merge
|
|
255
|
+
[🚎yard-head]: https://html-merge.galtzo.com
|
|
256
|
+
[💎stone_checksums]: https://github.com/galtzo-floss/stone_checksums
|
|
257
|
+
[💎SHA_checksums]: https://gitlab.com/structuredmerge/structuredmerge-ruby/-/tree/main/checksums
|
|
258
|
+
[💎rlts]: https://github.com/rubocop-lts/rubocop-lts
|
|
259
|
+
[💎rlts-img]: https://img.shields.io/badge/code_style_&_linting-rubocop--lts-34495e.svg?plastic&logo=ruby&logoColor=white
|
|
260
|
+
[💎appraisal2]: https://github.com/appraisal-rb/appraisal2
|
|
261
|
+
[💎appraisal2-img]: https://img.shields.io/badge/appraised_by-appraisal2-34495e.svg?plastic&logo=ruby&logoColor=white
|
|
262
|
+
[💎d-in-dvcs]: https://railsbling.com/posts/dvcs/put_the_d_in_dvcs/
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "ast/crispr"
|
|
4
|
+
|
|
5
|
+
module Html
|
|
6
|
+
module Merge
|
|
7
|
+
class CrisprAdapter
|
|
8
|
+
Location = Struct.new(:start_line, :end_line, keyword_init: true)
|
|
9
|
+
Owner = Struct.new(:node, :type, :text, :location, keyword_init: true)
|
|
10
|
+
|
|
11
|
+
def read_ast(document)
|
|
12
|
+
result = Html::Merge.parse_html(document.content)
|
|
13
|
+
unless result.fetch(:ok)
|
|
14
|
+
raise Ast::Crispr::Error.new(
|
|
15
|
+
"Unable to parse HTML for CRISPR",
|
|
16
|
+
details: { source_label: document.source_label, diagnostics: result.fetch(:diagnostics) }
|
|
17
|
+
)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
result
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def structural_owners(document, owner_scope: :html_element)
|
|
24
|
+
unless owner_scope.to_sym == :html_element
|
|
25
|
+
raise Ast::Crispr::Error.new("Unsupported HTML CRISPR owner scope",
|
|
26
|
+
details: { owner_scope: owner_scope })
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
root = Html::Merge.html_root_node(document.content)
|
|
30
|
+
owners = []
|
|
31
|
+
Html::Merge.visit_html_node(root) do |node|
|
|
32
|
+
next unless node.structural?
|
|
33
|
+
next unless node.type == "element"
|
|
34
|
+
|
|
35
|
+
span = Html::Merge.html_node_span(node)
|
|
36
|
+
owners << Owner.new(
|
|
37
|
+
node: node,
|
|
38
|
+
type: node.type,
|
|
39
|
+
text: node.text.to_s,
|
|
40
|
+
location: Location.new(start_line: span.fetch(:start_line), end_line: span.fetch(:end_line))
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
owners
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def comment_regions_for(_document, _owner, region: :leading, owner_scope: :html_element)
|
|
47
|
+
raise Ast::Crispr::Error.new(
|
|
48
|
+
"HTML CRISPR comment regions are not implemented",
|
|
49
|
+
details: { region: region, owner_scope: owner_scope }
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def comment_region_text(_document, _comment_region)
|
|
54
|
+
raise Ast::Crispr::Error, "HTML CRISPR comment regions are not implemented"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def structure_profile(owner_scope: :html_element)
|
|
58
|
+
Ast::Crispr::StructureProfile.new(
|
|
59
|
+
owner_scope: owner_scope,
|
|
60
|
+
owner_selector: :html_element,
|
|
61
|
+
metadata: { source: :html_merge }
|
|
62
|
+
)
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Html
|
|
4
|
+
module Merge
|
|
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
|
data/lib/html/merge.rb
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "version_gem"
|
|
4
|
+
|
|
5
|
+
require "tree_haver"
|
|
6
|
+
require "ast/merge"
|
|
7
|
+
require_relative "merge/version"
|
|
8
|
+
|
|
9
|
+
module Html
|
|
10
|
+
module Merge
|
|
11
|
+
PACKAGE_NAME = "html-merge"
|
|
12
|
+
BACKEND_REFERENCE = TreeHaver::KREUZBERG_LANGUAGE_PACK_BACKEND
|
|
13
|
+
BACKEND_REGISTRY = Struct.new(:registered, :mutex).new(false, Mutex.new)
|
|
14
|
+
|
|
15
|
+
class Error < Ast::Merge::Error; end
|
|
16
|
+
class ParseError < Ast::Merge::ParseError; end
|
|
17
|
+
|
|
18
|
+
autoload :CrisprAdapter, "html/merge/crispr_adapter"
|
|
19
|
+
|
|
20
|
+
module_function
|
|
21
|
+
|
|
22
|
+
def register_backend!
|
|
23
|
+
BACKEND_REGISTRY.mutex.synchronize do
|
|
24
|
+
return if BACKEND_REGISTRY.registered
|
|
25
|
+
|
|
26
|
+
TreeHaver::BackendRegistry.register(BACKEND_REFERENCE)
|
|
27
|
+
|
|
28
|
+
grammar_finder = TreeHaver::GrammarFinder.new(:html)
|
|
29
|
+
grammar_finder.register! if grammar_finder.available?
|
|
30
|
+
|
|
31
|
+
BACKEND_REGISTRY.registered = true
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def html_feature_profile
|
|
36
|
+
{
|
|
37
|
+
family: "html",
|
|
38
|
+
supported_dialects: ["html"],
|
|
39
|
+
supported_policies: []
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def available_html_backends
|
|
44
|
+
html_backend_available_for_analysis?(BACKEND_REFERENCE.id) ? [BACKEND_REFERENCE] : []
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def html_backend_feature_profile(backend: nil)
|
|
48
|
+
requested = requested_html_backend_id(backend)
|
|
49
|
+
unless available_html_backends.any? { |backend_ref| backend_ref.id == requested }
|
|
50
|
+
return unsupported_feature_result("Unsupported HTML backend #{requested}.")
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
html_feature_profile.merge(
|
|
54
|
+
backend: requested,
|
|
55
|
+
backend_ref: BACKEND_REFERENCE.to_h
|
|
56
|
+
)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def html_plan_context(backend: nil)
|
|
60
|
+
profile = html_backend_feature_profile(backend: backend)
|
|
61
|
+
return profile if profile[:ok] == false
|
|
62
|
+
|
|
63
|
+
{
|
|
64
|
+
family_profile: html_feature_profile,
|
|
65
|
+
feature_profile: {
|
|
66
|
+
backend: profile[:backend],
|
|
67
|
+
supports_dialects: false,
|
|
68
|
+
supported_policies: profile[:supported_policies]
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def parse_html(source, dialect = "html", backend: nil)
|
|
74
|
+
return unsupported_feature_result("Unsupported HTML dialect #{dialect}.") unless dialect.to_s == "html"
|
|
75
|
+
|
|
76
|
+
requested = requested_html_backend_id(backend)
|
|
77
|
+
unless available_html_backends.any? { |backend_ref| backend_ref.id == requested }
|
|
78
|
+
return unsupported_feature_result("Unsupported HTML backend #{requested}.")
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
register_backend!
|
|
82
|
+
tree = TreeHaver.with_backend(requested) { TreeHaver.parser_for(:html).parse(source.to_s) }
|
|
83
|
+
root = tree.root_node
|
|
84
|
+
diagnostics = html_parse_error_nodes(root).map do |node|
|
|
85
|
+
{
|
|
86
|
+
severity: "error",
|
|
87
|
+
category: "parse_error",
|
|
88
|
+
message: "HTML parse error in #{node.type}",
|
|
89
|
+
span: html_node_span(node)
|
|
90
|
+
}
|
|
91
|
+
end
|
|
92
|
+
return { ok: false, diagnostics: diagnostics, policies: [] } unless diagnostics.empty?
|
|
93
|
+
|
|
94
|
+
{
|
|
95
|
+
ok: true,
|
|
96
|
+
diagnostics: [],
|
|
97
|
+
analysis: {
|
|
98
|
+
dialect: "html",
|
|
99
|
+
root_kind: root.type,
|
|
100
|
+
nodes: html_node_summaries(root)
|
|
101
|
+
},
|
|
102
|
+
policies: []
|
|
103
|
+
}
|
|
104
|
+
rescue TreeHaver::Error, StandardError => e
|
|
105
|
+
{
|
|
106
|
+
ok: false,
|
|
107
|
+
diagnostics: [{
|
|
108
|
+
severity: "error",
|
|
109
|
+
category: "parse_error",
|
|
110
|
+
message: e.message
|
|
111
|
+
}],
|
|
112
|
+
policies: []
|
|
113
|
+
}
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
def html_root_node(source, backend: nil)
|
|
117
|
+
requested = requested_html_backend_id(backend)
|
|
118
|
+
register_backend!
|
|
119
|
+
TreeHaver.with_backend(requested) { TreeHaver.parser_for(:html).parse(source.to_s).root_node }
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
def html_node_summaries(root)
|
|
123
|
+
nodes = []
|
|
124
|
+
visit_html_node(root) do |node|
|
|
125
|
+
next unless node.structural?
|
|
126
|
+
|
|
127
|
+
nodes << {
|
|
128
|
+
type: node.type,
|
|
129
|
+
span: html_node_span(node),
|
|
130
|
+
text: node.text.to_s.strip[0, 120]
|
|
131
|
+
}
|
|
132
|
+
end
|
|
133
|
+
nodes
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
def html_parse_error_nodes(root)
|
|
137
|
+
errors = []
|
|
138
|
+
visit_html_node(root) do |node|
|
|
139
|
+
errors << node if node.has_error? || node.type == "ERROR"
|
|
140
|
+
end
|
|
141
|
+
errors
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
def visit_html_node(node, &block)
|
|
145
|
+
yield node
|
|
146
|
+
node.child_count.times do |index|
|
|
147
|
+
child = node.child(index)
|
|
148
|
+
visit_html_node(child, &block) if child
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
def html_node_span(node)
|
|
153
|
+
start_point = html_point(html_raw_point(node, :start))
|
|
154
|
+
end_point = html_point(html_raw_point(node, :end))
|
|
155
|
+
{
|
|
156
|
+
start_byte: node.start_byte,
|
|
157
|
+
end_byte: node.end_byte,
|
|
158
|
+
start_line: start_point.fetch(:row) + 1,
|
|
159
|
+
end_line: end_point.fetch(:row) + 1,
|
|
160
|
+
start_column: start_point.fetch(:column),
|
|
161
|
+
end_column: end_point.fetch(:column)
|
|
162
|
+
}
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
def html_raw_point(node, boundary)
|
|
166
|
+
raw_node = node.respond_to?(:inner_node) ? node.inner_node : node
|
|
167
|
+
methods = boundary == :start ? %i[start_point start_position] : %i[end_point end_position]
|
|
168
|
+
methods.each do |method_name|
|
|
169
|
+
return raw_node.public_send(method_name) if raw_node.respond_to?(method_name)
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
node.public_send(methods.first)
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
def html_point(point)
|
|
176
|
+
return { row: point.row, column: point.column } if point.respond_to?(:row) && point.respond_to?(:column)
|
|
177
|
+
|
|
178
|
+
return { row: point[:row], column: point[:column] } if point.respond_to?(:[])
|
|
179
|
+
|
|
180
|
+
raise Error, "Unsupported TreeHaver point #{point.inspect}"
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
def html_backend_available_for_analysis?(backend_id)
|
|
184
|
+
requested = requested_html_backend_id(backend_id)
|
|
185
|
+
register_backend!
|
|
186
|
+
TreeHaver.with_backend(requested) { TreeHaver.parser_for(:html).respond_to?(:parse) }
|
|
187
|
+
rescue TreeHaver::Error, StandardError
|
|
188
|
+
false
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
def requested_html_backend_id(backend)
|
|
192
|
+
backend.to_s.empty? ? BACKEND_REFERENCE.id : backend.to_s
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
def unsupported_feature_result(message)
|
|
196
|
+
{
|
|
197
|
+
ok: false,
|
|
198
|
+
diagnostics: [{
|
|
199
|
+
severity: "error",
|
|
200
|
+
category: "unsupported_feature",
|
|
201
|
+
message: message
|
|
202
|
+
}],
|
|
203
|
+
policies: []
|
|
204
|
+
}
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
def document_context(content:, source_label: "source")
|
|
208
|
+
require "ast/crispr"
|
|
209
|
+
|
|
210
|
+
Ast::Crispr::DocumentContext.new(
|
|
211
|
+
content: content,
|
|
212
|
+
source_label: source_label,
|
|
213
|
+
adapter: CrisprAdapter.new
|
|
214
|
+
)
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
def element_text_selector(text:, id: nil)
|
|
218
|
+
require "ast/crispr"
|
|
219
|
+
|
|
220
|
+
Ast::Crispr::Selectors.owner_filter(
|
|
221
|
+
id: id || "html_element_text:#{text}",
|
|
222
|
+
adapter: CrisprAdapter.new,
|
|
223
|
+
owner_scope: :html_element
|
|
224
|
+
) do |_context, owner|
|
|
225
|
+
owner.type == "element" &&
|
|
226
|
+
owner.text.include?(text.to_s) &&
|
|
227
|
+
!html_descendant_element_text?(owner.node, text.to_s)
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
def html_descendant_element_text?(node, text)
|
|
232
|
+
node.child_count.times.any? do |index|
|
|
233
|
+
child = node.child(index)
|
|
234
|
+
next false unless child
|
|
235
|
+
|
|
236
|
+
(child.type == "element" && child.text.include?(text)) || html_descendant_element_text?(child, text)
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
def ensure_yard_content_wrapper(source)
|
|
241
|
+
require "ast/crispr"
|
|
242
|
+
|
|
243
|
+
replacement = %(<div id="content"><h1 class="noborder title">Documentation by YARD</h1></div>\n)
|
|
244
|
+
target = element_text_selector(text: "Documentation by YARD", id: "yard_title_element")
|
|
245
|
+
actor = Ast::Crispr::Replace.result(content: source.to_s, target: target, replacement: replacement)
|
|
246
|
+
if actor.failure?
|
|
247
|
+
raise Error, actor.respond_to?(:error) ? actor.error.to_s : "HTML CRISPR replacement failed"
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
actor.updated_content
|
|
251
|
+
end
|
|
252
|
+
end
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
Html::Merge::Version.class_eval do
|
|
256
|
+
extend VersionGem::Basic
|
|
257
|
+
end
|
data/sig/html/merge.rbs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module Html
|
|
2
|
+
module Merge
|
|
3
|
+
VERSION: String
|
|
4
|
+
module Version
|
|
5
|
+
VERSION: String
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def self.register_backend!: () -> nil
|
|
9
|
+
def self.html_feature_profile: () -> Hash[Symbol, untyped]
|
|
10
|
+
def self.available_html_backends: () -> Array[untyped]
|
|
11
|
+
def self.html_backend_feature_profile: (?backend: untyped) -> Hash[Symbol, untyped]
|
|
12
|
+
def self.html_plan_context: (?backend: untyped) -> Hash[Symbol, untyped]
|
|
13
|
+
def self.parse_html: (String source, ?String dialect, ?backend: untyped) -> Hash[Symbol, untyped]
|
|
14
|
+
def self.document_context: (content: String, ?source_label: String) -> untyped
|
|
15
|
+
def self.element_text_selector: (text: String, ?id: String?) -> untyped
|
|
16
|
+
def self.ensure_yard_content_wrapper: (String source) -> String
|
|
17
|
+
end
|
|
18
|
+
end
|
data.tar.gz.sig
ADDED
|
Binary file
|
metadata
ADDED
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: html-merge
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 7.1.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Peter H. Boling
|
|
8
|
+
bindir: exe
|
|
9
|
+
cert_chain:
|
|
10
|
+
- |
|
|
11
|
+
-----BEGIN CERTIFICATE-----
|
|
12
|
+
MIIEgDCCAuigAwIBAgIBATANBgkqhkiG9w0BAQsFADBDMRUwEwYDVQQDDAxwZXRl
|
|
13
|
+
ci5ib2xpbmcxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkW
|
|
14
|
+
A2NvbTAeFw0yNTA1MDQxNTMzMDlaFw00NTA0MjkxNTMzMDlaMEMxFTATBgNVBAMM
|
|
15
|
+
DHBldGVyLmJvbGluZzEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPy
|
|
16
|
+
LGQBGRYDY29tMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAruUoo0WA
|
|
17
|
+
uoNuq6puKWYeRYiZekz/nsDeK5x/0IEirzcCEvaHr3Bmz7rjo1I6On3gGKmiZs61
|
|
18
|
+
LRmQ3oxy77ydmkGTXBjruJB+pQEn7UfLSgQ0xa1/X3kdBZt6RmabFlBxnHkoaGY5
|
|
19
|
+
mZuZ5+Z7walmv6sFD9ajhzj+oIgwWfnEHkXYTR8I6VLN7MRRKGMPoZ/yvOmxb2DN
|
|
20
|
+
coEEHWKO9CvgYpW7asIihl/9GMpKiRkcYPm9dGQzZc6uTwom1COfW0+ZOFrDVBuV
|
|
21
|
+
FMQRPswZcY4Wlq0uEBLPU7hxnCL9nKK6Y9IhdDcz1mY6HZ91WImNslOSI0S8hRpj
|
|
22
|
+
yGOWxQIhBT3fqCBlRIqFQBudrnD9jSNpSGsFvbEijd5ns7Z9ZMehXkXDycpGAUj1
|
|
23
|
+
to/5cuTWWw1JqUWrKJYoifnVhtE1o1DZ+LkPtWxHtz5kjDG/zR3MG0Ula0UOavlD
|
|
24
|
+
qbnbcXPBnwXtTFeZ3C+yrWpE4pGnl3yGkZj9SMTlo9qnTMiPmuWKQDatAgMBAAGj
|
|
25
|
+
fzB9MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQE8uWvNbPVNRXZ
|
|
26
|
+
HlgPbc2PCzC4bjAhBgNVHREEGjAYgRZwZXRlci5ib2xpbmdAZ21haWwuY29tMCEG
|
|
27
|
+
A1UdEgQaMBiBFnBldGVyLmJvbGluZ0BnbWFpbC5jb20wDQYJKoZIhvcNAQELBQAD
|
|
28
|
+
ggGBAJbnUwfJQFPkBgH9cL7hoBfRtmWiCvdqdjeTmi04u8zVNCUox0A4gT982DE9
|
|
29
|
+
wmuN12LpdajxZONqbXuzZvc+nb0StFwmFYZG6iDwaf4BPywm2e/Vmq0YG45vZXGR
|
|
30
|
+
L8yMDSK1cQXjmA+ZBKOHKWavxP6Vp7lWvjAhz8RFwqF9GuNIdhv9NpnCAWcMZtpm
|
|
31
|
+
GUPyIWw/Cw/2wZp74QzZj6Npx+LdXoLTF1HMSJXZ7/pkxLCsB8m4EFVdb/IrW/0k
|
|
32
|
+
kNSfjtAfBHO8nLGuqQZVH9IBD1i9K6aSs7pT6TW8itXUIlkIUI2tg5YzW6OFfPzq
|
|
33
|
+
QekSkX3lZfY+HTSp/o+YvKkqWLUV7PQ7xh1ZYDtocpaHwgxe/j3bBqHE+CUPH2vA
|
|
34
|
+
0V/FwdTRWcwsjVoOJTrYcff8pBZ8r2MvtAc54xfnnhGFzeRHfcltobgFxkAXdE6p
|
|
35
|
+
DVjBtqT23eugOqQ73umLcYDZkc36vnqGxUBSsXrzY9pzV5gGr2I8YUxMqf6ATrZt
|
|
36
|
+
L9nRqA==
|
|
37
|
+
-----END CERTIFICATE-----
|
|
38
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
39
|
+
dependencies:
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: ast-crispr
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - '='
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: 7.1.1
|
|
47
|
+
type: :runtime
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - '='
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: 7.1.1
|
|
54
|
+
- !ruby/object:Gem::Dependency
|
|
55
|
+
name: ast-merge
|
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
|
57
|
+
requirements:
|
|
58
|
+
- - '='
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: 7.1.1
|
|
61
|
+
type: :runtime
|
|
62
|
+
prerelease: false
|
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
64
|
+
requirements:
|
|
65
|
+
- - '='
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: 7.1.1
|
|
68
|
+
- !ruby/object:Gem::Dependency
|
|
69
|
+
name: tree_haver
|
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
|
71
|
+
requirements:
|
|
72
|
+
- - '='
|
|
73
|
+
- !ruby/object:Gem::Version
|
|
74
|
+
version: 7.1.1
|
|
75
|
+
type: :runtime
|
|
76
|
+
prerelease: false
|
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
78
|
+
requirements:
|
|
79
|
+
- - '='
|
|
80
|
+
- !ruby/object:Gem::Version
|
|
81
|
+
version: 7.1.1
|
|
82
|
+
- !ruby/object:Gem::Dependency
|
|
83
|
+
name: version_gem
|
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
|
85
|
+
requirements:
|
|
86
|
+
- - "~>"
|
|
87
|
+
- !ruby/object:Gem::Version
|
|
88
|
+
version: '1.1'
|
|
89
|
+
- - ">="
|
|
90
|
+
- !ruby/object:Gem::Version
|
|
91
|
+
version: 1.1.15
|
|
92
|
+
type: :runtime
|
|
93
|
+
prerelease: false
|
|
94
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
95
|
+
requirements:
|
|
96
|
+
- - "~>"
|
|
97
|
+
- !ruby/object:Gem::Version
|
|
98
|
+
version: '1.1'
|
|
99
|
+
- - ">="
|
|
100
|
+
- !ruby/object:Gem::Version
|
|
101
|
+
version: 1.1.15
|
|
102
|
+
- !ruby/object:Gem::Dependency
|
|
103
|
+
name: kettle-dev
|
|
104
|
+
requirement: !ruby/object:Gem::Requirement
|
|
105
|
+
requirements:
|
|
106
|
+
- - "~>"
|
|
107
|
+
- !ruby/object:Gem::Version
|
|
108
|
+
version: '2.5'
|
|
109
|
+
- - ">="
|
|
110
|
+
- !ruby/object:Gem::Version
|
|
111
|
+
version: 2.5.24
|
|
112
|
+
type: :development
|
|
113
|
+
prerelease: false
|
|
114
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
115
|
+
requirements:
|
|
116
|
+
- - "~>"
|
|
117
|
+
- !ruby/object:Gem::Version
|
|
118
|
+
version: '2.5'
|
|
119
|
+
- - ">="
|
|
120
|
+
- !ruby/object:Gem::Version
|
|
121
|
+
version: 2.5.24
|
|
122
|
+
- !ruby/object:Gem::Dependency
|
|
123
|
+
name: bundler-audit
|
|
124
|
+
requirement: !ruby/object:Gem::Requirement
|
|
125
|
+
requirements:
|
|
126
|
+
- - "~>"
|
|
127
|
+
- !ruby/object:Gem::Version
|
|
128
|
+
version: 0.9.3
|
|
129
|
+
type: :development
|
|
130
|
+
prerelease: false
|
|
131
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
132
|
+
requirements:
|
|
133
|
+
- - "~>"
|
|
134
|
+
- !ruby/object:Gem::Version
|
|
135
|
+
version: 0.9.3
|
|
136
|
+
- !ruby/object:Gem::Dependency
|
|
137
|
+
name: rake
|
|
138
|
+
requirement: !ruby/object:Gem::Requirement
|
|
139
|
+
requirements:
|
|
140
|
+
- - "~>"
|
|
141
|
+
- !ruby/object:Gem::Version
|
|
142
|
+
version: '13.0'
|
|
143
|
+
type: :development
|
|
144
|
+
prerelease: false
|
|
145
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
146
|
+
requirements:
|
|
147
|
+
- - "~>"
|
|
148
|
+
- !ruby/object:Gem::Version
|
|
149
|
+
version: '13.0'
|
|
150
|
+
- !ruby/object:Gem::Dependency
|
|
151
|
+
name: require_bench
|
|
152
|
+
requirement: !ruby/object:Gem::Requirement
|
|
153
|
+
requirements:
|
|
154
|
+
- - "~>"
|
|
155
|
+
- !ruby/object:Gem::Version
|
|
156
|
+
version: '1.0'
|
|
157
|
+
- - ">="
|
|
158
|
+
- !ruby/object:Gem::Version
|
|
159
|
+
version: 1.0.4
|
|
160
|
+
type: :development
|
|
161
|
+
prerelease: false
|
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
163
|
+
requirements:
|
|
164
|
+
- - "~>"
|
|
165
|
+
- !ruby/object:Gem::Version
|
|
166
|
+
version: '1.0'
|
|
167
|
+
- - ">="
|
|
168
|
+
- !ruby/object:Gem::Version
|
|
169
|
+
version: 1.0.4
|
|
170
|
+
- !ruby/object:Gem::Dependency
|
|
171
|
+
name: anonymous_loader
|
|
172
|
+
requirement: !ruby/object:Gem::Requirement
|
|
173
|
+
requirements:
|
|
174
|
+
- - "~>"
|
|
175
|
+
- !ruby/object:Gem::Version
|
|
176
|
+
version: '0.1'
|
|
177
|
+
- - ">="
|
|
178
|
+
- !ruby/object:Gem::Version
|
|
179
|
+
version: 0.1.3
|
|
180
|
+
type: :development
|
|
181
|
+
prerelease: false
|
|
182
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
183
|
+
requirements:
|
|
184
|
+
- - "~>"
|
|
185
|
+
- !ruby/object:Gem::Version
|
|
186
|
+
version: '0.1'
|
|
187
|
+
- - ">="
|
|
188
|
+
- !ruby/object:Gem::Version
|
|
189
|
+
version: 0.1.3
|
|
190
|
+
- !ruby/object:Gem::Dependency
|
|
191
|
+
name: appraisal2
|
|
192
|
+
requirement: !ruby/object:Gem::Requirement
|
|
193
|
+
requirements:
|
|
194
|
+
- - "~>"
|
|
195
|
+
- !ruby/object:Gem::Version
|
|
196
|
+
version: '3.2'
|
|
197
|
+
- - ">="
|
|
198
|
+
- !ruby/object:Gem::Version
|
|
199
|
+
version: 3.2.2
|
|
200
|
+
type: :development
|
|
201
|
+
prerelease: false
|
|
202
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
203
|
+
requirements:
|
|
204
|
+
- - "~>"
|
|
205
|
+
- !ruby/object:Gem::Version
|
|
206
|
+
version: '3.2'
|
|
207
|
+
- - ">="
|
|
208
|
+
- !ruby/object:Gem::Version
|
|
209
|
+
version: 3.2.2
|
|
210
|
+
- !ruby/object:Gem::Dependency
|
|
211
|
+
name: kettle-test
|
|
212
|
+
requirement: !ruby/object:Gem::Requirement
|
|
213
|
+
requirements:
|
|
214
|
+
- - "~>"
|
|
215
|
+
- !ruby/object:Gem::Version
|
|
216
|
+
version: '2.0'
|
|
217
|
+
- - ">="
|
|
218
|
+
- !ruby/object:Gem::Version
|
|
219
|
+
version: 2.0.19
|
|
220
|
+
type: :development
|
|
221
|
+
prerelease: false
|
|
222
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
223
|
+
requirements:
|
|
224
|
+
- - "~>"
|
|
225
|
+
- !ruby/object:Gem::Version
|
|
226
|
+
version: '2.0'
|
|
227
|
+
- - ">="
|
|
228
|
+
- !ruby/object:Gem::Version
|
|
229
|
+
version: 2.0.19
|
|
230
|
+
- !ruby/object:Gem::Dependency
|
|
231
|
+
name: turbo_tests2
|
|
232
|
+
requirement: !ruby/object:Gem::Requirement
|
|
233
|
+
requirements:
|
|
234
|
+
- - "~>"
|
|
235
|
+
- !ruby/object:Gem::Version
|
|
236
|
+
version: '3.2'
|
|
237
|
+
- - ">="
|
|
238
|
+
- !ruby/object:Gem::Version
|
|
239
|
+
version: 3.2.4
|
|
240
|
+
type: :development
|
|
241
|
+
prerelease: false
|
|
242
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
243
|
+
requirements:
|
|
244
|
+
- - "~>"
|
|
245
|
+
- !ruby/object:Gem::Version
|
|
246
|
+
version: '3.2'
|
|
247
|
+
- - ">="
|
|
248
|
+
- !ruby/object:Gem::Version
|
|
249
|
+
version: 3.2.4
|
|
250
|
+
- !ruby/object:Gem::Dependency
|
|
251
|
+
name: ruby-progressbar
|
|
252
|
+
requirement: !ruby/object:Gem::Requirement
|
|
253
|
+
requirements:
|
|
254
|
+
- - "~>"
|
|
255
|
+
- !ruby/object:Gem::Version
|
|
256
|
+
version: '1.13'
|
|
257
|
+
type: :development
|
|
258
|
+
prerelease: false
|
|
259
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
260
|
+
requirements:
|
|
261
|
+
- - "~>"
|
|
262
|
+
- !ruby/object:Gem::Version
|
|
263
|
+
version: '1.13'
|
|
264
|
+
- !ruby/object:Gem::Dependency
|
|
265
|
+
name: stone_checksums
|
|
266
|
+
requirement: !ruby/object:Gem::Requirement
|
|
267
|
+
requirements:
|
|
268
|
+
- - "~>"
|
|
269
|
+
- !ruby/object:Gem::Version
|
|
270
|
+
version: '1.0'
|
|
271
|
+
- - ">="
|
|
272
|
+
- !ruby/object:Gem::Version
|
|
273
|
+
version: 1.0.8
|
|
274
|
+
type: :development
|
|
275
|
+
prerelease: false
|
|
276
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
277
|
+
requirements:
|
|
278
|
+
- - "~>"
|
|
279
|
+
- !ruby/object:Gem::Version
|
|
280
|
+
version: '1.0'
|
|
281
|
+
- - ">="
|
|
282
|
+
- !ruby/object:Gem::Version
|
|
283
|
+
version: 1.0.8
|
|
284
|
+
- !ruby/object:Gem::Dependency
|
|
285
|
+
name: gitmoji-regex
|
|
286
|
+
requirement: !ruby/object:Gem::Requirement
|
|
287
|
+
requirements:
|
|
288
|
+
- - "~>"
|
|
289
|
+
- !ruby/object:Gem::Version
|
|
290
|
+
version: '2.0'
|
|
291
|
+
- - ">="
|
|
292
|
+
- !ruby/object:Gem::Version
|
|
293
|
+
version: 2.0.11
|
|
294
|
+
type: :development
|
|
295
|
+
prerelease: false
|
|
296
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
297
|
+
requirements:
|
|
298
|
+
- - "~>"
|
|
299
|
+
- !ruby/object:Gem::Version
|
|
300
|
+
version: '2.0'
|
|
301
|
+
- - ">="
|
|
302
|
+
- !ruby/object:Gem::Version
|
|
303
|
+
version: 2.0.11
|
|
304
|
+
description: "\U0001F48E Parser-backed HTML analysis and merge primitives for Structured
|
|
305
|
+
Merge."
|
|
306
|
+
email:
|
|
307
|
+
- floss@galtzo.com
|
|
308
|
+
executables: []
|
|
309
|
+
extensions: []
|
|
310
|
+
extra_rdoc_files: []
|
|
311
|
+
files:
|
|
312
|
+
- LICENSE.md
|
|
313
|
+
- README.md
|
|
314
|
+
- lib/html/merge.rb
|
|
315
|
+
- lib/html/merge/crispr_adapter.rb
|
|
316
|
+
- lib/html/merge/version.rb
|
|
317
|
+
- sig/html/merge.rbs
|
|
318
|
+
homepage: https://github.com/structuredmerge/structuredmerge-ruby
|
|
319
|
+
licenses:
|
|
320
|
+
- MIT
|
|
321
|
+
metadata:
|
|
322
|
+
homepage_uri: https://structuredmerge.org
|
|
323
|
+
source_code_uri: https://github.com/structuredmerge/structuredmerge-ruby/tree/v7.1.1
|
|
324
|
+
changelog_uri: https://github.com/structuredmerge/structuredmerge-ruby/blob/v7.1.1/CHANGELOG.md
|
|
325
|
+
bug_tracker_uri: https://github.com/structuredmerge/structuredmerge-ruby/issues
|
|
326
|
+
documentation_uri: https://www.rubydoc.info/gems/html-merge/7.1.1
|
|
327
|
+
funding_uri: https://github.com/sponsors/pboling
|
|
328
|
+
wiki_uri: https://github.com/structuredmerge/structuredmerge-ruby/wiki
|
|
329
|
+
news_uri: https://www.railsbling.com/tags/html-merge
|
|
330
|
+
discord_uri: https://discord.gg/3qme4XHNKN
|
|
331
|
+
mailing_list_uri: https://www.rubyforum.org/tag/structuredmerge
|
|
332
|
+
rubygems_mfa_required: 'true'
|
|
333
|
+
rdoc_options:
|
|
334
|
+
- "--title"
|
|
335
|
+
- "html-merge - \U0001F48E Structured Merge HTML analysis for Ruby"
|
|
336
|
+
- "--main"
|
|
337
|
+
- README.md
|
|
338
|
+
- "--exclude"
|
|
339
|
+
- "^sig/"
|
|
340
|
+
- "--line-numbers"
|
|
341
|
+
- "--inline-source"
|
|
342
|
+
- "--quiet"
|
|
343
|
+
require_paths:
|
|
344
|
+
- lib
|
|
345
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
346
|
+
requirements:
|
|
347
|
+
- - ">="
|
|
348
|
+
- !ruby/object:Gem::Version
|
|
349
|
+
version: 3.2.0
|
|
350
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
351
|
+
requirements:
|
|
352
|
+
- - ">="
|
|
353
|
+
- !ruby/object:Gem::Version
|
|
354
|
+
version: '0'
|
|
355
|
+
requirements: []
|
|
356
|
+
rubygems_version: 4.0.17
|
|
357
|
+
specification_version: 4
|
|
358
|
+
summary: "\U0001F48E Structured Merge HTML analysis for Ruby"
|
|
359
|
+
test_files: []
|
metadata.gz.sig
ADDED
|
Binary file
|