rubocop-hanami 0.2.1 → 0.2.2

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: b66d94028f3350e9dc3966897abca014e9ccad980d431858e664b43421293cd2
4
- data.tar.gz: 461f52c846ff69d42d92f1ba5e9f88259b88e32607f0f61130e0d650e359e95d
3
+ metadata.gz: 2169ce8b43d8304f184e28f0560edf76c73654542c868540f0e7fe188f6707c2
4
+ data.tar.gz: 4fc80c3fbe838ad322b042383acdfd9897380f56be6c13e46bdd5529d948f4e5
5
5
  SHA512:
6
- metadata.gz: c675f410f6986ad1f8d8cce76f009ed5bdec6b33311d1ce4d49c2f0086d301f17cd4dd1f0d93e23406edad78d90ea5429f08bb50927fc2c358e94cda0a8c9e05
7
- data.tar.gz: 83e3270654f1717d865a996e5257becb33edc829cb5ce1d8bd0722762586996465683d6d0793c0bb9246f30e0deb9ec21a79171150d1698346e3fd151eba4161
6
+ metadata.gz: 01211e396a82a31af6f12c3c76f8a4f60440942eccd1f71c19c9ce5965b7a49a0f094b554df480e4a38a795ef28e293c99060166c33edad4038ecdf4dec53fc5
7
+ data.tar.gz: 3afa6fe7bb4ada35bd5e00c0e59f15d3eef82196eb489a012ee67fb85bb4eed43ca734cadeadd1108d5dae5245f867bbd4f4f7c0ae37b14ae96b2886aa8fe7f6
data/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [v0.2.2] - 2026-11-11
11
+
12
+ ### Changed
13
+
14
+ - Moved the project and CI to [Forgejo].
15
+
10
16
  ## [v0.2.1] - 2026-10-18
11
17
 
12
18
  ### Added
@@ -77,7 +83,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
83
  `ParentClasses` names the superclasses that mark a class as a slice, `Hanami::Slice` by default.
78
84
  `RequireExport: false` lets a slice leave out `export`.
79
85
 
80
- [Unreleased]: https://github.com/aaronmallen/rubocop-hanami/compare/0.2.1...HEAD
81
- [v0.2.1]: https://github.com/aaronmallen/rubocop-hanami/releases/tag/0.2.1
82
- [v0.2.0]: https://github.com/aaronmallen/rubocop-hanami/releases/tag/0.2.0
83
- [v0.1.0]: https://github.com/aaronmallen/rubocop-hanami/releases/tag/0.1.0
86
+ [Forgejo]: https://aaronmallen.dev/aaron/rubocop-hanami
87
+ [Unreleased]: https://aaronmallen.dev/aaron/rubocop-hanami/compare/0.2.2...HEAD
88
+ [v0.2.2]: https://aaronmallen.dev/aaron/rubocop-hanami/src/tag/0.2.2
89
+ [v0.2.1]: https://aaronmallen.dev/github-archive/rubocop-hanami/releases/tag/0.2.1
90
+ [v0.2.0]: https://aaronmallen.dev/github-archive/rubocop-hanami/releases/tag/0.2.0
91
+ [v0.1.0]: https://aaronmallen.dev/github-archive/rubocop-hanami/releases/tag/0.1.0
@@ -30,9 +30,7 @@ module RuboCop
30
30
  # One index per project root, shared by every file in the run. `reads` takes a class or module
31
31
  # node and returns its Definition#reads.
32
32
  def for(root, processed_source, &reads)
33
- index = @indexes[root] ||= new(root, processed_source, reads)
34
- index.refresh
35
- index
33
+ (@indexes[root] ||= new(root, processed_source, reads)).tap(&:refresh)
36
34
  end
37
35
 
38
36
  def mtime(root, path)
@@ -75,13 +73,6 @@ module RuboCop
75
73
  end
76
74
  end
77
75
 
78
- # Every definition that inherits from `name`, at any depth.
79
- def descendants(name, seen = Set[name])
80
- @children.fetch(name, []).flat_map do |child|
81
- seen.add?(child.name) ? [child, *descendants(child.name, seen)] : []
82
- end
83
- end
84
-
85
76
  def definition(node, reads = @reads.call(node))
86
77
  name = self.class.name_of(node)
87
78
  scopes = self.class.scopes_of(node)
@@ -90,6 +81,13 @@ module RuboCop
90
81
  Definition.new(name, parents, reads)
91
82
  end
92
83
 
84
+ # Every definition that inherits from `name`, at any depth.
85
+ def descendants(name, seen = Set[name])
86
+ @children.fetch(name, []).flat_map do |child|
87
+ seen.add?(child.name) ? [child, *descendants(child.name, seen)] : []
88
+ end
89
+ end
90
+
93
91
  # Parses only the files added or touched since the last scan.
94
92
  def refresh
95
93
  now = Process.clock_gettime(Process::CLOCK_MONOTONIC)
@@ -10,7 +10,7 @@ module RuboCop
10
10
  LintRoller::About.new(
11
11
  name: "rubocop-hanami",
12
12
  version: Gem.loaded_specs["rubocop-hanami"].version.to_s,
13
- homepage: "https://github.com/aaronmallen/rubocop-hanami",
13
+ homepage: "https://aaronmallen.dev/aaron/rubocop-hanami",
14
14
  description: "A collection of RuboCop cops for Hanami.",
15
15
  )
16
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-hanami
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Allen
@@ -63,16 +63,16 @@ files:
63
63
  - lib/rubocop/cop/hanami/unwrapped_step.rb
64
64
  - lib/rubocop/hanami/class_index.rb
65
65
  - lib/rubocop/hanami/plugin.rb
66
- homepage: https://github.com/aaronmallen/rubocop-hanami
66
+ homepage: https://aaronmallen.dev/aaron/rubocop-hanami
67
67
  licenses:
68
68
  - MIT
69
69
  metadata:
70
- bug_tracker_uri: https://github.com/aaronmallen/rubocop-hanami/issues
71
- changelog_uri: https://github.com/aaronmallen/rubocop-hanami/blob/main/CHANGELOG.md
70
+ bug_tracker_uri: https://aaronmallen.dev/aaron/rubocop-hanami/issues
71
+ changelog_uri: https://aaronmallen.dev/aaron/rubocop-hanami/src/branch/main/CHANGELOG.md
72
72
  default_lint_roller_plugin: RuboCop::Hanami::Plugin
73
- homepage_uri: https://github.com/aaronmallen/rubocop-hanami
73
+ homepage_uri: https://aaronmallen.dev/aaron/rubocop-hanami
74
74
  rubygems_mfa_required: 'true'
75
- source_code_uri: https://github.com/aaronmallen/rubocop-hanami
75
+ source_code_uri: https://aaronmallen.dev/aaron/rubocop-hanami
76
76
  rdoc_options: []
77
77
  require_paths:
78
78
  - lib