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.
- checksums.yaml +4 -4
- data/lib/env_bang-rails.rb +9 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e95ee79cbc6b99eae34b6de03fdb21685caffcb
|
4
|
+
data.tar.gz: 6fdaf1b766136d3d2bd1b4fa2135e35ea17ed7b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8779dd5791dfc6b2dbc108bdd4a650f6402b0227b5caa466b38328fc400d71984db9104d851f993b2847f7b8b83989962e4a447bb09935613ae2f60ea4fd7a23
|
7
|
+
data.tar.gz: a2593bb825db60770a78f5bf271d8cb40cb6bcdf526ee4a4699a1d396f5a524121ecc5c97dc07f701aec282e56ffb3b19cdb9b4b70ec159738334791313de732
|
data/lib/env_bang-rails.rb
CHANGED
@@ -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
|
-
|
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.
|
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-
|
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.
|
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.
|
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:
|