ssm_utils 0.1.1 → 0.1.2

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
- SHA256:
3
- metadata.gz: 8f36aa12f0e5bdfb56d6567dff5eac1fe3671d975c28eef57287ed6e7a9e78d8
4
- data.tar.gz: 670bdbe87f6428c7e8bd420dacad2bdc3ae3706b08fe314e8c76132e0514ca8b
2
+ SHA1:
3
+ metadata.gz: d63cdb97433eb8bf07c17037aaaee3cdc0da4600
4
+ data.tar.gz: b6ef021be53936561744073ec2399773bd4db9a4
5
5
  SHA512:
6
- metadata.gz: fd05922bd6425b543603372db9e108e30fc157d5ba0e7ec953123a2e585011b6737f14104814dbc6ef3f7b7b093d56cbb83f2e0fd44907376eac35d861c37f23
7
- data.tar.gz: 896373da6e7440302be83cb47c2856dd27e50cbddb07e11aa65eb5b6aa84dcd543e62533662413c9b39aac46c77b8eba01c9aa80e96eb3924097a2a9e5fc966f
6
+ metadata.gz: 517bf5f1a66fe19ce45481361548502736936b28b1d5f54d9a88b07e25cffcc77204a7abd712423740686a293394e9c779ddbe8b33de0e664caa8113f7a8383b
7
+ data.tar.gz: e5916c973f14dfdf28a6e0f280495caa345f5648d2849e45d6ffd811daf0ef2bae4222aca002c681b240dd44bfb46867ac11fc3e06107b9194bebf78f10822ed
@@ -22,7 +22,7 @@ module SsmUtils
22
22
  EOF
23
23
  c.option '--file FILE', String, 'File to retrieve account to.'
24
24
  c.option '--[no-]decrypt', 'Decrypt SecureStrings, default true'
25
- c.option '--ssm_root PATH_ROOT', String,
25
+ c.option '--ssm_root PATH_ROOT', String,
26
26
  "A path root to retrieve from, default is '/'"
27
27
  c.when_called do |args, options|
28
28
  options.default(decrypt: true, ssm_root: '/')
@@ -41,12 +41,14 @@ module SsmUtils
41
41
  the reverse of the mappings used by get.
42
42
  EOF
43
43
  c.option '--file FILE', String, 'File to retrieve account to.'
44
+ c.option '--retry-limit INTEGER', Integer, 'increase retry limit, default 3'
44
45
  c.option '--[no-]overwrite', 'Overwrite exitings strings, default true'
45
46
  c.when_called do |args, options|
46
- options.default(overwrite: true)
47
+ options.default(overwrite: true, retry_limit: 3)
47
48
  PutParamsCommand.new(
48
49
  in_file: options.file,
49
- overwrite: options.overwrite
50
+ overwrite: options.overwrite,
51
+ retry_limit: options.retry_limit
50
52
  ).execute
51
53
  end
52
54
  end
@@ -6,12 +6,14 @@ module SsmUtils
6
6
  class PutParamsCommand
7
7
  def initialize(options)
8
8
  options = {
9
- overwrite: false
9
+ overwrite: false,
10
+ retry_limit: 3
10
11
  }.merge(options)
11
12
 
12
13
  raise ArgumentError.new("No input file") unless options.key? :in_file
13
14
 
14
15
  @overwrite = options[:overwrite]
16
+ @retry_limit = options[:retry_limit]
15
17
  @in_file = options[:in_file]
16
18
  end
17
19
 
@@ -19,7 +21,8 @@ module SsmUtils
19
21
  parameters = YAML.load_file(@in_file)
20
22
  SsmWriterDriver.new(
21
23
  parameters: parameters,
22
- overwrite: @overwrite
24
+ overwrite: @overwrite,
25
+ retry_limit: @retry_limit
23
26
  ).write_parameters
24
27
  end
25
28
  end
@@ -7,13 +7,14 @@ module SsmUtils
7
7
 
8
8
  def initialize(options)
9
9
  options = {
10
- overwrite: false
10
+ overwrite: false,
11
+ retry_limit: 3
11
12
  }.merge(options)
12
13
 
13
14
  raise ArgumentError('Missing parameters') unless options.key? :parameters
14
15
 
15
16
  @parameters = options[:parameters]
16
- @ssm = Aws::SSM::Client.new
17
+ @ssm = Aws::SSM::Client.new({retry_limit: options[:retry_limit]})
17
18
  @overwrite = options[:overwrite]
18
19
  end
19
20
 
@@ -1,3 +1,3 @@
1
1
  module SsmUtils
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ssm_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Kolb
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-20 00:00:00.000000000 Z
11
+ date: 2019-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  version: '0'
146
146
  requirements: []
147
147
  rubyforge_project:
148
- rubygems_version: 2.7.6
148
+ rubygems_version: 2.6.14
149
149
  signing_key:
150
150
  specification_version: 4
151
151
  summary: Utility scripts for managing SSM params