porky_lib 0.11.3 → 0.12.0
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 +4 -4
- data/.circleci/config.yml +3 -6
- data/.github/dependabot.yml +2 -2
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/Gemfile +21 -1
- data/Gemfile.lock +68 -56
- data/README.md +10 -29
- data/lib/porky_lib/aws/kms/client.rb +6 -6
- data/lib/porky_lib/file_service.rb +8 -23
- data/lib/porky_lib/file_service_helper.rb +8 -10
- data/lib/porky_lib/symmetric.rb +4 -4
- data/lib/porky_lib/unencrypted/file_service.rb +4 -16
- data/lib/porky_lib/version.rb +1 -1
- data/lib/tasks/file.rake +2 -2
- data/porky_lib.gemspec +2 -23
- metadata +8 -288
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8de510dc040348a1e718fd1a54aaea64a6e3b8914a0521d606fffbfed7cbd48a
|
|
4
|
+
data.tar.gz: 11ab1c698c0e20a4e2ef4cc7fa3d1d2f800a514f986eb33d479ca2e16903464d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a731c88dbc787ba37304919d5a5f4c4f80c0bd8325c0baf7c2a6433dfb8288ef6ae02e02f571b1583f9aaa84dfefe3ca2d4049f8f01d5b6342fa876c39ca9e70
|
|
7
|
+
data.tar.gz: 3a872f348ffc9ebfcdae6d9e235ad27abf2897c994fceb0d280eede27f340acc0ccbadf09be295d0921bc1312fefda11b4c1f68a8e826e1d851b8731c9d0a653
|
data/.circleci/config.yml
CHANGED
|
@@ -4,10 +4,11 @@ jobs:
|
|
|
4
4
|
parallelism: 1
|
|
5
5
|
working_directory: ~/porky_lib
|
|
6
6
|
docker:
|
|
7
|
-
- image:
|
|
7
|
+
- image: cimg/ruby:3.2.5
|
|
8
8
|
|
|
9
9
|
steps:
|
|
10
|
-
- checkout
|
|
10
|
+
- checkout:
|
|
11
|
+
method: full
|
|
11
12
|
|
|
12
13
|
- restore_cache:
|
|
13
14
|
name: Restore bundle cache
|
|
@@ -27,10 +28,6 @@ jobs:
|
|
|
27
28
|
name: Bundle Install
|
|
28
29
|
command: bundle install
|
|
29
30
|
|
|
30
|
-
- run:
|
|
31
|
-
name: Install libsodium
|
|
32
|
-
command: sudo apt-get install libsodium-dev
|
|
33
|
-
|
|
34
31
|
- save_cache:
|
|
35
32
|
name: Store bundle cache
|
|
36
33
|
key: porky_lib-bundle-{{ checksum "Gemfile.lock" }}
|
data/.github/dependabot.yml
CHANGED
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.
|
|
1
|
+
3.2.5
|
data/Gemfile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
ruby '3.
|
|
3
|
+
ruby '3.2.5'
|
|
4
4
|
|
|
5
5
|
source "https://rubygems.org"
|
|
6
6
|
|
|
@@ -8,3 +8,23 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
|
|
8
8
|
|
|
9
9
|
# Specify your gem's dependencies in porky_lib.gemspec
|
|
10
10
|
gemspec
|
|
11
|
+
|
|
12
|
+
# add development dependencies
|
|
13
|
+
group :development, :test do
|
|
14
|
+
gem 'bundler'
|
|
15
|
+
gem 'bundler-audit'
|
|
16
|
+
gem 'byebug'
|
|
17
|
+
gem 'codacy-coverage'
|
|
18
|
+
gem 'codecov'
|
|
19
|
+
gem 'rake'
|
|
20
|
+
gem 'rspec'
|
|
21
|
+
gem 'rspec-collection_matchers'
|
|
22
|
+
gem 'rspec_junit_formatter'
|
|
23
|
+
gem 'rspec-mocks'
|
|
24
|
+
gem 'rubocop'
|
|
25
|
+
gem 'rubocop-performance'
|
|
26
|
+
gem 'rubocop-rspec'
|
|
27
|
+
gem 'rubocop_runner'
|
|
28
|
+
gem 'simplecov'
|
|
29
|
+
gem 'timecop'
|
|
30
|
+
end
|
data/Gemfile.lock
CHANGED
|
@@ -1,32 +1,37 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
porky_lib (0.
|
|
4
|
+
porky_lib (0.12.0)
|
|
5
5
|
aws-sdk-kms
|
|
6
6
|
aws-sdk-s3
|
|
7
7
|
msgpack
|
|
8
|
-
rbnacl (
|
|
8
|
+
rbnacl (~> 7.1)
|
|
9
9
|
|
|
10
10
|
GEM
|
|
11
11
|
remote: https://rubygems.org/
|
|
12
12
|
specs:
|
|
13
13
|
ast (2.4.2)
|
|
14
|
-
aws-eventstream (1.
|
|
15
|
-
aws-partitions (1.
|
|
16
|
-
aws-sdk-core (3.
|
|
17
|
-
aws-eventstream (~> 1, >= 1.0
|
|
18
|
-
aws-partitions (~> 1, >= 1.
|
|
19
|
-
aws-sigv4 (~> 1.
|
|
14
|
+
aws-eventstream (1.4.0)
|
|
15
|
+
aws-partitions (1.1206.0)
|
|
16
|
+
aws-sdk-core (3.241.4)
|
|
17
|
+
aws-eventstream (~> 1, >= 1.3.0)
|
|
18
|
+
aws-partitions (~> 1, >= 1.992.0)
|
|
19
|
+
aws-sigv4 (~> 1.9)
|
|
20
|
+
base64
|
|
21
|
+
bigdecimal
|
|
20
22
|
jmespath (~> 1, >= 1.6.1)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
aws-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
logger
|
|
24
|
+
aws-sdk-kms (1.121.0)
|
|
25
|
+
aws-sdk-core (~> 3, >= 3.241.4)
|
|
26
|
+
aws-sigv4 (~> 1.5)
|
|
27
|
+
aws-sdk-s3 (1.212.0)
|
|
28
|
+
aws-sdk-core (~> 3, >= 3.241.4)
|
|
26
29
|
aws-sdk-kms (~> 1)
|
|
27
|
-
aws-sigv4 (~> 1.
|
|
28
|
-
aws-sigv4 (1.
|
|
30
|
+
aws-sigv4 (~> 1.5)
|
|
31
|
+
aws-sigv4 (1.12.1)
|
|
29
32
|
aws-eventstream (~> 1, >= 1.0.2)
|
|
33
|
+
base64 (0.3.0)
|
|
34
|
+
bigdecimal (4.0.1)
|
|
30
35
|
bundler-audit (0.9.1)
|
|
31
36
|
bundler (>= 1.2.0, < 3)
|
|
32
37
|
thor (~> 1.0)
|
|
@@ -35,85 +40,92 @@ GEM
|
|
|
35
40
|
simplecov
|
|
36
41
|
codecov (0.6.0)
|
|
37
42
|
simplecov (>= 0.15, < 0.22)
|
|
38
|
-
diff-lcs (1.5.
|
|
43
|
+
diff-lcs (1.5.1)
|
|
39
44
|
docile (1.4.0)
|
|
40
45
|
ffi (1.15.4)
|
|
41
46
|
jmespath (1.6.2)
|
|
42
|
-
json (2.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
json (2.7.2)
|
|
48
|
+
language_server-protocol (3.17.0.3)
|
|
49
|
+
logger (1.7.0)
|
|
50
|
+
msgpack (1.7.2)
|
|
51
|
+
parallel (1.24.0)
|
|
52
|
+
parser (3.3.1.0)
|
|
46
53
|
ast (~> 2.4.1)
|
|
54
|
+
racc
|
|
55
|
+
racc (1.7.3)
|
|
47
56
|
rainbow (3.1.1)
|
|
48
|
-
rake (13.
|
|
57
|
+
rake (13.2.1)
|
|
49
58
|
rbnacl (7.1.1)
|
|
50
59
|
ffi
|
|
51
|
-
regexp_parser (2.
|
|
52
|
-
rexml (3.
|
|
53
|
-
rspec (3.
|
|
54
|
-
rspec-core (~> 3.
|
|
55
|
-
rspec-expectations (~> 3.
|
|
56
|
-
rspec-mocks (~> 3.
|
|
57
|
-
rspec-collection_matchers (1.2.
|
|
60
|
+
regexp_parser (2.9.0)
|
|
61
|
+
rexml (3.4.4)
|
|
62
|
+
rspec (3.13.0)
|
|
63
|
+
rspec-core (~> 3.13.0)
|
|
64
|
+
rspec-expectations (~> 3.13.0)
|
|
65
|
+
rspec-mocks (~> 3.13.0)
|
|
66
|
+
rspec-collection_matchers (1.2.1)
|
|
58
67
|
rspec-expectations (>= 2.99.0.beta1)
|
|
59
|
-
rspec-core (3.
|
|
60
|
-
rspec-support (~> 3.
|
|
61
|
-
rspec-expectations (3.
|
|
68
|
+
rspec-core (3.13.0)
|
|
69
|
+
rspec-support (~> 3.13.0)
|
|
70
|
+
rspec-expectations (3.13.0)
|
|
62
71
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
63
|
-
rspec-support (~> 3.
|
|
64
|
-
rspec-mocks (3.
|
|
72
|
+
rspec-support (~> 3.13.0)
|
|
73
|
+
rspec-mocks (3.13.0)
|
|
65
74
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
66
|
-
rspec-support (~> 3.
|
|
67
|
-
rspec-support (3.
|
|
75
|
+
rspec-support (~> 3.13.0)
|
|
76
|
+
rspec-support (3.13.0)
|
|
68
77
|
rspec_junit_formatter (0.6.0)
|
|
69
78
|
rspec-core (>= 2, < 4, != 2.12.0)
|
|
70
|
-
rubocop (1.
|
|
79
|
+
rubocop (1.63.4)
|
|
71
80
|
json (~> 2.3)
|
|
81
|
+
language_server-protocol (>= 3.17.0)
|
|
72
82
|
parallel (~> 1.10)
|
|
73
|
-
parser (>= 3.
|
|
83
|
+
parser (>= 3.3.0.2)
|
|
74
84
|
rainbow (>= 2.2.2, < 4.0)
|
|
75
85
|
regexp_parser (>= 1.8, < 3.0)
|
|
76
86
|
rexml (>= 3.2.5, < 4.0)
|
|
77
|
-
rubocop-ast (>= 1.
|
|
87
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
|
78
88
|
ruby-progressbar (~> 1.7)
|
|
79
89
|
unicode-display_width (>= 2.4.0, < 3.0)
|
|
80
|
-
rubocop-ast (1.
|
|
81
|
-
parser (>= 3.
|
|
82
|
-
rubocop-capybara (2.
|
|
90
|
+
rubocop-ast (1.31.3)
|
|
91
|
+
parser (>= 3.3.1.0)
|
|
92
|
+
rubocop-capybara (2.20.0)
|
|
93
|
+
rubocop (~> 1.41)
|
|
94
|
+
rubocop-factory_bot (2.25.1)
|
|
83
95
|
rubocop (~> 1.41)
|
|
84
|
-
rubocop-performance (1.
|
|
85
|
-
rubocop (>= 1.
|
|
86
|
-
rubocop-ast (>=
|
|
87
|
-
rubocop-rspec (2.
|
|
88
|
-
rubocop (~> 1.
|
|
96
|
+
rubocop-performance (1.21.0)
|
|
97
|
+
rubocop (>= 1.48.1, < 2.0)
|
|
98
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
|
99
|
+
rubocop-rspec (2.29.1)
|
|
100
|
+
rubocop (~> 1.40)
|
|
89
101
|
rubocop-capybara (~> 2.17)
|
|
102
|
+
rubocop-factory_bot (~> 2.22)
|
|
103
|
+
rubocop-rspec_rails (~> 2.28)
|
|
104
|
+
rubocop-rspec_rails (2.28.2)
|
|
105
|
+
rubocop (~> 1.40)
|
|
90
106
|
rubocop_runner (2.2.1)
|
|
91
|
-
ruby-progressbar (1.
|
|
107
|
+
ruby-progressbar (1.13.0)
|
|
92
108
|
simplecov (0.21.2)
|
|
93
109
|
docile (~> 1.1)
|
|
94
110
|
simplecov-html (~> 0.11)
|
|
95
111
|
simplecov_json_formatter (~> 0.1)
|
|
96
112
|
simplecov-html (0.12.3)
|
|
97
113
|
simplecov_json_formatter (0.1.3)
|
|
98
|
-
thor (1.
|
|
99
|
-
timecop (0.9.
|
|
100
|
-
unicode-display_width (2.
|
|
114
|
+
thor (1.5.0)
|
|
115
|
+
timecop (0.9.8)
|
|
116
|
+
unicode-display_width (2.5.0)
|
|
101
117
|
|
|
102
118
|
PLATFORMS
|
|
103
119
|
ruby
|
|
104
120
|
|
|
105
121
|
DEPENDENCIES
|
|
106
|
-
aws-sdk-kms
|
|
107
|
-
aws-sdk-s3
|
|
108
122
|
bundler
|
|
109
123
|
bundler-audit
|
|
110
124
|
byebug
|
|
111
125
|
codacy-coverage
|
|
112
126
|
codecov
|
|
113
|
-
msgpack
|
|
114
127
|
porky_lib!
|
|
115
128
|
rake
|
|
116
|
-
rbnacl (= 7.1.1)
|
|
117
129
|
rspec
|
|
118
130
|
rspec-collection_matchers
|
|
119
131
|
rspec-mocks
|
|
@@ -126,7 +138,7 @@ DEPENDENCIES
|
|
|
126
138
|
timecop
|
|
127
139
|
|
|
128
140
|
RUBY VERSION
|
|
129
|
-
ruby 3.
|
|
141
|
+
ruby 3.2.5p208
|
|
130
142
|
|
|
131
143
|
BUNDLED WITH
|
|
132
|
-
2.
|
|
144
|
+
2.4.10
|
data/README.md
CHANGED
|
@@ -154,16 +154,6 @@ file_data = PorkyLib::FileService.read(bucket_name, file_key)
|
|
|
154
154
|
file_data = PorkyLib::Unencrypted::FileService.read(bucket_name, file_key)
|
|
155
155
|
```
|
|
156
156
|
|
|
157
|
-
### To Write To AWS S3
|
|
158
|
-
```ruby
|
|
159
|
-
# --- DEPRECATED --- Please use write_data or write_file instead of write
|
|
160
|
-
# Where file is the data to encrypt and upload to S3 (can be a path or raw data or ruby file object)
|
|
161
|
-
# bucket_name is the name of the S3 bucket to write to
|
|
162
|
-
# key_id is the ID of the CMK to use to generate a data encryption key to encrypt the file data
|
|
163
|
-
# options is an optional parameter for specifying optional metadata about the file and the storage_class of the object
|
|
164
|
-
file_key = PorkyLib::FileService.write(file, bucket_name, key_id, options)
|
|
165
|
-
```
|
|
166
|
-
|
|
167
157
|
### To Write Files To AWS S3
|
|
168
158
|
```ruby
|
|
169
159
|
# Where file is the data to encrypt and upload to S3 (can be a path or ruby file object)
|
|
@@ -182,15 +172,6 @@ file_key = PorkyLib::FileService.write_file(file, bucket_name, key_id, options)
|
|
|
182
172
|
file_key = PorkyLib::FileService.write_data(data, bucket_name, key_id, options)
|
|
183
173
|
```
|
|
184
174
|
|
|
185
|
-
### To Write Unencrypted To AWS S3
|
|
186
|
-
```ruby
|
|
187
|
-
# --- DEPRECATED --- Please use write_data or write_file instead of write
|
|
188
|
-
# Where file is the data to upload to S3 (can be a path or raw data or ruby file object)
|
|
189
|
-
# bucket_name is the name of the S3 bucket to write to
|
|
190
|
-
# options is an optional parameter for specifying optional metadata about the file and the storage_class of the object
|
|
191
|
-
file_key = PorkyLib::Unencrypted::FileService.write(file, bucket_name, options)
|
|
192
|
-
```
|
|
193
|
-
|
|
194
175
|
### To Write Unencrypted Files To AWS S3
|
|
195
176
|
```ruby
|
|
196
177
|
# Where file is the data to encrypt and upload to S3 (can be a path or ruby file object)
|
|
@@ -273,33 +254,33 @@ the likelihood of the pull request being accepted.
|
|
|
273
254
|
|
|
274
255
|
This application requires:
|
|
275
256
|
|
|
276
|
-
* Ruby version: 2.
|
|
257
|
+
* Ruby version: 3.2.5
|
|
277
258
|
|
|
278
|
-
Ruby
|
|
259
|
+
Ruby 3.2+ requires OpenSSL 3.0+. To link to Homebrew's version of OpenSSL, add the following to your shell profile:
|
|
279
260
|
|
|
280
261
|
```shell script
|
|
281
|
-
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@
|
|
262
|
+
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@3)"
|
|
282
263
|
```
|
|
283
264
|
|
|
284
265
|
If you do not have Ruby installed, it is recommended you use ruby-install and chruby to manage Ruby versions.
|
|
285
266
|
|
|
286
267
|
```bash
|
|
287
268
|
brew install ruby-install chruby
|
|
288
|
-
ruby-install ruby 2.
|
|
269
|
+
ruby-install ruby 3.2.5
|
|
289
270
|
```
|
|
290
271
|
|
|
291
|
-
Add the following lines to ~/.bash_profile:
|
|
272
|
+
Add the following lines to ~/.zshrc (or ~/.bash_profile for bash):
|
|
292
273
|
|
|
293
274
|
```bash
|
|
294
|
-
source /
|
|
295
|
-
source /
|
|
275
|
+
source /opt/homebrew/opt/chruby/share/chruby/chruby.sh
|
|
276
|
+
source /opt/homebrew/opt/chruby/share/chruby/auto.sh
|
|
296
277
|
```
|
|
297
278
|
|
|
298
|
-
Set Ruby version to 2.
|
|
279
|
+
Set Ruby version to 3.2.5:
|
|
299
280
|
|
|
300
281
|
```bash
|
|
301
|
-
source ~/.
|
|
302
|
-
chruby 2.
|
|
282
|
+
source ~/.zshrc
|
|
283
|
+
chruby 3.2.5
|
|
303
284
|
```
|
|
304
285
|
|
|
305
286
|
### Running Tests
|
|
@@ -25,8 +25,8 @@ class Aws::KMS::Client
|
|
|
25
25
|
enabled: true,
|
|
26
26
|
key_id: SecureRandom.uuid,
|
|
27
27
|
key_state: 'Enabled',
|
|
28
|
-
key_usage
|
|
29
|
-
origin:
|
|
28
|
+
key_usage:,
|
|
29
|
+
origin:
|
|
30
30
|
}
|
|
31
31
|
)
|
|
32
32
|
end
|
|
@@ -64,8 +64,8 @@ class Aws::KMS::Client
|
|
|
64
64
|
|
|
65
65
|
plaintext = SecureRandom.random_bytes(PLAINTEXT_KEY_LENGTH)
|
|
66
66
|
Aws::KMS::Types::GenerateDataKeyResponse.new(
|
|
67
|
-
key_id
|
|
68
|
-
plaintext
|
|
67
|
+
key_id:,
|
|
68
|
+
plaintext:,
|
|
69
69
|
ciphertext_blob: [key_id, encryption_context, plaintext].to_msgpack.reverse
|
|
70
70
|
)
|
|
71
71
|
end
|
|
@@ -76,8 +76,8 @@ class Aws::KMS::Client
|
|
|
76
76
|
raise Aws::KMS::Errors::InvalidCiphertextException.new(nil, nil) unless decoded_context == encryption_context
|
|
77
77
|
|
|
78
78
|
Aws::KMS::Types::DecryptResponse.new(
|
|
79
|
-
key_id
|
|
80
|
-
plaintext:
|
|
79
|
+
key_id:,
|
|
80
|
+
plaintext:
|
|
81
81
|
)
|
|
82
82
|
rescue MessagePack::MalformedFormatError
|
|
83
83
|
raise Aws::KMS::Errors::InvalidCiphertextException.new(nil, nil)
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require 'base64'
|
|
3
4
|
require 'singleton'
|
|
4
5
|
|
|
5
6
|
class PorkyLib::FileService
|
|
6
|
-
extend Gem::Deprecate
|
|
7
|
-
|
|
8
7
|
include Singleton
|
|
9
8
|
include PorkyLib::FileServiceHelper
|
|
10
9
|
|
|
@@ -45,28 +44,18 @@ class PorkyLib::FileService
|
|
|
45
44
|
tempfile = Tempfile.new
|
|
46
45
|
|
|
47
46
|
begin
|
|
48
|
-
|
|
49
|
-
raise FileSizeTooLargeError, "File size is larger than maximum allowed size of #{max_file_size}" if
|
|
47
|
+
head_response = s3_client.head_object(bucket: bucket_name, key: file_key)
|
|
48
|
+
raise FileSizeTooLargeError, "File size is larger than maximum allowed size of #{max_file_size}" if head_response.content_length > max_size
|
|
50
49
|
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
get_options = { bucket: bucket_name, key: file_key, response_target: tempfile.path }.merge(options)
|
|
51
|
+
s3_client.get_object(get_options)
|
|
52
|
+
rescue Aws::Errors::ServiceError, Seahorse::Client::NetworkingError => e
|
|
53
53
|
raise FileServiceError, "Attempt to download a file from S3 failed.\n#{e.message}"
|
|
54
54
|
end
|
|
55
55
|
|
|
56
56
|
decrypt_file_contents(tempfile)
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
-
def write(file, bucket_name, key_id, options = {})
|
|
60
|
-
raise FileServiceError, 'Invalid input. One or more input values is nil' if input_invalid?(file, bucket_name, key_id)
|
|
61
|
-
|
|
62
|
-
if file?(file)
|
|
63
|
-
write_file(file, bucket_name, key_id, options)
|
|
64
|
-
else
|
|
65
|
-
write_data(file, bucket_name, key_id, options)
|
|
66
|
-
end
|
|
67
|
-
end
|
|
68
|
-
deprecate :write, 'write_file or write_data', 2020, 1
|
|
69
|
-
|
|
70
59
|
def write_file(file, bucket_name, key_id, options = {})
|
|
71
60
|
raise FileServiceError, 'Invalid input. One or more input values is nil' if input_invalid?(file, bucket_name, key_id)
|
|
72
61
|
|
|
@@ -86,7 +75,7 @@ class PorkyLib::FileService
|
|
|
86
75
|
|
|
87
76
|
begin
|
|
88
77
|
perform_upload(bucket_name, file_key, tempfile, options)
|
|
89
|
-
rescue Aws::Errors::ServiceError => e
|
|
78
|
+
rescue Aws::Errors::ServiceError, Seahorse::Client::NetworkingError => e
|
|
90
79
|
raise FileServiceError, "Attempt to upload a file to S3 failed.\n#{e.message}"
|
|
91
80
|
end
|
|
92
81
|
|
|
@@ -105,7 +94,7 @@ class PorkyLib::FileService
|
|
|
105
94
|
|
|
106
95
|
begin
|
|
107
96
|
perform_upload(bucket_name, file_key, tempfile, options)
|
|
108
|
-
rescue Aws::Errors::ServiceError => e
|
|
97
|
+
rescue Aws::Errors::ServiceError, Seahorse::Client::NetworkingError => e
|
|
109
98
|
raise FileServiceError, "Attempt to upload a file to S3 failed.\n#{e.message}"
|
|
110
99
|
end
|
|
111
100
|
|
|
@@ -176,10 +165,6 @@ class PorkyLib::FileService
|
|
|
176
165
|
PorkyLib::Config.config[:presign_url_expires_in]
|
|
177
166
|
end
|
|
178
167
|
|
|
179
|
-
def s3_client
|
|
180
|
-
@s3_client ||= Aws::S3::Client.new
|
|
181
|
-
end
|
|
182
|
-
|
|
183
168
|
def input_invalid?(file_or_data, bucket_name, key_id)
|
|
184
169
|
file_or_data.nil? || bucket_name.nil? || key_id.nil?
|
|
185
170
|
end
|
|
@@ -3,19 +3,12 @@
|
|
|
3
3
|
require 'aws-sdk-s3'
|
|
4
4
|
|
|
5
5
|
module PorkyLib::FileServiceHelper
|
|
6
|
-
extend Gem::Deprecate
|
|
7
|
-
|
|
8
6
|
class FileServiceError < StandardError; end
|
|
9
7
|
|
|
10
8
|
def data_size_invalid?(data)
|
|
11
9
|
data.bytesize > max_size
|
|
12
10
|
end
|
|
13
11
|
|
|
14
|
-
def file?(file_or_content)
|
|
15
|
-
a_file?(file_or_content) || a_path?(file_or_content)
|
|
16
|
-
end
|
|
17
|
-
deprecate :file?, :none, 2020, 1
|
|
18
|
-
|
|
19
12
|
def write_tempfile(file_contents, file_key)
|
|
20
13
|
tempfile = Tempfile.new(file_key)
|
|
21
14
|
tempfile << file_contents
|
|
@@ -35,20 +28,25 @@ module PorkyLib::FileServiceHelper
|
|
|
35
28
|
end
|
|
36
29
|
|
|
37
30
|
def perform_upload(bucket_name, file_key, tempfile, options)
|
|
38
|
-
obj = s3.bucket(bucket_name).object(file_key)
|
|
39
|
-
|
|
40
31
|
upload_options = {
|
|
32
|
+
bucket: bucket_name,
|
|
33
|
+
key: file_key,
|
|
34
|
+
body: File.open(tempfile.path, 'rb'),
|
|
41
35
|
metadata: (options[:metadata] if options.key?(:metadata)),
|
|
42
36
|
storage_class: (options[:storage_class] if options.key?(:storage_class))
|
|
43
37
|
}.compact
|
|
44
38
|
|
|
45
|
-
|
|
39
|
+
s3_client.put_object(upload_options)
|
|
46
40
|
end
|
|
47
41
|
|
|
48
42
|
def s3
|
|
49
43
|
@s3 ||= Aws::S3::Resource.new
|
|
50
44
|
end
|
|
51
45
|
|
|
46
|
+
def s3_client
|
|
47
|
+
@s3_client ||= Aws::S3::Client.new
|
|
48
|
+
end
|
|
49
|
+
|
|
52
50
|
def max_size
|
|
53
51
|
PorkyLib::Config.config[:max_file_size]
|
|
54
52
|
end
|
data/lib/porky_lib/symmetric.rb
CHANGED
|
@@ -22,7 +22,7 @@ class PorkyLib::Symmetric
|
|
|
22
22
|
|
|
23
23
|
# rubocop:disable Style/OptionalBooleanParameter
|
|
24
24
|
def create_key(tags, key_alias = nil, key_rotation_enabled = true)
|
|
25
|
-
resp = client.create_key(key_usage: CMK_KEY_USAGE, origin: CMK_KEY_ORIGIN, tags:
|
|
25
|
+
resp = client.create_key(key_usage: CMK_KEY_USAGE, origin: CMK_KEY_ORIGIN, tags:)
|
|
26
26
|
key_id = resp.to_h[:key_metadata][:key_id]
|
|
27
27
|
|
|
28
28
|
# Enable automatic key rotation for the newly created CMK
|
|
@@ -45,7 +45,7 @@ class PorkyLib::Symmetric
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
def enable_key_rotation(key_id)
|
|
48
|
-
client.enable_key_rotation(key_id:
|
|
48
|
+
client.enable_key_rotation(key_id:)
|
|
49
49
|
end
|
|
50
50
|
|
|
51
51
|
def create_alias(key_id, key_alias)
|
|
@@ -54,14 +54,14 @@ class PorkyLib::Symmetric
|
|
|
54
54
|
|
|
55
55
|
def generate_data_encryption_key(cmk_key_id, encryption_context = nil)
|
|
56
56
|
resp = {}
|
|
57
|
-
resp = client.generate_data_key(key_id: cmk_key_id, key_spec: SYMMETRIC_KEY_SPEC, encryption_context:
|
|
57
|
+
resp = client.generate_data_key(key_id: cmk_key_id, key_spec: SYMMETRIC_KEY_SPEC, encryption_context:) if encryption_context
|
|
58
58
|
resp = client.generate_data_key(key_id: cmk_key_id, key_spec: SYMMETRIC_KEY_SPEC) unless encryption_context
|
|
59
59
|
|
|
60
60
|
[resp.plaintext, resp.ciphertext_blob]
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
def decrypt_data_encryption_key(ciphertext_key, encryption_context = nil)
|
|
64
|
-
return client.decrypt(ciphertext_blob: ciphertext_key, encryption_context:
|
|
64
|
+
return client.decrypt(ciphertext_blob: ciphertext_key, encryption_context:).plaintext if encryption_context
|
|
65
65
|
|
|
66
66
|
resp = client.decrypt(ciphertext_blob: ciphertext_key)
|
|
67
67
|
resp.plaintext
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
require 'singleton'
|
|
4
4
|
|
|
5
5
|
class PorkyLib::Unencrypted::FileService
|
|
6
|
-
extend Gem::Deprecate
|
|
7
|
-
|
|
8
6
|
include Singleton
|
|
9
7
|
include PorkyLib::FileServiceHelper
|
|
10
8
|
|
|
@@ -15,10 +13,11 @@ class PorkyLib::Unencrypted::FileService
|
|
|
15
13
|
tempfile = Tempfile.new
|
|
16
14
|
|
|
17
15
|
begin
|
|
18
|
-
|
|
19
|
-
raise FileSizeTooLargeError, "File size is larger than maximum allowed size of #{max_file_size}" if
|
|
16
|
+
head_response = s3_client.head_object(bucket: bucket_name, key: file_key)
|
|
17
|
+
raise FileSizeTooLargeError, "File size is larger than maximum allowed size of #{max_file_size}" if head_response.content_length > max_size
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
get_options = { bucket: bucket_name, key: file_key, response_target: tempfile.path }.merge(options)
|
|
20
|
+
s3_client.get_object(get_options)
|
|
22
21
|
rescue Aws::Errors::ServiceError, Seahorse::Client::NetworkingError => e
|
|
23
22
|
raise FileServiceError, "Attempt to download a file from S3 failed.\n#{e.message}"
|
|
24
23
|
end
|
|
@@ -26,17 +25,6 @@ class PorkyLib::Unencrypted::FileService
|
|
|
26
25
|
tempfile.read
|
|
27
26
|
end
|
|
28
27
|
|
|
29
|
-
def write(file, bucket_name, options = {})
|
|
30
|
-
raise FileServiceError, 'Invalid input. One or more input values is nil' if input_invalid?(file, bucket_name)
|
|
31
|
-
|
|
32
|
-
if file?(file)
|
|
33
|
-
write_file(file, bucket_name, options)
|
|
34
|
-
else
|
|
35
|
-
write_data(file, bucket_name, options)
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
deprecate :write, 'write_file or write_data', 2020, 1
|
|
39
|
-
|
|
40
28
|
def write_file(file, bucket_name, options = {})
|
|
41
29
|
raise FileServiceError, 'Invalid input. One or more input values is nil' if input_invalid?(file, bucket_name)
|
|
42
30
|
|
data/lib/porky_lib/version.rb
CHANGED
data/lib/tasks/file.rake
CHANGED
|
@@ -55,7 +55,7 @@ namespace :file do
|
|
|
55
55
|
setup_porky_lib(arguments, use_mock_client, max_file_size)
|
|
56
56
|
|
|
57
57
|
write_options = {
|
|
58
|
-
storage_class
|
|
58
|
+
storage_class:,
|
|
59
59
|
file_name: (File.basename(arguments[:file_path]) if keep_file_name)
|
|
60
60
|
}.compact
|
|
61
61
|
|
|
@@ -80,6 +80,6 @@ def setup_porky_lib(arguments, use_mock_client, max_file_size)
|
|
|
80
80
|
aws_key_id: arguments[:aws_access_key_id],
|
|
81
81
|
aws_key_secret: arguments[:aws_access_key],
|
|
82
82
|
aws_client_mock: use_mock_client,
|
|
83
|
-
max_file_size:
|
|
83
|
+
max_file_size:)
|
|
84
84
|
PorkyLib::Config.initialize_aws
|
|
85
85
|
end
|
data/porky_lib.gemspec
CHANGED
|
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
|
|
|
13
13
|
spec.summary = 'A library for cryptographic services using AWS KMS and RbNaCl'
|
|
14
14
|
spec.homepage = 'https://github.com/Zetatango/porky_lib'
|
|
15
15
|
|
|
16
|
-
spec.required_ruby_version = '>= 2.
|
|
16
|
+
spec.required_ruby_version = '>= 3.2.5'
|
|
17
17
|
|
|
18
18
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
|
19
19
|
f.match(%r{^(test|spec|features)/})
|
|
@@ -22,31 +22,10 @@ Gem::Specification.new do |spec|
|
|
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
23
23
|
spec.require_paths = ['lib']
|
|
24
24
|
|
|
25
|
-
spec.add_development_dependency 'aws-sdk-kms'
|
|
26
|
-
spec.add_development_dependency 'aws-sdk-s3'
|
|
27
|
-
spec.add_development_dependency 'bundler'
|
|
28
|
-
spec.add_development_dependency 'bundler-audit'
|
|
29
|
-
spec.add_development_dependency 'byebug'
|
|
30
|
-
spec.add_development_dependency 'codacy-coverage'
|
|
31
|
-
spec.add_development_dependency 'codecov'
|
|
32
|
-
spec.add_development_dependency 'msgpack'
|
|
33
|
-
spec.add_development_dependency 'rake'
|
|
34
|
-
spec.add_development_dependency 'rbnacl', '=7.1.1'
|
|
35
|
-
spec.add_development_dependency 'rspec'
|
|
36
|
-
spec.add_development_dependency 'rspec-collection_matchers'
|
|
37
|
-
spec.add_development_dependency 'rspec_junit_formatter'
|
|
38
|
-
spec.add_development_dependency 'rspec-mocks'
|
|
39
|
-
spec.add_development_dependency 'rubocop'
|
|
40
|
-
spec.add_development_dependency 'rubocop-performance'
|
|
41
|
-
spec.add_development_dependency 'rubocop-rspec'
|
|
42
|
-
spec.add_development_dependency 'rubocop_runner'
|
|
43
|
-
spec.add_development_dependency 'simplecov'
|
|
44
|
-
spec.add_development_dependency 'timecop'
|
|
45
|
-
|
|
46
25
|
spec.add_dependency 'aws-sdk-kms'
|
|
47
26
|
spec.add_dependency 'aws-sdk-s3'
|
|
48
27
|
spec.add_dependency 'msgpack'
|
|
49
|
-
spec.add_dependency 'rbnacl', '
|
|
28
|
+
spec.add_dependency 'rbnacl', '~> 7.1'
|
|
50
29
|
spec.metadata = {
|
|
51
30
|
'rubygems_mfa_required' => 'true'
|
|
52
31
|
}
|
metadata
CHANGED
|
@@ -1,295 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: porky_lib
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.12.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Greg Fletcher
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-01-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
|
-
- !ruby/object:Gem::Dependency
|
|
14
|
-
name: aws-sdk-kms
|
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
|
16
|
-
requirements:
|
|
17
|
-
- - ">="
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0'
|
|
20
|
-
type: :development
|
|
21
|
-
prerelease: false
|
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
-
requirements:
|
|
24
|
-
- - ">="
|
|
25
|
-
- !ruby/object:Gem::Version
|
|
26
|
-
version: '0'
|
|
27
|
-
- !ruby/object:Gem::Dependency
|
|
28
|
-
name: aws-sdk-s3
|
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
|
30
|
-
requirements:
|
|
31
|
-
- - ">="
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: '0'
|
|
34
|
-
type: :development
|
|
35
|
-
prerelease: false
|
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
-
requirements:
|
|
38
|
-
- - ">="
|
|
39
|
-
- !ruby/object:Gem::Version
|
|
40
|
-
version: '0'
|
|
41
|
-
- !ruby/object:Gem::Dependency
|
|
42
|
-
name: bundler
|
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
|
44
|
-
requirements:
|
|
45
|
-
- - ">="
|
|
46
|
-
- !ruby/object:Gem::Version
|
|
47
|
-
version: '0'
|
|
48
|
-
type: :development
|
|
49
|
-
prerelease: false
|
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
-
requirements:
|
|
52
|
-
- - ">="
|
|
53
|
-
- !ruby/object:Gem::Version
|
|
54
|
-
version: '0'
|
|
55
|
-
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: bundler-audit
|
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - ">="
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: '0'
|
|
62
|
-
type: :development
|
|
63
|
-
prerelease: false
|
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - ">="
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: '0'
|
|
69
|
-
- !ruby/object:Gem::Dependency
|
|
70
|
-
name: byebug
|
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
|
72
|
-
requirements:
|
|
73
|
-
- - ">="
|
|
74
|
-
- !ruby/object:Gem::Version
|
|
75
|
-
version: '0'
|
|
76
|
-
type: :development
|
|
77
|
-
prerelease: false
|
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
-
requirements:
|
|
80
|
-
- - ">="
|
|
81
|
-
- !ruby/object:Gem::Version
|
|
82
|
-
version: '0'
|
|
83
|
-
- !ruby/object:Gem::Dependency
|
|
84
|
-
name: codacy-coverage
|
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
|
86
|
-
requirements:
|
|
87
|
-
- - ">="
|
|
88
|
-
- !ruby/object:Gem::Version
|
|
89
|
-
version: '0'
|
|
90
|
-
type: :development
|
|
91
|
-
prerelease: false
|
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
-
requirements:
|
|
94
|
-
- - ">="
|
|
95
|
-
- !ruby/object:Gem::Version
|
|
96
|
-
version: '0'
|
|
97
|
-
- !ruby/object:Gem::Dependency
|
|
98
|
-
name: codecov
|
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
|
100
|
-
requirements:
|
|
101
|
-
- - ">="
|
|
102
|
-
- !ruby/object:Gem::Version
|
|
103
|
-
version: '0'
|
|
104
|
-
type: :development
|
|
105
|
-
prerelease: false
|
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
-
requirements:
|
|
108
|
-
- - ">="
|
|
109
|
-
- !ruby/object:Gem::Version
|
|
110
|
-
version: '0'
|
|
111
|
-
- !ruby/object:Gem::Dependency
|
|
112
|
-
name: msgpack
|
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
|
114
|
-
requirements:
|
|
115
|
-
- - ">="
|
|
116
|
-
- !ruby/object:Gem::Version
|
|
117
|
-
version: '0'
|
|
118
|
-
type: :development
|
|
119
|
-
prerelease: false
|
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
-
requirements:
|
|
122
|
-
- - ">="
|
|
123
|
-
- !ruby/object:Gem::Version
|
|
124
|
-
version: '0'
|
|
125
|
-
- !ruby/object:Gem::Dependency
|
|
126
|
-
name: rake
|
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
|
128
|
-
requirements:
|
|
129
|
-
- - ">="
|
|
130
|
-
- !ruby/object:Gem::Version
|
|
131
|
-
version: '0'
|
|
132
|
-
type: :development
|
|
133
|
-
prerelease: false
|
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
135
|
-
requirements:
|
|
136
|
-
- - ">="
|
|
137
|
-
- !ruby/object:Gem::Version
|
|
138
|
-
version: '0'
|
|
139
|
-
- !ruby/object:Gem::Dependency
|
|
140
|
-
name: rbnacl
|
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
|
142
|
-
requirements:
|
|
143
|
-
- - '='
|
|
144
|
-
- !ruby/object:Gem::Version
|
|
145
|
-
version: 7.1.1
|
|
146
|
-
type: :development
|
|
147
|
-
prerelease: false
|
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
149
|
-
requirements:
|
|
150
|
-
- - '='
|
|
151
|
-
- !ruby/object:Gem::Version
|
|
152
|
-
version: 7.1.1
|
|
153
|
-
- !ruby/object:Gem::Dependency
|
|
154
|
-
name: rspec
|
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
|
156
|
-
requirements:
|
|
157
|
-
- - ">="
|
|
158
|
-
- !ruby/object:Gem::Version
|
|
159
|
-
version: '0'
|
|
160
|
-
type: :development
|
|
161
|
-
prerelease: false
|
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
163
|
-
requirements:
|
|
164
|
-
- - ">="
|
|
165
|
-
- !ruby/object:Gem::Version
|
|
166
|
-
version: '0'
|
|
167
|
-
- !ruby/object:Gem::Dependency
|
|
168
|
-
name: rspec-collection_matchers
|
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
|
170
|
-
requirements:
|
|
171
|
-
- - ">="
|
|
172
|
-
- !ruby/object:Gem::Version
|
|
173
|
-
version: '0'
|
|
174
|
-
type: :development
|
|
175
|
-
prerelease: false
|
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
177
|
-
requirements:
|
|
178
|
-
- - ">="
|
|
179
|
-
- !ruby/object:Gem::Version
|
|
180
|
-
version: '0'
|
|
181
|
-
- !ruby/object:Gem::Dependency
|
|
182
|
-
name: rspec_junit_formatter
|
|
183
|
-
requirement: !ruby/object:Gem::Requirement
|
|
184
|
-
requirements:
|
|
185
|
-
- - ">="
|
|
186
|
-
- !ruby/object:Gem::Version
|
|
187
|
-
version: '0'
|
|
188
|
-
type: :development
|
|
189
|
-
prerelease: false
|
|
190
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
191
|
-
requirements:
|
|
192
|
-
- - ">="
|
|
193
|
-
- !ruby/object:Gem::Version
|
|
194
|
-
version: '0'
|
|
195
|
-
- !ruby/object:Gem::Dependency
|
|
196
|
-
name: rspec-mocks
|
|
197
|
-
requirement: !ruby/object:Gem::Requirement
|
|
198
|
-
requirements:
|
|
199
|
-
- - ">="
|
|
200
|
-
- !ruby/object:Gem::Version
|
|
201
|
-
version: '0'
|
|
202
|
-
type: :development
|
|
203
|
-
prerelease: false
|
|
204
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
205
|
-
requirements:
|
|
206
|
-
- - ">="
|
|
207
|
-
- !ruby/object:Gem::Version
|
|
208
|
-
version: '0'
|
|
209
|
-
- !ruby/object:Gem::Dependency
|
|
210
|
-
name: rubocop
|
|
211
|
-
requirement: !ruby/object:Gem::Requirement
|
|
212
|
-
requirements:
|
|
213
|
-
- - ">="
|
|
214
|
-
- !ruby/object:Gem::Version
|
|
215
|
-
version: '0'
|
|
216
|
-
type: :development
|
|
217
|
-
prerelease: false
|
|
218
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
219
|
-
requirements:
|
|
220
|
-
- - ">="
|
|
221
|
-
- !ruby/object:Gem::Version
|
|
222
|
-
version: '0'
|
|
223
|
-
- !ruby/object:Gem::Dependency
|
|
224
|
-
name: rubocop-performance
|
|
225
|
-
requirement: !ruby/object:Gem::Requirement
|
|
226
|
-
requirements:
|
|
227
|
-
- - ">="
|
|
228
|
-
- !ruby/object:Gem::Version
|
|
229
|
-
version: '0'
|
|
230
|
-
type: :development
|
|
231
|
-
prerelease: false
|
|
232
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
233
|
-
requirements:
|
|
234
|
-
- - ">="
|
|
235
|
-
- !ruby/object:Gem::Version
|
|
236
|
-
version: '0'
|
|
237
|
-
- !ruby/object:Gem::Dependency
|
|
238
|
-
name: rubocop-rspec
|
|
239
|
-
requirement: !ruby/object:Gem::Requirement
|
|
240
|
-
requirements:
|
|
241
|
-
- - ">="
|
|
242
|
-
- !ruby/object:Gem::Version
|
|
243
|
-
version: '0'
|
|
244
|
-
type: :development
|
|
245
|
-
prerelease: false
|
|
246
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
247
|
-
requirements:
|
|
248
|
-
- - ">="
|
|
249
|
-
- !ruby/object:Gem::Version
|
|
250
|
-
version: '0'
|
|
251
|
-
- !ruby/object:Gem::Dependency
|
|
252
|
-
name: rubocop_runner
|
|
253
|
-
requirement: !ruby/object:Gem::Requirement
|
|
254
|
-
requirements:
|
|
255
|
-
- - ">="
|
|
256
|
-
- !ruby/object:Gem::Version
|
|
257
|
-
version: '0'
|
|
258
|
-
type: :development
|
|
259
|
-
prerelease: false
|
|
260
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
261
|
-
requirements:
|
|
262
|
-
- - ">="
|
|
263
|
-
- !ruby/object:Gem::Version
|
|
264
|
-
version: '0'
|
|
265
|
-
- !ruby/object:Gem::Dependency
|
|
266
|
-
name: simplecov
|
|
267
|
-
requirement: !ruby/object:Gem::Requirement
|
|
268
|
-
requirements:
|
|
269
|
-
- - ">="
|
|
270
|
-
- !ruby/object:Gem::Version
|
|
271
|
-
version: '0'
|
|
272
|
-
type: :development
|
|
273
|
-
prerelease: false
|
|
274
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
275
|
-
requirements:
|
|
276
|
-
- - ">="
|
|
277
|
-
- !ruby/object:Gem::Version
|
|
278
|
-
version: '0'
|
|
279
|
-
- !ruby/object:Gem::Dependency
|
|
280
|
-
name: timecop
|
|
281
|
-
requirement: !ruby/object:Gem::Requirement
|
|
282
|
-
requirements:
|
|
283
|
-
- - ">="
|
|
284
|
-
- !ruby/object:Gem::Version
|
|
285
|
-
version: '0'
|
|
286
|
-
type: :development
|
|
287
|
-
prerelease: false
|
|
288
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
289
|
-
requirements:
|
|
290
|
-
- - ">="
|
|
291
|
-
- !ruby/object:Gem::Version
|
|
292
|
-
version: '0'
|
|
293
13
|
- !ruby/object:Gem::Dependency
|
|
294
14
|
name: aws-sdk-kms
|
|
295
15
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -336,16 +56,16 @@ dependencies:
|
|
|
336
56
|
name: rbnacl
|
|
337
57
|
requirement: !ruby/object:Gem::Requirement
|
|
338
58
|
requirements:
|
|
339
|
-
- -
|
|
59
|
+
- - "~>"
|
|
340
60
|
- !ruby/object:Gem::Version
|
|
341
|
-
version: 7.1
|
|
61
|
+
version: '7.1'
|
|
342
62
|
type: :runtime
|
|
343
63
|
prerelease: false
|
|
344
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
345
65
|
requirements:
|
|
346
|
-
- -
|
|
66
|
+
- - "~>"
|
|
347
67
|
- !ruby/object:Gem::Version
|
|
348
|
-
version: 7.1
|
|
68
|
+
version: '7.1'
|
|
349
69
|
description:
|
|
350
70
|
email:
|
|
351
71
|
- greg.fletcher@zetatango.com
|
|
@@ -393,14 +113,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
393
113
|
requirements:
|
|
394
114
|
- - ">="
|
|
395
115
|
- !ruby/object:Gem::Version
|
|
396
|
-
version: 2.
|
|
116
|
+
version: 3.2.5
|
|
397
117
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
398
118
|
requirements:
|
|
399
119
|
- - ">="
|
|
400
120
|
- !ruby/object:Gem::Version
|
|
401
121
|
version: '0'
|
|
402
122
|
requirements: []
|
|
403
|
-
rubygems_version: 3.
|
|
123
|
+
rubygems_version: 3.4.19
|
|
404
124
|
signing_key:
|
|
405
125
|
specification_version: 4
|
|
406
126
|
summary: A library for cryptographic services using AWS KMS and RbNaCl
|