Addons Gem
TODO: Write a gem description
Installation
Add the addons gem and bundle install
gem 'addons'
bundle install
Or install it yourself as:
$ gem install addons
Run the Rails generator with your AddonList credentials
$ rails g addons:install --apiid=<addonsio_api_id> --authtoken=<addonsio_auth_token>
Recipe Runner
To run all recipes related to your app, run this in your Terminal:
rake addons:recipe:run[all]
Recipes
Mailgun SMTP
Run the recipe
rake addons:recipe:run[mailgun_smtp]
Copy and paste this to the rails console to test your email settings
class TestMailer < ActionMailer::Base
default :from => "[email protected]"
def welcome_email
mail(:to => "[email protected]", :subject => "Test Mailgun SMTP mail", :body => "Test Mailgun SMTP mail body")
end
end
TestMailer.welcome_email.deliver
Mailgun HTTP
Run the recipe
rake addons:recipe:run[mailgun_http]
Copy and paste this to the rails console to test your email settings
email = {
to: "[email protected]",
from: "[email protected]",
subject: "Test Mailgun HTTP mail",
body: "Test Mailgun HTTP mail body"
}
Addons::Mailgun.(email)
Rollbar
Run the recipe
rake addons:recipe:run[rollbar]
Test Rollbar by causing an exception, and Rollbar should report it. In a browser visit:
http://localhost:3000/this/route/definitely/wont/exist/and/will/cause/a/RoutingError
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request