thor-completion 0.0.0 → 0.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ed6cf7a902321998969b818d34e76c6a9d076293b8da98b1d5a29c9ddc0ad59
4
- data.tar.gz: 67f58ca09b8a52fa232541b4b95fe6344baec35f34a03f27839a95f9b4960b01
3
+ metadata.gz: f3c79e30be2195c35c21530d4c302a007d40262d831d50c7026a8ddebee4b064
4
+ data.tar.gz: 61197a3c4e7dc6aaaaefbf6142d6db610a677768d8de3382a07459a62e343757
5
5
  SHA512:
6
- metadata.gz: 1c3500d2d5f4728343b6cf76d0f1073772fe06549215638c0961623949d80690e7ec0826831eab7eeedae2dffeee1beba1cdbbbf825655255d87b5230fc56c04
7
- data.tar.gz: 057db162bd7c9978c7ff471eb91e573df368e8d19efd87e571f62fe3ef46dfc5c83746867f0a415710ebcf32d47b15aed864945941f8d2e3b5c8f13e96677d4e
6
+ metadata.gz: 18c78b02ce1a05b9ca8fd5c7b1d60edd5f23253cf7ca684fe3b2bc20ef2d00639cdb54c9c7087e3e7ab4c497e313cb50063961600d13d2bb46568a95f13cf5f4
7
+ data.tar.gz: 236c05dfe69aad1b439bf204ae95cdc8e9b5cfe0fff1909f75b8ddfc2b84e0ce4eb0ee97924d43ebf36108d3c11ce18ba12063972e92d9a3d5be2f37733c9a4c
@@ -24,14 +24,13 @@ jobs:
24
24
  - Gemfile
25
25
 
26
26
  steps:
27
- - uses: actions/checkout@v4
27
+ - uses: actions/checkout@v5
28
28
 
29
- - uses: actions/cache@v5
29
+ - uses: actions/cache@v4
30
30
  with:
31
31
  path: vendor/bundle
32
32
  key: >
33
33
  ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles(matrix.gemfile) }}
34
-
35
34
  - name: Set up Ruby
36
35
  uses: ruby/setup-ruby@v1
37
36
  with:
data/.rubocop.yml CHANGED
@@ -3,7 +3,7 @@ inherit_gem:
3
3
  rubocop-fnando: .rubocop.yml
4
4
 
5
5
  AllCops:
6
- TargetRubyVersion: 3.4
6
+ TargetRubyVersion: 3.3
7
7
  NewCops: enable
8
8
  Exclude:
9
9
  - vendor/**/*
data/CHANGELOG.md CHANGED
@@ -11,6 +11,10 @@ Prefix your message with one of the following:
11
11
  - [Security] in case of vulnerabilities.
12
12
  -->
13
13
 
14
+ ## v0.0.1
15
+
16
+ - [Changed] Support ruby 3.3+.
17
+
14
18
  ## v0.0.0
15
19
 
16
20
  - Initial release.
@@ -33,7 +33,7 @@ class Thor
33
33
  cmd_schema = {
34
34
  name: command.name,
35
35
  description: command.description || "",
36
- options: command.options.each_value.flat_map { build_option(it) }
36
+ options: command.options.each_value.flat_map { build_option(_1) }
37
37
  }
38
38
 
39
39
  # Extract positional arguments from method parameters
@@ -71,7 +71,7 @@ class Thor
71
71
  subcmd_schema = {
72
72
  name: command.name,
73
73
  description: command.description || "",
74
- options: command.options.each_value.flat_map { build_option(it) }
74
+ options: command.options.each_value.flat_map { build_option(_1) }
75
75
  }
76
76
 
77
77
  # Extract positional arguments from method parameters
@@ -95,9 +95,10 @@ class Thor
95
95
  end
96
96
 
97
97
  def self.extract_arguments(method)
98
+ opts = %i[req opt rest]
98
99
  values = method
99
100
  .parameters
100
- .select {|type, _| %i[req opt rest].include?(type) } # rubocop:disable Style/HashSlice
101
+ .select {|type, _| opts.include?(type) } # rubocop:disable Style/HashSlice
101
102
 
102
103
  values.map do |type, name|
103
104
  arg_hash = {
@@ -116,11 +117,11 @@ class Thor
116
117
  end
117
118
 
118
119
  def self.build_option(option)
119
- dasherize = proc { it.to_s.tr("_", "-") }
120
+ dasherize = proc { _1.to_s.tr("_", "-") }
120
121
  name = dasherize.call(option.name)
121
122
 
122
123
  [].tap do |list|
123
- short_opts = option.aliases.map { dasherize.call(it.gsub(/^-+/, "")) }
124
+ short_opts = option.aliases.map { dasherize.call(_1.gsub(/^-+/, "")) }
124
125
  opt_hash = {
125
126
  name:,
126
127
  type: option.type.to_s,
@@ -2,6 +2,6 @@
2
2
 
3
3
  class Thor
4
4
  module Completion
5
- VERSION = "0.0.0"
5
+ VERSION = "0.0.1"
6
6
  end
7
7
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.summary = "Generate shell completions for Thor CLIs."
13
13
  spec.description = spec.summary
14
14
  spec.license = "MIT"
15
- spec.required_ruby_version = Gem::Requirement.new(">= 3.4.0")
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 3.3.0")
16
16
 
17
17
  github_url = "https://github.com/fnando/thor-completion"
18
18
  github_tree_url = "#{github_url}/tree/v#{spec.version}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thor-completion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
@@ -165,10 +165,10 @@ metadata:
165
165
  rubygems_mfa_required: 'true'
166
166
  homepage_uri: https://github.com/fnando/thor-completion
167
167
  bug_tracker_uri: https://github.com/fnando/thor-completion/issues
168
- source_code_uri: https://github.com/fnando/thor-completion/tree/v0.0.0
169
- changelog_uri: https://github.com/fnando/thor-completion/tree/v0.0.0/CHANGELOG.md
170
- documentation_uri: https://github.com/fnando/thor-completion/tree/v0.0.0/README.md
171
- license_uri: https://github.com/fnando/thor-completion/tree/v0.0.0/LICENSE.md
168
+ source_code_uri: https://github.com/fnando/thor-completion/tree/v0.0.1
169
+ changelog_uri: https://github.com/fnando/thor-completion/tree/v0.0.1/CHANGELOG.md
170
+ documentation_uri: https://github.com/fnando/thor-completion/tree/v0.0.1/README.md
171
+ license_uri: https://github.com/fnando/thor-completion/tree/v0.0.1/LICENSE.md
172
172
  rdoc_options: []
173
173
  require_paths:
174
174
  - lib
@@ -176,7 +176,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
176
176
  requirements:
177
177
  - - ">="
178
178
  - !ruby/object:Gem::Version
179
- version: 3.4.0
179
+ version: 3.3.0
180
180
  required_rubygems_version: !ruby/object:Gem::Requirement
181
181
  requirements:
182
182
  - - ">="