args_parser 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.0.2 2012-06-11
2
+
3
+ * fix syntax warn on ruby1.9.2
4
+
1
5
  === 0.0.1 2012-05-09
2
6
 
3
7
  * Initial release
@@ -7,7 +7,6 @@ module ArgsParser
7
7
  class Parser
8
8
  attr_reader :first
9
9
 
10
-
11
10
  private
12
11
  def params
13
12
  @params ||=
@@ -31,7 +30,7 @@ module ArgsParser
31
30
  unless block_given?
32
31
  raise ArgumentError, 'initialize block was not given'
33
32
  end
34
- instance_eval &block
33
+ instance_eval(&block)
35
34
  parse argv
36
35
  end
37
36
 
data/lib/args_parser.rb CHANGED
@@ -4,5 +4,5 @@ $:.unshift(File.dirname(__FILE__)) unless
4
4
  require 'args_parser/parser'
5
5
 
6
6
  module ArgsParser
7
- VERSION = '0.0.1'
7
+ VERSION = '0.0.2'
8
8
  end
@@ -31,7 +31,8 @@ class TestArgsParser < Test::Unit::TestCase
31
31
  end
32
32
 
33
33
  def test_has_param?
34
- assert (@parser.has_param? :input and @parser.has_param? :output)
34
+ assert @parser.has_param? :input
35
+ assert @parser.has_param? :output
35
36
  end
36
37
 
37
38
  def test_has_params?
@@ -43,7 +44,8 @@ class TestArgsParser < Test::Unit::TestCase
43
44
  end
44
45
 
45
46
  def test_has_option?
46
- assert (@parser.has_option? :help and @parser.has_option? :a)
47
+ assert @parser.has_option? :help
48
+ assert @parser.has_option? :a
47
49
  end
48
50
 
49
51
  def test_has_options?
metadata CHANGED
@@ -1,80 +1,74 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: args_parser
3
- version: !ruby/object:Gem::Version
4
- hash: 29
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 1
10
- version: 0.0.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Sho Hashimoto
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-05-09 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-06-11 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: rdoc
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
18
+ requirements:
26
19
  - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 19
29
- segments:
30
- - 3
31
- - 10
32
- version: "3.10"
20
+ - !ruby/object:Gem::Version
21
+ version: '3.10'
33
22
  type: :development
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: newgem
37
23
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '3.10'
30
+ - !ruby/object:Gem::Dependency
31
+ name: newgem
32
+ requirement: !ruby/object:Gem::Requirement
39
33
  none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 5
44
- segments:
45
- - 1
46
- - 5
47
- - 3
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
48
37
  version: 1.5.3
49
38
  type: :development
50
- version_requirements: *id002
51
- - !ruby/object:Gem::Dependency
52
- name: hoe
53
39
  prerelease: false
54
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
55
41
  none: false
56
- requirements:
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 1.5.3
46
+ - !ruby/object:Gem::Dependency
47
+ name: hoe
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
57
51
  - - ~>
58
- - !ruby/object:Gem::Version
59
- hash: 29
60
- segments:
61
- - 2
62
- - 15
63
- version: "2.15"
52
+ - !ruby/object:Gem::Version
53
+ version: '3.0'
64
54
  type: :development
65
- version_requirements: *id003
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
66
62
  description: ARGV parser - Parse args from command line.
67
- email:
63
+ email:
68
64
  - hashimoto@shokai.org
69
65
  executables: []
70
-
71
66
  extensions: []
72
-
73
- extra_rdoc_files:
67
+ extra_rdoc_files:
74
68
  - History.txt
75
69
  - Manifest.txt
76
70
  - README.rdoc
77
- files:
71
+ files:
78
72
  - History.txt
79
73
  - Manifest.txt
80
74
  - README.rdoc
@@ -90,38 +84,30 @@ files:
90
84
  - .gemtest
91
85
  homepage: http://github.com/shokai/args_parser
92
86
  licenses: []
93
-
94
87
  post_install_message:
95
- rdoc_options:
88
+ rdoc_options:
96
89
  - --main
97
90
  - README.rdoc
98
- require_paths:
91
+ require_paths:
99
92
  - lib
100
- required_ruby_version: !ruby/object:Gem::Requirement
93
+ required_ruby_version: !ruby/object:Gem::Requirement
101
94
  none: false
102
- requirements:
103
- - - ">="
104
- - !ruby/object:Gem::Version
105
- hash: 3
106
- segments:
107
- - 0
108
- version: "0"
109
- required_rubygems_version: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ! '>='
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ required_rubygems_version: !ruby/object:Gem::Requirement
110
100
  none: false
111
- requirements:
112
- - - ">="
113
- - !ruby/object:Gem::Version
114
- hash: 3
115
- segments:
116
- - 0
117
- version: "0"
101
+ requirements:
102
+ - - ! '>='
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
118
105
  requirements: []
119
-
120
106
  rubyforge_project: args_parser
121
- rubygems_version: 1.8.17
107
+ rubygems_version: 1.8.24
122
108
  signing_key:
123
109
  specification_version: 3
124
110
  summary: ARGV parser - Parse args from command line.
125
- test_files:
111
+ test_files:
126
112
  - test/test_args_parser.rb
127
113
  - test/test_helper.rb