env_rails 0.1 → 0.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: 7b6aa1e293c8661aecec09f06f5a84acbbaa1fa3
4
- data.tar.gz: b4709cd91ec8c465f2943dc9fca3d0097793c4e7
3
+ metadata.gz: c767f4ca811162f1fcb922a8426fd8a7ae7f9e40
4
+ data.tar.gz: 73325bd74eb1bffc9e7cc6f3f07fde8e5ee1a02a
5
5
  SHA512:
6
- metadata.gz: bdcfbc6ddd74a93af15c60d0e4dc4035d45679b66f95892304ef57d0482ebda6dcffaa5308858d7c4f50d26aefb2e57f3da93ef3d000a370017d11c279d1ea51
7
- data.tar.gz: e5c61c31ddeb39d10f7979f0807a0284578c940900f85163b579c3431aaacfb9c05899866897614a1a84e1c5bb62e1d4088ebfce09f9d021cca7e221c13f04a5
6
+ metadata.gz: 94ec82648f17e6012ca447600f089cdee9dbae4e6cf2d00e09f3b31b0c13c09e1f59b1bae45c11f759683cfe9564e4bd9299e8dcd80ff2b656c8cc9635de5125
7
+ data.tar.gz: 1383a0e90a6850f068ae874a7849c539d1be9d0bf2447ce65947a776d2d021f31580908cdb9f0cfb3578886820be7aa9510c0fa09a870274f46aaea7cd498816
data/README.md CHANGED
@@ -18,12 +18,12 @@ And then execute:
18
18
 
19
19
  This gem is a Railtie plugin. It doesn't require any special configuration.
20
20
 
21
- When the Rails application starts it will pick up any environment variable matching a name like __RAILS_CONFIG.foo.bar__ and apply the value to the corresponding Rails configuration.
21
+ When the Rails application starts it will pick up any environment variable matching a name like **RAILS_CONFIG__foo__bar** and apply the value to the corresponding Rails configuration.
22
22
 
23
23
  For example:
24
24
 
25
25
  ```
26
- RAILS_CONFIG.action_mailer.smtp_settings.address=smtpserver.yourdomain.com
26
+ RAILS_CONFIG__action_mailer__smtp_settings__address=smtpserver.yourdomain.com
27
27
  ```
28
28
 
29
29
  ## Contributing
@@ -1,3 +1,3 @@
1
1
  module EnvRails
2
- VERSION = "0.1"
2
+ VERSION = "0.2"
3
3
  end
data/lib/env_rails.rb CHANGED
@@ -4,8 +4,8 @@ module EnvRails
4
4
  class Railtie < Rails::Railtie
5
5
  config.after_initialize do
6
6
  ENV.each do |key, value|
7
- if key =~ /\ARAILS_CONFIG((\.[a-z_]+)+)\Z/
8
- config_path = $1.split('.')[1 .. -1]
7
+ if key =~ /\ARAILS_CONFIG((__[a-z_]+)+)\Z/
8
+ config_path = $1.split('__')[1 .. -1]
9
9
  parameter_name = config_path.pop
10
10
 
11
11
  # Find or create the parameter container
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: env_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: '0.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Wajnerman