denv 0.2.4 → 0.2.5

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: cb3c23fc8d74e9c088f48d4b60f0f9409c3b2753
4
- data.tar.gz: 63f81ac4cece85d1858bc4838b0bfdc91e5addad
3
+ metadata.gz: 8ec0793ffe91ad8bc83012fdd947b8eb5f4ce0bb
4
+ data.tar.gz: 46958e78bcd24d5dff808637c0bae4484652d280
5
5
  SHA512:
6
- metadata.gz: 73a5f8dfc8838af45199b4c565f8edeb35333cff496fac65e8d57563e57e383b9c4709f33ba164e82ad964dd4e659837476cd3ceb999e7b7aa6238e20824898e
7
- data.tar.gz: fdb6d15ff73f9dae28d04d2673d2bf517bc8f90ffff560e9be582099c306f6be15906f5167db479e8301ce42f881a873c4577c1dc0bb7bdc92b45d1f655bf85e
6
+ metadata.gz: 78b1f47c7219c9b45c08397ff876a1f92a34bbc6f58e2ef2319217dbfb771f260dc60a105e09de4627701e35dda325b52b723eb5df3e264f1284c9f7d249ecd9
7
+ data.tar.gz: 2d22d829aa41761fd1dff0328db0924cf299eca90cfeea4ba4ffb62a15d8559c5dc0a6b04a728926a89978fd0dc9436c4c1e9b9cf2f7bc21903e804f175cd5d5
@@ -1,4 +1,7 @@
1
1
  # CHANGELOG.md for denv
2
+ ## 0.2.5
3
+ - Correct loading order to overwirte default one #3
4
+
2
5
  ## 0.2.4
3
6
  - Work around for old spring gem (< 0.0.8)
4
7
 
@@ -13,7 +13,7 @@ end
13
13
 
14
14
  module Denv
15
15
  class Railtie < ::Rails::Railtie
16
- DEFAULT_ENV_FILES = %w[.env.local .env.#{Rails.env} .env]
16
+ DEFAULT_ENV_FILES = %w[.env .env.#{Rails.env} .env.local]
17
17
 
18
18
  config.before_configuration { load_env }
19
19
 
@@ -1,3 +1,3 @@
1
1
  module Denv
2
- VERSION = '0.2.4'
2
+ VERSION = '0.2.5'
3
3
  end
@@ -13,12 +13,22 @@ Dir.chdir('tmp') do
13
13
  new = lines.first(1) + [%!gem "denv", path: "#{path}"!] + lines.drop(1)
14
14
  File.open('Gemfile', 'w') {|f| f.puts(new.join("\n")) }
15
15
  system('bundle install -j8')
16
+
16
17
  File.open('.env', 'w') {|f| f.puts("XXX=123\nYYY=1\n") }
17
18
  result = system(%!bundle exec rails runner 'ENV["XXX"] == "123" ? exit : exit(1)'!)
18
19
  if result
19
- puts "[#{name}] Succeeded"
20
+ puts "[#{name}] Test case 'default' succeeded"
21
+ else
22
+ $stderr.puts "[#{name}] Test case 'default' failed"
23
+ exit(1)
24
+ end
25
+
26
+ File.open('.env.local', 'w') {|f| f.puts("XXX=000\n") }
27
+ result = system(%!bundle exec rails runner 'ENV["XXX"] == "000" ? exit : exit(1)'!)
28
+ if result
29
+ puts "[#{name}] Test case 'overwirte' succeeded"
20
30
  else
21
- $stderr.puts "[#{name}] Failed"
31
+ $stderr.puts "[#{name}] Test case 'overwirte' failed"
22
32
  exit(1)
23
33
  end
24
34
  end
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
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taiki Ono
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-13 00:00:00.000000000 Z
11
+ date: 2016-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -126,9 +126,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  requirements: []
128
128
  rubyforge_project:
129
- rubygems_version: 2.5.1
129
+ rubygems_version: 2.6.3
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: Loads environment variables to `ENV` from `.env` file. No special treatments
133
133
  about shell meta characters.
134
134
  test_files: []
135
+ has_rdoc: