opt 0.2.1 → 0.3.0
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.
- checksums.yaml +4 -4
- data/lib/opt/command.rb +2 -1
- data/lib/opt/version.rb +2 -2
- data/spec/opt_spec.rb +5 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65365f8b3bd3a26fbd82607908f7e6eed5cb1b04
|
4
|
+
data.tar.gz: 54a096c8afd77fb9c75d1d32e33f3429ff3e2be4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33d38ef7732b9229f02cc8a416a76124cec5c877b6c6c1041c0835550d42497fc19c6c181c862feac0fd4a5688afc8819042a526b4bbe9cb32c97c687c415f1d
|
7
|
+
data.tar.gz: ee6e9e7facdbd3e73d101f6e1793e44a8f2b69d7371642b943009632098590fc5efc37916421b286ccd1001126dccbf54a43f1b17ab9687b19d22e1ebbd34df3
|
data/lib/opt/command.rb
CHANGED
data/lib/opt/version.rb
CHANGED
data/spec/opt_spec.rb
CHANGED
@@ -100,13 +100,14 @@ describe Opt do
|
|
100
100
|
|
101
101
|
expect(result.force?).to eq true
|
102
102
|
expect(result.verbose?).to eq true
|
103
|
-
expect(result.command).to
|
103
|
+
expect(result.command.first).to be_a Opt::Command
|
104
|
+
expect(result.command.map(&:name)).to eq %w(add)
|
104
105
|
|
105
106
|
result = opt.parse %w(add -f --verbose)
|
106
107
|
|
107
108
|
expect(result.force?).to eq true
|
108
109
|
expect(result.verbose?).to eq true
|
109
|
-
expect(result.command).to eq %w(add)
|
110
|
+
expect(result.command.map(&:name)).to eq %w(add)
|
110
111
|
end
|
111
112
|
|
112
113
|
it 'should parse subcommands (II)' do
|
@@ -121,13 +122,13 @@ describe Opt do
|
|
121
122
|
|
122
123
|
expect(result.a?).to eq true
|
123
124
|
expect(result.f?).to eq true
|
124
|
-
expect(result.command).to eq %w(add)
|
125
|
+
expect(result.command.map(&:name)).to eq %w(add)
|
125
126
|
|
126
127
|
result = opt.parse %w(add -ajf)
|
127
128
|
|
128
129
|
expect(result.a?).to eq true
|
129
130
|
expect(result.f?).to eq nil
|
130
131
|
expect(result.j).to eq 'f'
|
131
|
-
expect(result.command).to eq %w(add)
|
132
|
+
expect(result.command.map(&:name)).to eq %w(add)
|
132
133
|
end
|
133
134
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Graichen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|