getopt-declare 1.31 → 1.32

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
  SHA1:
3
- metadata.gz: 32dd881f507e3cc2dc55780ba052ca6b09789396
4
- data.tar.gz: 19e4fc6b1ece3315fbd9383b4ac5f0fd86d65427
3
+ metadata.gz: 9f756b7c73f03f47078ec705e96b26f18e8ff369
4
+ data.tar.gz: 553b0ec0a4d39bc1ccd2035ec2196425400b8143
5
5
  SHA512:
6
- metadata.gz: 0b5d5c07014591e5e929c6f6026a16dde339cde8c4adbfb4f8ade9e48c6cf2cd90cfc2aa4640e9c8571119495b281228f0a8aff3253b1046cc35bfe65111dda1
7
- data.tar.gz: e1c8b0a43a262962aa16a3e21eeb80d0eaf6b12e698d76ab86dd2e71f35670698e256ca508aaa7c66734ce9191ccc49b41e0d8055c6812910c53eae0a987a8dc
6
+ metadata.gz: bb52eeff9ded0b89f4ab3937273b268a60b6f9e569669e4f3fe1284bf51d6f53036992fbc1d820932f39d0464001f55b66a0a41161433588a37f72110591a6e3
7
+ data.tar.gz: 2280346006e7015ee25a0c1548a554db615d0022e3aa80c087920607f91ec37dd04429953d94c4a60f91869d1ea53ab980aedc73d6f784868805cdd31e70cb43
@@ -1,24 +1,24 @@
1
1
  require "rubygems"
2
2
 
3
- sp = Gem::Specification.new do |spec|
4
- spec.name = "getopt-declare"
5
- spec.version = '1.31'
6
- spec.author = "Gonzalo Garramuno"
7
- spec.email = 'ggarra13@gmail.com'
8
- spec.homepage = 'http://www.rubyforge.org/projects/getoptdeclare/'
9
- spec.summary = 'A regex command-line parsing library.'
10
- spec.license = 'GPL'
11
- spec.require_path = "lib"
12
- spec.files =
3
+ sp = Gem::Specification.new do |s|
4
+ s.name = "getopt-declare"
5
+ s.version = '1.32'
6
+ s.author = "Gonzalo Garramuno"
7
+ s.email = 'ggarra13@gmail.com'
8
+ s.homepage = 'http://www.rubyforge.org/projects/getoptdeclare/'
9
+ s.summary = 'A regex command-line parsing library.'
10
+ s.license = 'GPL'
11
+ s.require_path = "lib"
12
+ s.files =
13
13
  ['getopt-declare.gemspec'] +
14
14
  Dir.glob("lib/Getopt/*.rb") +
15
15
  Dir.glob("samples/*.rb") + Dir.glob("test/*.rb")
16
- spec.extra_rdoc_files = ["Manifest.txt", "README.txt"] +
16
+ s.extra_rdoc_files = ["Manifest.txt", "README.txt"] +
17
17
  Dir.glob("docs/*/*")
18
- spec.has_rdoc = true
19
- spec.rubyforge_project = 'getopt-declare'
20
- spec.required_ruby_version = '>= 1.8.0'
21
- spec.description = <<-EOF
18
+ s.has_rdoc = true
19
+ s.rubyforge_project = 'getopt-declare'
20
+ s.required_ruby_version = '>= 1.8.0'
21
+ s.description = <<-EOF
22
22
  A command-line parser using regular expressions.
23
23
  EOF
24
24
  end
@@ -71,7 +71,7 @@ module Getopt
71
71
  # Main Class
72
72
  class Declare
73
73
 
74
- VERSION = '1.28'
74
+ VERSION = '1.32'
75
75
 
76
76
  # For debugging, use [debug] and it will output the ruby code as .CODE.rb
77
77
  @@debug = false
@@ -1617,6 +1617,8 @@ end
1617
1617
  if _FOUND_['% + arg.name + %q%'] && !(% + arg.found_requires +
1618
1618
  %q%)
1619
1619
  $stderr.puts "Error#{@source}: parameter '% + arg.name + %q%' can only be specified with '% + arg.requires + %q%'"
1620
+ _FOUND_['% + arg.name + %q%'] = nil
1621
+ @args['% + arg.name + %q%'] = nil
1620
1622
  _errors += 1
1621
1623
  end
1622
1624
  %
@@ -49,15 +49,5 @@ EOF
49
49
  assert_equal( ['crapola'], @args.unused )
50
50
  end
51
51
 
52
- def test_usage
53
- usage = @args.usage
54
- # We don't check first lines, as they contain date
55
- usage.sub!(/.*Options:\n/m, '')
56
- assert_equal( <<"EOF", usage )
57
- -v <value> [etc] One or more values
58
- <infile> Input file
59
- -o <outfiles>... Output files
60
- EOF
61
- end
62
52
 
63
53
  end
@@ -22,8 +22,8 @@ class TC_Mid < Test::Unit::TestCase
22
22
  e <w:i>x<h:i> Expand image to height <h> and width <w>
23
23
  { }
24
24
  -F <file>... Process named file(s)
25
- { defer { file.each {|i|
26
- process(i) } } }
25
+ { defer { file.each {|j|
26
+ process(j) } } }
27
27
  =getrand [<n:i>] Get a random number
28
28
  (or, optionally, <n> of them)
29
29
  { n = 1 unless n }
@@ -27,7 +27,10 @@ class TC_Regex < Test::Unit::TestCase
27
27
  -file <name:/\w*\.[A-Z]{3}/> File name must have a three-
28
28
  capital-letter extension
29
29
  -find <what:/(%T.)+/> ; look ahead test
30
+
30
31
  EOPARAM
32
+
33
+
31
34
  end
32
35
 
33
36
  def test_ar
@@ -22,6 +22,7 @@ class TC_Require < Test::Unit::TestCase
22
22
 
23
23
  def setup
24
24
  @args = Getopt::Declare.new(<<EOF, :build)
25
+ [debug]
25
26
  -i <iterations:+i> iteration count
26
27
  -q add new task [ requires: -i ]
27
28
  EOF
@@ -30,7 +31,7 @@ EOF
30
31
  def test_q_without_i
31
32
  begin
32
33
  @args.parse('-q')
33
- assert_equal( nil, "Parsing of -q did not fail" )
34
+ assert_equal( nil, @args['-q'] )
34
35
  rescue
35
36
  end
36
37
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: getopt-declare
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.31'
4
+ version: '1.32'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gonzalo Garramuno
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-26 00:00:00.000000000 Z
11
+ date: 2014-01-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: "\tA command-line parser using regular expressions.\n"
14
14
  email: ggarra13@gmail.com
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  version: '0'
77
77
  requirements: []
78
78
  rubyforge_project: getopt-declare
79
- rubygems_version: 2.2.0
79
+ rubygems_version: 2.2.1
80
80
  signing_key:
81
81
  specification_version: 4
82
82
  summary: A regex command-line parsing library.