gina-conveyor 1.0.0 → 1.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 08fc3174aa43d6d5eb64bfec83f61eadf806f0b3
4
- data.tar.gz: fb2d81a0e75ffc1a620630831f9f8f1e9b5d37af
3
+ metadata.gz: 4e36152eec16d715a5fe6b6f75396521adc5061d
4
+ data.tar.gz: 98ece90ebe918c9f7db4b22ebb8b6ed73ca3ba1e
5
5
  SHA512:
6
- metadata.gz: 589d9f31d1621aea95ac881210703e72a56165c8d53c7c59e472e2e4fb9c1677b3109d32fae779dfe7abf52ef21ab478b7fc81549b5a59bf6091352f96acb81d
7
- data.tar.gz: 718daf0c2872ed754c6dfd24207dfac7ef6981678aa718c639c5a93e06be39916e38aa3a40107d5f82738047565964085fb3344c561831893e388df60b0b83da
6
+ metadata.gz: 8f2be7a86cd0135f534321cfff254af10833bdf69825cba9444a5d21f2c2c8d0032f94ab7d0727e9d3a9d480b1f2ecb902534a22e399e0ef72260a9b32517cb9
7
+ data.tar.gz: 2588fec637fcd027186d261efd0f8cc5b62f3e7d9b764e37361d5991839b838b9dc87760ebef5415c12edbdeec73fed67a61d7d445271f459202c69bb6f334ab
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gina-conveyor (1.0.0)
4
+ gina-conveyor (1.0.1)
5
5
  activemodel (~> 4.1.0)
6
6
  activesupport (~> 4.1.0)
7
7
  em-websocket (~> 0.5.1)
data/README.md CHANGED
@@ -15,7 +15,7 @@ From source
15
15
  git clone https://github.com/gina-alaska/conveyor.git
16
16
  cd conveyor
17
17
  rake install
18
-
18
+
19
19
  Usage
20
20
  -----
21
21
 
@@ -36,6 +36,43 @@ Todo
36
36
  3. Finish email notifications
37
37
  4. Add additional cli options
38
38
 
39
+ Worker Commands
40
+ ---------------
41
+
42
+ #### `run 'COMMAND', [options]`
43
+
44
+ Runs the specified command in a shell
45
+
46
+ **Options**
47
+ * quite (boolean) - suppress any output from the command, default: false
48
+ * timeout (seconds) - the command stop execution after give number of seconds, default: 600 (10 minutes)
49
+
50
+ #### `scp 'FILE', 'DESTINATION', [options]`
51
+
52
+ SCP the specified file to a remote DESTINATION. DESTINATION uses the same format as the actual `scp` command.
53
+
54
+ **Options**
55
+ * quite (boolean) - suppress any output from the command, default: false
56
+ * timeout (seconds) - the command stop execution after give number of seconds, default: 600 (10 minutes)
57
+
58
+ **WARNING:** You will need to have ssh/scp'd to the host manually once in order to ensure that the host key and ssh keys are available for this command.
59
+
60
+ #### `copy 'FILE', 'DESTINATION'`
61
+
62
+ Copy the specified file to DESTINATION. DESTINATION can be a folder or another filename
63
+
64
+ ### `move 'FILE', 'DESTINATION'`
65
+
66
+ Move the specified file to DESTINATION. DESTINATION can be a folder or another filename
67
+
68
+ #### `delete 'FILE'`
69
+
70
+ Deletes the specified file
71
+
72
+ #### `error 'MESSAGE'`, `info 'MESSAGE'`
73
+
74
+ Print info out to various log files and consoles
75
+
39
76
  License
40
77
  -------
41
78
 
@@ -1,3 +1,3 @@
1
1
  module Conveyor
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -64,7 +64,7 @@ module Conveyor
64
64
  info command unless opts[:quiet]
65
65
 
66
66
  begin
67
- cmdrunner = Mixlib::ShellOut.new(command, timeout: Conveyor::Foreman.instance.config[:command_timeout] || 600)
67
+ cmdrunner = Mixlib::ShellOut.new(command, timeout: opts[:timeout] || Conveyor::Foreman.instance.config[:command_timeout] || 600)
68
68
  cmdrunner.run_command()
69
69
 
70
70
  info cmdrunner.stdout.chomp unless cmdrunner.stdout.chomp.length == 0
@@ -81,9 +81,11 @@ module Conveyor
81
81
 
82
82
  return !cmdrunner.error!
83
83
  rescue Mixlib::ShellOut::CommandTimeout => e
84
- error e.class, "Timeout running: #{command}"
84
+ error e.class, e.message, "Command: #{command}"
85
+ # raise e unless opts[:ignore_error]
85
86
  rescue => e
86
87
  error e.class, e.message, e.backtrace.join("\n")
88
+ # raise e unless opts[:ignore_error]
87
89
  end
88
90
  end
89
91
 
@@ -126,8 +128,8 @@ module Conveyor
126
128
 
127
129
  # Scp files to destination
128
130
  # See: man scp
129
- def scp(src, dest)
130
- run "scp #{Array.wrap(src).join(' ')} #{dest}"
131
+ def scp(src, dest, *opts)
132
+ run "scp #{Array.wrap(src).join(' ')} #{dest}", *opts
131
133
  end
132
134
  end
133
135
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gina-conveyor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will Fisher