brillo 1.1.4 → 1.2.0

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
2
  SHA1:
3
- metadata.gz: 409f9ce5dd27378fd766bd9f1f3ab4194e008411
4
- data.tar.gz: b96f4513ff4f310cd8bf838fd734f5cfb2e1ba0d
3
+ metadata.gz: 850d48dae3c6bf1654a5b2074d59ef7b65cf5d92
4
+ data.tar.gz: 000d01ce6b3dbfd64c57cee650dc8d032026069d
5
5
  SHA512:
6
- metadata.gz: 899b0fc92c94c54c68013fa9f858cfc31dfdee6b76ea06adfbd0d5f3df10e70d96b2352e08263dc4b28096572cfe2ceef3faf6238fe6f19b00efd93acc42ba80
7
- data.tar.gz: 898c99aac2e7928e805013f27c79035d3f3020cb4662ab73feb1de9048c117099e298023cc8071fb6d9735c59e12557505430370c9ba75fb047728e7317e5de2
6
+ metadata.gz: 2a93f3620efbc74837f97b54c07607fb69ff16f0751ecea04f1da747a56d5744262468b9301cc47d9b5ac679cd0486acdc9f87c43b9078fa830064709c138af6
7
+ data.tar.gz: 33c3cb7609c2b3124d5e402db08b363d7a097ffbcda5c67dc445f9ba296413c9066ebf9bd43815cef6d8e62f6620aa81b93eeec511b9ef51de6321520573d4af
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Change Log
2
2
 
3
+ ## 1.2.0
4
+ Support S3 config [via your environment](https://github.com/aws/aws-sdk-ruby#configuration). To configure via the environment, just leave your `Brillo.config.transfer_config.{access_key_id,secret_access_key}` blank.
5
+
3
6
  ## 1.1.4
4
7
  Fix loading a postgres database with a password set.
5
8
 
@@ -13,13 +13,7 @@ module Brillo
13
13
  @region = config.transfer_config.region
14
14
  @filename = config.compressed_filename
15
15
  @path = config.compressed_dump_path
16
- Aws.config.update(
17
- credentials: Aws::Credentials.new(
18
- config.transfer_config.access_key_id,
19
- config.transfer_config.secret_access_key
20
- ),
21
- region: config.transfer_config.region
22
- )
16
+ Aws.config.update(aws_config(config.transfer_config))
23
17
  end
24
18
 
25
19
  def download
@@ -44,6 +38,20 @@ module Brillo
44
38
 
45
39
  private
46
40
 
41
+ def aws_config(transfer_config)
42
+ {
43
+ region: transfer_config.region
44
+ }.tap do |hash|
45
+ # Don't explicitly set credentials if we have none
46
+ # Doing so stops [automatic configuration](https://github.com/aws/aws-sdk-ruby#configuration)
47
+ return unless transfer_config.access_key_id
48
+ hash[:credentials] = Aws::Credentials.new(
49
+ transfer_config.access_key_id,
50
+ transfer_config.secret_access_key
51
+ )
52
+ end
53
+ end
54
+
47
55
  def create_bucket
48
56
  client.create_bucket(bucket: bucket)
49
57
  end
@@ -1,3 +1,3 @@
1
1
  module Brillo
2
- VERSION = "1.1.4"
2
+ VERSION = "1.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brillo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Bessey
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-12 00:00:00.000000000 Z
11
+ date: 2016-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -225,10 +225,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
225
  version: '0'
226
226
  requirements: []
227
227
  rubyforge_project:
228
- rubygems_version: 2.2.2
228
+ rubygems_version: 2.6.6
229
229
  signing_key:
230
230
  specification_version: 4
231
231
  summary: Rails database scrubber and loader, great for seeding your dev db with real
232
232
  but sanitized data
233
233
  test_files: []
234
- has_rdoc: