rails_email_preview 0.2.26 → 0.2.27

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: f86b81c3f482a9dd5c94b239ca17d84f2f696580
4
- data.tar.gz: c25d3d93bcc0bd66e0707154de88fc8349ca8fa1
3
+ metadata.gz: 2f86480c69846f6b4a1482c0b2b9169bea7adccd
4
+ data.tar.gz: 4651dd80a4435ab3ede398b9d8361152f40f9352
5
5
  SHA512:
6
- metadata.gz: 6b27657005e0fcd5c93bb7d6752815c42aa719f6025248772eab87e2d53b0789f1eb054d63108478f95740e66c7a4770906b2c722b400414555890dfea00290d
7
- data.tar.gz: bd0d7e1a79ae9c5c90c07011f2a43fa0b3d76e6701ba1452111405c26f97f7906064f2591a299d25bbfec557be49cbbeb075e496185112fd322208a6b6054051
6
+ metadata.gz: 2ed4cd889238cb8978ea254db1f556106441fc5bf26345b5a53d2a698732f69ca5b77a09b8a1fd9ebee94a9c09fc9e9c7166b81ca035135abfe148e3f4faf610
7
+ data.tar.gz: 8e6a2374b03c424f7f4240d2007db6db1cc4bac680e7a8d0bcece65ad0dcfb361ef1f622d2a38a68cb54da3e2ebb85b6783a9be6936e6c7404b914c834062c91
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Rails Email Preview [![Build Status][travis-badge]][travis] [![Test Coverage][coverage-badge]][coverage] [![Code Climate][codeclimate-badge]][codeclimate]
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
3
  Preview email in the browser with this Rails engine. Compatible with Rails 3 and 4.
4
4
 
@@ -16,7 +16,7 @@ REP can use your application styles, markup is compatible with [bootstrap 3][rep
16
16
  Add [![Gem Version][gem-badge]][gem] to Gemfile:
17
17
 
18
18
  ```ruby
19
- gem 'rails_email_preview', '~> 0.2.26'
19
+ gem 'rails_email_preview', '~> 0.2.27'
20
20
  ```
21
21
 
22
22
  Add an initializer and the routes:
@@ -14,6 +14,7 @@ ruby:
14
14
  // Hide nav:
15
15
  $('.left-column,.right-column').hide();
16
16
  $('.center-column').css('margin', 0);
17
+ $('#comfy').css({padding: 0, backgroundColor: 'white'});
17
18
 
18
19
  var showUrl = '#{show_url}';
19
20
 
@@ -1,8 +1,8 @@
1
1
  .rep-email-show#email-show
2
- div class=rep_row_class
3
- .pull-left
4
- ul.breadcrumb
5
- li: a href=rails_email_preview.rep_emails_path(email_locale: @email_locale) #{t '.breadcrumb_list'}
2
+ = with_show_hook :breadcrumb do
3
+ ol.breadcrumb
4
+ = with_show_hook :breadcrumb_content do
5
+ li: a href=rails_email_preview.rep_emails_path(email_locale: @email_locale) = t '.breadcrumb_list'
6
6
  li.active: a href=(request.path) = @preview.name
7
7
 
8
8
  = with_show_hook :headers_and_nav do
@@ -122,8 +122,7 @@ module RailsEmailPreview
122
122
  end
123
123
 
124
124
  def cms_snippet_class
125
- if defined?(::Comfy::Cms::Snippet)
126
- # cms >= 1.12
125
+ if cms_version_gte?('1.12.0')
127
126
  ::Comfy::Cms::Snippet
128
127
  else
129
128
  ::Cms::Snippet
@@ -131,8 +130,7 @@ module RailsEmailPreview
131
130
  end
132
131
 
133
132
  def cms_site_class
134
- if defined?(::Comfy::Cms::Site)
135
- # cms >= 1.12
133
+ if cms_version_gte?('1.12.0')
136
134
  ::Comfy::Cms::Site
137
135
  else
138
136
  ::Cms::Site
@@ -146,6 +144,11 @@ module RailsEmailPreview
146
144
  :cms_snippet_content
147
145
  ].detect { |m| respond_to? m }
148
146
  end
147
+
148
+ private
149
+ def cms_version_gte?(version)
150
+ (::ComfortableMexicanSofa::VERSION.split('.').map(&:to_i) <=> version.split('.').map(&:to_i)) >= 0
151
+ end
149
152
  end
150
153
  extend CmsVersionsCompatibility
151
154
  include CmsVersionsCompatibility
@@ -1,3 +1,3 @@
1
1
  module RailsEmailPreview
2
- VERSION = '0.2.26'
2
+ VERSION = '0.2.27'
3
3
  end
@@ -8,6 +8,8 @@ module RailsEmailPreview
8
8
  # All valid hooks and their argument names
9
9
  SCHEMA = {
10
10
  list: args[:index],
11
+ breadcrumb: args[:show],
12
+ breadcrumb_content: args[:show],
11
13
  headers_and_nav: args[:show],
12
14
  headers: args[:show],
13
15
  headers_content: args[:show],
@@ -61,9 +63,6 @@ module RailsEmailPreview
61
63
  template.safe_join(parts, '')
62
64
  end
63
65
 
64
- # Find available hooks with simple static analysis of the gem's views
65
- # @return [Array<String>] return hook names
66
-
67
66
  private
68
67
 
69
68
  def render_providers(providers, locals, template)
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.26
4
+ version: 0.2.27
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-09-27 00:00:00.000000000 Z
11
+ date: 2014-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: i18n-tasks
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 0.7.6
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 0.7.6
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: capybara
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -136,8 +150,7 @@ dependencies:
136
150
  - - ">="
137
151
  - !ruby/object:Gem::Version
138
152
  version: '0'
139
- description: A Rails Engine to preview plain text and html email in your browser.
140
- Compatible with Rails 3 and 4.
153
+ description: A Rails Engine to preview plain text and html email in your browser
141
154
  email: glex.spb@gmail.com
142
155
  executables: []
143
156
  extensions: []