tree_haver 7.1.19 → 7.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6320e925decf598268d0ad5fb3788e8f95d6a230dd37b5488187960f797736a8
4
- data.tar.gz: ae17756e08750b525ceb387a22e3b6e4276aff33f35054e0643948b3f4462a13
3
+ metadata.gz: f934d70b4df97a3c5c96c140c278d84cfe924b6148a03c51b85ee99bf1ad7fe1
4
+ data.tar.gz: 6bfb186e23db0d33eae49f0ba03e6a283f9696345765a067a1bd428ab34186c8
5
5
  SHA512:
6
- metadata.gz: f8e0da82e5e8355509023ebe2fd41582048adad75a8a4e2b2e407362b5eecf4d728da8a03a3f73a5cd01d8710d44dd51c60bcea8adfed0f1646ffd3c1ef35ff3
7
- data.tar.gz: 4775119ec27ea08b60affa94726aef3936f7e3700a9e919f7352accc771809e161d25411456103a6f62a10e9df8b83123af5d341e569d3c8c2e4ae5b94bfb1bc
6
+ metadata.gz: 913df54d2c26ad9c2d735157e91326b4a962569c1245f84272412e592b85cda855c118d807991c13f965f847e5573f9e5fdcdfe31cd021860d0dfdfaa54e78c9
7
+ data.tar.gz: 1f4f39a1aa1e7cbbf6584f43f8a9fbb786920a41b1b2812ce2b9e0097acfcb56bde2452e2cde87ff5fb1a514e4df7e0d894e4c3ff9272311ec07ec1ddf22a9e2
checksums.yaml.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -2,22 +2,16 @@
2
2
 
3
3
  # 🌴 TreeHaver
4
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]
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] [![CI Test Coverage][🚎2-cov-wfi]][🚎2-cov-wf]
6
6
 
7
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
8
 
9
- ---
10
-
11
9
  `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
10
 
13
11
  [![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
12
 
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>
13
+ <!-- kettle-sponsors:shields:start -->
14
+ <!-- kettle-sponsors:shields:end -->
21
15
 
22
16
  ## 🌻 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
17
 
@@ -355,48 +349,6 @@ tree-sitter is a powerful parser generator that creates incremental parsers for
355
349
  [ts-jsonc]: https://gitlab.com/WhyNotHugo/tree-sitter-jsonc
356
350
  [ts-bash]: https://github.com/tree-sitter/tree-sitter-bash
357
351
 
358
- ## 💡 Info you can shake a stick at
359
-
360
- | Tokens to Remember | [![Gem name][⛳️name-img]][⛳️gem-name] [![Gem namespace][⛳️namespace-img]][⛳️gem-namespace] |
361
- |-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
362
- | Works with MRI Ruby 4 | [![Ruby current Compat][💎ruby-c-i]][🚎11-c-wf]|
363
- | 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] |
364
- | 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] |
365
- | 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] |
366
- | 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] |
367
- | 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] |
368
- | 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] |
369
- | `...` 💖 | [![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] |
370
-
371
- ### Compatibility
372
-
373
- The gem's declared runtime compatibility floor is MRI Ruby 4.0.0+, with concordant releases of JRuby and TruffleRuby.
374
- CI workflows and Appraisals are generated for MRI Ruby 4.0.0+.
375
- The current MRI CI lane runs on Linux and macOS.
376
- The test floor is configured by `ruby.test_minimum` in `.kettle-jem.yml`.
377
- When it is higher than the runtime floor, older runtime-compatible Rubies are
378
- not covered by the generated CI or Appraisal matrix.
379
-
380
- <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>
381
-
382
- The _amazing_ test matrix is powered by the kettle-dev stack.
383
-
384
- <details markdown="1">
385
- <summary>How kettle-dev manages complexity in tests</summary>
386
-
387
- | Gem | Source | Role | Total downloads |
388
- |-----|--------|------|---------------------|
389
- | [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) |
390
- | [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) |
391
- | [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) |
392
- | [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) |
393
- | [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) |
394
- | [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) |
395
- | [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) |
396
- | [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) |
397
-
398
- </details>
399
-
400
352
  ## ✨ Installation
401
353
 
402
354
  Install the gem and add to the application's Gemfile by executing:
@@ -1771,6 +1723,48 @@ Set `TREE_HAVER_DEBUG=1` to print a dependency summary at the start of your test
1771
1723
  TREE_HAVER_DEBUG=1 bundle exec rspec
1772
1724
  ```
1773
1725
 
1726
+ ## 💡 Info you can shake a stick at
1727
+
1728
+ | Tokens to Remember | [![Gem name][⛳️name-img]][⛳️gem-name] [![Gem namespace][⛳️namespace-img]][⛳️gem-namespace] |
1729
+ |-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
1730
+ | Works with MRI Ruby 4 | [![Ruby current Compat][💎ruby-c-i]][🚎11-c-wf]|
1731
+ | 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] |
1732
+ | 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] |
1733
+ | 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] |
1734
+ | 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] |
1735
+ | 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] |
1736
+ | 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] |
1737
+ | `...` 💖 | [![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] |
1738
+
1739
+ ### Compatibility
1740
+
1741
+ The gem's declared runtime compatibility floor is MRI Ruby 4.0.0+, with concordant releases of JRuby and TruffleRuby.
1742
+ CI workflows and Appraisals are generated for MRI Ruby 4.0.0+.
1743
+ The current MRI CI lane runs on Linux and macOS.
1744
+ The test floor is configured by `ruby.test_minimum` in `.structuredmerge/kettle-jem.yml`.
1745
+ When it is higher than the runtime floor, older runtime-compatible Rubies are
1746
+ not covered by the generated CI or Appraisal matrix.
1747
+
1748
+ <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>
1749
+
1750
+ The _amazing_ test matrix is powered by the kettle-dev stack.
1751
+
1752
+ <details markdown="1">
1753
+ <summary>How kettle-dev manages complexity in tests</summary>
1754
+
1755
+ | Gem | Source | Role | Total downloads |
1756
+ |-----|--------|------|---------------------|
1757
+ | [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) |
1758
+ | [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) |
1759
+ | [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) |
1760
+ | [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) |
1761
+ | [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) |
1762
+ | [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) |
1763
+ | [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) |
1764
+ | [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) |
1765
+
1766
+ </details>
1767
+
1774
1768
  ## 🔐 Security
1775
1769
 
1776
1770
  See [SECURITY.md][🔐security].
@@ -1893,6 +1887,8 @@ If none of the available licenses suit your use case, please [contact us](mailto
1893
1887
  [👽dl-ranki]: https://img.shields.io/gem/dt/tree_haver.svg
1894
1888
  [👽version]: https://clickgems.clickhouse.com/dashboard/tree_haver
1895
1889
  [👽versioni]: https://img.shields.io/gem/v/tree_haver.svg
1890
+ [🚎2-cov-wf]: https://github.com/structuredmerge/structuredmerge-ruby/actions/workflows/coverage.yml
1891
+ [🚎2-cov-wfi]: https://github.com/structuredmerge/structuredmerge-ruby/actions/workflows/coverage.yml/badge.svg
1896
1892
  [🚎11-c-wf]: https://github.com/structuredmerge/structuredmerge-ruby/actions/workflows/current.yml
1897
1893
  [🚎11-c-wfi]: https://github.com/structuredmerge/structuredmerge-ruby/actions/workflows/current.yml/badge.svg
1898
1894
  [💎ruby-c-i]: https://img.shields.io/badge/Ruby-current-CC342D?style=for-the-badge&logo=ruby&logoColor=green
@@ -1920,7 +1916,7 @@ If none of the available licenses suit your use case, please [contact us](mailto
1920
1916
  [📌gitmoji]: https://gitmoji.dev
1921
1917
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
1922
1918
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
1923
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.000-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
1919
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-3.606-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
1924
1920
  [🔐security]: https://github.com/structuredmerge/structuredmerge-ruby/blob/main/SECURITY.md
1925
1921
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
1926
1922
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
@@ -182,7 +182,7 @@ module TreeHaver
182
182
  def text
183
183
  return '' unless source
184
184
 
185
- source[start_byte...end_byte] || ''
185
+ source.byteslice(start_byte...end_byte) || ''
186
186
  end
187
187
 
188
188
  # Get a child by field name
@@ -242,13 +242,13 @@ module TreeHaver
242
242
  @inner_node.text(@source)
243
243
  elsif @source
244
244
  # Fallback to byte extraction
245
- @source[start_byte...end_byte] || ''
245
+ @source.byteslice(start_byte...end_byte) || ''
246
246
  else
247
247
  raise TreeHaver::Error, 'Cannot extract text: backend requires source but none provided'
248
248
  end
249
249
  elsif @source
250
250
  # Fallback: extract from source using byte positions
251
- @source[start_byte...end_byte] || ''
251
+ @source.byteslice(start_byte...end_byte) || ''
252
252
  else
253
253
  raise TreeHaver::Error, 'Cannot extract text: node has no text method and no source provided'
254
254
  end
@@ -4,7 +4,7 @@ module TreeHaver
4
4
  # Version namespace for this gem.
5
5
  module Version
6
6
  # Current gem version.
7
- VERSION = '7.1.19'
7
+ VERSION = '7.1.21'
8
8
  end
9
9
  # Current gem version exposed at the traditional constant location.
10
10
  VERSION = Version::VERSION # Traditional Constant Location
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tree_haver
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.19
4
+ version: 7.1.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -76,11 +76,7 @@ dependencies:
76
76
  -
77
77
  - ~>
78
78
  - !ruby/object:Gem::Version
79
- version: "0.2"
80
- -
81
- - ">="
82
- - !ruby/object:Gem::Version
83
- version: 0.2.2
79
+ version: "0.3"
84
80
  type: :runtime
85
81
  prerelease: false
86
82
  version_requirements: !ruby/object:Gem::Requirement
@@ -88,11 +84,7 @@ dependencies:
88
84
  -
89
85
  - ~>
90
86
  - !ruby/object:Gem::Version
91
- version: "0.2"
92
- -
93
- - ">="
94
- - !ruby/object:Gem::Version
95
- version: 0.2.2
87
+ version: "0.3"
96
88
  - !ruby/object:Gem::Dependency
97
89
  name: tree_sitter_language_pack
98
90
  requirement: !ruby/object:Gem::Requirement
@@ -152,7 +144,7 @@ dependencies:
152
144
  -
153
145
  - ">="
154
146
  - !ruby/object:Gem::Version
155
- version: 3.1.31
147
+ version: 3.1.36
156
148
  type: :development
157
149
  prerelease: false
158
150
  version_requirements: !ruby/object:Gem::Requirement
@@ -164,7 +156,7 @@ dependencies:
164
156
  -
165
157
  - ">="
166
158
  - !ruby/object:Gem::Version
167
- version: 3.1.31
159
+ version: 3.1.36
168
160
  - !ruby/object:Gem::Dependency
169
161
  name: bundler-audit
170
162
  requirement: !ruby/object:Gem::Requirement
@@ -280,7 +272,7 @@ dependencies:
280
272
  -
281
273
  - ">="
282
274
  - !ruby/object:Gem::Version
283
- version: 2.0.30
275
+ version: 2.0.31
284
276
  type: :development
285
277
  prerelease: false
286
278
  version_requirements: !ruby/object:Gem::Requirement
@@ -292,7 +284,7 @@ dependencies:
292
284
  -
293
285
  - ">="
294
286
  - !ruby/object:Gem::Version
295
- version: 2.0.30
287
+ version: 2.0.31
296
288
  - !ruby/object:Gem::Dependency
297
289
  name: turbo_tests2
298
290
  requirement: !ruby/object:Gem::Requirement
@@ -467,10 +459,10 @@ licenses:
467
459
  - PolyForm-Small-Business-1.0.0
468
460
  metadata:
469
461
  homepage_uri: "https://structuredmerge.org"
470
- source_code_uri: "https://github.com/structuredmerge/structuredmerge-ruby/tree/v7.1.19"
471
- changelog_uri: "https://github.com/structuredmerge/structuredmerge-ruby/blob/v7.1.19/CHANGELOG.md"
462
+ source_code_uri: "https://github.com/structuredmerge/structuredmerge-ruby/tree/v7.1.21"
463
+ changelog_uri: "https://github.com/structuredmerge/structuredmerge-ruby/blob/v7.1.21/CHANGELOG.md"
472
464
  bug_tracker_uri: "https://github.com/structuredmerge/structuredmerge-ruby/issues"
473
- documentation_uri: "https://www.rubydoc.info/gems/tree_haver/7.1.19"
465
+ documentation_uri: "https://www.rubydoc.info/gems/tree_haver/7.1.21"
474
466
  funding_uri: "https://github.com/sponsors/pboling"
475
467
  wiki_uri: "https://github.com/structuredmerge/structuredmerge-ruby/wiki"
476
468
  news_uri: "https://www.railsbling.com/tags/tree_haver"
@@ -502,7 +494,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
502
494
  - !ruby/object:Gem::Version
503
495
  version: "0"
504
496
  requirements: []
505
- rubygems_version: 4.1.0
497
+ rubygems_version: 4.1.1
506
498
  specification_version: 4
507
499
  summary: 🌴 Structured Merge parser abstraction and process analysis for Ruby
508
500
  test_files: []
metadata.gz.sig CHANGED
Binary file