dotenv 3.1.7 → 3.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a4ad122f937755147ff0cc52552f17b1e1cf8f9a290ff791ac5ba2f8ef8b43c7
4
- data.tar.gz: 3116d767ea5dc67adca867395ea7effbc1b4ee30769223961f8d041d5c34482d
3
+ metadata.gz: 586dd937a4a5a27f37fb6c71d64498ba9c84854d36d761cd1e1759f6cf130710
4
+ data.tar.gz: c3c8aad2fa4666f59833edc8baa77a2e127350a5987208c6c96b6a0f4ac55e98
5
5
  SHA512:
6
- metadata.gz: 86436a8b6d193590befeb48a29882b9bd5523f8b80fff961faf1feda91cc720b8b44c1e2705bfbebb73836b99684273d49f78b94c09d05a3077e62996473a47c
7
- data.tar.gz: bb6f98a159c821e0f1cb98ab6c3f0b54a109acc3c934770fd6603f7497c047f031c7124f839963f0f5132a12bd2736e25ab2e4c648cfa56589a30b328d03de61
6
+ metadata.gz: d77998e7079602e9e2114cea2fcc9a119be0f9fcbc5d962d687c72df0239bf6ae93a66502fb856abaaa0b12dd14960ef08bc990d75fc3bca87ec8b08f8f17ea6
7
+ data.tar.gz: a669c1d1bc64af5cb3e3eafafdab2877adf5bfcf7d8b72b90d47bfcdad441afd77c8a55742660a46ab75b34ac8bc447c82a6b86b52f2714366382737eb72efa3
data/README.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  Shim to load environment variables from `.env` into `ENV` in *development*.
4
4
 
5
+ <img align="left" src="https://github.com/user-attachments/assets/0052ed0b-00d2-416a-bdaa-0466c0226933" width="80" />
6
+ <div><sup>Dotenv is proud to be <a href="https://github.com/sponsors/bkeepers">sponsored by</a>:</sup></div>
7
+ <strong><a href="https://bit.ly/dotenv-stoked-seagull">Stoked Seagull Software</a></strong>
8
+ <div>Need help with a software project but don't know where to begin? <a href="https://bit.ly/dotenv-stoked-seagull">Stoked Seagull can help.</a></div><br><br>
9
+
5
10
  Storing [configuration in the environment](http://12factor.net/config) is one of the tenets of a [twelve-factor app](http://12factor.net). Anything that is likely to change between deployment environments–such as resource handles for databases or credentials for external services–should be extracted from the code into environment variables.
6
11
 
7
12
  But it is not always practical to set environment variables on development machines or continuous integration servers where multiple projects are run. dotenv loads variables from a `.env` file into `ENV` when the environment is bootstrapped.
@@ -84,7 +89,7 @@ You can use the `dotenv` executable load `.env` before launching your applicatio
84
89
  $ dotenv ./script.rb
85
90
  ```
86
91
 
87
- The `dotenv` executable also accepts the flag `-f`. Its value should be a comma-separated list of configuration files, in the order of most important to least. All of the files must exist. There _must_ be a space between the flag and its value.
92
+ The `dotenv` executable also accepts the flag `-f`. Its value should be a comma-separated list of configuration files, in the order of the most important to the least important. All of the files must exist. There _must_ be a space between the flag and its value.
88
93
 
89
94
  ```console
90
95
  $ dotenv -f ".env.local,.env" ./script.rb
data/lib/dotenv/parser.rb CHANGED
@@ -33,6 +33,8 @@ module Dotenv
33
33
  (?:$|\z) # end of line
34
34
  /x
35
35
 
36
+ QUOTED_STRING = /\A(['"])(.*)\1\z/m
37
+
36
38
  class << self
37
39
  attr_reader :substitutions
38
40
 
@@ -75,7 +77,6 @@ module Dotenv
75
77
  !@overwrite && key != "DOTENV_LINEBREAK_MODE" && ENV.key?(key)
76
78
  end
77
79
 
78
- QUOTED_STRING = /\A(['"])(.*)\1\z/m
79
80
  def parse_value(value)
80
81
  # Remove surrounding quotes
81
82
  value = value.strip.sub(QUOTED_STRING, '\2')
@@ -1,3 +1,3 @@
1
1
  module Dotenv
2
- VERSION = "3.1.7".freeze
2
+ VERSION = "3.1.8".freeze
3
3
  end
data/lib/dotenv.rb CHANGED
@@ -55,7 +55,7 @@ module Dotenv
55
55
  begin
56
56
  env = Environment.new(File.expand_path(filename), overwrite: overwrite)
57
57
  env = block.call(env) if block
58
- rescue Errno::ENOENT
58
+ rescue Errno::ENOENT, Errno::EISDIR
59
59
  raise unless ignore
60
60
  end
61
61
 
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dotenv
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.7
4
+ version: 3.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Keepers
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-12-18 00:00:00.000000000 Z
10
+ date: 2025-04-10 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rake
@@ -85,7 +84,7 @@ licenses:
85
84
  - MIT
86
85
  metadata:
87
86
  changelog_uri: https://github.com/bkeepers/dotenv/releases
88
- post_install_message:
87
+ funding_uri: https://github.com/sponsors/bkeepers
89
88
  rdoc_options: []
90
89
  require_paths:
91
90
  - lib
@@ -100,8 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
99
  - !ruby/object:Gem::Version
101
100
  version: '0'
102
101
  requirements: []
103
- rubygems_version: 3.5.22
104
- signing_key:
102
+ rubygems_version: 3.6.2
105
103
  specification_version: 4
106
104
  summary: Loads environment variables from `.env`.
107
105
  test_files: []