README.md in turf-1.1.0 vs README.md in turf-1.2.0

- old
+ new

@@ -91,10 +91,12 @@ ``` bundle exec rake turf:setup ``` +### Ruby Projects (see below for Rails Projects) + Require all the files in the `/lib/#{project_name}.rb` file: ```ruby require_relative "../config/turf/default.rb" @@ -103,10 +105,12 @@ end require_all("config/turf") ``` +***RAILS_ENV is used to manage the environment for compatibility with other gems*** + Set the `RAILS_ENV` to "develoment" at the top of the `/lib/#{project_name}.rb` file: ```ruby ENV['RAILS_ENV'] ||= "development" ``` @@ -116,9 +120,23 @@ ```ruby ENV['RAILS_ENV'] = 'test' ``` Set the `RAILS_ENV` to production on the remote host. + +### Rails Projects + +Require all the `Turf` files in the `config/application.rb` file: + +```ruby +Dir.glob("#{Rails.root}/config/turf/**/*.rb").each { |path| require path } +``` + +That's it! + +## .gitignore Turf::Local + +Application secrets can be stored in `Turf::Local` and the file can be gitignored so these secrets are not exposed in source control. Add this line (`/config/turf/local.rb`) to your `.gitignore` file and `scp` the local.rb file to the remote host when changes are made. ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/MrPowers/turf.