env_bang-rails 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/env_bang-rails.rb +9 -1
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b474f8f68c42ec81c71c49c55b986543990186a
4
- data.tar.gz: 50c654ca6c1d0eb11e0fdb8dba8b69e572fedf60
3
+ metadata.gz: 1e95ee79cbc6b99eae34b6de03fdb21685caffcb
4
+ data.tar.gz: 6fdaf1b766136d3d2bd1b4fa2135e35ea17ed7b2
5
5
  SHA512:
6
- metadata.gz: 6f4f07867ba5f02f919791617cef6230c61732b0ef7c1fa31377c7cf16907d8b3fd04c3c971db7336f85aaa0ced203c7490cc78c0bc0fbcd689b0536b87b5109
7
- data.tar.gz: cef81e013a1c0d7ef35eea4ada9f6abfa30c5358629dd4ad1bbdc91a5d93d9036ffa2c3abb6a524000f43f10720cc3620723349992b9a990ce78080fd83bfb0a
6
+ metadata.gz: 8779dd5791dfc6b2dbc108bdd4a650f6402b0227b5caa466b38328fc400d71984db9104d851f993b2847f7b8b83989962e4a447bb09935613ae2f60ea4fd7a23
7
+ data.tar.gz: a2593bb825db60770a78f5bf271d8cb40cb6bcdf526ee4a4699a1d396f5a524121ecc5c97dc07f701aec282e56ffb3b19cdb9b4b70ec159738334791313de732
@@ -6,11 +6,19 @@ class ENV_BANG
6
6
  File.join(Rails.root.to_s, 'config/env.rb')
7
7
  end
8
8
 
9
+ def warn(msg)
10
+ if Rails.logger
11
+ Rails.logger.warn(msg)
12
+ else
13
+ puts "WARNING: #{msg}"
14
+ end
15
+ end
16
+
9
17
  config.before_configuration do
10
18
  if File.exists?(env_rb_file)
11
19
  load env_rb_file
12
20
  else
13
- Rails.logger.warn "ENV! could not find your environment variable configuration. Please create #{env_rb_file} to set up environment variables at Rails boot."
21
+ warn("ENV! could not find your environment variable configuration. Please create #{env_rb_file} to set up environment variables at Rails boot.")
14
22
  end
15
23
  end
16
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: env_bang-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Camenisch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-22 00:00:00.000000000 Z
11
+ date: 2017-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: env_bang
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.4.1
19
+ version: 0.4.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.4.1
26
+ version: 0.4.2
27
27
  description: ENV! provides a thin wrapper around ENV to encourage central, self-documenting
28
28
  configuration and helpful error message.
29
29
  email: