sp-job 0.2.2 → 0.2.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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/bin/unique-file +0 -2
- data/lib/sp/job/common.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9672916da9a019a5b292a332195e307e2cf35b5b
|
4
|
+
data.tar.gz: 48c48bd95897811d2a7c922313bd0ebaa8dd27c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 167ac6ad6e86de69551c4241d27154a56701819cac80cdbcdadf69f66fc1dff1afa63b26bdece1705f06a911bae01a8ec6a5aa0cfa0e557a811b8583e1a87c92
|
7
|
+
data.tar.gz: d9bee2c1dbdd785f42c674f6247255fc218a3f068352318ee25e1de5fab1c93f9addb21bd68b7bc28b26a5bb1518ad8f77fd92be12d8b525c8f6abac342725e4
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
data/bin/unique-file
CHANGED
@@ -45,8 +45,6 @@ begin
|
|
45
45
|
raise 'Must specify path' if $args[:path].nil?
|
46
46
|
raise 'Must specify extension' if $args[:ext].nil?
|
47
47
|
|
48
|
-
raise 'Path not writable' unless File.writable?($args[:path])
|
49
|
-
|
50
48
|
file = SP::Job::Unique::File.create($args[:path], ".#{$args[:ext]}")
|
51
49
|
|
52
50
|
raise 'Could not create file'.red if file.nil?
|
data/lib/sp/job/common.rb
CHANGED
@@ -128,9 +128,9 @@ module SP
|
|
128
128
|
else
|
129
129
|
uploads_server = config[:uploads][:server]
|
130
130
|
destination_file = %x[ssh #{uploads_server} unique-file -p #{File.join(config[:uploads][:path], remote_path)} -e #{extension}].strip
|
131
|
-
if $?.
|
131
|
+
if $?.exitstatus == 0
|
132
132
|
%x[scp #{src_file} #{uploads_server}:#{remote_file}]
|
133
|
-
raise_error(message: 'i18n_upload_to_server_failed') if $?.
|
133
|
+
raise_error(message: 'i18n_upload_to_server_failed') if $?.exitstatus != 0
|
134
134
|
else
|
135
135
|
raise_error(message: 'i18n_upload_to_server_failed')
|
136
136
|
end
|