crap4ruby 0.2.3 → 0.2.4

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: 365b5fb5f2ef4c7c0f38cb53afe0cc689dc11d2abdd18129927bfaedbf305430
4
- data.tar.gz: 06d039700eef30031089877bbf03823e4fbad79d882ac083a4f91cfba3e1f0fd
3
+ metadata.gz: dada0d1d790a96c73811f6970d4aca07935dff096805da03f7a1c88b915420de
4
+ data.tar.gz: 8e5c903bd1b45a6f4eea147af46669ab49a81753b90d6760e77b121c462d5983
5
5
  SHA512:
6
- metadata.gz: aded83410c9291f84556aa261d6c9a942b2a414d01b42cb1ce4a301304f9ccd1a2538d375ae6e479720d62202f4943e9de537858060838082e2f90d74e95328e
7
- data.tar.gz: 53cbeb8c9ef702dd75c63e2459ce508a9f069993f80290cd5ed2894499a6f4054be8815331c9c0643db2539613c24f1e749997588035a0896b53f61140a27c86
6
+ metadata.gz: 4d183c752379bb1e86e2e5ef1be3a9bf40767c2d4af2e1d9ed4e5eacc9afc6f904ce5a10d8f7f5aa92012ced727e7ed11803312e66054bccc6e27d28f82b1f8b
7
+ data.tar.gz: b7006ec2c0f4708a1bde7a0d8632c541cc5cc1ec42df2ebc2d31e8d053075f6d05953237bbcaf4338062619a67a92e87261aa0afd0e501ccff6f08184e702314
data/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ Version numbers follow [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.2.4] - 2026-11-13
9
+
10
+ ### Fixed
11
+
12
+ - Preserve parsing of the newest supported Ruby syntax with Prism 2.x, independently of the Ruby version running crap4ruby.
13
+
8
14
  ## [0.2.3] - 2026-11-06
9
15
 
10
16
  ### Added
@@ -68,7 +74,8 @@ Version numbers follow [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.
68
74
 
69
75
  - Split CLI execution, AST discovery, and coverage loading into smaller methods without changing their behavior or scoring rules.
70
76
 
71
- [Unreleased]: https://github.com/svyatov/crap4ruby/compare/v0.2.3...HEAD
77
+ [Unreleased]: https://github.com/svyatov/crap4ruby/compare/v0.2.4...HEAD
78
+ [0.2.4]: https://github.com/svyatov/crap4ruby/compare/v0.2.3...v0.2.4
72
79
  [0.2.3]: https://github.com/svyatov/crap4ruby/compare/v0.2.2...v0.2.3
73
80
  [0.2.2]: https://github.com/svyatov/crap4ruby/compare/v0.2.1...v0.2.2
74
81
  [0.2.1]: https://github.com/svyatov/crap4ruby/compare/v0.2.0...v0.2.1
data/README.md CHANGED
@@ -11,6 +11,8 @@ crap4ruby identifies complex, under-tested Ruby methods using the Change Risk An
11
11
 
12
12
  Ruby 3.3 or newer is required.
13
13
 
14
+ Source parsing uses the newest Ruby syntax supported by the installed Prism version, independently of the Ruby version running crap4ruby.
15
+
14
16
  ```sh
15
17
  gem install crap4ruby
16
18
  ```
@@ -53,7 +55,7 @@ Run these commands from this checkout with Ruby 3.3 or newer:
53
55
  ```sh
54
56
  bundle install
55
57
  gem build crap4ruby.gemspec
56
- gem install ./crap4ruby-0.2.3.gem
58
+ gem install ./crap4ruby-0.2.4.gem
57
59
  ```
58
60
 
59
61
  To use Bundler in the measured project, add this checkout to that project's `Gemfile`:
@@ -214,8 +216,9 @@ bundle exec rake
214
216
  bundle exec ruby -Ilib exe/crap4ruby --help
215
217
  ```
216
218
 
217
- The default task runs the tests with SimpleCov, then fails if any library method's CRAP score exceeds 10.
218
- `bundle exec rake crap` runs the same check. `bundle exec rake test` runs only the tests and coverage collection.
219
+ The default task runs RuboCop, Steep, tests with SimpleCov, the CRAP limit, YARD validation, and dependency audits.
220
+ It requires 100% typed calls and fails if any library method's CRAP score exceeds 10.
221
+ `bundle exec rake crap` runs the tests and CRAP check. `bundle exec rake test` runs only the tests and coverage collection.
219
222
  Each Rake test run discards the previous resultset so stale coverage cannot improve the score.
220
223
  Reports are written to `coverage/index.html`, `coverage/.resultset.json`, and `.metrics/crap.edn`.
221
224
 
@@ -35,7 +35,7 @@ module Crap4Ruby
35
35
  # @example Analyze a method without loading it
36
36
  # Analyzer.new.call("def eligible?(age) = age >= 18", path: "person.rb")
37
37
  def call(source, path:)
38
- result = Prism.parse(source)
38
+ result = Prism.parse(source, version: "latest")
39
39
  unless result.success?
40
40
  error = result.errors.first
41
41
  raise Error, "#{path}:#{error.location.start_line}: #{error.message}"
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Crap4Ruby
4
4
  # Gem version used by the CLI and release process.
5
- VERSION = "0.2.3"
5
+ VERSION = "0.2.4"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crap4ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leonid Svyatov