dotenv 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ae9316b6ae85fca9d3c5724f6179127fa17444b94ba27ea1000fd5677e73249
4
- data.tar.gz: da1ac6f6c94bda168a504f58244dd382012fa60ca56ba9dc44524bccc1a687b8
3
+ metadata.gz: f9897791ad9e8b033e9bf66513f4f53bd1afb7fa2d925995bcd4f46c6edff8f7
4
+ data.tar.gz: 4bff08bdfbdc9f5709626ab2b46ed098d5c602ccfcb8063457f238dabf459f43
5
5
  SHA512:
6
- metadata.gz: b3fe0a0048d061128625f85f7f475a4f5a2d2e296906d108225275384ff22e249adc7a1e59e3f3585a912279796de06b9606dc842311e3c43c47de92561f6f99
7
- data.tar.gz: 420e753ad539b9eabc26e7b13997d0b7272ccf1c4ec1b42f2455c2531976ec07514be88ca7fd691b422c4534f46ec0de77af7a86d6220b4cf0af2c11fbc0dff4
6
+ metadata.gz: 9594d44181f64067dd47b0e4a86a534620aa09278774ad8c86f08bb6d2d35f45d27a724a16207aee9189f508e00f102686c562d85f2feffd45fe506b6451f828
7
+ data.tar.gz: 9352577bba48b8f713914b1688f17355fc543b4b004a918889ffc1a83dda939e60597ea49c6ef9f3aad7dfcc48fd837fefa4746dfa783088429ea96ffb7fbaed
@@ -9,8 +9,10 @@ module Dotenv
9
9
  File.open(@env_file, "r") do |env_file|
10
10
  File.open("#{@env_file}.template", "w") do |env_template|
11
11
  env_file.each do |line|
12
- variable = line.split("=").first
13
- env_template.puts "#{variable}=#{variable}"
12
+ var, value = line.split("=")
13
+ is_a_comment = var.strip[0].eql?("#")
14
+ line_transform = value.nil? || is_a_comment ? line : "#{var}=#{var}"
15
+ env_template.puts line_transform
14
16
  end
15
17
  end
16
18
  end
@@ -1,3 +1,3 @@
1
1
  module Dotenv
2
- VERSION = "2.7.5".freeze
2
+ VERSION = "2.7.6".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dotenv
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.5
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: 2019-07-31 00:00:00.000000000 Z
11
+ date: 2020-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  - !ruby/object:Gem::Version
94
94
  version: '0'
95
95
  requirements: []
96
- rubygems_version: 3.0.1
96
+ rubygems_version: 3.0.3
97
97
  signing_key:
98
98
  specification_version: 4
99
99
  summary: Loads environment variables from `.env`.