dotenv-vault 0.10.0 β†’ 0.10.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: d50c70b0cdf146642c45402aced8a3a917835a08d705d12285365a52b9e42c28
4
- data.tar.gz: 0cad8a7095928704247fd5c0cde071be993612805c67163bde7e0c79d57c450c
3
+ metadata.gz: ea4194bf32f46a6276553e4c87e37252c8511663b74797291efb6d03388b074d
4
+ data.tar.gz: ef162b574d7ca8b79ee9ea290791cca4f924088c34e298c7e5062497b2e87ade
5
5
  SHA512:
6
- metadata.gz: 71b28ee0642d01ccfcb065c32265d9352a4696e8dc16822917066039efad4e42b3155d365dcfa3780d26cc295804f72c5419d6e47360d25d45ad190c7e08c9e2
7
- data.tar.gz: ae75c04dbad3f6a66d6b2f77eadd10a31d54de2c6e4f75a4f8a5c779fa6b70644d5bccfeb9b104e065de5abff1eade9321acce525f485bb8d75a6dcf44f55d42
6
+ metadata.gz: 1942043c014772062b5b8ae38e07ae10506aacf0fc24c81589cf26f2a4b2c58bc41aa0e368e7aa004934aaad84afbec3904694c7f329c48687a448fe21862728
7
+ data.tar.gz: 6cf74d179440a7be3554bb40fd262045a339be9239bbd54866d70e8885f2e29cf666ee216b82a11430b011f71f62bfbab69624f3c34a0974f04b04f9a08d86d5
data/CHANGELOG.md CHANGED
@@ -2,7 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- ## [Unreleased](https://github.com/dotenv-org/dotenv-vault-ruby/compare/v0.9.0...master)
5
+ ## [Unreleased](https://github.com/dotenv-org/dotenv-vault-ruby/compare/v0.10.1...master)
6
+
7
+ ## 0.10.1
8
+
9
+ ### Changed
10
+
11
+ - Modify the log message to `Loading env from encrypted .env.vault`.
6
12
 
7
13
  ## 0.10.0
8
14
 
data/Gemfile.lock CHANGED
@@ -1,68 +1,70 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dotenv-vault (0.10.0)
4
+ dotenv-vault (0.10.1)
5
5
  dotenv
6
6
  lockbox
7
- dotenv-vault-rails (0.10.0)
7
+ dotenv-vault-rails (0.10.1)
8
8
  dotenv-rails
9
- dotenv-vault (= 0.10.0)
9
+ dotenv-vault (= 0.10.1)
10
10
 
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- actionpack (7.0.4)
15
- actionview (= 7.0.4)
16
- activesupport (= 7.0.4)
17
- rack (~> 2.0, >= 2.2.0)
14
+ actionpack (7.0.6)
15
+ actionview (= 7.0.6)
16
+ activesupport (= 7.0.6)
17
+ rack (~> 2.0, >= 2.2.4)
18
18
  rack-test (>= 0.6.3)
19
19
  rails-dom-testing (~> 2.0)
20
20
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
21
- actionview (7.0.4)
22
- activesupport (= 7.0.4)
21
+ actionview (7.0.6)
22
+ activesupport (= 7.0.6)
23
23
  builder (~> 3.1)
24
24
  erubi (~> 1.4)
25
25
  rails-dom-testing (~> 2.0)
26
26
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
27
- activesupport (7.0.4)
27
+ activesupport (7.0.6)
28
28
  concurrent-ruby (~> 1.0, >= 1.0.2)
29
29
  i18n (>= 1.6, < 2)
30
30
  minitest (>= 5.1)
31
31
  tzinfo (~> 2.0)
32
32
  builder (3.2.4)
33
33
  byebug (11.1.3)
34
- concurrent-ruby (1.1.10)
34
+ concurrent-ruby (1.2.2)
35
35
  crass (1.0.6)
36
36
  diff-lcs (1.5.0)
37
37
  dotenv (2.8.1)
38
38
  dotenv-rails (2.8.1)
39
39
  dotenv (= 2.8.1)
40
40
  railties (>= 3.2)
41
- erubi (1.11.0)
42
- i18n (1.12.0)
41
+ erubi (1.12.0)
42
+ i18n (1.14.1)
43
43
  concurrent-ruby (~> 1.0)
44
- lockbox (1.1.0)
45
- loofah (2.19.0)
44
+ lockbox (1.3.0)
45
+ loofah (2.21.3)
46
46
  crass (~> 1.0.2)
47
- nokogiri (>= 1.5.9)
47
+ nokogiri (>= 1.12.0)
48
48
  method_source (1.0.0)
49
- mini_portile2 (2.8.0)
50
- minitest (5.16.3)
51
- nokogiri (1.13.9)
52
- mini_portile2 (~> 2.8.0)
49
+ mini_portile2 (2.8.4)
50
+ minitest (5.19.0)
51
+ nokogiri (1.15.3)
52
+ mini_portile2 (~> 2.8.2)
53
53
  racc (~> 1.4)
54
- racc (1.6.0)
55
- rack (2.2.4)
56
- rack-test (2.0.2)
54
+ racc (1.7.1)
55
+ rack (2.2.7)
56
+ rack-test (2.1.0)
57
57
  rack (>= 1.3)
58
- rails-dom-testing (2.0.3)
59
- activesupport (>= 4.2.0)
58
+ rails-dom-testing (2.1.1)
59
+ activesupport (>= 5.0.0)
60
+ minitest
60
61
  nokogiri (>= 1.6)
61
- rails-html-sanitizer (1.4.3)
62
- loofah (~> 2.3)
63
- railties (7.0.4)
64
- actionpack (= 7.0.4)
65
- activesupport (= 7.0.4)
62
+ rails-html-sanitizer (1.6.0)
63
+ loofah (~> 2.21)
64
+ nokogiri (~> 1.14)
65
+ railties (7.0.6)
66
+ actionpack (= 7.0.6)
67
+ activesupport (= 7.0.6)
66
68
  method_source
67
69
  rake (>= 12.2)
68
70
  thor (~> 1.0)
@@ -82,10 +84,10 @@ GEM
82
84
  rspec-support (~> 3.11.0)
83
85
  rspec-support (3.11.0)
84
86
  spring (4.0.0)
85
- thor (1.2.1)
86
- tzinfo (2.0.5)
87
+ thor (1.2.2)
88
+ tzinfo (2.0.6)
87
89
  concurrent-ruby (~> 1.0)
88
- zeitwerk (2.6.1)
90
+ zeitwerk (2.6.9)
89
91
 
90
92
  PLATFORMS
91
93
  ruby
data/README.md CHANGED
@@ -2,18 +2,25 @@
2
2
 
3
3
  <img src="https://raw.githubusercontent.com/motdotla/dotenv/master/dotenv.svg" alt="dotenv-vault" align="right" width="200" />
4
4
 
5
- Extends the proven & trusted foundation of [dotenv](https://github.com/bkeepers/dotenv), with a `.env.vault` file.
5
+ Extends the proven & trusted foundation of [dotenv](https://github.com/bkeepers/dotenv), with `.env.vault` file support.
6
6
 
7
- The extended standard lets you sync your `.env` files – quickly & securely. Stop sharing them over insecure channels like Slack and email, and never lose an important `.env` file again.
7
+ The extended standard lets you load encrypted secrets from your `.env.vault` file in production (and other) environments. Brought to you by the same people that pioneered [dotenv-nodejs](https://github.com/motdotla/dotenv).
8
8
 
9
- ## Installation
9
+ * [🌱 Install](#-install)
10
+ * [πŸ—οΈ Usage (.env)](#%EF%B8%8F-usage)
11
+ * [πŸš€ Deploying (.env.vault) πŸ†•](#-deploying)
12
+ * [🌴 Multiple Environments](#-manage-multiple-environments)
13
+ * [❓ FAQ](#-faq)
14
+ * [⏱️ Changelog](./CHANGELOG.md)
15
+
16
+ ## 🌱 Install
10
17
 
11
18
  ### Rails
12
19
 
13
20
  Add this line to the top of your application's Gemfile:
14
21
 
15
22
  ```ruby
16
- gem 'dotenv-vault-rails'
23
+ gem "dotenv-vault-rails", require: "dotenv-vault/rails-now"
17
24
  ```
18
25
 
19
26
  And then execute:
@@ -33,18 +40,16 @@ $ gem install dotenv-vault
33
40
  As early as possible in your application bootstrap process, load `.env`:
34
41
 
35
42
  ```ruby
36
- require 'dotenv-vault/load'
43
+ require "dotenv-vault/load"
37
44
 
38
45
  # or
39
- require 'dotenv-vault'
46
+ require "dotenv-vault"
40
47
  DotenvVault.load
41
48
  ```
42
49
 
43
- ## Usage
44
-
45
- ### `.env`
50
+ ## πŸ—οΈ Usage
46
51
 
47
- Basic usage works just like [dotenv](https://github.com/bkeepers/dotenv).
52
+ Development usage works just like [dotenv](https://github.com/bkeepers/dotenv).
48
53
 
49
54
  Add your application configuration to your `.env` file in the root of your project:
50
55
 
@@ -56,99 +61,55 @@ SECRET_KEY=YOURSECRETKEYGOESHERE
56
61
  When your application loads, these variables will be available in `ENV`:
57
62
 
58
63
  ```ruby
59
- config.fog_directory = ENV['S3_BUCKET']
64
+ config.fog_directory = ENV["S3_BUCKET"]
60
65
  ```
61
66
 
62
- ### `.env.vault`
67
+ ## πŸš€ Deploying
63
68
 
64
- The `.env.vault` extends `.env`. It facilitates syncing your `.env` file across machines, team members, and environments.
69
+ Encrypt your `.env.vault` file.
65
70
 
66
- Usage is similar to git. In the same directory as your `.env` file, run the command:
67
-
68
- ```shell
69
- $ npx dotenv-vault new
71
+ ```bash
72
+ $ npx dotenv-vault build
70
73
  ```
71
74
 
72
- Follow those instructions and then run:
75
+ Fetch your production `DOTENV_KEY`.
73
76
 
74
- ```shell
75
- $ npx dotenv-vault login
77
+ ```bash
78
+ $ npx dotenv-vault keys production
76
79
  ```
77
80
 
78
- Then run push and pull:
81
+ Set `DOTENV_KEY` on your server.
79
82
 
80
- ```shell
81
- $ npx dotenv-vault push
82
- $ npx dotenv-vault pull
83
+ ```bash
84
+ # heroku example
85
+ heroku config:set DOTENV_KEY=dotenv://:key_1234…@dotenv.org/vault/.env.vault?environment=production
83
86
  ```
84
87
 
85
- That's it!
88
+ That's it! On deploy, your `.env.vault` file will be decrypted and its secrets injected as environment variables – just in time.
86
89
 
87
- You just synced your `.env` file. Commit your `.env.vault` file to code, and tell your teammates to run `npx dotenv-vault pull`.
90
+ *ℹ️ A note from [Mot](https://github.com/motdotla): Until recently, we did not have an opinion on how and where to store your secrets in production. We now strongly recommend generating a `.env.vault` file. It's the best way to prevent your secrets from being scattered across multiple servers and cloud providers – protecting you from breaches like the [CircleCI breach](https://techcrunch.com/2023/01/05/circleci-breach/). Also it unlocks interoperability WITHOUT native third-party integrations. Third-party integrations are [increasingly risky](https://coderpad.io/blog/development/heroku-github-breach/) to our industry. They may be the 'du jour' of today, but we imagine a better future.*
88
91
 
89
- [Learn more](https://www.dotenv.org/docs/tutorials/sync)
92
+ <a href="https://github.com/dotenv-org/dotenv-vault#dotenv-vault-">Learn more at dotenv-vault: Deploying</a>
90
93
 
91
- ## Multiple Environments
94
+ ## 🌴 Manage Multiple Environments
92
95
 
93
- Run the command:
96
+ Edit your production environment variables.
94
97
 
95
- ```shell
98
+ ```bash
96
99
  $ npx dotenv-vault open production
97
100
  ```
98
101
 
99
- It will open up an interface to manage your production environment variables.
102
+ Regenerate your `.env.vault` file.
100
103
 
101
- [Learn more](https://www.dotenv.org/docs/tutorials/environments)
102
-
103
- ## Integrate Anywhereβ„’
104
-
105
- Build your encrypted `.env.vault`:
106
-
107
- ```shell
104
+ ```bash
108
105
  $ npx dotenv-vault build
109
106
  ```
110
107
 
111
- Safely commit and push your changes:
108
+ *ℹ️ πŸ” Vault Managed vs πŸ’» Locally Managed: The above example, for brevity's sake, used the πŸ” Vault Managed solution to manage your `.env.vault` file. You can instead use the πŸ’» Locally Managed solution. [Read more here](https://github.com/dotenv-org/dotenv-vault#how-do-i-use--locally-managed-dotenv-vault). Our vision is that other platforms and orchestration tools adopt the `.env.vault` standard as they did the `.env` standard. We don't expect to be the only ones providing tooling to manage and generate `.env.vault` files.*
112
109
 
113
- ```shell
114
- $ git commit -am "Updated .env.vault"
115
- $ git push
116
- ```
110
+ <a href="https://github.com/dotenv-org/dotenv-vault#-manage-multiple-environments">Learn more at dotenv-vault: Manage Multiple Environments</a>
117
111
 
118
- Obtain your `DOTENV_KEY`:
119
-
120
- ```shell
121
- $ npx dotenv-vault keys
122
- ```
123
-
124
- Set `DOTENV_KEY` on your infrastructure. For example, on Heroku:
125
-
126
- ```shell
127
- $ heroku config:set DOTENV_KEY="dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=production"
128
- ```
129
-
130
- All set! When your app boots, it will recognize a `DOTENV_KEY` is set, decrypt the `.env.vault` file, and load the variables to `ENV`.
131
-
132
- Made a change to your production envs? Run `npx dotenv-vault build`, commit that safely to code, and deploy. It's simple and safe like that.
133
-
134
- [Learn more](https://www.dotenv.org/docs/tutorials/integrations)
135
-
136
- ## Dotenv.org
137
-
138
- You need a [Dotenv Account](https://dotenv.org) to use Dotenv Vault. It is free to use with premium features.
139
-
140
- ![](https://api.checklyhq.com/v1/badges/checks/c2fee99a-38e7-414e-89b8-9766ceeb1927?style=flat&theme=dark&responseTime=true)
141
- ![](https://api.checklyhq.com/v1/badges/checks/4f557967-1ed1-486a-b762-39a63781d752?style=flat&theme=dark&responseTime=true)
142
- <br>
143
- ![](https://api.checklyhq.com/v1/badges/checks/804eb6fa-6599-4688-a649-7ff3c39a64b9?style=flat&theme=dark&responseTime=true)
144
- ![](https://api.checklyhq.com/v1/badges/checks/6a94504e-e936-4f07-bc0b-e08fee2734b3?style=flat&theme=dark&responseTime=true)
145
- <br>
146
- ![](https://api.checklyhq.com/v1/badges/checks/06ac4f4e-3e0e-4501-9987-580b4d2a6b06?style=flat&theme=dark&responseTime=true)
147
- ![](https://api.checklyhq.com/v1/badges/checks/0ffc1e55-7ef0-4c2c-8acc-b6311871f41c?style=flat&theme=dark&responseTime=true)
148
-
149
- Visit [health.dotenv.org](https://health.dotenv.org) for more information.
150
-
151
- ## FAQ
112
+ ## ❓ FAQ
152
113
 
153
114
  #### What happens if `DOTENV_KEY` is not set?
154
115
 
@@ -178,6 +139,11 @@ No. It is the key that unlocks your encrypted environment variables. Be very car
178
139
 
179
140
  See [CHANGELOG.md](CHANGELOG.md)
180
141
 
142
+ ## Development
143
+
144
+ 1. Bump and tag version
145
+ 2. rake release
146
+
181
147
  ## License
182
148
 
183
149
  MIT
@@ -1,3 +1,3 @@
1
1
  module DotenvVault
2
- VERSION = "0.10.0"
2
+ VERSION = "0.10.1"
3
3
  end
data/lib/dotenv-vault.rb CHANGED
@@ -90,7 +90,7 @@ module DotenvVault
90
90
  #
91
91
  # Decrypts and loads to ENV
92
92
  def load_vault(*filenames)
93
- DotenvVault.logger.info("[dotenv-vault] Loading encrypted .env.vault to environment variables") if DotenvVault.logger
93
+ DotenvVault.logger.info("[dotenv-vault] Loading env from encrypted .env.vault") if DotenvVault.logger
94
94
 
95
95
  parsed = parse_vault(*filenames)
96
96
 
@@ -104,7 +104,7 @@ module DotenvVault
104
104
  #
105
105
  # Decrypts and overloads to ENV
106
106
  def overload_vault(*filenames)
107
- DotenvVault.logger.info("[dotenv-vault] Overloading encrypted .env.vault to environment variables") if DotenvVault.logger
107
+ DotenvVault.logger.info("[dotenv-vault] Overloading env from encrypted .env.vault") if DotenvVault.logger
108
108
 
109
109
  parsed = parse_vault(*filenames)
110
110
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dotenv-vault
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - motdotla
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-11-18 00:00:00.000000000 Z
11
+ date: 2023-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv
@@ -113,7 +113,7 @@ metadata:
113
113
  homepage_uri: https://github.com/dotenv-org/dotenv-vault-ruby
114
114
  source_code_uri: https://github.com/dotenv-org/dotenv-vault-ruby
115
115
  changelog_uri: https://github.com/dotenv-org/dotenv-vault-ruby
116
- post_install_message:
116
+ post_install_message:
117
117
  rdoc_options: []
118
118
  require_paths:
119
119
  - lib
@@ -128,8 +128,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  - !ruby/object:Gem::Version
129
129
  version: '0'
130
130
  requirements: []
131
- rubygems_version: 3.1.6
132
- signing_key:
131
+ rubygems_version: 3.3.26
132
+ signing_key:
133
133
  specification_version: 4
134
134
  summary: Decrypt .env.vault file.
135
135
  test_files: []