dotenv-rails 2.7.5 → 2.7.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dotenv/rails.rb +12 -3
- metadata +5 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63a5d656ee0a5beec3233432fe5132ddcaae19276ddb1bf57eeb0303e7533dd0
|
4
|
+
data.tar.gz: 42d7b7894c089250b36e14263c175c6ed0dd3952076bc2008a9b2312ba4f36c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a469e40e9eb8a977108a5c00ab6b6d3178892a4b06eb2c9e5157a04bb5219d05df934d51d6b09ffaeedacacbfe9e05441a890311895b24d6bf687c671e55bac9
|
7
|
+
data.tar.gz: 01fdb41bcd5eeaaa41fdfe14df7fec1e1632aaac050e00f46089635d28aad1598b28b44fa30b737bc09821d6fcacceef913e3298f5f4ba238a19445c9a0a9c27
|
data/lib/dotenv/rails.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require "dotenv"
|
2
2
|
|
3
|
-
# Fix for
|
3
|
+
# Fix for rake tasks loading in development
|
4
4
|
#
|
5
5
|
# Dotenv loads environment variables when the Rails application is initialized.
|
6
6
|
# When running `rake`, the Rails application is initialized in development.
|
@@ -9,8 +9,10 @@ require "dotenv"
|
|
9
9
|
#
|
10
10
|
# See https://github.com/bkeepers/dotenv/issues/219
|
11
11
|
if defined?(Rake.application)
|
12
|
-
|
13
|
-
|
12
|
+
task_regular_expression = /^(default$|parallel:spec|spec(:|$))/
|
13
|
+
if Rake.application.top_level_tasks.grep(task_regular_expression).any?
|
14
|
+
environment = Rake.application.options.show_tasks ? "development" : "test"
|
15
|
+
Rails.env = ENV["RAILS_ENV"] ||= environment
|
14
16
|
end
|
15
17
|
end
|
16
18
|
|
@@ -39,6 +41,13 @@ module Dotenv
|
|
39
41
|
Dotenv.load(*dotenv_files)
|
40
42
|
end
|
41
43
|
|
44
|
+
# Public: Reload dotenv
|
45
|
+
#
|
46
|
+
# Same as `load`, but will override existing values in `ENV`
|
47
|
+
def overload
|
48
|
+
Dotenv.overload(*dotenv_files)
|
49
|
+
end
|
50
|
+
|
42
51
|
# Internal: `Rails.root` is nil in Rails 4.1 before the application is
|
43
52
|
# initialized, so this falls back to the `RAILS_ROOT` environment variable,
|
44
53
|
# or the current working directory.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dotenv-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Keepers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.7.
|
19
|
+
version: 2.7.6
|
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: 2.7.
|
26
|
+
version: 2.7.6
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: railties
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -31,9 +31,6 @@ dependencies:
|
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '3.2'
|
34
|
-
- - "<"
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: '6.1'
|
37
34
|
type: :runtime
|
38
35
|
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -41,9 +38,6 @@ dependencies:
|
|
41
38
|
- - ">="
|
42
39
|
- !ruby/object:Gem::Version
|
43
40
|
version: '3.2'
|
44
|
-
- - "<"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '6.1'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: spring
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -89,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
83
|
- !ruby/object:Gem::Version
|
90
84
|
version: '0'
|
91
85
|
requirements: []
|
92
|
-
rubygems_version: 3.0.
|
86
|
+
rubygems_version: 3.0.3
|
93
87
|
signing_key:
|
94
88
|
specification_version: 4
|
95
89
|
summary: Autoload dotenv in Rails.
|