instacli 1.0.0 → 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/README.org +1 -1
- data/lib/instacli/silence.rb +16 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4a2fd308b300d0876ff33e66342c22de3968044
|
4
|
+
data.tar.gz: 9927eb0293c7693dafbe03ed101e89213fa48830
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a45f8b9dbf1703d74d7f67001ba462514a12fa1c4dc0a83ab30abfd99cc1b109f13a7834f93e10aaa5f1b4af3933a810b1ef670ebf1c2188bb71f71c4c219c59
|
7
|
+
data.tar.gz: 84deb3641b57cf7b8eea93d99b4363ecb59cc26db19b7ac080040a3244b79c76ad9b47e450baf6c77316d37ac978144a6b1a7d0071c930a7e58f845d56b5e32f
|
data/README.org
CHANGED
@@ -116,7 +116,7 @@
|
|
116
116
|
The parameters of a method are used to generate usage documentation,
|
117
117
|
following the common convention of =<required>= and =[optional]=.
|
118
118
|
|
119
|
-
If a method raises an ~
|
119
|
+
If a method raises an ~ArgumentError~, a usage notice will be displayed,
|
120
120
|
outlining the correct usage.
|
121
121
|
|
122
122
|
** Command Demultiplexing (aka "that thing =busybox= does")
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module InstaCLI
|
2
|
+
# Suppress output
|
3
|
+
module Silence
|
4
|
+
def execute(*args)
|
5
|
+
return STDERR.puts help(*args[1..-1]) if %w(--help -h).include?(args.first)
|
6
|
+
|
7
|
+
o, m, *rest = *args
|
8
|
+
|
9
|
+
begin
|
10
|
+
method(o, m).call(*rest)
|
11
|
+
rescue *rescues
|
12
|
+
STDERR.puts help(*args)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: instacli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Olstrom
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: contracts
|
@@ -44,6 +44,7 @@ files:
|
|
44
44
|
- lib/instacli/demuxing.rb
|
45
45
|
- lib/instacli/exception_variant.rb
|
46
46
|
- lib/instacli/help.rb
|
47
|
+
- lib/instacli/silence.rb
|
47
48
|
homepage: https://github.com/colstrom/instacli
|
48
49
|
licenses:
|
49
50
|
- MIT
|