Skip to content

Commit

Permalink
removed discuss from readme
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinMulhern committed Jun 3, 2016
1 parent f0442c6 commit d87bfca
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,8 @@ This site runs on **Ruby 2.3** and **Rails 4.2** (upgraded from Ruby 1.9.3 and R

3. The `db/seeds.rb` file is used to populate all the course and lesson meta-data. Use the command `$ rake db:seed` to populate all the meta-data for courses and lessons so you can run the rake task in the next step. `db/seeds.rb` is identical to the data you'll see presented on the production site (this is used to populate it). You can run it as many times as you'd like... it basically deletes all metadata and repopulates it with each run. The seeds file only creates curriculum data, it doesn't create any users.
3. One thing the seeds file will not populate is the actual content for each lesson. This needs to be retrieved from the curriculum repository on github (which is at [http://www.github.com/theodinproject/curriculum](http://www.github.com/theodinproject/curriculum)) by running the rake task (`$ rake curriculum:update_content`). But there's a catch... Github only allows you something like 50 API calls per hour if you haven't registered for an API key with them and used it to authenticate your requests. As of this writing, there are over 170 lessons so you would be rate limited before even finishing populating them with the rake task if you don't get an API key yourself. So go get an API key from github (at [https://github.com/settings/tokens](https://github.com/settings/tokens)) and use Figaro (as described below) to pass that key to the application so you can happily download all the curriculum files into your build.
3. The DISQUS forums and Github API calls rely on private environment variables (to store their API secret keys) that you won't find in the repo. I upload them directly to the server myself using the `figaro` gem and a corresponding file called `application.yml` that's located in my `config/` directory but not checked into git (no, you can't have my passwords). Check out the [Figaro Documentation](https://github.com/laserlemon/figaro) for a very easy-to-understand explanation of how the gem works. You basically just need to run `$ rails generate figaro:install` and populate the missing variables to `application.yml`. An example, as of this writing:

# config/application.yml --these are two steps. first two steps are created on initial registration at [http://disqus.com/admin/create/]. Second two are given when you request access to SSO for your application via a form at [http://help.disqus.com/customer/portal/articles/236206-integrating-single-sign-on]
DISQUS_ACCOUNT_NAME: generated_on_intial_signup
DISQUS_WEBSITE_NAME: generated_on_initial_application_registration
DISQUS_API_SECRET_KEY: generated_after_SSO_permission_granted
DISQUS_API_PUBLIC_KEY: generated_after_SSO_permission_granted

3. The Github API call relies on private environment variables (to store their API secret keys) that you won't find in the repo. I upload them directly to the server myself using the `figaro` gem and a corresponding file called `application.yml` that's located in my `config/` directory but not checked into git (no, you can't have my passwords). Check out the [Figaro Documentation](https://github.com/laserlemon/figaro) for a very easy-to-understand explanation of how the gem works. You basically just need to run `$ rails generate figaro:install` and populate the missing variables to `application.yml`. An example, as of this writing:
4.
# config/application.yml --set up this token to make API calls to get all the lessons.
GITHUB_API_TOKEN: your_token_would_go_here

Expand Down

0 comments on commit d87bfca

Please sign in to comment.