octopolo 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.gitignore +1 -0
- data/CHANGELOG.markdown +1 -0
- data/README.markdown +5 -0
- data/lib/octopolo/cli.rb +1 -0
- data/lib/octopolo/version.rb +1 -1
- data/spec/octopolo/cli_spec.rb +11 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDVhMDU0NWZiZDc1NmNkYTNjOWM3Y2I2MTM3ZmEzMjQwOGQ4YTUwZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YmEzOGViMTQ2ZDA0YjljZTFjZDM0YzEwOTNhM2UwYjBiMDdhYWE2Zg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Nzc2OTI0NWEwYTIzYTBiOTRjZDk1MjI2MWUxNjY4OGJiNDI5NTg1MzFiMTI0
|
10
|
+
MjJiNDI1YWIxNDRkNDJmNjgwMzI2ZTczNWZiNDczYjZlM2JhNjE3YTZjZmZm
|
11
|
+
OTJjYzg2N2JkMzRmNWFmZDcwZTA2ZTRjOGJlMzQ5Y2MyOTVjZmY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OTcxMWIwNDFkOWMwZDBkNTk4YjVlOWY2MmE1MmVjNTNmOWRmMWUwYzEyYjI3
|
14
|
+
ODYxYmMyYjM5ZDdmMjkzOGZmOWJhNTYxZmZmMDVmNGIzNjYyODAyZDg2ODUy
|
15
|
+
OTdmMzMyOGQ5NzdjNTM4YWFhMWU5NGVlNzY5YjUxZjgyODc0YTc=
|
data/.gitignore
CHANGED
data/CHANGELOG.markdown
CHANGED
data/README.markdown
CHANGED
@@ -8,6 +8,11 @@ A set of Github workflow scripts.
|
|
8
8
|
|
9
9
|
### GitHub Octopolo
|
10
10
|
|
11
|
+
#### Octopolo Installation
|
12
|
+
|
13
|
+
`$ rvm use system && brew gem uninstall sportngin-octopolo-workflow && brew gem install sportngin-octopolo-workflow
|
14
|
+
` or part of the brew gem quickstart [script](https://sportngin.atlassian.net/wiki/display/DEV/Brew+Gem)
|
15
|
+
|
11
16
|
#### GitHub Setup
|
12
17
|
|
13
18
|
Interactively set up your local machine for GitHub octopolo, including
|
data/lib/octopolo/cli.rb
CHANGED
@@ -26,6 +26,7 @@ module Octopolo
|
|
26
26
|
# and then perform it
|
27
27
|
if Open3.respond_to?(:capture3)
|
28
28
|
output, error, status = Open3.capture3(command)
|
29
|
+
raise "exit_status=#{status.exitstatus}; stderr=#{error}" unless status.success?
|
29
30
|
else
|
30
31
|
# Only necessary as long as we use 1.8.7, which doesn't have Open3.capture3
|
31
32
|
output = `#{command}`
|
data/lib/octopolo/version.rb
CHANGED
data/spec/octopolo/cli_spec.rb
CHANGED
@@ -9,10 +9,12 @@ module Octopolo
|
|
9
9
|
let(:result) { "result" }
|
10
10
|
let(:error) { "error message" }
|
11
11
|
let(:exception_message) { "Error with something" }
|
12
|
+
let(:status_success) { double("status", "success?" => true, :exitstatus => 0) }
|
13
|
+
let(:status_error) { double("status", "success?" => nil, :exitstatus => 1) }
|
12
14
|
|
13
15
|
it "passes the given command to the shell" do
|
14
16
|
subject.should_receive(:say).with(command)
|
15
|
-
Open3.should_receive(:capture3).with(command).and_return([result, nil])
|
17
|
+
Open3.should_receive(:capture3).with(command).and_return([result, nil, status_success])
|
16
18
|
subject.should_receive(:say).with(result)
|
17
19
|
subject.perform(command).should == result
|
18
20
|
end
|
@@ -26,13 +28,20 @@ module Octopolo
|
|
26
28
|
subject.perform(command).should == result
|
27
29
|
end
|
28
30
|
|
29
|
-
it "should handle
|
31
|
+
it "should handle exception gracefully" do
|
30
32
|
subject.should_receive(:say).with(command)
|
31
33
|
Open3.should_receive(:capture3).with(command).and_raise(exception_message)
|
32
34
|
subject.should_receive(:say).with("Unable to perform '#{command}': #{exception_message}")
|
33
35
|
subject.perform(command).should be_nil
|
34
36
|
end
|
35
37
|
|
38
|
+
it "should handle errors gracefully" do
|
39
|
+
subject.should_receive(:say).with(command)
|
40
|
+
Open3.should_receive(:capture3).with(command).and_return([result, "kaboom", status_error])
|
41
|
+
subject.should_receive(:say).with("Unable to perform '#{command}': exit_status=1; stderr=kaboom")
|
42
|
+
subject.perform(command).should be_nil
|
43
|
+
end
|
44
|
+
|
36
45
|
it "should not speak the command if told not to" do
|
37
46
|
subject.should_receive(:say).with(command).never
|
38
47
|
subject.perform(command, false)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octopolo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Byrne
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-03-
|
12
|
+
date: 2015-03-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|