reyes 1.2.5 → 1.2.6
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/bin/reyes +22 -0
- data/lib/reyes/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aee98a9cbc8ed42310ebf0edeac2193d8c919f84
|
4
|
+
data.tar.gz: 461a416f7ea2a33953792d0bbbe4677c1e895e0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfa634f9ec9e5f317faf5fdd6736c6e9342f88d6f88ba7c25e5b7a9cb38bb5d56b5308dada3db28d351eb0726bed005eb25146486cb14eb55e1548e28ce50d7b
|
7
|
+
data.tar.gz: 17b0c2e6fa7d23906845ee5edbf4a0e7327f4baff113e679e80b0a7601f26a38777c5179fc443918f158e49b97e779b820f8a1614e27cefe7252fd987fd2b746
|
data/bin/reyes
CHANGED
@@ -2,6 +2,22 @@
|
|
2
2
|
require 'optparse'
|
3
3
|
require_relative '../lib/reyes'
|
4
4
|
|
5
|
+
REYES_STOP_FILE = '/run/reyes-stop'
|
6
|
+
|
7
|
+
def exit_if_stopped!(options)
|
8
|
+
if File.file?(REYES_STOP_FILE)
|
9
|
+
if options[:ignore_stop_file]
|
10
|
+
STDERR.puts "#{REYES_STOP_FILE} exists but --ignore-stop-file present, proceeding!"
|
11
|
+
else
|
12
|
+
STDERR.puts "#{REYES_STOP_FILE} exists, exiting without modifying local system state!"
|
13
|
+
if File.size(REYES_STOP_FILE) > 0
|
14
|
+
STDERR.puts "Stop file contents: " + File.read(REYES_STOP_FILE)
|
15
|
+
end
|
16
|
+
exit 0 # 0 rather than 1 to avoid cron-spam possibility
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
5
21
|
def command_dump(output_file, options)
|
6
22
|
aws = Reyes::AwsManager.new(options[:config])
|
7
23
|
aws.dump_fake_data(output_file)
|
@@ -114,6 +130,10 @@ For example:
|
|
114
130
|
Options:
|
115
131
|
EOM
|
116
132
|
|
133
|
+
opts.on('--ignore-stop-file', "Ignore presence of Reyes stop file (#{REYES_STOP_FILE})") do |config|
|
134
|
+
options[:ignore_stop_file] = true
|
135
|
+
end
|
136
|
+
|
117
137
|
opts.on('-c', '--config CONFIG', 'YAML config file') do |config|
|
118
138
|
options[:config] = config
|
119
139
|
end
|
@@ -172,6 +192,8 @@ Options:
|
|
172
192
|
|
173
193
|
optparse.parse!
|
174
194
|
|
195
|
+
exit_if_stopped!(options)
|
196
|
+
|
175
197
|
command = ARGV.shift
|
176
198
|
case command
|
177
199
|
when 'dump'
|
data/lib/reyes/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reyes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Brody
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-08-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk
|