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 +4 -4
- data/config/initializers/_aws_config.rb +13 -10
- data/lib/ocean/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e221c7b67dd6a2c387854ebe06f2ccb361c2b79c
|
4
|
+
data.tar.gz: 6afd1f9c7294a6a9eae821589166526816c2a603
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
26
|
-
|
27
|
-
ENV['
|
28
|
-
ENV['
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
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