thor-ssh 0.1.2 → 0.1.3
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/thor-ssh/remote_server.rb +4 -4
- data/lib/thor-ssh/version.rb +1 -1
- data/spec/actions_spec.rb +7 -0
- metadata +1 -7
|
@@ -9,7 +9,7 @@ module ThorSsh
|
|
|
9
9
|
@connection = connection
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
def run_with_codes
|
|
12
|
+
def run_with_codes(command)
|
|
13
13
|
stdout_data = ""
|
|
14
14
|
stderr_data = ""
|
|
15
15
|
exit_code = nil
|
|
@@ -36,9 +36,9 @@ module ThorSsh
|
|
|
36
36
|
exit_signal = data.read_long
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
|
-
channel.wait
|
|
40
|
-
end
|
|
41
|
-
|
|
39
|
+
# channel.wait
|
|
40
|
+
end
|
|
41
|
+
connection.loop
|
|
42
42
|
|
|
43
43
|
return stdout_data, stderr_data, exit_code, exit_signal
|
|
44
44
|
end
|
data/lib/thor-ssh/version.rb
CHANGED
data/spec/actions_spec.rb
CHANGED
|
@@ -98,6 +98,13 @@ describe ThorSsh do
|
|
|
98
98
|
@thor_test.get('http://nginx.org/download/nginx-1.2.0.tar.gz', '/home/vagrant/nginx-1.2.0.tar.gz')
|
|
99
99
|
end
|
|
100
100
|
|
|
101
|
+
it "should run exec with an exit code" do
|
|
102
|
+
stdout, stderr, exit_code, exit_signal = @thor_test.exec_with_codes('false')
|
|
103
|
+
exit_code.should == 1
|
|
104
|
+
|
|
105
|
+
stdout, stderr, exit_code, exit_signal = @thor_test.exec_with_codes('true')
|
|
106
|
+
exit_code.should == 0
|
|
107
|
+
end
|
|
101
108
|
end
|
|
102
109
|
|
|
103
110
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: thor-ssh
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -169,18 +169,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
169
169
|
- - ! '>='
|
|
170
170
|
- !ruby/object:Gem::Version
|
|
171
171
|
version: '0'
|
|
172
|
-
segments:
|
|
173
|
-
- 0
|
|
174
|
-
hash: -3046248322099718199
|
|
175
172
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
173
|
none: false
|
|
177
174
|
requirements:
|
|
178
175
|
- - ! '>='
|
|
179
176
|
- !ruby/object:Gem::Version
|
|
180
177
|
version: '0'
|
|
181
|
-
segments:
|
|
182
|
-
- 0
|
|
183
|
-
hash: -3046248322099718199
|
|
184
178
|
requirements: []
|
|
185
179
|
rubyforge_project:
|
|
186
180
|
rubygems_version: 1.8.22
|