ec2-snapshot-replicator 0.1.4 → 0.1.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: 55624de661f4fbc2dcd0175dad6024f603e8f95e
4
- data.tar.gz: a6dfc26ba418ad79adc0fee52b97ce3fdcc61269
3
+ metadata.gz: 9e47184d3770ccf05149c40f7c5c5ba4dd15bf41
4
+ data.tar.gz: 8955170fb745c11c2d475a1e03c58d4abd025d5a
5
5
  SHA512:
6
- metadata.gz: a191546361c6fdfd1d13e4169c0b4490a763c64a3cae2d542f92b4c7c0e9447ea37a4788ad6e78e01620b942f11b4fe509b0b3733e7cf60455598b526d3fe615
7
- data.tar.gz: 3b1b976e3b2998ed636e47905437e5245ab96ae29e777a15d4ffb0eadfe7061a74393f9676da0f884b3111ca975f4ae04985e113b009534f8e9c733de33c2914
6
+ metadata.gz: 1a4128672aabf8c0b7d3752578cf08ce02c8b59e60dcd5a42ebb87b39665534fc80a3b14613faa6e8bf6bcec41ac82172c0ef38fd1090381a30eb54cda17d90e
7
+ data.tar.gz: 1f5391fa2e63a501d224c9a7126f4417691635cbc22342a5cca7d6a7396acec27c9a10c01618253c7d879165a21230449823ad48e4a6f7258a8d901701d20e2c
@@ -11,11 +11,11 @@ module EC2
11
11
  end
12
12
 
13
13
  desc "start", "Start"
14
- method_option :source_region, type: :string, required: true
15
- method_option :destination_region, type: :string, required: true
14
+ method_option :source_region, type: :string
15
+ method_option :destination_region, type: :string
16
16
  method_option :interval_sec, type: :numeric, default: 60 * 10
17
17
  method_option :delay_deletion_sec, type: :numeric, default: 60 * 60 * 24 * 7
18
- method_option :owner_id, type: :string, required: true
18
+ method_option :owner_id, type: :string
19
19
  method_option :debug, type: :boolean, default: false
20
20
  method_option :once, type: :boolean, default: false
21
21
  method_option :config, type: :string
@@ -26,6 +26,7 @@ module EC2
26
26
  config.load_yaml_file(options[:config])
27
27
  end
28
28
  config.load_options(options)
29
+ config.validate!
29
30
 
30
31
  if options[:once]
31
32
  Engine.new(config).run_once
@@ -14,6 +14,14 @@ module EC2
14
14
  self[member] = value if value
15
15
  end
16
16
  end
17
+
18
+ def validate!
19
+ %w!source_region destination_region interval_sec delay_deletion_sec owner_id!.each do |k|
20
+ unless self[k]
21
+ raise "#{k} is not set."
22
+ end
23
+ end
24
+ end
17
25
  end
18
26
  end
19
27
  end
@@ -1,7 +1,7 @@
1
1
  module EC2
2
2
  module Snapshot
3
3
  module Replicator
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ec2-snapshot-replicator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryota Arai