optitron 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/optitron/response.rb +1 -1
- data/lib/optitron/version.rb +1 -1
- data/spec/response_spec.rb +16 -0
- metadata +29 -28
data/lib/optitron/response.rb
CHANGED
data/lib/optitron/version.rb
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Optitron::Response" do
|
4
|
+
context "when validation fails" do
|
5
|
+
it "should output error messages" do
|
6
|
+
parser = Optitron.new do
|
7
|
+
cmd "foo" do
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
response = parser.parse([])
|
12
|
+
response.should_receive(:puts).with("Unknown command")
|
13
|
+
response.dispatch(nil)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: optitron
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 1
|
10
|
+
version: 0.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Joshua Hull
|
@@ -15,11 +15,13 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-01-
|
18
|
+
date: 2011-01-09 00:00:00 -08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
|
22
|
+
name: callsite
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
23
25
|
none: false
|
24
26
|
requirements:
|
25
27
|
- - ~>
|
@@ -30,12 +32,12 @@ dependencies:
|
|
30
32
|
- 0
|
31
33
|
- 4
|
32
34
|
version: 0.0.4
|
33
|
-
requirement: *id001
|
34
|
-
name: callsite
|
35
|
-
prerelease: false
|
36
35
|
type: :runtime
|
36
|
+
version_requirements: *id001
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
|
-
|
38
|
+
name: method-args
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
41
|
none: false
|
40
42
|
requirements:
|
41
43
|
- - ~>
|
@@ -46,12 +48,12 @@ dependencies:
|
|
46
48
|
- 1
|
47
49
|
- 0
|
48
50
|
version: 0.1.0
|
49
|
-
requirement: *id002
|
50
|
-
name: method-args
|
51
|
-
prerelease: false
|
52
51
|
type: :runtime
|
52
|
+
version_requirements: *id002
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
|
-
|
54
|
+
name: bundler
|
55
|
+
prerelease: false
|
56
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
55
57
|
none: false
|
56
58
|
requirements:
|
57
59
|
- - ~>
|
@@ -62,12 +64,12 @@ dependencies:
|
|
62
64
|
- 0
|
63
65
|
- 0
|
64
66
|
version: 1.0.0
|
65
|
-
requirement: *id003
|
66
|
-
name: bundler
|
67
|
-
prerelease: false
|
68
67
|
type: :development
|
68
|
+
version_requirements: *id003
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
|
70
|
+
name: rake
|
71
|
+
prerelease: false
|
72
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
71
73
|
none: false
|
72
74
|
requirements:
|
73
75
|
- - ">="
|
@@ -76,12 +78,12 @@ dependencies:
|
|
76
78
|
segments:
|
77
79
|
- 0
|
78
80
|
version: "0"
|
79
|
-
requirement: *id004
|
80
|
-
name: rake
|
81
|
-
prerelease: false
|
82
81
|
type: :development
|
82
|
+
version_requirements: *id004
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
|
84
|
+
name: rspec
|
85
|
+
prerelease: false
|
86
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
85
87
|
none: false
|
86
88
|
requirements:
|
87
89
|
- - ">="
|
@@ -90,12 +92,12 @@ dependencies:
|
|
90
92
|
segments:
|
91
93
|
- 0
|
92
94
|
version: "0"
|
93
|
-
requirement: *id005
|
94
|
-
name: rspec
|
95
|
-
prerelease: false
|
96
95
|
type: :development
|
96
|
+
version_requirements: *id005
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
|
98
|
+
name: phocus
|
99
|
+
prerelease: false
|
100
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
99
101
|
none: false
|
100
102
|
requirements:
|
101
103
|
- - ">="
|
@@ -104,10 +106,8 @@ dependencies:
|
|
104
106
|
segments:
|
105
107
|
- 0
|
106
108
|
version: "0"
|
107
|
-
requirement: *id006
|
108
|
-
name: phocus
|
109
|
-
prerelease: false
|
110
109
|
type: :development
|
110
|
+
version_requirements: *id006
|
111
111
|
description: Sensible options parsing
|
112
112
|
email:
|
113
113
|
- joshbuddy@gmail.com
|
@@ -143,6 +143,7 @@ files:
|
|
143
143
|
- spec/group_spec.rb
|
144
144
|
- spec/help_spec.rb
|
145
145
|
- spec/option_spec.rb
|
146
|
+
- spec/response_spec.rb
|
146
147
|
- spec/short_name_spec.rb
|
147
148
|
- spec/simple_spec.rb
|
148
149
|
- spec/spec.opts
|