Skip to content
This repository was archived by the owner on Dec 3, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ COMPOSE_PROJECT_NAME=operationcodebackend
REDIS_URL=redis://redis:6379/0
RAILS_ENV=development
POSTGRES_HOST=operationcode-psql
DEV_FOREST_ENV_SECRET=
DEV_FOREST_AUTH_SECRET=
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -285,3 +285,6 @@ $RECYCLE.BIN/
*.lnk

# End of https://www.gitignore.io/api/ruby,macos,linux,rails,windows,rubymine,jetbrains,sublimetext,visualstudiocode

# redis local dump file
dump.rdb
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ end
gem 'active_model_serializers'
gem 'acts-as-taggable-on', '~> 5.0'
gem 'devise'
gem 'forest_liana'
gem 'geocoder'
gem 'gibbon'
gem 'httparty'
Expand Down Expand Up @@ -53,5 +54,3 @@ end

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'


17 changes: 17 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ GEM
airtable (0.0.9)
httparty
arel (7.1.4)
arel-helpers (2.6.1)
activerecord (>= 3.1.0, < 6)
awesome_print (1.8.0)
bcrypt (3.1.11)
builder (3.2.3)
Expand Down Expand Up @@ -78,17 +80,30 @@ GEM
faraday (0.12.0.1)
multipart-post (>= 1.2, < 3)
ffi (1.9.18)
forest_liana (2.4.3)
arel-helpers
bcrypt
groupdate
jsonapi-serializers (>= 0.14.0)
jwt
rack-cors
rails (>= 4.0)
useragent
geocoder (1.4.3)
gibbon (3.0.1)
faraday (>= 0.9.1)
multi_json (>= 1.11.0)
globalid (0.3.7)
activesupport (>= 4.1.0)
groupdate (4.0.0)
activesupport (>= 4.2)
hashdiff (0.3.7)
httparty (0.14.0)
multi_xml (>= 0.5.2)
i18n (0.8.1)
jsonapi-renderer (0.1.2)
jsonapi-serializers (1.0.0)
activesupport
jwt (1.5.6)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
Expand Down Expand Up @@ -199,6 +214,7 @@ GEM
thread_safe (0.3.6)
tzinfo (1.2.3)
thread_safe (~> 0.1)
useragent (0.16.10)
vcr (3.0.3)
warden (1.2.7)
rack (>= 1.0)
Expand All @@ -221,6 +237,7 @@ DEPENDENCIES
devise
factory_girl_rails
faker
forest_liana
geocoder
gibbon
httparty
Expand Down
2 changes: 2 additions & 0 deletions config/initializers/forest_liana.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ForestLiana.env_secret = Rails.application.secrets.forest_env_secret
ForestLiana.auth_secret = Rails.application.secrets.forest_auth_secret
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Rails.application.routes.draw do

mount ForestLiana::Engine => '/forest'
devise_for :users

# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
Expand Down
4 changes: 4 additions & 0 deletions config/secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# if you're sharing your code publicly.

development:
forest_env_secret: <%= ENV["DEV_FOREST_ENV_SECRET"] %>
forest_auth_secret: <%= ENV["DEV_FOREST_AUTH_SECRET"] %>
secret_key_base: 5d44826022fd9ef943fa7d5dcaf76722893b63e264fd8b3d22174992a001ed0bd8bb91131928d9ab2d25b6eccce54ebca320a7676942d05ae3defe96e2f04346
jwt_secret: 'super random key'
jwt_expiration_hours: 24
Expand All @@ -23,6 +25,8 @@ test:
# Do not keep production secrets in the repository,
# instead read values from the environment.
production:
forest_env_secret: <%= ENV["FOREST_ENV_SECRET"] %>
forest_auth_secret: <%= ENV["FOREST_AUTH_SECRET"] %>
secret_key_base: <%= ENV['SECRET_KEY_BASE'] %>
jwt_secret: <%= ENV['JWT_SECRET_KEY'] %>
jwt_expiration_hours: 6
Binary file removed dump.rdb
Binary file not shown.