ocean-rails 5.3.1 → 5.3.2

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: 9966cbcd3df009602977ca27cdc0933f17ecf9e6
4
- data.tar.gz: e499281233517f7e2e5cd3608cb4d5678a9eeba0
3
+ metadata.gz: e221c7b67dd6a2c387854ebe06f2ccb361c2b79c
4
+ data.tar.gz: 6afd1f9c7294a6a9eae821589166526816c2a603
5
5
  SHA512:
6
- metadata.gz: 49ca85b7e76937b7517cd8d78a50855b4b0200e9ec1b5f3e915a5d14ca3614b70f9a302c0602401f9c0aad835855824f8a929e482a757745c9b3c6991cc37428
7
- data.tar.gz: 26268bfb60bc7c8f378bb3d6ac1e1cdba05d6f1f662dd6419e29db4c4a3062f3ac0a0cdf89a57606c33cc282e90bf25fb0f26ed46b72f53a0918e3f1a7357c2e
6
+ metadata.gz: c04e247e67366e3c98ec4884de480af548a38579faacc42f7d33043de4681e3944357f233e0de2a148204a4e93283f93f6b250df95add29df0df576908dc42cd
7
+ data.tar.gz: 781c92646ef8a41e80ed5c703a53bd5d3d04084b64b1268369648803e3f8576860816fceb560f1247a0fb88ee2d4da23396136c15b3f418f4a254307a8138d3d
@@ -22,16 +22,19 @@ else
22
22
 
23
23
  # If there is a file to process, do so
24
24
  if f
25
- options = YAML.load(File.read(f))[Rails.env]
26
- ENV['AWS_ACCESS_KEY_ID'] = options[:access_key_id] || options['access_key_id']
27
- ENV['AWS_SECRET_ACCESS_KEY'] = options[:secret_access_key] || options['secret_access_key']
28
- ENV['AWS_REGION'] = options[:region] || options['region']
29
- Aws.config.update(
30
- region: options["region"],
31
- credentials: Aws::Credentials.new(options["access_key_id"], options["secret_access_key"]),
32
- endpoint: options["endpoint"]
33
- )
34
- AWS.config(options)
25
+ cfg = YAML.load(File.read(f))[Rails.env]
26
+ # Set the ENV variables
27
+ ENV['AWS_ACCESS_KEY_ID'] = cfg[:access_key_id] || cfg['access_key_id']
28
+ ENV['AWS_SECRET_ACCESS_KEY'] = cfg[:secret_access_key] || cfg['secret_access_key']
29
+ ENV['AWS_REGION'] = cfg[:region] || cfg['region']
30
+ # Configure AWS with the raw cfg data
31
+ AWS.config(cfg)
32
+ # Configure Aws with a massaged version of the cfg data
33
+ config = { region: cfg["region"],
34
+ credentials: Aws::Credentials.new(cfg["access_key_id"], cfg["secret_access_key"])
35
+ }
36
+ config[:endpoint] = cfg["endpoint"] if cfg["endpoint"]
37
+ Aws.config.update(config)
35
38
  else
36
39
  # Otherwise print an error message and abort.
37
40
  puts
data/lib/ocean/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ocean
2
- VERSION = "5.3.1"
2
+ VERSION = "5.3.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ocean-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.1
4
+ version: 5.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Bengtson