dotenv 2.8.0 → 2.8.1

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: 53a782f20ccb8d0ed6e70eb3f6e626313a96460297e75dfc02356da40bea9ef1
4
- data.tar.gz: 7dee9ae1c761ad5f069883443f8ccb0c3e8540187e432fc184783c88f1844ac6
3
+ metadata.gz: ac1a9e8e04f95f111da23bf2541070f2617864fc3c55ac4e11e6b91c78d11a9b
4
+ data.tar.gz: 24bf24be5be7020e72877e32d8cd2d9cf022a74b182569c77b2c81c0d482696b
5
5
  SHA512:
6
- metadata.gz: 0425caeb0f6321954bc8731438793f3d24306b72e0bf17c7de14e45c093bd2af892899d9b91780e0b688371e5db03a819eead8fe2475a7550fb1fc4762989e23
7
- data.tar.gz: 52414dd28acab5d41879dc1740c08f8fe4265c66476dd04e1580291104701c0c5b5dcda87575d9aa4433f92587efcee87bf3aa7bb32eab35685b2fa2dd580855
6
+ metadata.gz: 1f8d6ae3bfd67c1b57bc4d72346d670c02570d07cee953930d6b7f9018cc053ac42624d1bc4d59dd112abe5ba711d551199ff92a2672d5434577356b0a24d0c0
7
+ data.tar.gz: 38488d0f24d6f6014f87415775f94969cd56236bcb848c77b5dd4d066285ec47993006f87f1ab1afb50a033db101fe206741ec8e561de602a88717ad6fff3bdf
data/lib/dotenv/parser.rb CHANGED
@@ -84,7 +84,7 @@ module Dotenv
84
84
  end
85
85
 
86
86
  def variable_not_set?(line)
87
- !line.split[1..].all? { |var| @hash.member?(var) }
87
+ !line.split[1..-1].all? { |var| @hash.member?(var) }
88
88
  end
89
89
 
90
90
  def unescape_value(value, maybe_quote)
@@ -28,7 +28,7 @@ module Dotenv
28
28
 
29
29
  if $LAST_MATCH_INFO[:backslash]
30
30
  # Command is escaped, don't replace it.
31
- $LAST_MATCH_INFO[0][1..]
31
+ $LAST_MATCH_INFO[0][1..-1]
32
32
  else
33
33
  # Execute the command and return the value
34
34
  `#{command}`.chomp
@@ -30,7 +30,7 @@ module Dotenv
30
30
 
31
31
  def substitute(match, variable, env)
32
32
  if match[1] == "\\"
33
- variable[1..]
33
+ variable[1..-1]
34
34
  elsif match[3]
35
35
  env.fetch(match[3], "")
36
36
  else
@@ -1,3 +1,3 @@
1
1
  module Dotenv
2
- VERSION = "2.8.0".freeze
2
+ VERSION = "2.8.1".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.8.0
4
+ version: 2.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Keepers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-26 00:00:00.000000000 Z
11
+ date: 2022-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake