clamp 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +60 -0
- data/.travis.yml +3 -5
- data/CHANGES.md +6 -0
- data/Gemfile +3 -2
- data/Guardfile +1 -1
- data/README.md +14 -1
- data/Rakefile +2 -2
- data/clamp.gemspec +3 -4
- data/examples/defaulted +1 -1
- data/examples/scoop +2 -2
- data/examples/speak +2 -4
- data/examples/subcommand_missing +18 -0
- data/lib/clamp.rb +2 -2
- data/lib/clamp/attribute/declaration.rb +3 -1
- data/lib/clamp/attribute/definition.rb +6 -12
- data/lib/clamp/attribute/instance.rb +1 -1
- data/lib/clamp/command.rb +33 -35
- data/lib/clamp/help.rb +11 -12
- data/lib/clamp/messages.rb +5 -28
- data/lib/clamp/option/declaration.rb +20 -19
- data/lib/clamp/option/definition.rb +11 -18
- data/lib/clamp/option/parsing.rb +27 -18
- data/lib/clamp/parameter/declaration.rb +16 -3
- data/lib/clamp/parameter/definition.rb +7 -2
- data/lib/clamp/parameter/parsing.rb +8 -1
- data/lib/clamp/subcommand/declaration.rb +28 -25
- data/lib/clamp/subcommand/definition.rb +1 -1
- data/lib/clamp/subcommand/execution.rb +7 -7
- data/lib/clamp/subcommand/parsing.rb +2 -2
- data/lib/clamp/truthy.rb +1 -1
- data/lib/clamp/version.rb +1 -1
- data/spec/clamp/command_group_spec.rb +89 -23
- data/spec/clamp/command_spec.rb +20 -21
- data/spec/clamp/messages_spec.rb +1 -1
- data/spec/clamp/option/definition_spec.rb +5 -5
- data/spec/clamp/option_module_spec.rb +1 -1
- data/spec/clamp/parameter/definition_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -3
- metadata +5 -3
data/spec/spec_helper.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require "rspec"
|
2
2
|
require "clamp"
|
3
|
-
require
|
3
|
+
require "stringio"
|
4
4
|
|
5
5
|
RSpec.configure do |config|
|
6
6
|
|
@@ -11,7 +11,6 @@ end
|
|
11
11
|
module OutputCapture
|
12
12
|
|
13
13
|
def self.included(target)
|
14
|
-
|
15
14
|
target.before do
|
16
15
|
$stdout = @out = StringIO.new
|
17
16
|
$stderr = @err = StringIO.new
|
@@ -21,7 +20,6 @@ module OutputCapture
|
|
21
20
|
$stdout = STDOUT
|
22
21
|
$stderr = STDERR
|
23
22
|
end
|
24
|
-
|
25
23
|
end
|
26
24
|
|
27
25
|
def stdout
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clamp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
Clamp provides an object-model for command-line utilities.
|
@@ -21,6 +21,7 @@ files:
|
|
21
21
|
- ".autotest"
|
22
22
|
- ".gitignore"
|
23
23
|
- ".rspec"
|
24
|
+
- ".rubocop.yml"
|
24
25
|
- ".travis.yml"
|
25
26
|
- CHANGES.md
|
26
27
|
- Gemfile
|
@@ -36,6 +37,7 @@ files:
|
|
36
37
|
- examples/gitdown
|
37
38
|
- examples/scoop
|
38
39
|
- examples/speak
|
40
|
+
- examples/subcommand_missing
|
39
41
|
- lib/clamp.rb
|
40
42
|
- lib/clamp/attribute/declaration.rb
|
41
43
|
- lib/clamp/attribute/definition.rb
|
@@ -83,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
85
|
version: '0'
|
84
86
|
requirements: []
|
85
87
|
rubyforge_project:
|
86
|
-
rubygems_version: 2.
|
88
|
+
rubygems_version: 2.4.8
|
87
89
|
signing_key:
|
88
90
|
specification_version: 4
|
89
91
|
summary: a minimal framework for command-line utilities
|