Commit d4b4ca9166ead39999711cb47a60298b472bedff

Authored by Bryce McDonnell
1 parent b8c11203
Exists in master and in 1 other branch production

changes default heroku config to use MongoLab instead of MongoHQ

README.md
... ... @@ -144,8 +144,8 @@ git clone http://github.com/errbit/errbit.git
144 144 ```bash
145 145 gem install heroku
146 146 heroku create example-errbit --stack cedar
147   -heroku addons:add mongohq:free
148   -cp -f config/mongoid.mongohq.yml config/mongoid.yml
  147 +heroku addons:add mongolab:starter
  148 +cp -f config/mongoid.mongolab.yml config/mongoid.yml
149 149 git add -f config/mongoid.yml
150 150 git commit -m "Added mongoid config for MongoHQ"
151 151 heroku addons:add sendgrid:starter
... ...
config/initializers/_load_config.rb
... ... @@ -9,7 +9,7 @@ unless defined?(Errbit::Config)
9 9 if ENV['HEROKU']
10 10 Errbit::Config.host = ENV['ERRBIT_HOST']
11 11 Errbit::Config.email_from = ENV['ERRBIT_EMAIL_FROM']
12   - Errbit::Config.email_at_notices = [1,3,10] #ENV['ERRBIT_EMAIL_AT_NOTICES']
  12 + Errbit::Config.email_at_notices = ENV['ERRBIT_EMAIL_AT_NOTICES']
13 13 Errbit::Config.confirm_resolve_err = ENV['ERRBIT_CONFIRM_RESOLVE_ERR']
14 14 Errbit::Config.user_has_username = ENV['ERRBIT_USER_HAS_USERNAME']
15 15 Errbit::Config.allow_comments_with_issue_tracker = ENV['ERRBIT_ALLOW_COMMENTS_WITH_ISSUE_TRACKER']
... ...
config/initializers/mongo.rb
1   -if mongo = ENV['MONGOHQ_URL'] || ENV['MONGOLAB_URI']
  1 +if mongo = ENV['MONGOLAB_URI'] || ENV['MONGOHQ_URL']
2 2 settings = URI.parse(mongo)
3 3 database_name = settings.path.gsub(/^\//, '')
4 4  
... ...
config/mongoid.mongolab.yml 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +# Mongoid Configuration for MongoLab on Heroku
  2 +# ===========================================
  3 +#
  4 +# Copy this file to config/mongoid.yml,
  5 +# commit it to your repo, then push to heroku.
  6 +
  7 +production:
  8 + uri: <%= ENV['MONGOLAB_URI'] %>
... ...