rails_email_preview 1.0.3 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 506d608b1ee447ce0e09e421c24c3bcbe15fbed8
4
- data.tar.gz: aba0f6d204539b565542510f4514a9fe93e7d5b4
3
+ metadata.gz: a586d7cf77f0bdcdeebffa23d9b0346196ae0277
4
+ data.tar.gz: 6725bf049c7b76b8cebe6e0a57385d67101ce83e
5
5
  SHA512:
6
- metadata.gz: 5eccad495eded901b7a85c23b10f21e4d27d31be9e0d5be40b1f950f6d1df4afcc4ac1101b29e9d212f50a59c14f85ed114bd56c6566f434311a8161f165dc4d
7
- data.tar.gz: ac8e6ac1b99baf80ef6a8d80739d00a14c0526844745839375fbb2651a1b1f9f1d1b866b53cd5b73717a5a990d8f8e53a28e47c51c5043f1e327a0db11bb04f6
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] [![Gitter](https://badges.gitter.im/Join Chat.svg)](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 and 4.
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', '~> 1.0.3'
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
- before_filter :check_rep_permissions
225
+ before_action :check_rep_permissions
226
226
 
227
227
  private
228
228
  def check_rep_permissions
@@ -1,9 +1,9 @@
1
1
  module RailsEmailPreview
2
2
  class EmailsController < ::RailsEmailPreview::ApplicationController
3
3
  include ERB::Util
4
- before_filter :load_preview, except: :index
5
- around_filter :set_locale
6
- before_filter :set_email_preview_locale
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
- # Rails 4.2+
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
- class << self
7
- attr_accessor :root
8
- def root
9
- @root ||= Pathname.new(File.expand_path('../../', __FILE__))
10
- end
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
@@ -1,3 +1,3 @@
1
1
  module RailsEmailPreview
2
- VERSION = '1.0.3'
2
+ VERSION = '2.0.1'
3
3
  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: 1.0.3
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-04-16 00:00:00.000000000 Z
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: '3.2'
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: '3.2'
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.css.sass
137
- - app/assets/stylesheets/rails_email_preview/bootstrap3.css.sass
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