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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa74489b2e95cf9784f9a4d43c87298865e4c41d
4
- data.tar.gz: 1464ba97f4c0a785947f9e412d8b88831d4076ef
3
+ metadata.gz: a60f9e5ddde0f53ae3f5164a61b946f103a465d1
4
+ data.tar.gz: d78c366ddd1750da5f4339c67ff97e1956a7fd8d
5
5
  SHA512:
6
- metadata.gz: 77f8e945949e311cb05ee4a3b395c122384344141ceeb05ff8760fb6ee5fce6479826e2456b795741934ac4ffe319002f6414b227460d40cf96b202c95cec2cb
7
- data.tar.gz: 8533c9aa7fdf99d731221f6f91543068a56a143da5ff5970b7d1c055c1028a0ff5024164df5fbde92563f542262b4b6799a6f90341641716a2c1e6826eb7b522
6
+ metadata.gz: eb38170d80e1723704b8fc5312df41b19f42bbdcaab49d5f51c1c4a2288e0ce50e08b63dde76a805259a0090555944510e116e078d3db10ba05d7ead406a51fa
7
+ data.tar.gz: f9d70e6d7c2183a3b0bfd25f98e486300f8b7188a8639f02d574669e9dd749127ce7d100c76cebddef9f77e28aa93f3086f032acf0083e8c4d6b98111907630f
@@ -1,25 +1,35 @@
1
- f = File.join(Rails.root, "config/config.yml")
1
+ # The is the example file
2
2
  ef = File.join(Rails.root, "config/config.yml.example")
3
3
 
4
- f = File.exists?(f) && f ||
5
- File.exists?(ef) && Rails.env == 'production' && ef
4
+ # Only load AWS data if there is an example file
5
+ if File.exists?(ef)
6
6
 
7
- if f
8
- cfg = YAML.load(File.read(f))
9
- cfg.merge! cfg.fetch(Rails.env, {}) if cfg.fetch(Rails.env, {})
10
- cfg.each do |k, v|
11
- next if k =~ /[a-z]/
12
- eval "#{k} = #{v.inspect}"
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
- else
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
- f = File.join(Rails.root, "config/aws.yml")
1
+
2
+ # The is the example file
2
3
  ef = File.join(Rails.root, "config/aws.yml.example")
3
4
 
4
- f = File.exists?(f) && f ||
5
- File.exists?(ef) && Rails.env == 'production' && ef
5
+ # Only load AWS data if there is an example file
6
+ if File.exists?(ef)
6
7
 
7
- if f
8
- AWS.config YAML.load(File.read(f))[Rails.env]
9
- else
10
- puts
11
- puts "-----------------------------------------------------------------------"
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
@@ -1,3 +1,3 @@
1
1
  module Ocean
2
- VERSION = "1.23.0"
2
+ VERSION = "1.23.1"
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: 1.23.0
4
+ version: 1.23.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Bengtson