Update README (#25)

* Update info on environment vairables

* Remove spaces from sample keys

* Move selenium-webdriver into test

* Remove webkit related info
This commit is contained in:
Mac Siri 2018-03-02 16:37:25 -05:00 committed by Ben Halpern
parent 5d47766067
commit 25d720f853
5 changed files with 55 additions and 63 deletions

View file

@ -70,7 +70,6 @@ gem "rolify", "~> 5.2"
gem "rouge", "~> 3.1"
gem "sass-rails", "~> 5.0"
gem "sdoc", "~> 0.4", group: :doc
gem "selenium-webdriver", "~> 3.9"
gem "serviceworker-rails", "~> 0.5"
gem "share_meow_client", "~> 0.1"
gem "skylight", "~> 1.5"
@ -127,6 +126,7 @@ group :test do
gem "rack_session_access", "~> 0.1"
gem "rails-controller-testing", "~> 1.0"
gem "ruby-prof", "~> 0.17", require: false
gem "selenium-webdriver", "~> 3.9"
gem "shoulda-matchers", "~> 3.1", require: false
gem "simplecov", "~> 0.15", require: false
gem "sinatra", "~> 2.0"

View file

@ -70,9 +70,8 @@ If a process could be improved, don't hesitate to bring it up, but there are alw
2. `bundle install`
3. `bin/yarn`
4. `bin/setup`
6. Set up your environment variables/secrets with the either of the following two methods:
- A. create a `config/application.yml` file and paste secret keys in it.
- B. Use [Torus](http://torus.sh/) to wrap around the whole app. Refer to the [wiki](https://github.com/thepracticaldev/dev.to_private/wiki/Torus) if you are interested. *Please bear in mind that usage of Torus is experimental*.
6. Set up your environment variables/secrets
- Take a look at `sample_application.yml` to help you create your own `application.yml` in `config/`.
- If you are missing `ENV` variables on bootup, `_env_checker.rb` will let you know. If you add or remove `ENV` vars to the project, you must also modify this file before they can be merged.
#### Starting the application
@ -135,21 +134,14 @@ The following technologies are used for testing:
- **Rspec**
- **Capybara** with **selenium-webdriver**
- **chromedriver-helper** for standard JS testing.
- **Capybara-webkit** for headless JS testing.(not in use)
- **`rack_session_access`**
- **Warden**
- **guard-rspec** for automated testing
#### Installing Capybara-webkit
**This is currently commented out in the Gemfile, but if you want to experiment with it** Follow the instruction of installing Qt [here](https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit) then `bundle install` normally.
#### When should I use `login_via_session_as(:user)` vs `login_as(:user)`?
- `login_as(:user)` uses Warden's stubbing actions to make the application think that a user is signed in but without all of the overhead of actually signing them in. Recommended for view test.
- `login_via_session_as(:user)` uses `rack_session_access` to modify application's session. It is integrated with Devise so current_user won't be nil. Recommended for feature test.
## Environment Variables
You need to keep your personal `config/application.yml` up-to-date in order to properly set up your environment variables. We have some "shared" environment variables, but you may need "personal" environment variables for one reason or another (such as a private Algolia instance, possibly). It is important to keep people up-to-date on changes to this protocol, as it is not checked into git. It is also important to use secure ways of passing these keys around. We currently use LastPass to store this.
## Previewing emails in development
You can modify the test in `/test/mailers/previews`
You can view the previews at (for example) `http://localhost:3000/rails/mailers/notify_mailer/new_reply_email`

View file

@ -41,7 +41,7 @@ Airbrake.configure do |c|
# environments.
# NOTE: This option *does not* work if you don't set the 'environment' option.
# https://github.com/airbrake/airbrake-ruby#ignore_environments
c.ignore_environments = %w(test)
c.ignore_environments = %w(test development)
# A list of parameters that should be filtered out of what is sent to
# Airbrake. By default, all "password" attributes will have their contents

View file

@ -2,4 +2,4 @@
region: ENV["AWS_DEFAULT_REGION"],
access_key_id: ENV["AWS_SDK_KEY"],
secret_access_key: ENV["AWS_SDK_SECRET"]
)
)

View file

@ -28,15 +28,15 @@ DEPLOYMENT_SIGNATURE: "PLACEHOLDER"
# for more development experience
# Github for github related access
GITHUB_KEY: "REPLACE ME"
GITHUB_SECRET: "REPLACE ME"
GITHUB_TOKEN: "REPLACE ME"
GITHUB_KEY: "REPLACEME"
GITHUB_SECRET: "REPLACEME"
GITHUB_TOKEN: "REPLACEME"
# Twitter for normal twitter access
TWITTER_ACCESS_TOKEN: "REPLACE ME"
TWITTER_ACCESS_TOKEN_SECRET: "REPLACE ME"
TWITTER_KEY: "REPLACE ME"
TWITTER_SECRET: "REPLACE ME"
TWITTER_ACCESS_TOKEN: "REPLACEME"
TWITTER_ACCESS_TOKEN_SECRET: "REPLACEME"
TWITTER_KEY: "REPLACEME"
TWITTER_SECRET: "REPLACEME"
################################################
######### Optional 3rd Party Services ##########
@ -45,78 +45,78 @@ TWITTER_SECRET: "REPLACE ME"
# They are very optional
# Airbrake for error tracking
AIRBRAKE_API_KEY: "REPLACE ME"
AIRBRAKE_PROJECT_ID: "REPLACE ME"
AIRBRAKE_API_KEY: "REPLACEME"
AIRBRAKE_PROJECT_ID: "REPLACEME"
# Algolish for search
ALGOLIASEARCH_API_KEY: "REPLACE ME"
ALGOLIASEARCH_APPLICATION_ID: "REPLACE ME"
ALGOLIASEARCH_SEARCH_ONLY_KEY: "REPLACE ME"
ALGOLIASEARCH_API_KEY: "REPLACEME"
ALGOLIASEARCH_APPLICATION_ID: "REPLACEME"
ALGOLIASEARCH_SEARCH_ONLY_KEY: "REPLACEME"
# AWS for images storages
AWS_DEFAULT_REGION: "REPLACE ME"
AWS_SDK_KEY: "REPLACE ME"
AWS_SDK_SECRET: "REPLACE ME"
AWS_DEFAULT_REGION: "REPLACEME"
AWS_SDK_KEY: "REPLACEME"
AWS_SDK_SECRET: "REPLACEME"
# Buffer for ????
BUFFER_ACCESS_TOKEN: "REPLACE ME"
BUFFER_FACEBOOK_ID: "REPLACE ME"
BUFFER_LINKEDIN_ID: "REPLACE ME"
BUFFER_PROFILE_ID: "REPLACE ME"
BUFFER_TWITTER_ID: "REPLACE ME"
BUFFER_ACCESS_TOKEN: "REPLACEME"
BUFFER_FACEBOOK_ID: "REPLACEME"
BUFFER_LINKEDIN_ID: "REPLACEME"
BUFFER_PROFILE_ID: "REPLACEME"
BUFFER_TWITTER_ID: "REPLACEME"
# Cloudinary for image resizing and cache??
CLOUDINARY_API_KEY: "REPLACE ME"
CLOUDINARY_API_SECRET: "REPLACE ME"
CLOUDINARY_CLOUD_NAME: "REPLACE ME"
CLOUDINARY_SECURE: "REPLACE ME"
CLOUDINARY_API_KEY: "REPLACEME"
CLOUDINARY_API_SECRET: "REPLACEME"
CLOUDINARY_CLOUD_NAME: "REPLACEME"
CLOUDINARY_SECURE: "REPLACEME"
# Dacast for streaming
DACAST_STREAM_CODE: "REPLACE ME"
DACAST_STREAM_CODE: "REPLACEME"
# Google analytic
GA_SERVICE_ACCOUNT_JSON: "REPLACE ME"
GA_TRACKING_ID: "REPLACE ME"
GA_VIEW_ID: "REPLACE ME"
GA_SERVICE_ACCOUNT_JSON: "REPLACEME"
GA_TRACKING_ID: "REPLACEME"
GA_VIEW_ID: "REPLACEME"
# JW player for videos on the site
JWPLAYER_API_KEY: "REPLACE ME"
JWPLAYER_API_SECRET: "REPLACE ME"
JWPLAYER_API_KEY: "REPLACEME"
JWPLAYER_API_SECRET: "REPLACEME"
# Keen for ????
KEEN_API_URL: "REPLACE ME"
KEEN_PROJECT_ID: "REPLACE ME"
KEEN_READ_KEY: "REPLACE ME"
KEEN_WRITE_KEY: "REPLACE ME"
KEEN_API_URL: "REPLACEME"
KEEN_PROJECT_ID: "REPLACEME"
KEEN_READ_KEY: "REPLACEME"
KEEN_WRITE_KEY: "REPLACEME"
# Mailchimp for mails duh
MAILCHIMP_API_KEY: "REPLACE ME"
MAILCHIMP_NEWSLETTER_ID: "REPLACE ME"
MAILCHIMP_SUSTAINING_MEMBERS_ID: "REPLACE ME"
MAILCHIMP_API_KEY: "REPLACEME"
MAILCHIMP_NEWSLETTER_ID: "REPLACEME"
MAILCHIMP_SUSTAINING_MEMBERS_ID: "REPLACEME"
# Google recaptcha?
RECAPTCHA_SECRET: "REPLACE ME"
RECAPTCHA_SITE: "REPLACE ME"
RECAPTCHA_SECRET: "REPLACEME"
RECAPTCHA_SITE: "REPLACEME"
# Sendbird For live stream chat
SENDBIRD_APP_ID: "REPLACE ME"
SENDBIRD_LIVECHAT_URL: "REPLACE ME"
SENDBIRD_APP_ID: "REPLACEME"
SENDBIRD_LIVECHAT_URL: "REPLACEME"
# Sharemeow is a text-shot service
# more information here https://github.com/producthunt/ShareMeow
SHARE_MEOW_BASE_URL: "REPLACE ME"
SHARE_MEOW_SECRET_KEY: "REPLACE ME"
SHARE_MEOW_BASE_URL: "REPLACEME"
SHARE_MEOW_SECRET_KEY: "REPLACEME"
# Slack for customer alerts
SLACK_CHANNEL: "REPLACE ME"
SLACK_WEBHOOK_URL: "REPLACE ME"
SLACK_CHANNEL: "REPLACEME"
SLACK_WEBHOOK_URL: "REPLACEME"
# Stream for notifications
STREAM_RAILS_KEY: "REPLACE ME"
STREAM_RAILS_SECRET: "REPLACE ME"
STREAM_URL: "REPLACE ME"
STREAM_RAILS_KEY: "REPLACEME"
STREAM_RAILS_SECRET: "REPLACEME"
STREAM_URL: "REPLACEME"
# Stripe for payment system
STRIPE_PUBLISHABLE_KEY: "REPLACE ME"
STRIPE_SECRET_KEY: "REPLACE ME"
STRIPE_PUBLISHABLE_KEY: "REPLACEME"
STRIPE_SECRET_KEY: "REPLACEME"