rails_env_config 1.0.3 → 1.1.0

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: 768c5cd0526b120bb72d9f8a3f90bd4b7645ca86
4
- data.tar.gz: 329ef433e1a413b975eaff84cd3f39a01706aa5b
3
+ metadata.gz: 0e3bf8897ada9a81a89eed3be9c68578b012f209
4
+ data.tar.gz: 4fb6423097b4354edbefd3941a9c148570459283
5
5
  SHA512:
6
- metadata.gz: c62a3744b6d5277871b33e81d519bc5227bde3920f12fe7aa37e8ba7b15c91db52e65f7464be6d3a08d88688baaa3dabc0b4cf7f97d9f05c4f2771732a1c7fd4
7
- data.tar.gz: 6449650314e0b45ba97afe6bc3ff628a02c9b3af62d41b390a2e5afb0641b686887c6134d017b83eea9ecf3a1daf0909bc5b95cdd282b5213418e706122f2047
6
+ metadata.gz: 6033fe3c2241e27e81e574e7902c448d4342a68e594a3e243ab93e38790740e0dd401679bc0c9fabaa7ccb6eaa47ad5c2af5e455e3ac14c95e4ef90371e2aae3
7
+ data.tar.gz: 4947f820a018362d3be1aa06d71271bbc359667c62e7bf093c772da236115842b3463d302eb17f3c469c20c69b5603727a81bb516c410a9abf82ad613d8ea302
@@ -7,7 +7,7 @@ module RailsEnvConfig
7
7
  # Load some environment variables from a given path
8
8
  #
9
9
  def self.load(path)
10
- if File.exist?(path)
10
+ if File.file?(path)
11
11
  YAML.load(File.open(path)).each do |key, value|
12
12
  ENV[key.to_s] ||= value
13
13
  end
@@ -1,7 +1,12 @@
1
1
  module RailsEnvConfig
2
2
  class Railtie < Rails::Railtie
3
3
  initializer 'rails_env_config.initializer' do |app|
4
- RailsEnvConfig.load(Rails.root.join('config', 'environment.yml'))
4
+ ["environment.#{Rails.env}.yml", "environment.yml"].each do |file|
5
+ full_path = Rails.root.join('config', file)
6
+ if File.file?(full_path)
7
+ RailsEnvConfig.load(full_path)
8
+ end
9
+ end
5
10
  end
6
11
  end
7
12
  end
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_env_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Cooke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-22 00:00:00.000000000 Z
11
+ date: 2017-02-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Loads the complete contents of config/environment.yml into ENV when a
14
14
  Rails application starts.
15
15
  email:
16
- - adam@atechmedia.com
16
+ - me@adamcooke.io
17
17
  executables: []
18
18
  extensions: []
19
19
  extra_rdoc_files: []
@@ -40,10 +40,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
40
40
  version: '0'
41
41
  requirements: []
42
42
  rubyforge_project:
43
- rubygems_version: 2.4.5
43
+ rubygems_version: 2.5.1
44
44
  signing_key:
45
45
  specification_version: 4
46
46
  summary: A library to allow custom local environment variables to be loaded into a
47
47
  Rails application.
48
48
  test_files: []
49
- has_rdoc: