README.md in jt-rails-toolbox-1.3.1 vs README.md in jt-rails-toolbox-2.0.0

- old
+ new

@@ -8,27 +8,21 @@ JTRailsToolbox is distributed as a gem, which is how it should be used in your app. Include the gem in your Gemfile: - gem 'jt-rails-toolbox', '~> 1.0' + gem 'jt-rails-toolbox', '~> 2.0' Create a `jt-toolbox.yml` file: rails g jt:toolbox A simple configuration of `jt-toolbox.yml` file: ```yml production: exception: - airbrake: - project_host: "https://errbit.example.com" - project_id: 1 - project_key: 12345678901234567890 - slack: - webhook_url: https://hooks.slack.com/services/XXXXXXXX email_prefix: '[ERROR]' sender_address: "Your website <error@example.com>" exception_recipients: - my_email_for_errors@example.com files: @@ -52,50 +46,26 @@ redis_url: redis://localhost:6379/my_app ``` ## What's in it? -- [http_accept_language](https://github.com/iain/http_accept_language), helps you detect the users preferred language, as sent by the "Accept-Language" HTTP header -- [dotenv](https://github.com/bkeepers/dotenv), load environment variables from .env file -- [Exception Notification](https://github.com/smartinez87/exception_notification), -send notifications when errors occur (email, slack) -- [Airbrake](https://github.com/airbrake/airbrake), send notifications when errors occur to [Airbrake](https://airbrake.io/) or [Errbit](http://errbit.com/) +- [Exception Notification](https://github.com/smartinez87/exception_notification), send email notifications when errors occur - [paperclip](https://github.com/thoughtbot/paperclip), manage file upload -- [quiet_assets](https://github.com/evrone/quiet_assets), silence assets in log - [sidekiq](https://github.com/mperham/sidekiq), manage background jobs - [validates_email_format_of](https://github.com/validates-email-format-of/validates_email_format_of), who doesn't need to validate email format? - [rails-i18n](https://github.com/svenfuchs/rails-i18n) Default locale data - [jt-rails-meta](https://github.com/jonathantribouharet/jt-rails-meta) Manage HTML meta tags - [jt-rails-generator-user](https://github.com/jonathantribouharet/jt-rails-generator-user) Generate a scaffold for user authentication - [jt-rails-tokenizable](https://github.com/jonathantribouharet/jt-rails-tokenizable) Generate tokens for ActiveRecord models - simplified configuration of hostnames and `ActionMailer` with a YAML file -### http_accept_language - -To install `http_accept_language` you just have to add a line in your `ApplicationController` - -```ruby -class ApplicationController < ActionController::Base - include HttpAcceptLanguage::AutoLocale - -end -``` - -### Dotenv - -It's a good practice to not include credentials for third party services in your code. You can defined it in a `.env` file which I recommend to not include in your git repository. - ### Exception Notification If `exception` is not set in `jt-toolbox.yml` file, Exception Notification is disabled. In addition to the default ignored exceptions, the following exceptions are also muted: - `ActionController::InvalidCrossOriginRequest` - `ActionController::InvalidAuthenticityToken` - -### Airbrake - -If `airbrake` is not set in `jt-toolbox.yml` file, Airbrake is disabled. ### Paperclip - `convert_options` is set to `-strip`, which means all metadata of images are removed, this is used for reduced the weight of images. - `use_timestamp` is et to `false`, it's a good practice to have unique url for image and url without parameters, instead of using the timestamp we use the fingerprint of the image. [More informations here.](https://github.com/thoughtbot/paperclip#md5-checksum--fingerprint)