rails_email_preview 0.2.16 → 0.2.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +1 -1
- data/Rakefile +0 -2
- data/app/controllers/rails_email_preview/emails_controller.rb +1 -1
- data/app/views/rails_email_preview/emails/_email_iframe.html.slim +4 -3
- data/lib/generators/rails_email_preview/update_previews_generator.rb +4 -2
- data/lib/rails_email_preview/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c8913f959f468e0419fc73fe498f3b627435911
|
4
|
+
data.tar.gz: 7312f5fc2cdeb1ed911ba7b363391464d2982adc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fd1760ef205d77998d7f97b5556a99ab038fb87d77d7b72aef4ef5e3bc065cbb19251ff7b68db65690ac586f03e7bd334c4f82f40116c4e092b788afd2e6b0c
|
7
|
+
data.tar.gz: ac603d9e154558b28c731b9dfe31b245babe83d6cd4b0c18cebf869ca7d910f78a5d479a4fb7850daa65de2c8418e7392185786ca8b43c8be8f11de4d1950912
|
data/Gemfile
CHANGED
@@ -9,7 +9,7 @@ platform :rbx do
|
|
9
9
|
end
|
10
10
|
|
11
11
|
group :development, :test do
|
12
|
-
gem 'i18n-tasks'
|
12
|
+
gem 'i18n-tasks', '>= 0.3.3'
|
13
13
|
gem 'capybara', '>= 0.4.0'
|
14
14
|
gem 'rspec', '2.12.0' #, git: 'https://github.com/rspec/rspec'
|
15
15
|
gem 'rspec-rails' #, git: 'https://github.com/rspec/rspec-rails'
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -30,7 +30,7 @@ class RailsEmailPreview::EmailsController < ::RailsEmailPreview::ApplicationCont
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def test_deliver
|
33
|
-
redirect_url = rails_email_preview.rep_email_url(params.slice(:
|
33
|
+
redirect_url = rails_email_preview.rep_email_url(params.slice(:preview_id, :email_locale))
|
34
34
|
if (address = params[:recipient_email]).blank? || address !~ /@/
|
35
35
|
redirect_to redirect_url, alert: t('rep.test_deliver.provide_email')
|
36
36
|
return
|
@@ -2,8 +2,9 @@ javascript:
|
|
2
2
|
(function(doc){
|
3
3
|
var rep = window.rep = window['rep'] || {
|
4
4
|
resizeIframe: function(id) {
|
5
|
-
var el = doc.getElementById(id)
|
6
|
-
|
5
|
+
var el = doc.getElementById(id);
|
6
|
+
if (!el) return;
|
7
|
+
var w = el.parentNode.clientWidth,
|
7
8
|
h = el.contentWindow.document.body.scrollHeight;
|
8
9
|
el.height = (h) + "px";
|
9
10
|
el.width = (w) + "px";
|
@@ -26,5 +27,5 @@ javascript:
|
|
26
27
|
pre#loading-el.lead
|
27
28
|
i.icon-spinner.icon-spin
|
28
29
|
| #{t 'rep.base.loading'}
|
29
|
-
iframe#src-iframe[src=rails_email_preview.rep_raw_email_url(params.slice(:
|
30
|
+
iframe#src-iframe[src=rails_email_preview.rep_raw_email_url(params.slice(:preview_id, :part_type).merge(email_locale: @email_locale))
|
30
31
|
width="100%" height=1 onLoad="rep.iframeLoad('src-iframe')" style="border:none;padding:0;margin:0"]
|
@@ -25,13 +25,14 @@ module RailsEmailPreview
|
|
25
25
|
def mailer_class_body(mailer_class_name)
|
26
26
|
<<-RUBY
|
27
27
|
class #{mailer_class_name}Preview
|
28
|
-
#{mailer_methods(mailer_class_name) * "\n\n"}
|
28
|
+
#{(mailer_methods(mailer_class_name) * "\n\n").chomp}
|
29
29
|
end
|
30
30
|
RUBY
|
31
31
|
end
|
32
32
|
|
33
33
|
def mailer_methods(mailer_class_name)
|
34
|
-
|
34
|
+
mailer_class = mailer_class_name.constantize
|
35
|
+
::RailsEmailPreview::Preview.mail_methods(mailer_class).map do |m|
|
35
36
|
<<-RUBY
|
36
37
|
def #{m}
|
37
38
|
#{mailer_class_name}.#{m.to_s} #{mailer_class.instance_method(m).parameters.map(&:second) * ', '}
|
@@ -39,6 +40,7 @@ RUBY
|
|
39
40
|
RUBY
|
40
41
|
end
|
41
42
|
end
|
43
|
+
|
42
44
|
end
|
43
45
|
end
|
44
46
|
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: 0.2.
|
4
|
+
version: 0.2.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gleb Mazovetskiy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -80,8 +80,8 @@ dependencies:
|
|
80
80
|
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
description: Rails
|
84
|
-
|
83
|
+
description: A Rails Engine to preview plain text and html email in your browser.
|
84
|
+
Compatible with Rails 3 and 4.
|
85
85
|
email: glex.spb@gmail.com
|
86
86
|
executables: []
|
87
87
|
extensions: []
|