inky-rb 1.3.7.1 → 1.3.7.2
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 +10 -2
- data/lib/generators/inky/install_generator.rb +12 -4
- data/lib/generators/inky/templates/mailer_layout.html.erb +2 -2
- data/lib/inky/rails/version.rb +1 -1
- metadata +2 -62
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f486e08b00ec2b699b7a5143bf8470fe0cac860c
|
4
|
+
data.tar.gz: e0c04b5643e02a1d97ee14551e00bc2dca90b386
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e85ff5da6cd267d4422026ebdac6cc0898d8f5fa922f027722662c6e1be212b38e19ee1bf54bb2977446e2e5484dac3f0790f96c8ec136418f84eda1d5ddab1
|
7
|
+
data.tar.gz: 6d45c612c490c64e1ab555d6fcf197ac622fbac4abdbe75619353b126642f4b7e2b3d093d3be4a634ed0d3122fe133354317128f7e192091510fdbc53c641dd3
|
data/README.md
CHANGED
@@ -62,8 +62,16 @@ Run the following command to set up the required styles and mailer layout:
|
|
62
62
|
rails g inky:install
|
63
63
|
```
|
64
64
|
|
65
|
-
|
66
|
-
|
65
|
+
You can specify the layout name and templating language with the following options:
|
66
|
+
|
67
|
+
```
|
68
|
+
Usage:
|
69
|
+
rails generate inky:install [layout_name] [options]
|
70
|
+
|
71
|
+
Options:
|
72
|
+
[--haml], [--no-haml] # Generate layout in Haml
|
73
|
+
[--slim], [--no-slim] # Generate layout in Slim
|
74
|
+
```
|
67
75
|
|
68
76
|
Rename your email templates to use the `.inky` file extension. Note that you'll still be able to use your default
|
69
77
|
template engine within the `.inky` templates:
|
@@ -6,12 +6,13 @@ module Inky
|
|
6
6
|
desc 'Install Foundation for Emails'
|
7
7
|
source_root File.join(File.dirname(__FILE__), 'templates')
|
8
8
|
argument :layout_name, type: :string, default: 'mailer', banner: 'layout_name'
|
9
|
-
argument :extension, type: :string, default: 'erb', banner: 'extension'
|
10
9
|
|
11
|
-
|
12
|
-
|
10
|
+
class_option :haml, desc: "Generate layout in Haml", type: :boolean
|
11
|
+
class_option :slim, desc: "Generate layout in Slim", type: :boolean
|
13
12
|
|
14
|
-
|
13
|
+
def preserve_original_mailer_layout
|
14
|
+
return unless layout_name == 'mailer' && extension == 'erb'
|
15
|
+
original_mailer = File.join(layouts_base_dir, "mailer.html.erb")
|
15
16
|
rename_filename = File.join(layouts_base_dir, "old_mailer_#{Time.now.to_i}.html.erb")
|
16
17
|
File.rename(original_mailer, rename_filename) if File.exist? original_mailer
|
17
18
|
end
|
@@ -33,6 +34,13 @@ module Inky
|
|
33
34
|
def layouts_base_dir
|
34
35
|
File.join('app', 'views', 'layouts')
|
35
36
|
end
|
37
|
+
|
38
|
+
def extension
|
39
|
+
%w(haml slim).each do |ext|
|
40
|
+
return ext if options.send(ext)
|
41
|
+
end
|
42
|
+
'erb'
|
43
|
+
end
|
36
44
|
end
|
37
45
|
end
|
38
46
|
end
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
5
5
|
<meta name="viewport" content="width=device-width" />
|
6
6
|
|
7
|
-
|
7
|
+
<%%= stylesheet_link_tag "foundation_emails" %>
|
8
8
|
</head>
|
9
9
|
|
10
10
|
<body>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<tr>
|
13
13
|
<td class="center" align="center" valign="top">
|
14
14
|
<center>
|
15
|
-
|
15
|
+
<%%= yield %>
|
16
16
|
</center>
|
17
17
|
</td>
|
18
18
|
</tr>
|
data/lib/inky/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inky-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.7.
|
4
|
+
version: 1.3.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ZURB
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foundation_emails
|
@@ -167,35 +167,6 @@ files:
|
|
167
167
|
- lib/inky/rails/engine.rb
|
168
168
|
- lib/inky/rails/template_handler.rb
|
169
169
|
- lib/inky/rails/version.rb
|
170
|
-
- spec/_cases_output/button/no_link.inky
|
171
|
-
- spec/_cases_output/button/with_expand_class.inky
|
172
|
-
- spec/_cases_output/button/with_image.inky
|
173
|
-
- spec/_cases_output/button/with_link.inky
|
174
|
-
- spec/_cases_output/button/with_tricky_class.inky
|
175
|
-
- spec/_cases_output/callout/basic.inky
|
176
|
-
- spec/_cases_output/callout/with_attributes.inky
|
177
|
-
- spec/_cases_output/general/empty_attributes.inky
|
178
|
-
- spec/_cases_output/general/multiple_root.inky
|
179
|
-
- spec/_cases_output/general/no_tag.inky
|
180
|
-
- spec/_cases_output/general/root_within_text.inky
|
181
|
-
- spec/_cases_output/general/void_html_elements.inky
|
182
|
-
- spec/_cases_output/grid/columns.inky
|
183
|
-
- spec/_cases_output/grid/container.inky
|
184
|
-
- spec/_cases_output/grid/container_with_align.inky
|
185
|
-
- spec/_cases_output/grid/row.inky
|
186
|
-
- spec/_cases_output/grid/row_with_columns.inky
|
187
|
-
- spec/_cases_output/menu/item.inky
|
188
|
-
- spec/_cases_output/menu/menu.inky
|
189
|
-
- spec/_cases_output/menu/menu_with_align.inky
|
190
|
-
- spec/_cases_output/menu/menu_with_items.inky
|
191
|
-
- spec/_cases_output/spacer/basic.inky
|
192
|
-
- spec/_cases_output/spacer/with_size.inky
|
193
|
-
- spec/_cases_output/spacer/with_size_lg.inky
|
194
|
-
- spec/_cases_output/spacer/with_size_sm.inky
|
195
|
-
- spec/_cases_output/spacer/with_size_sm_and_lg.inky
|
196
|
-
- spec/_cases_output/wrapper/basic.inky
|
197
|
-
- spec/_cases_output/wrapper/with_align.inky
|
198
|
-
- spec/_cases_output/wrapper/with_attributes.inky
|
199
170
|
- spec/cases/button/no_link.inky
|
200
171
|
- spec/cases/button/with_expand_class.inky
|
201
172
|
- spec/cases/button/with_image.inky
|
@@ -270,7 +241,6 @@ files:
|
|
270
241
|
- spec/test_app/config/secrets.yml
|
271
242
|
- spec/test_app/config/spring.rb
|
272
243
|
- spec/test_app/log/.keep
|
273
|
-
- spec/test_app/log/test.log
|
274
244
|
- spec/test_app/spec/features/inky_spec.rb
|
275
245
|
- spec/test_app/spec/helper.rb
|
276
246
|
homepage: https://github.com/zurb/inky-rb
|
@@ -299,35 +269,6 @@ summary: Inky is an HTML-based templating language that converts simple HTML int
|
|
299
269
|
complex, responsive email-ready HTML. Designed for Foundation for Emails, a responsive
|
300
270
|
email framework from ZURB.
|
301
271
|
test_files:
|
302
|
-
- spec/_cases_output/button/no_link.inky
|
303
|
-
- spec/_cases_output/button/with_expand_class.inky
|
304
|
-
- spec/_cases_output/button/with_image.inky
|
305
|
-
- spec/_cases_output/button/with_link.inky
|
306
|
-
- spec/_cases_output/button/with_tricky_class.inky
|
307
|
-
- spec/_cases_output/callout/basic.inky
|
308
|
-
- spec/_cases_output/callout/with_attributes.inky
|
309
|
-
- spec/_cases_output/general/empty_attributes.inky
|
310
|
-
- spec/_cases_output/general/multiple_root.inky
|
311
|
-
- spec/_cases_output/general/no_tag.inky
|
312
|
-
- spec/_cases_output/general/root_within_text.inky
|
313
|
-
- spec/_cases_output/general/void_html_elements.inky
|
314
|
-
- spec/_cases_output/grid/columns.inky
|
315
|
-
- spec/_cases_output/grid/container.inky
|
316
|
-
- spec/_cases_output/grid/container_with_align.inky
|
317
|
-
- spec/_cases_output/grid/row.inky
|
318
|
-
- spec/_cases_output/grid/row_with_columns.inky
|
319
|
-
- spec/_cases_output/menu/item.inky
|
320
|
-
- spec/_cases_output/menu/menu.inky
|
321
|
-
- spec/_cases_output/menu/menu_with_align.inky
|
322
|
-
- spec/_cases_output/menu/menu_with_items.inky
|
323
|
-
- spec/_cases_output/spacer/basic.inky
|
324
|
-
- spec/_cases_output/spacer/with_size.inky
|
325
|
-
- spec/_cases_output/spacer/with_size_lg.inky
|
326
|
-
- spec/_cases_output/spacer/with_size_sm.inky
|
327
|
-
- spec/_cases_output/spacer/with_size_sm_and_lg.inky
|
328
|
-
- spec/_cases_output/wrapper/basic.inky
|
329
|
-
- spec/_cases_output/wrapper/with_align.inky
|
330
|
-
- spec/_cases_output/wrapper/with_attributes.inky
|
331
272
|
- spec/cases/button/no_link.inky
|
332
273
|
- spec/cases/button/with_expand_class.inky
|
333
274
|
- spec/cases/button/with_image.inky
|
@@ -400,7 +341,6 @@ test_files:
|
|
400
341
|
- spec/test_app/config/secrets.yml
|
401
342
|
- spec/test_app/config/spring.rb
|
402
343
|
- spec/test_app/config.ru
|
403
|
-
- spec/test_app/log/test.log
|
404
344
|
- spec/test_app/Rakefile
|
405
345
|
- spec/test_app/spec/features/inky_spec.rb
|
406
346
|
- spec/test_app/spec/helper.rb
|