plain_option_parser 0.1.1 → 0.1.2
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.
- data/VERSION +1 -1
- data/lib/plain_option_parser.rb +2 -1
- data/plain_option_parser.gemspec +51 -0
- metadata +4 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/lib/plain_option_parser.rb
CHANGED
@@ -5,7 +5,7 @@ class PlainOptionParser
|
|
5
5
|
@commands = []
|
6
6
|
desc "Prints help text for your command"
|
7
7
|
cmd "help" do
|
8
|
-
viable, remaining = commands_for_args(args[1, args.length] || [])
|
8
|
+
viable, remaining = commands_for_args(@args[1, @args.length] || [])
|
9
9
|
if viable.length == 0
|
10
10
|
no_match
|
11
11
|
else
|
@@ -16,6 +16,7 @@ class PlainOptionParser
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def start(args)
|
19
|
+
@args = args
|
19
20
|
viable, remaining = commands_for_args(args)
|
20
21
|
if viable.length == 1
|
21
22
|
viable[0].last.call(*remaining)
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{plain_option_parser}
|
8
|
+
s.version = "0.1.2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Kyle Maxwell"]
|
12
|
+
s.date = %q{2011-03-12}
|
13
|
+
s.description = %q{Parse command-line options in style}
|
14
|
+
s.email = %q{kyle@kylemaxwell.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
"LICENSE",
|
22
|
+
"README.rdoc",
|
23
|
+
"Rakefile",
|
24
|
+
"VERSION",
|
25
|
+
"lib/plain_option_parser.rb",
|
26
|
+
"plain_option_parser.gemspec",
|
27
|
+
"spec/plain_option_parser_spec.rb",
|
28
|
+
"spec/spec_helper.rb"
|
29
|
+
]
|
30
|
+
s.homepage = %q{http://github.com/fizx/plain_option_parser}
|
31
|
+
s.require_paths = ["lib"]
|
32
|
+
s.rubygems_version = %q{1.5.0}
|
33
|
+
s.summary = %q{a heroku-like option parser}
|
34
|
+
s.test_files = [
|
35
|
+
"spec/plain_option_parser_spec.rb",
|
36
|
+
"spec/spec_helper.rb"
|
37
|
+
]
|
38
|
+
|
39
|
+
if s.respond_to? :specification_version then
|
40
|
+
s.specification_version = 3
|
41
|
+
|
42
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
43
|
+
s.add_development_dependency(%q<rspec>, [">= 0"])
|
44
|
+
else
|
45
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
46
|
+
end
|
47
|
+
else
|
48
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plain_option_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kyle Maxwell
|
@@ -48,6 +48,7 @@ files:
|
|
48
48
|
- Rakefile
|
49
49
|
- VERSION
|
50
50
|
- lib/plain_option_parser.rb
|
51
|
+
- plain_option_parser.gemspec
|
51
52
|
- spec/plain_option_parser_spec.rb
|
52
53
|
- spec/spec_helper.rb
|
53
54
|
has_rdoc: true
|