Skip to content

Commit 807943d

Browse files
committed
Remove figaro gem and use rails-dotenv
1 parent 34b79ee commit 807943d

File tree

3 files changed

+26
-41
lines changed

3 files changed

+26
-41
lines changed

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ gem 'js-routes' # provides access to Rails routes in Javascript
4848

4949
gem 'cancancan' # for checking member privileges
5050
gem 'csv_shaper' # CSV export
51-
gem 'figaro' # for handling config via ENV variables
5251
gem 'gibbon', '~>1.2.0' # for Mailchimp newsletter subscriptions
5352

5453
# Maps
@@ -163,6 +162,8 @@ group :development, :test do
163162
gem 'rubocop-rspec'
164163
gem 'webrat' # provides HTML matchers for view tests
165164

165+
gem 'dotenv-rails'
166+
166167
# cli utils
167168
gem 'coveralls', require: false # coverage analysis
168169
gem 'haml-i18n-extractor', require: false

Gemfile.lock

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ GEM
163163
discard (1.2.0)
164164
activerecord (>= 4.2, < 7)
165165
docile (1.1.5)
166+
dotenv (2.7.6)
167+
dotenv-rails (2.7.6)
168+
dotenv (= 2.7.6)
169+
railties (>= 3.2)
166170
elasticsearch (6.8.2)
167171
elasticsearch-api (= 6.8.2)
168172
elasticsearch-transport (= 6.8.2)
@@ -193,8 +197,6 @@ GEM
193197
faraday_middleware (1.0.0)
194198
faraday (~> 1.0)
195199
ffi (1.13.0)
196-
figaro (1.2.0)
197-
thor (>= 0.14.0, < 2)
198200
flickraw (0.9.10)
199201
font-awesome-sass (5.13.0)
200202
sassc (>= 1.11)
@@ -613,12 +615,12 @@ DEPENDENCIES
613615
database_cleaner
614616
devise
615617
discard (~> 1.0)
618+
dotenv-rails
616619
elasticsearch (< 7.0.0)
617620
factory_bot_rails
618621
faker
619622
faraday
620623
faraday_middleware
621-
figaro
622624
flickraw
623625
font-awesome-sass
624626
friendly_id
Lines changed: 19 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
# Settings in this file will be available to you as ENV['WHATEVER']
1717

18-
# NOTE: please prefix all environment variables with GROWSTUFF_ to make
18+
# NOTE=please prefix all environment variables with GROWSTUFF_ to make
1919
# it easy to identify which were set by us vs. the system or anyone else
2020

2121
##############################################################################
@@ -26,56 +26,38 @@
2626
# It's the only one without "GROWSTUFF_" prefix.
2727
# To generate a real one, use 'rake secret' (you don't need to for
2828
# dev, though.)
29-
RAILS_SECRET_TOKEN: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
29+
RAILS_SECRET_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
3030

3131
# name that appears on the site, eg. in page titles
32-
GROWSTUFF_SITE_NAME: Growstuff (dev)
32+
GROWSTUFF_SITE_NAME="Growstuff (dev)"
3333

3434
# Mailchimp is used for subscribing/unsubscribing people from the newsletter
3535
# To fetch list IDs using Gibbon (and thus find the ID of your newsletter):
3636
# $ rails c
3737
# Gibbon::API.api_key = '...'
3838
# gb = Gibbon::API.new
3939
# puts gb.lists.list.to_yaml
40-
GROWSTUFF_MAILCHIMP_APIKEY: ""
41-
GROWSTUFF_MAILCHIMP_NEWSLETTER_ID: ""
40+
GROWSTUFF_MAILCHIMP_APIKEY=""
41+
GROWSTUFF_MAILCHIMP_NEWSLETTER_ID=""
4242

4343
# Used for connecting member accounts to Twitter
4444
# Get Twitter key from https://dev.twitter.com/apps
45-
GROWSTUFF_TWITTER_KEY: ""
46-
GROWSTUFF_TWITTER_SECRET: ""
45+
GROWSTUFF_TWITTER_KEY=""
46+
GROWSTUFF_TWITTER_SECRET=""
4747

4848
# Used for connecting member accounts to Flickr
4949
# Get Flickr key from http://www.flickr.com/services/apps/create/apply/
50-
GROWSTUFF_FLICKR_KEY: ""
51-
GROWSTUFF_FLICKR_SECRET: ""
50+
GROWSTUFF_FLICKR_KEY=""
51+
GROWSTUFF_FLICKR_SECRET=""
5252

5353
# https://developers.facebook.com/
54-
GROWSTUFF_FACEBOOK_KEY: ""
55-
GROWSTUFF_FACEBOOK_SECRET: ""
56-
57-
GROWSTUFF_MAPBOX_MAP_ID: ""
58-
GROWSTUFF_MAPBOX_ACCESS_TOKEN: ""
59-
60-
##############################################################################
61-
# Other environments
62-
# You can override the above for staging, production, etc.
63-
# To push these settings to Heroku, use "rake figaro:heroku --app=whatever".
64-
# To see current settings on Heroku, use "heroku config --app=whatever".
65-
##############################################################################
66-
67-
### EMAil addres for notifier and mailers to use as from
68-
GROWSTUFF_EMAIL: '[email protected]'
69-
70-
test:
71-
GROWSTUFF_SITE_NAME: Growstuff (test)
72-
73-
# Note: there is no good way to deploy settings from Figaro to
74-
# Travis-CI. If you need env vars set there in order for tests to pass,
75-
# set them in .travis.yml
76-
77-
staging:
78-
GROWSTUFF_SITE_NAME: Growstuff (staging)
79-
80-
production:
81-
GROWSTUFF_SITE_NAME: Growstuff
54+
GROWSTUFF_FACEBOOK_KEY=""
55+
GROWSTUFF_FACEBOOK_SECRET=""
56+
57+
# Elasticsearch is used for flexible search and it requires another component
58+
# to be installed. To make it easy for people who don't need to test this feature
59+
# it's been turned off for test and development environment as a default.
60+
# If you want to test this functionality, install elasticsearch and
61+
# set this flag to "true".
62+
GROWSTUFF_ELASTICSEARCH="true"
63+
GROWSTUFF_EMAIL='[email protected]'

0 commit comments

Comments
 (0)