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 +5 -5
- data/lib/cred_stash/repository/dynamo_db.rb +22 -5
- data/lib/cred_stash/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 87738b964c912763c179803996897c9e52d431026ad9973e26891d302a0ee7d6
|
4
|
+
data.tar.gz: e7eee30911e02377b7bcb904d99afa57364d5406c8b38b96f3e4861c70fed636
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
data/lib/cred_stash/version.rb
CHANGED
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.
|
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:
|
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
|
-
|
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
|