crossing 0.1.6 → 0.1.7
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 +5 -5
- data/lib/crossing.rb +11 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 382b5fee62e8d301e68c2a6e85c74d19bf12c6ef4c7868952dc0ec745dedaa8e
|
4
|
+
data.tar.gz: 5db0845e0a0ed2cc983c9746f0fa7cbd7cfb1500652fdf4a3f00075ebf007084
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e5c510a0b0f81f7b4603faddb06d7c73ae8ac8ae13c313f4a469d9c9928dd60992f072d7e2dfaccf859df0aa8b59f57fdfe2a278817a497e7ad0ac65a1dba21
|
7
|
+
data.tar.gz: 56b950e7765c909c58a0423df2a300afea715836bbf55743c1994d8c99afe4718d7af821f7cbb45a73710542b1d6f31006fb2130a03cf32b5250382b79db1360
|
data/lib/crossing.rb
CHANGED
@@ -2,11 +2,7 @@ require 'aws-sdk'
|
|
2
2
|
|
3
3
|
# Documentation incoming
|
4
4
|
class Crossing
|
5
|
-
def
|
6
|
-
raise CrossingMisconfigurationException if s3_client_encrypted.nil?
|
7
|
-
raise CrossingMisconfigurationException unless s3_client_encrypted.is_a? Aws::S3::Encryption::Client
|
8
|
-
@s3_client_encrypted = s3_client_encrypted
|
9
|
-
|
5
|
+
def setup_unencrypted_client(s3_client_encrypted, s3_client_unencrypted)
|
10
6
|
if !s3_client_unencrypted.nil?
|
11
7
|
raise CrossingMisconfigurationException unless s3_client_unencrypted.is_a? Aws::S3::Client
|
12
8
|
@s3_client_unencrypted = s3_client_unencrypted
|
@@ -16,6 +12,16 @@ class Crossing
|
|
16
12
|
end
|
17
13
|
end
|
18
14
|
|
15
|
+
def initialize(s3_client_encrypted, s3_client_unencrypted = nil)
|
16
|
+
raise CrossingMisconfigurationException if s3_client_encrypted.nil?
|
17
|
+
unless s3_client_encrypted.is_a? Aws::S3::Encryption::Client
|
18
|
+
raise CrossingMisconfigurationException
|
19
|
+
end
|
20
|
+
@s3_client_encrypted = s3_client_encrypted
|
21
|
+
|
22
|
+
setup_unencrypted_client s3_client_encrypted, s3_client_unencrypted
|
23
|
+
end
|
24
|
+
|
19
25
|
def put(bucket, filename)
|
20
26
|
File.open(filename, 'r') do |file|
|
21
27
|
put_content(bucket, File.basename(filename), file.read)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crossing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Ulick
|
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
147
|
version: '0'
|
148
148
|
requirements: []
|
149
149
|
rubyforge_project:
|
150
|
-
rubygems_version: 2.6
|
150
|
+
rubygems_version: 2.7.6
|
151
151
|
signing_key:
|
152
152
|
specification_version: 4
|
153
153
|
summary: Utility for storing objects in S3 while taking advantage of client side envelope
|