cmd-optparse.rb 0.1.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 604edf0badf7b3d053498dd0cdafaf516f31a0d6e300b444fc97a4c5a15e4fe1
4
- data.tar.gz: efd52b19e71a60735369074178db092209e5b9a5944e1fce8e048002f8352d58
3
+ metadata.gz: 9cf82f634b0577123de20738385e9b15fbe0f62652ac8af58397d0226c928fdf
4
+ data.tar.gz: a4831214ac1b1534d13309826f186e2d34087a7613111901e276c056f055e38d
5
5
  SHA512:
6
- metadata.gz: 1e8cbd03e9c2de55ac9bd17a5fe89a24b6a4602dd612cf45565b0d459a2ec5b17325727b3a008ed3d5c39e1d50642fb5343c7b869804e79008718c60b2fa3fa9
7
- data.tar.gz: b94fe059e594aaa8808891a850682e1c5ab13e29284e2bd0886ab57409784735556b2f5ae1103c0caf7863fb1c37f1de6ea76b3d1d667521a165e450d5a082ae
6
+ metadata.gz: 9683268f5c6a7e983a85e6018672c2448f080cf61c425f04666e58f38fca9f05735043355e02aeefae8cc45e0f7bb201024b0f94448762f27853fcee9958b9a2
7
+ data.tar.gz: 4f117eae64d9fb5f18d38c7121dbc74dae9c565335ac0d520a10b690bcd421e0498846d052a0af2aa4049596cfdd14a6b7673bf11e7af35ce166a093ccf3375d
data/.gitignore CHANGED
@@ -10,3 +10,4 @@
10
10
  /Gemfile.lock
11
11
  /ChangeLog
12
12
  /.gems
13
+ /*.core
@@ -1,15 +1,9 @@
1
1
  # frozen_string_literal: true
2
-
3
- name = File.basename(__FILE__, ".gemspec")
4
- version = ["lib", Array.new(name.count("-")+1, "..").join("/")].find do |dir|
5
- break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
6
- /^\s*OptionParser::Version\s*=\s*"(.*)"/ =~ line and break $1
7
- end rescue nil
8
- end
2
+ require "./lib/cmd-optparse"
9
3
 
10
4
  Gem::Specification.new do |spec|
11
- spec.name = name
12
- spec.version = "0.1.1"
5
+ spec.name = File.basename(__FILE__, ".gemspec")
6
+ spec.version = OptionParser::VERSION
13
7
  spec.authors = ["0x1eef", "Nobu Nakada"]
14
8
  spec.email = ["0x1eef@protonmail.com"]
15
9
 
@@ -1,6 +1,4 @@
1
1
  # frozen_string_literal: false
2
- require_relative 'option_parser'
3
-
4
2
  class OptionParser::AC < OptionParser
5
3
  private
6
4
 
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: false
2
- require_relative 'option_parser'
3
2
  require 'date'
4
-
5
3
  OptionParser.accept(DateTime) do |s,|
6
4
  begin
7
5
  DateTime.parse(s) if s
@@ -1,5 +1,4 @@
1
1
  # frozen_string_literal: true
2
- require_relative 'option_parser'
3
2
 
4
3
  class OptionParser
5
4
  # :call-seq:
@@ -1,7 +1,4 @@
1
1
  # frozen_string_literal: false
2
2
  # -*- ruby -*-
3
-
4
3
  require 'shellwords'
5
- require_relative 'option_parser'
6
-
7
4
  OptionParser.accept(Shellwords) {|s,| Shellwords.shellwords(s)}
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: false
2
- require_relative 'option_parser'
3
2
  require 'time'
4
-
5
3
  OptionParser.accept(Time) do |s,|
6
4
  begin
7
5
  (Time.httpdate(s) rescue Time.parse(s)) if s
@@ -1,7 +1,4 @@
1
1
  # frozen_string_literal: false
2
2
  # -*- ruby -*-
3
-
4
- require_relative 'option_parser'
5
3
  require 'uri'
6
-
7
4
  OptionParser.accept(URI) {|s,| URI.parse(s) if s}
@@ -425,7 +425,7 @@
425
425
  # If you have any questions, file a ticket at http://bugs.ruby-lang.org.
426
426
  #
427
427
  class OptionParser
428
- OptionParser::Version = "0.4.0"
428
+ VERSION = "0.5.0"
429
429
 
430
430
  # :stopdoc:
431
431
  NoArgument = [NO_ARGUMENT = :NONE, nil].freeze
@@ -2337,6 +2337,14 @@ XXX
2337
2337
  const_set(:OctalInteger, OptionParser::OctalInteger)
2338
2338
  const_set(:DecimalNumeric, OptionParser::DecimalNumeric)
2339
2339
  end
2340
+
2341
+ require_relative "option_parser/ac"
2342
+ require_relative "option_parser/date"
2343
+ require_relative "option_parser/time"
2344
+ require_relative "option_parser/kwargs"
2345
+ require_relative "option_parser/shellwords"
2346
+ require_relative "option_parser/uri"
2347
+ require_relative "option_parser/version"
2340
2348
  end
2341
2349
 
2342
2350
  # ARGV is arguable by OptionParser
data/lib/cmd-optparse.rb CHANGED
@@ -1 +1 @@
1
- require_relative "cmd-optparse/option_parser"
1
+ require_relative "cmd/optparse"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmd-optparse.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - '0x1eef'
@@ -92,14 +92,14 @@ files:
92
92
  - doc/optparse/ruby/uri.rb
93
93
  - doc/optparse/tutorial.rdoc
94
94
  - lib/cmd-optparse.rb
95
- - lib/cmd-optparse/ac.rb
96
- - lib/cmd-optparse/date.rb
97
- - lib/cmd-optparse/kwargs.rb
98
- - lib/cmd-optparse/option_parser.rb
99
- - lib/cmd-optparse/shellwords.rb
100
- - lib/cmd-optparse/time.rb
101
- - lib/cmd-optparse/uri.rb
102
- - lib/cmd-optparse/version.rb
95
+ - lib/cmd/option_parser/ac.rb
96
+ - lib/cmd/option_parser/date.rb
97
+ - lib/cmd/option_parser/kwargs.rb
98
+ - lib/cmd/option_parser/shellwords.rb
99
+ - lib/cmd/option_parser/time.rb
100
+ - lib/cmd/option_parser/uri.rb
101
+ - lib/cmd/option_parser/version.rb
102
+ - lib/cmd/optparse.rb
103
103
  - misc/rb_optparse.bash
104
104
  - misc/rb_optparse.zsh
105
105
  - rakelib/.document
File without changes