Skip to content
This repository has been archived by the owner on Jul 15, 2021. It is now read-only.

Commit

Permalink
Updating the app to make it easier to setup and run
Browse files Browse the repository at this point in the history
  • Loading branch information
CaseyFaist committed Aug 10, 2017
1 parent 9af0e34 commit 8e53489
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 7 deletions.
22 changes: 20 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
#
# set this to 'codeschool.com:pluralsight.com' to only authorize
# emails from these two domains to sign in to Orientation
APP_DOMAIN=compliments.dev
# APP_DOMAIN should be something like compliments.dev
# EMAIL_WHITELIST should be the email domain name
#
APP_DOMAIN=
EMAIL_WHITELIST=

# Google OAuth 2
Expand All @@ -16,6 +19,21 @@ GOOGLE_KEY=
GOOGLE_SECRET=


# Sendgrid
# Sendgrid
# Get this from heroku - you'll need access to the app there
#
SENDGRID_USERNAME=
SENDGRID_PASSWORD=

# Slack
# Check the production variables for these
SLACK_INCOMING_WEBHOOK=
SLACK_TOKEN=

# For local environment, use #testchannel + grab the ID by copying the "add app"
# link - it's the key at the end of the url
SLACK_COMPLIMENTS_CHANNEL_ID=
SLACK_COMPLIMENTS_CHANNEL_NAME=

SLACK_QUOTES_CHANNEL_ID=
SLACK_QUOTES_CHANNEL_NAME=
6 changes: 6 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,9 @@ DEPENDENCIES
turbolinks
uglifier (>= 1.3.0)
web-console (~> 2.0)

RUBY VERSION
ruby 2.0.0p598

BUNDLED WITH
1.15.3
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,12 @@ you have a Gmail or Google Apps account, not so much if you don't.

You'll need to create a Google API console project for your own hosted version of
Compliments in order to sign in. You can find [a step-by-step guide here](https://github.com/zquestz/omniauth-google-oauth2#google-api-setup).

## How to get set up

After you clone the repository locally, there are a few steps to get a local
version running.

- Run ./bin/setup
- Update the .env file with the correct environment variables (see the file)
- Das it!
7 changes: 3 additions & 4 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ Dir.chdir APP_ROOT do
system "gem install bundler --conservative"
system "bundle check || bundle install"

# puts "\n== Copying sample files =="
# unless File.exist?("config/database.yml")
# system "cp config/database.yml.sample config/database.yml"
# end
puts "== Initializing ENV variables =="
system "cp .env.example .env"
puts "Update the .env file with correct development environment variables"

puts "\n== Preparing database =="
system "bin/rake db:setup"
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/session_store.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Be sure to restart your server when you modify this file.

Rails.application.config.session_store :cookie_store, key: '_compliments_session'
Rails.application.config.session_store :cookie_store, key: '_compliments_session', domain: 'localhost'

0 comments on commit 8e53489

Please sign in to comment.