ocean-rails 1.23.0 → 1.23.1
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 +4 -4
- data/config/initializers/api_constants.rb +30 -20
- data/config/initializers/aws_constants.rb +26 -17
- 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: a60f9e5ddde0f53ae3f5164a61b946f103a465d1
|
4
|
+
data.tar.gz: d78c366ddd1750da5f4339c67ff97e1956a7fd8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb38170d80e1723704b8fc5312df41b19f42bbdcaab49d5f51c1c4a2288e0ce50e08b63dde76a805259a0090555944510e116e078d3db10ba05d7ead406a51fa
|
7
|
+
data.tar.gz: f9d70e6d7c2183a3b0bfd25f98e486300f8b7188a8639f02d574669e9dd749127ce7d100c76cebddef9f77e28aa93f3086f032acf0083e8c4d6b98111907630f
|
@@ -1,25 +1,35 @@
|
|
1
|
-
|
1
|
+
# The is the example file
|
2
2
|
ef = File.join(Rails.root, "config/config.yml.example")
|
3
3
|
|
4
|
-
|
5
|
-
|
4
|
+
# Only load AWS data if there is an example file
|
5
|
+
if File.exists?(ef)
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
# This is the tailored file, not under source control.
|
8
|
+
f = File.join(Rails.root, "config/config.yml")
|
9
|
+
# If the tailored file doesn't exist, and we're running in production mode
|
10
|
+
# (which is the case under TeamCity), use the example file as-is.
|
11
|
+
f = File.exists?(f) && f || Rails.env == 'production' && ef
|
12
|
+
|
13
|
+
# If there is a file to process, do so
|
14
|
+
if f
|
15
|
+
cfg = YAML.load(File.read(f))
|
16
|
+
cfg.merge! cfg.fetch(Rails.env, {}) if cfg.fetch(Rails.env, {})
|
17
|
+
cfg.each do |k, v|
|
18
|
+
next if k =~ /[a-z]/
|
19
|
+
eval "#{k} = #{v.inspect}"
|
20
|
+
end
|
21
|
+
else
|
22
|
+
# Otherwise print an error message and abort.
|
23
|
+
puts
|
24
|
+
puts "-----------------------------------------------------------------------"
|
25
|
+
puts "Constant definition file missing. Please copy config/config.yml.example"
|
26
|
+
puts "to config/config.yml and tailor its contents to suit your dev setup."
|
27
|
+
puts
|
28
|
+
puts "NB: config.yml is excluded from git version control as it will contain"
|
29
|
+
puts " data private to your Ocean system."
|
30
|
+
puts "-----------------------------------------------------------------------"
|
31
|
+
puts
|
32
|
+
abort
|
13
33
|
end
|
14
|
-
|
15
|
-
puts
|
16
|
-
puts "-----------------------------------------------------------------------"
|
17
|
-
puts "Constant definition file missing. Please copy config/config.yml.example"
|
18
|
-
puts "to config/config.yml and tailor its contents to suit your dev setup."
|
19
|
-
puts
|
20
|
-
puts "NB: config.yml is excluded from git version control as it will contain"
|
21
|
-
puts " data private to your Ocean system."
|
22
|
-
puts "-----------------------------------------------------------------------"
|
23
|
-
puts
|
24
|
-
abort
|
34
|
+
|
25
35
|
end
|
@@ -1,22 +1,31 @@
|
|
1
|
-
|
1
|
+
|
2
|
+
# The is the example file
|
2
3
|
ef = File.join(Rails.root, "config/aws.yml.example")
|
3
4
|
|
4
|
-
|
5
|
-
|
5
|
+
# Only load AWS data if there is an example file
|
6
|
+
if File.exists?(ef)
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
puts "AWS config file missing. Please copy config/aws.yml.example"
|
13
|
-
puts "to config/aws.yml and tailor its contents to suit your dev setup."
|
14
|
-
puts
|
15
|
-
puts "NB: aws.yml is excluded from git version control as it will contain"
|
16
|
-
puts " data private to your Ocean system."
|
17
|
-
puts "-----------------------------------------------------------------------"
|
18
|
-
puts
|
19
|
-
abort
|
20
|
-
end
|
8
|
+
# This is the tailored file, not under source control.
|
9
|
+
f = File.join(Rails.root, "config/aws.yml")
|
10
|
+
# If the tailored file doesn't exist, and we're running in production mode
|
11
|
+
# (which is the case under TeamCity), use the example file as-is.
|
12
|
+
f = File.exists?(f) && f || Rails.env == 'production' && ef
|
21
13
|
|
14
|
+
# If there is a file to process, do so
|
15
|
+
if f
|
16
|
+
AWS.config YAML.load(File.read(f))[Rails.env]
|
17
|
+
else
|
18
|
+
# Otherwise print an error message and abort.
|
19
|
+
puts
|
20
|
+
puts "-----------------------------------------------------------------------"
|
21
|
+
puts "AWS config file missing. Please copy config/aws.yml.example"
|
22
|
+
puts "to config/aws.yml and tailor its contents to suit your dev setup."
|
23
|
+
puts
|
24
|
+
puts "NB: aws.yml is excluded from git version control as it will contain"
|
25
|
+
puts " data private to your Ocean system."
|
26
|
+
puts "-----------------------------------------------------------------------"
|
27
|
+
puts
|
28
|
+
abort
|
29
|
+
end
|
22
30
|
|
31
|
+
end
|
data/lib/ocean/version.rb
CHANGED