rcredstash 1.0.0 → 1.0.1

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
- SHA1:
3
- metadata.gz: aca06718657a698ddb0fd0656439042e474170b0
4
- data.tar.gz: 324fe21131421305b45470106bacc13babfff0b6
2
+ SHA256:
3
+ metadata.gz: 87738b964c912763c179803996897c9e52d431026ad9973e26891d302a0ee7d6
4
+ data.tar.gz: e7eee30911e02377b7bcb904d99afa57364d5406c8b38b96f3e4861c70fed636
5
5
  SHA512:
6
- metadata.gz: 4b427dc9e94c13ce80316d8dad17defec8a4afb5fcfe64f4903d99b4d997135e868158b36f79b586f0be8dc4671cd29b350749ed9bb51f8a55efbc596de0bcae
7
- data.tar.gz: cfa18c4db3718522d563e3f28d2ed239f7949a7c312f9bd4772c94a81394aeffd5dc93431d401a1366cb3ffd05b8317c49aa444147b4d41df221233dc2e1edc6
6
+ metadata.gz: 215d2946ea3197dee17ff033642de2958b4628c6f5d56f496ced7cec6be0917c8f5d3611fc3bbd6a590141fcaec75c321a95b8fa15cb002fc936d589202399a3
7
+ data.tar.gz: d6cc7e2228276f47193f25ece54fddbaaaebc2aea7b8b7cef8bb7c512a13f243e581d74b56da343e8bd06a330e4cf681af89ce1b6e6fc20fc43c3ca2c9034dbe
@@ -56,11 +56,7 @@ module CredStash::Repository
56
56
  end
57
57
 
58
58
  def list
59
- @client.scan(
60
- table_name: CredStash.config.table_name,
61
- projection_expression: '#name, version',
62
- expression_attribute_names: { "#name" => "name" },
63
- ).items.map do |item|
59
+ fetch_all_items.map do |item|
64
60
  Item.new(name: item['name'], version: item['version'])
65
61
  end
66
62
  end
@@ -92,5 +88,26 @@ module CredStash::Repository
92
88
  },
93
89
  )
94
90
  end
91
+
92
+ private
93
+
94
+ def fetch_all_items
95
+ all_items = []
96
+ last_key = nil
97
+ loop do
98
+ response = @client.scan(
99
+ table_name: CredStash.config.table_name,
100
+ projection_expression: "#name, version",
101
+ expression_attribute_names: { "#name" => "name" },
102
+ exclusive_start_key: last_key
103
+ )
104
+
105
+ all_items += response.items
106
+
107
+ last_key = response.last_evaluated_key
108
+ break if last_key.nil?
109
+ end
110
+ all_items
111
+ end
95
112
  end
96
113
  end
@@ -1,3 +1,3 @@
1
1
  module CredStash
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rcredstash
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
  - adorechic
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-27 00:00:00.000000000 Z
11
+ date: 2019-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-kms
@@ -143,8 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
145
  requirements: []
146
- rubyforge_project:
147
- rubygems_version: 2.6.13
146
+ rubygems_version: 3.0.3
148
147
  signing_key:
149
148
  specification_version: 4
150
149
  summary: A Ruby port of CredStash