thor-ssh 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -84,14 +84,13 @@ module ThorSsh
84
84
  return unless behavior == :invoke
85
85
 
86
86
  destination = relative_to_original_destination_root(destination_root, false)
87
- desc = "#{command} from #{destination.inspect}"
88
87
 
89
88
  if config[:with]
90
89
  desc = "#{File.basename(config[:with].to_s)} #{desc}"
91
90
  command = "#{config[:with]} #{command}"
92
91
  end
93
92
 
94
- say_status :run, desc, config.fetch(:verbose, true)
93
+ say_status :run, command, config.fetch(:verbose, true)
95
94
 
96
95
  unless options[:pretend]
97
96
  # config[:capture] ? `#{command}` : system("#{command}")
@@ -134,8 +134,9 @@ module ThorSsh
134
134
  end
135
135
  end
136
136
 
137
- # Move the file
138
- run("mv #{temp_file.inspect} #{path.inspect}")
137
+ # Copy the text from the source file
138
+ run("cat #{temp_file.inspect} > #{path.inspect}")
139
+ run("rm -f #{temp_file.inspect}")
139
140
  end
140
141
 
141
142
  unless base.destination_files.exists?(path)
@@ -85,7 +85,7 @@ module ThorSsh
85
85
  stdout_data, stderr_data, exit_code, exit_signal = run_with_codes(command, options)
86
86
 
87
87
  # if stderr_data.strip != ''
88
- if exit_code != 0
88
+ if exit_code != 0 && options[:log_stderr] == true
89
89
  base.say "#{exit_code}>> #{command}", :red
90
90
  base.say stderr_data, :red
91
91
  end
@@ -1,3 +1,3 @@
1
1
  module ThorSsh
2
- VERSION = "0.2.7"
2
+ VERSION = "0.2.8"
3
3
  end
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.2.7
4
+ version: 0.2.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-26 00:00:00.000000000 Z
12
+ date: 2012-07-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -207,7 +207,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
207
207
  version: '0'
208
208
  segments:
209
209
  - 0
210
- hash: -1839400333026886195
210
+ hash: -649158884082539933
211
211
  required_rubygems_version: !ruby/object:Gem::Requirement
212
212
  none: false
213
213
  requirements:
@@ -216,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
216
216
  version: '0'
217
217
  segments:
218
218
  - 0
219
- hash: -1839400333026886195
219
+ hash: -649158884082539933
220
220
  requirements: []
221
221
  rubyforge_project:
222
222
  rubygems_version: 1.8.22