Skip to content

Commit aae2c79

Browse files
author
Kaka Ruto
committed
Add dotenv gem and the .env file to load environment variables
1 parent 2dcc737 commit aae2c79

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CLOUDFLARE_EMAIL='your_cloudlare_email'
2+
CLOUDFLARE_KEY='your_cloudflare_api_key'
3+

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,10 @@ end
8888

8989
1. Fork it
9090
2. Create your feature branch (`git checkout -b my-new-feature`)
91-
3. Commit your changes (`git commit -am 'Add some feature'`)
92-
4. Push to the branch (`git push origin my-new-feature`)
93-
5. Create new Pull Request
91+
3. Run `cp .env.example .env` to create a .env file and populate it with the required environment variables. Edit the new file appropriately
92+
4. Commit your changes (`git commit -am 'Add some feature'`)
93+
5. Push to the branch (`git push origin my-new-feature`)
94+
6. Create new Pull Request
9495

9596
## See Also
9697

gems.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@
1919
gem 'simplecov'
2020
gem 'sinatra'
2121
gem 'webmock'
22+
gem 'dotenv'
2223
end

spec/spec_helper.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# frozen_string_literal: true
22

3+
require 'dotenv/load'
4+
35
AUTH_EMAIL = ENV['CLOUDFLARE_EMAIL']
46
AUTH_KEY = ENV['CLOUDFLARE_KEY']
57

0 commit comments

Comments
 (0)