ame 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ame/help/console.rb +1 -1
- data/lib/ame/method.rb +1 -1
- data/lib/ame/option.rb +1 -1
- data/lib/ame/version.rb +1 -1
- metadata +46 -78
data/lib/ame/help/console.rb
CHANGED
data/lib/ame/method.rb
CHANGED
@@ -65,7 +65,7 @@ class Ame::Method
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def call(instance, arguments = nil, options = nil)
|
68
|
-
options,
|
68
|
+
options, _ = self.options.process([]) unless options
|
69
69
|
arguments ||= self.arguments.process(options, [])
|
70
70
|
instance.send ruby_name, *(arguments + (options.empty? ? [] : [options]))
|
71
71
|
self
|
data/lib/ame/option.rb
CHANGED
@@ -10,7 +10,7 @@ class Ame::Option < Ame::Argument
|
|
10
10
|
is_boolean = [true, false].include? options[:default]
|
11
11
|
raise ArgumentError,
|
12
12
|
'optional arguments to options are only allowed for booleans' if
|
13
|
-
options[:optional] and not
|
13
|
+
options[:optional] and not(is_boolean_type or is_boolean)
|
14
14
|
options[:optional] = is_boolean
|
15
15
|
raise ArgumentError,
|
16
16
|
'boolean options cannot have argument descriptions' if
|
data/lib/ame/version.rb
CHANGED
metadata
CHANGED
@@ -1,84 +1,62 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: ame
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
- 0
|
10
|
-
version: 0.1.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
prerelease:
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Nikolai Weibull
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-10-25 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
22
15
|
name: lookout
|
23
|
-
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &14761848 !ruby/object:Gem::Requirement
|
25
17
|
none: false
|
26
|
-
requirements:
|
18
|
+
requirements:
|
27
19
|
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
segments:
|
31
|
-
- 2
|
32
|
-
- 0
|
33
|
-
version: "2.0"
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '2.0'
|
34
22
|
type: :development
|
35
|
-
version_requirements: *id001
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: rbtags
|
38
23
|
prerelease: false
|
39
|
-
|
24
|
+
version_requirements: *14761848
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rbtags
|
27
|
+
requirement: &14761368 !ruby/object:Gem::Requirement
|
40
28
|
none: false
|
41
|
-
requirements:
|
29
|
+
requirements:
|
42
30
|
- - ~>
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
hash: 27
|
45
|
-
segments:
|
46
|
-
- 0
|
47
|
-
- 1
|
48
|
-
- 0
|
31
|
+
- !ruby/object:Gem::Version
|
49
32
|
version: 0.1.0
|
50
33
|
type: :development
|
51
|
-
version_requirements: *id002
|
52
|
-
- !ruby/object:Gem::Dependency
|
53
|
-
name: yard
|
54
34
|
prerelease: false
|
55
|
-
|
35
|
+
version_requirements: *14761368
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: yard
|
38
|
+
requirement: &14760576 !ruby/object:Gem::Requirement
|
56
39
|
none: false
|
57
|
-
requirements:
|
40
|
+
requirements:
|
58
41
|
- - ~>
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
hash: 7
|
61
|
-
segments:
|
62
|
-
- 0
|
63
|
-
- 6
|
64
|
-
- 0
|
42
|
+
- !ruby/object:Gem::Version
|
65
43
|
version: 0.6.0
|
66
44
|
type: :development
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *14760576
|
47
|
+
description: ! '# Ame #
|
48
|
+
|
49
|
+
|
71
50
|
Ame is a simple command-line parser and build system. Its aim is to replace
|
51
|
+
|
72
52
|
the need for other command-line parsers and Rake.
|
73
53
|
|
54
|
+
'
|
74
55
|
email: now@bitwi.se
|
75
56
|
executables: []
|
76
|
-
|
77
57
|
extensions: []
|
78
|
-
|
79
58
|
extra_rdoc_files: []
|
80
|
-
|
81
|
-
files:
|
59
|
+
files:
|
82
60
|
- lib/ame/argument.rb
|
83
61
|
- lib/ame/arguments.rb
|
84
62
|
- lib/ame/class.rb
|
@@ -112,39 +90,29 @@ files:
|
|
112
90
|
- test/unit/ame/splat.rb
|
113
91
|
- README
|
114
92
|
- Rakefile
|
115
|
-
has_rdoc: true
|
116
93
|
homepage: http://github.com/now/ame
|
117
94
|
licenses: []
|
118
|
-
|
95
|
+
metadata: {}
|
119
96
|
post_install_message:
|
120
97
|
rdoc_options: []
|
121
|
-
|
122
|
-
require_paths:
|
98
|
+
require_paths:
|
123
99
|
- lib
|
124
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
100
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
125
101
|
none: false
|
126
|
-
requirements:
|
127
|
-
- -
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
|
130
|
-
|
131
|
-
- 0
|
132
|
-
version: "0"
|
133
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - ! '>='
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '0'
|
106
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
134
107
|
none: false
|
135
|
-
requirements:
|
136
|
-
- -
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
|
139
|
-
segments:
|
140
|
-
- 0
|
141
|
-
version: "0"
|
108
|
+
requirements:
|
109
|
+
- - ! '>='
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
142
112
|
requirements: []
|
143
|
-
|
144
113
|
rubyforge_project:
|
145
|
-
rubygems_version: 1.
|
114
|
+
rubygems_version: 1.8.10
|
146
115
|
signing_key:
|
147
|
-
specification_version:
|
116
|
+
specification_version: 4
|
148
117
|
summary: Ame is a simple command-line parser and build system.
|
149
118
|
test_files: []
|
150
|
-
|