smps 0.3.2 → 0.3.3

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: 74fb7895cd7555cf1821c7629a1a6d7bcec1e6f9
4
- data.tar.gz: e069ba67143ceb52425e0bf8ebbc49742c76fda1
3
+ metadata.gz: 45726b22b9b1656ce417d47fec4e4a811bc0f532
4
+ data.tar.gz: 7e7e42647231aa41f5f477bf0d635ce18de7b510
5
5
  SHA512:
6
- metadata.gz: 6e9f81df0d16b07a5a2da9e1db54fc76c2269a65d60cc30b705ca4d73bc33c70b6d884e04f8be3f20d9b20189f8e550afc7fcbd49dded5df87840478e321f8dc
7
- data.tar.gz: 6c26f759dbc3cd0ab5066ac00ebdb6b2a4b90c7b974bcf5ae7e5963cfa3f3cc520bd85a806de872d55de3b01ed06fe0c76725d9af95a8a31bf40b9a0157cf59b
6
+ metadata.gz: 3369bf6cf940ac85300d11ba159b9a509fb90348bff06208eed0d9c607b742e95189a224d42650525878019125c2e6ed48acf4c85a9fc10786a8e32f149f10cb
7
+ data.tar.gz: 679b6c53927b469b86dfc8b14a37785cc297044bbd2a67dccba5b8be4ba5ed5318d8550428def8836d9db79c2870ade60876a81c7e40f2047909b0f3fc012f57
@@ -5,6 +5,10 @@ Version format based on http://semver.org/
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.3.3] - 2017-11-17
9
+ ### Changed
10
+ - Add next_token handling for get_parameters_by_path
11
+
8
12
  ## [0.3.2] - 2017-11-16
9
13
  ### Changed
10
14
  - Set \@decrypt param to true by default
@@ -34,25 +34,36 @@ class SmPs
34
34
  path = options.fetch(:path)
35
35
  recursive = options[:recursive]
36
36
  decrypt = options[:decrypt] || true
37
- params = ssm_client.get_parameters_by_path(
38
- path: path,
39
- recursive: recursive,
40
- with_decryption: decrypt
41
- )
42
- store_parameters params
37
+ @parameters_by_path_list = []
38
+ # while result has 'next_token'
39
+ fetch_more = true
40
+ next_token = nil
41
+ while fetch_more
42
+ params = ssm_client.get_parameters_by_path(
43
+ path: path,
44
+ recursive: recursive,
45
+ with_decryption: decrypt,
46
+ next_token: next_token
47
+ )
48
+ if params.next_token
49
+ next_token = params.next_token
50
+ else
51
+ fetch_more = false
52
+ end
53
+ store_parameters params
54
+ end
55
+ @parameters_by_path_list
43
56
  end
44
57
 
45
58
  def store_parameters(params)
46
59
  return if params.nil?
47
- list = []
48
60
  params.parameters.each do |parameter|
49
61
  @parameters[parameter.name] = SmPs::Parameter.new(
50
62
  ssm: ssm_client, fetch: false,
51
63
  name: parameter.name, value: parameter.value, type: parameter.type
52
64
  )
53
- list << @parameters[parameter.name]
65
+ @parameters_by_path_list << @parameters[parameter.name]
54
66
  end
55
- list
56
67
  end
57
68
 
58
69
  # def info
@@ -1,3 +1,3 @@
1
1
  class SmPs
2
- VERSION = '0.3.2'.freeze
2
+ VERSION = '0.3.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan - Zipkid - Goethals
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-16 00:00:00.000000000 Z
11
+ date: 2017-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler