crossing 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +5 -5
  2. data/lib/crossing.rb +11 -5
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c511a4e335eb652d1c4404b02af76512f04392c7
4
- data.tar.gz: 45e22e75b41b56a4515a6efc6ed72c9a5dca56ac
2
+ SHA256:
3
+ metadata.gz: 382b5fee62e8d301e68c2a6e85c74d19bf12c6ef4c7868952dc0ec745dedaa8e
4
+ data.tar.gz: 5db0845e0a0ed2cc983c9746f0fa7cbd7cfb1500652fdf4a3f00075ebf007084
5
5
  SHA512:
6
- metadata.gz: 58a76795bc7cbb42f9d9d711559f392121b2b01d653113c00df0fdc6b17ca7ccc71c0c07b7be5253c3f15758a443580688b9c4d13dc6001faf9d6f6b409dc4b2
7
- data.tar.gz: ff73a7f9bce79b3a2154ed7f1f226072eb697460ad4888cac650ea910647590a9cb15b5b57a1497cef71f56a78ec6749bc49f8d340893fb78f2980a2846ff838
6
+ metadata.gz: 8e5c510a0b0f81f7b4603faddb06d7c73ae8ac8ae13c313f4a469d9c9928dd60992f072d7e2dfaccf859df0aa8b59f57fdfe2a278817a497e7ad0ac65a1dba21
7
+ data.tar.gz: 56b950e7765c909c58a0423df2a300afea715836bbf55743c1994d8c99afe4718d7af821f7cbb45a73710542b1d6f31006fb2130a03cf32b5250382b79db1360
@@ -2,11 +2,7 @@ require 'aws-sdk'
2
2
 
3
3
  # Documentation incoming
4
4
  class Crossing
5
- def initialize(s3_client_encrypted, s3_client_unencrypted = nil)
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.6
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.14
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