pushwagner 0.0.2.4 → 0.0.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a66f0e1f5d755e8c784c3bd82da2b000dfb0c7a1
4
- data.tar.gz: 3480978077cdd1312e9aababba509c43b17e7e31
3
+ metadata.gz: c02ebe9ce911be883d12531506ec98e03773a02b
4
+ data.tar.gz: fcd393f3fa1e65db79bace80410f2bbf99789854
5
5
  SHA512:
6
- metadata.gz: 45043c5f1c30a1c13fe673b023e1684443ddbf267f1aaea1ec2396eb50982c311c8c701c337630b68e1d665da17a092121a174f237c67e4b3eb24ccdc665b544
7
- data.tar.gz: 9950d82df2fb02a42dcda13db12fd8bfb95e7dc7cdaf3686630ccf79df273e762b86a6930c4517fb5a13dcda97c4e50e3549e961dc178304d153ec5b2e5c8266
6
+ metadata.gz: 167cbf1595fb16414147ac171bc488908616d22b9105d146d44c22352eea210aa821e1b7072787851d7bd3be7558fe63151cee56d7496200872ce72d4703b7ee
7
+ data.tar.gz: 0faf6b816e34d7665587b2d0fc889a4c69d337cce789d6e9f462d21de33913634d0d4afd573ec3ca13bee6598d2601ce820be8ca7572891c337d1c3bc420a8b9
data/Gemfile.lock CHANGED
@@ -18,7 +18,7 @@ GEM
18
18
  net-scp (1.2.1)
19
19
  net-ssh (>= 2.6.5)
20
20
  net-ssh (4.2.0)
21
- nokogiri (1.8.1)
21
+ nokogiri (1.8.2)
22
22
  mini_portile2 (~> 2.3.0)
23
23
  pry (0.10.3)
24
24
  coderay (~> 1.1.0)
@@ -82,16 +82,20 @@ module Pushwagner
82
82
  ssh.open_channel do |ch|
83
83
 
84
84
  ch.request_pty do |pty_ch, success|
85
- raise "could not execute #{cmd}" unless success
85
+ raise "FATAL: could not execute #{cmd}" unless success
86
86
 
87
87
  puts
88
88
 
89
- ch.exec("#{cmd}")
89
+ ch.exec("#{cmd}") do |ch, success_exec|
90
+ raise "FATAL: failed on execution of #{cmd}" unless success_exec
91
+ end
90
92
 
91
- ch.on_data do |data_ch, data|
93
+ ch.on_extended_data do |data_ch, type, data|
92
94
  if data =~ /\[sudo\] password/i
93
95
  gets_sudo_passwd unless sudo
94
96
  ch.send_data("#{sudo}\n")
97
+ elsif type == :stderr
98
+ print "ERROR: #{data}"
95
99
  else
96
100
  print data
97
101
  end
@@ -1,3 +1,3 @@
1
1
  module Pushwagner
2
- VERSION = "0.0.2.4"
2
+ VERSION = "0.0.2.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pushwagner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2.4
4
+ version: 0.0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ole Christian Rynning
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-03 00:00:00.000000000 Z
11
+ date: 2018-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh