clive 1.0.0 → 1.0.1
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/lib/clive/parser.rb
CHANGED
data/lib/clive/version.rb
CHANGED
data/spec/clive/parser_spec.rb
CHANGED
@@ -8,6 +8,7 @@ describe Clive::Parser do
|
|
8
8
|
|
9
9
|
describe 'with no argument' do
|
10
10
|
it 'prints the help' do
|
11
|
+
Kernel.expects(:exit)
|
11
12
|
this {
|
12
13
|
subject.run s 'help'
|
13
14
|
}.must_output <<EOS
|
@@ -25,6 +26,7 @@ EOS
|
|
25
26
|
|
26
27
|
describe 'with an argument' do
|
27
28
|
it 'prints help for that command' do
|
29
|
+
Kernel.expects(:exit)
|
28
30
|
this {
|
29
31
|
subject.run s 'help new'
|
30
32
|
}.must_output <<EOS
|
@@ -37,6 +39,7 @@ EOS
|
|
37
39
|
end
|
38
40
|
|
39
41
|
it 'prints an error if command does not exist' do
|
42
|
+
Kernel.expects(:exit)
|
40
43
|
this {
|
41
44
|
subject.run s 'help missing'
|
42
45
|
}.must_output "Error: command missing could not be found. Try `help` to see the available commands.\n"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-01
|
12
|
+
date: 2012-02-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|
16
|
-
requirement: &
|
16
|
+
requirement: &2156107440 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '2.6'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2156107440
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: mocha
|
27
|
-
requirement: &
|
27
|
+
requirement: &2156106140 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0.10'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2156106140
|
36
36
|
description: ! " Clive provides a DSL for building command line interfaces. It
|
37
37
|
allows \n you to define commands and options, which can also take arguments,
|
38
38
|
\n and then runs the correct stuff!\n"
|