rails_email_preview 1.0.3 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/app/assets/stylesheets/rails_email_preview/{application.css.sass → application.sass} +0 -0
- data/app/assets/stylesheets/rails_email_preview/{bootstrap3.css.sass → bootstrap3.sass} +0 -0
- data/app/controllers/rails_email_preview/emails_controller.rb +4 -4
- data/lib/rails_email_preview/engine.rb +5 -6
- data/lib/rails_email_preview/version.rb +1 -1
- metadata +6 -6
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: a586d7cf77f0bdcdeebffa23d9b0346196ae0277
         | 
| 4 | 
            +
              data.tar.gz: 6725bf049c7b76b8cebe6e0a57385d67101ce83e
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: e75aa9aea3ecd4c3782ecf8608afebe6f5073570e5161ee6ffd3cb28d8a38d8835e7c895d7645cb7a3d7414886c616f7a8c7d5f640d140d87727c42f7dde93a3
         | 
| 7 | 
            +
              data.tar.gz: 31c10088387e24bf73252d76a3ec9407cee17913df1507e17fd47a09cc5a94ec48cc1f7ac9e997d0bc9363a77c086d83d9e6049b63d65d33ce01fd02f1b6170e
         | 
    
        data/README.md
    CHANGED
    
    | @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            # Rails Email Preview [![Build Status][travis-badge]][travis] [![Test Coverage][coverage-badge]][coverage] [![Code Climate][codeclimate-badge]][codeclimate] [](https://gitter.im/glebm/rails_email_preview?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
         | 
| 2 2 |  | 
| 3 | 
            -
            Preview email in the browser with this Rails engine. Compatible with Rails  | 
| 3 | 
            +
            Preview email in the browser with this Rails engine. Compatible with Rails 4.2+.
         | 
| 4 4 |  | 
| 5 5 | 
             
            An email review:
         | 
| 6 6 |  | 
| @@ -17,7 +17,7 @@ REP comes with two themes: a simple standalone theme, and a theme that uses [Boo | |
| 17 17 | 
             
            Add [![Gem Version][gem-badge]][gem] to Gemfile:
         | 
| 18 18 |  | 
| 19 19 | 
             
            ```ruby
         | 
| 20 | 
            -
            gem 'rails_email_preview', '~>  | 
| 20 | 
            +
            gem 'rails_email_preview', '~> 2.0.1'
         | 
| 21 21 | 
             
            ```
         | 
| 22 22 |  | 
| 23 23 | 
             
            Add an initializer and the routes:
         | 
| @@ -222,7 +222,7 @@ Alternatively, to have custom rules just for REP you can: | |
| 222 222 | 
             
            ```ruby
         | 
| 223 223 | 
             
            Rails.application.config.to_prepare do
         | 
| 224 224 | 
             
              RailsEmailPreview::ApplicationController.module_eval do
         | 
| 225 | 
            -
                 | 
| 225 | 
            +
                before_action :check_rep_permissions
         | 
| 226 226 |  | 
| 227 227 | 
             
                private
         | 
| 228 228 | 
             
                def check_rep_permissions
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| @@ -1,9 +1,9 @@ | |
| 1 1 | 
             
            module RailsEmailPreview
         | 
| 2 2 | 
             
              class EmailsController < ::RailsEmailPreview::ApplicationController
         | 
| 3 3 | 
             
                include ERB::Util
         | 
| 4 | 
            -
                 | 
| 5 | 
            -
                 | 
| 6 | 
            -
                 | 
| 4 | 
            +
                before_action :load_preview, except: :index
         | 
| 5 | 
            +
                around_action :set_locale
         | 
| 6 | 
            +
                before_action :set_email_preview_locale
         | 
| 7 7 | 
             
                helper_method :with_email_locale
         | 
| 8 8 | 
             
                helper_method :preview_params
         | 
| 9 9 |  | 
| @@ -83,7 +83,7 @@ module RailsEmailPreview | |
| 83 83 |  | 
| 84 84 | 
             
                def deliver_email!(mail)
         | 
| 85 85 | 
             
                  if mail.respond_to?(:deliver_now!)
         | 
| 86 | 
            -
                    #  | 
| 86 | 
            +
                    # ActiveJob
         | 
| 87 87 | 
             
                    mail.deliver_now!
         | 
| 88 88 | 
             
                  elsif mail.respond_to?(:deliver!)
         | 
| 89 89 | 
             
                    # support deliver! if present (resque-mailer etc)
         | 
| @@ -3,12 +3,11 @@ module ::RailsEmailPreview | |
| 3 3 | 
             
                isolate_namespace RailsEmailPreview
         | 
| 4 4 | 
             
                load_generators
         | 
| 5 5 |  | 
| 6 | 
            -
                 | 
| 7 | 
            -
                   | 
| 8 | 
            -
             | 
| 9 | 
            -
                     | 
| 10 | 
            -
                   | 
| 6 | 
            +
                initializer 'rails_email_preview.setup_assets' do
         | 
| 7 | 
            +
                  RailsEmailPreview::Engine.config.assets.precompile += %w(
         | 
| 8 | 
            +
                    rails_email_preview/application.js
         | 
| 9 | 
            +
                    rails_email_preview/application.css
         | 
| 10 | 
            +
                  )
         | 
| 11 11 | 
             
                end
         | 
| 12 | 
            -
             | 
| 13 12 | 
             
              end
         | 
| 14 13 | 
             
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: rails_email_preview
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version:  | 
| 4 | 
            +
              version: 2.0.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Gleb Mazovetskiy
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2016- | 
| 11 | 
            +
            date: 2016-05-12 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rails
         | 
| @@ -16,14 +16,14 @@ dependencies: | |
| 16 16 | 
             
                requirements:
         | 
| 17 17 | 
             
                - - ">="
         | 
| 18 18 | 
             
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version: ' | 
| 19 | 
            +
                    version: '4.2'
         | 
| 20 20 | 
             
              type: :runtime
         | 
| 21 21 | 
             
              prerelease: false
         | 
| 22 22 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 23 | 
             
                requirements:
         | 
| 24 24 | 
             
                - - ">="
         | 
| 25 25 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            -
                    version: ' | 
| 26 | 
            +
                    version: '4.2'
         | 
| 27 27 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 28 28 | 
             
              name: sass-rails
         | 
| 29 29 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -133,8 +133,8 @@ files: | |
| 133 133 | 
             
            - README.md
         | 
| 134 134 | 
             
            - Rakefile
         | 
| 135 135 | 
             
            - app/assets/javascripts/rails_email_preview/application.js.coffee
         | 
| 136 | 
            -
            - app/assets/stylesheets/rails_email_preview/application. | 
| 137 | 
            -
            - app/assets/stylesheets/rails_email_preview/bootstrap3. | 
| 136 | 
            +
            - app/assets/stylesheets/rails_email_preview/application.sass
         | 
| 137 | 
            +
            - app/assets/stylesheets/rails_email_preview/bootstrap3.sass
         | 
| 138 138 | 
             
            - app/controllers/rails_email_preview/application_controller.rb
         | 
| 139 139 | 
             
            - app/controllers/rails_email_preview/emails_controller.rb
         | 
| 140 140 | 
             
            - app/helpers/rails_email_preview/emails_helper.rb
         |