denv 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +3 -4
- data/CHANGELOG.md +3 -0
- data/denv.gemspec +1 -0
- data/lib/denv/rails.rb +1 -1
- data/lib/denv/version.rb +1 -1
- data/reload_env_test.rb +17 -3
- metadata +17 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a41043d097851fba8d5cf225af1b0729df840c12
|
4
|
+
data.tar.gz: ab5f2fd89e6eeac99f950954c5ae1a7946454982
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4b8de6e2f7f2395dbfcf74ef2f3dca17c29cc80b077cc311e79f56b0e17f3f44572db0db29a8329972243c393a5e1a3949b1f7e6514d309ba9f554b501e158e
|
7
|
+
data.tar.gz: 6eff8e3897153a22964552133b97efb6181a2fbb6f543b093cd00109646c7a5262f8d80cf0254eab2870c097c55e0178a89fe0fe302dede5ddf3cf728c5fb4a7
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/denv.gemspec
CHANGED
@@ -19,6 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
21
|
spec.add_development_dependency 'bundler'
|
22
|
+
spec.add_development_dependency 'pry-byebug'
|
22
23
|
spec.add_development_dependency 'rails'
|
23
24
|
spec.add_development_dependency 'rake'
|
24
25
|
spec.add_development_dependency 'rspec', '~> 3'
|
data/lib/denv/rails.rb
CHANGED
data/lib/denv/version.rb
CHANGED
data/reload_env_test.rb
CHANGED
@@ -13,13 +13,27 @@ Dir.chdir('tmp') do
|
|
13
13
|
raise('Necessary keys are removed') unless ENV.has_key?('INIT')
|
14
14
|
raise('Can not set env') unless ENV['YYY'] == '2'
|
15
15
|
|
16
|
-
File.write('.env', "XXX=
|
16
|
+
File.write('.env', "XXX=\nYYY=3\nZZZ=4")
|
17
17
|
code = <<-EOS
|
18
18
|
$LOAD_PATH.unshift("#{lib}")
|
19
19
|
require 'denv'
|
20
20
|
Denv.load
|
21
|
-
|
22
|
-
|
21
|
+
|
22
|
+
if ENV['XXX'] != ''
|
23
|
+
p ENV
|
24
|
+
raise('Previous env vars are not removed')
|
25
|
+
end
|
26
|
+
|
27
|
+
if ENV['YYY'] != '3'
|
28
|
+
p ENV
|
29
|
+
raise('can not overwrite env var')
|
30
|
+
end
|
31
|
+
|
32
|
+
if ENV['ZZZ'] != '4'
|
33
|
+
p ENV
|
34
|
+
raise('can not add new env var')
|
35
|
+
end
|
36
|
+
|
23
37
|
puts 'Success'
|
24
38
|
EOS
|
25
39
|
exec('ruby', '-e', code)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: denv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taiki Ono
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pry-byebug
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rails
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -126,10 +140,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
140
|
version: '0'
|
127
141
|
requirements: []
|
128
142
|
rubyforge_project:
|
129
|
-
rubygems_version: 2.
|
143
|
+
rubygems_version: 2.5.2
|
130
144
|
signing_key:
|
131
145
|
specification_version: 4
|
132
146
|
summary: Loads environment variables to `ENV` from `.env` file. No special treatments
|
133
147
|
about shell meta characters.
|
134
148
|
test_files: []
|
135
|
-
has_rdoc:
|