cli-option_parser.rb 0.5.2 → 0.6.0

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: f9f9a9f315168ff7c66e50c15312301146ba8c24c0ef6cd0c6b22727caf954df
4
- data.tar.gz: 6a14724a245484c434d2cc17d171e39dfc751bc082481327890ad952b08bd081
3
+ metadata.gz: 2d365632981faf7162ffa52adc29b8bd3dbee9729f159ca1b14719d0be84048c
4
+ data.tar.gz: 629ab57644cef615ddf9037d31bbdabb168ee808b1e87ccc507cf6cb233e49c2
5
5
  SHA512:
6
- metadata.gz: 6ed13500ff383b2f13cb71344a03dd3140e17119fef70bd4fbb121cb38f9b3943a5b00d0e7ae1ed259564a7ae3620c9fc7483ff3b2e25297fc4f1a605875b7b9
7
- data.tar.gz: 993dfd4d3d13d20e1eb8c346323b773d81010ab1372168d03bc00ff5b1a2ed79dc60c9cbdff3b4add65fe53007f0bc17fd134404cfa123d1e5b7f0284ffc2354
6
+ metadata.gz: c48516e5910222aec437efe69472b05862ce5ef5049400f944b623208c8725f33d91a22b665c5a718174c0dc20f315cc41a52ed2afd7af42740bb8e1fcac36e1
7
+ data.tar.gz: 7aa2efbc53841de9009d4d91d809023d06fb394ce03bfa113ac5f5df04f16b53fb4481954278412bcdc25ad289215e334d221491afc9b2ae8aa83a57b3b37059
@@ -6,9 +6,9 @@ Gem::Specification.new do |spec|
6
6
  spec.authors = ["0x1eef", "Nobu Nakada"]
7
7
  spec.email = ["0x1eef@protonmail.com"]
8
8
 
9
- spec.summary = %q{OptionParser is a class for command-line option analysis.}
10
- spec.description = %q{OptionParser is a class for command-line option analysis.}
11
- spec.homepage = "https://github.com/0x1eef/cmd-optparse.rb#readme"
9
+ spec.summary = %q{Fork of ruby/optparse}
10
+ spec.description = %q{Fork of ruby/optparse}
11
+ spec.homepage = "https://github.com/0x1eef/cli-option_parser.rb#readme"
12
12
  spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
13
13
  spec.licenses = ["Ruby", "BSD-2-Clause"]
14
14
 
@@ -427,7 +427,7 @@ module CLI
427
427
  end unless defined?(CLI)
428
428
 
429
429
  class CLI::OptionParser
430
- VERSION = "0.5.2"
430
+ VERSION = "0.6.0"
431
431
 
432
432
  # :stopdoc:
433
433
  NoArgument = [NO_ARGUMENT = :NONE, nil].freeze
@@ -1776,6 +1776,18 @@ XXX
1776
1776
  end
1777
1777
  end
1778
1778
 
1779
+ ##
1780
+ # @return [CLI::OptionParser::Switch]
1781
+ # Returns the subclasses of
1782
+ # {CLI::OptionParser::Switch CLI::OptionParser::Switch}
1783
+ # who accept an optional argument.
1784
+ def optional_switches
1785
+ [
1786
+ CLI::OptionParser::Switch::PlacedArgument,
1787
+ CLI::OptionParser::Switch::OptionalArgument
1788
+ ]
1789
+ end
1790
+
1779
1791
  #
1780
1792
  # Wrapper method for getopts.rb.
1781
1793
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cli-option_parser.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - '0x1eef'
@@ -9,9 +9,9 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2024-01-30 00:00:00.000000000 Z
12
+ date: 2024-02-27 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: OptionParser is a class for command-line option analysis.
14
+ description: Fork of ruby/optparse
15
15
  email:
16
16
  - 0x1eef@protonmail.com
17
17
  executables: []
@@ -122,13 +122,13 @@ files:
122
122
  - test/optparse/test_reqarg.rb
123
123
  - test/optparse/test_summary.rb
124
124
  - test/optparse/test_zsh_completion.rb
125
- homepage: https://github.com/0x1eef/cmd-optparse.rb#readme
125
+ homepage: https://github.com/0x1eef/cli-option_parser.rb#readme
126
126
  licenses:
127
127
  - Ruby
128
128
  - BSD-2-Clause
129
129
  metadata:
130
- homepage_uri: https://github.com/0x1eef/cmd-optparse.rb#readme
131
- source_code_uri: https://github.com/0x1eef/cmd-optparse.rb#readme
130
+ homepage_uri: https://github.com/0x1eef/cli-option_parser.rb#readme
131
+ source_code_uri: https://github.com/0x1eef/cli-option_parser.rb#readme
132
132
  post_install_message:
133
133
  rdoc_options:
134
134
  - "--main=README.md"
@@ -150,5 +150,5 @@ requirements: []
150
150
  rubygems_version: 3.5.3
151
151
  signing_key:
152
152
  specification_version: 4
153
- summary: OptionParser is a class for command-line option analysis.
153
+ summary: Fork of ruby/optparse
154
154
  test_files: []