inky-rb 1.3.6.0 → 1.3.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3282f169829c4857894a4cb75b7ef6a5a96f3edc
4
- data.tar.gz: 3bceb0ddb23bad1075e79ef58bad6040dbf7e17f
3
+ metadata.gz: 74de32d25371bce184fdc11c8bd97d240e91d6e8
4
+ data.tar.gz: 35d2d7fb902610d3cbe0ff3c1a7e259b65811483
5
5
  SHA512:
6
- metadata.gz: a1ae7a6c393a72b2aa6c4a3f7d4ca463253a95f2b826f6a4e5032c2454efc4e1044d4e9bc25ca126eb618e4eb34c5024e92e2f3a0844f87af1c7846cc714ef83
7
- data.tar.gz: 28240f7c706c4a3fa1dcc294f45a3c6f4f0e2d929780f7419fa5715c3e69a31f589e396c026a77947e21254f193e9a217cf144cf2a2262cfe37c0725c4e07fce
6
+ metadata.gz: a32921470b7797e53caa988ccef060bd6e4970980484d91af51e62dc447235893ba78933167c8788413fe9aacb7cd155532093e58a82787da3fa4938b66e9be8
7
+ data.tar.gz: 3e9f7ff46e9d6c722633a54e6f008eb6b4ad8ad58ba9c3be3aa96afdda52a4503caa9f604670fd6be53443e41c5a4d69fdec10a313202628d7ab4735f4dfafdc
@@ -1,21 +1,21 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- inky-rb (0.0.3)
4
+ inky-rb (1.3.6.1)
5
5
  foundation_emails (~> 2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  diff-lcs (1.2.5)
11
- foundation_emails (2.1.0.1)
11
+ foundation_emails (2.2.0.0)
12
12
  rake (11.2.2)
13
- rspec-core (3.4.4)
14
- rspec-support (~> 3.4.0)
15
- rspec-expectations (3.4.0)
13
+ rspec-core (3.5.0)
14
+ rspec-support (~> 3.5.0)
15
+ rspec-expectations (3.5.0)
16
16
  diff-lcs (>= 1.2.0, < 2.0)
17
- rspec-support (~> 3.4.0)
18
- rspec-support (3.4.1)
17
+ rspec-support (~> 3.5.0)
18
+ rspec-support (3.5.0)
19
19
 
20
20
  PLATFORMS
21
21
  ruby
@@ -28,4 +28,4 @@ DEPENDENCIES
28
28
  rspec-expectations
29
29
 
30
30
  BUNDLED WITH
31
- 1.12.4
31
+ 1.11.2
data/README.md CHANGED
@@ -1,7 +1,11 @@
1
1
  # Inky
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/inky-rb.svg)](https://badge.fury.io/rb/inky-rb)
4
+
3
5
  Inky is an HTML-based templating language that converts simple HTML into complex, responsive email-ready HTML. Designed for [Foundation for Emails](http://foundation.zurb.com/emails), a responsive email framework from [ZURB](http://zurb.com).
4
6
 
7
+ To include only the Foundation for Emails styles in your Asset Pipeline, without Inky, use the [**foundation_emails**](https://github.com/zurb/foundation-emails/#using-the-ruby-gem) gem.
8
+
5
9
  Give Inky simple HTML like this:
6
10
 
7
11
  ```html
@@ -52,13 +56,14 @@ Then execute:
52
56
  bundle install
53
57
  ```
54
58
 
55
- Make sure that the stylesheet included in your email layout imports the Foundation for Emails styles:
59
+ Run the following command to set up the required styles and mailer layout:
56
60
 
57
- ```scss
58
- // my_awesome_emails_stylesheet.scss
59
- @import "foundation-emails";
61
+ ```bash
62
+ rails g inky:install
60
63
  ```
61
64
 
65
+ (You can specify the generated mailer layout filename like so: `rails g inky:install some_name`)
66
+
62
67
  Rename your email templates to use the `.inky` file extension. Note that you'll still be able to use ERB within the `.inky` templates:
63
68
 
64
69
  ```
@@ -68,7 +73,7 @@ pw_reset.html.erb => pw_reset.html.inky
68
73
 
69
74
  You're all set!
70
75
 
71
- ** The majority of email clients ignore linked stylesheets. By inlining your referenced styles, `premailer-rails` lets you keep your markup and stylesheets in separate files.
76
+ ** The majority of email clients ignore linked stylesheets. By using a CSS inliner like `premailer-rails` or `roadie`, you're able to leave your stylesheets in a separate file, keeping your markup lean.
72
77
 
73
78
  ## Custom Elements
74
79
 
@@ -0,0 +1,37 @@
1
+ require 'rails/generators'
2
+
3
+ module Inky
4
+ module Generators
5
+ class InstallGenerator < ::Rails::Generators::Base
6
+ desc 'Install Foundation for Emails'
7
+ source_root File.join(File.dirname(__FILE__), 'templates')
8
+ argument :layout_name, :type => :string, :default => 'mailer', :banner => 'layout_name'
9
+
10
+ def preserve_original_mailer_layout
11
+ return nil unless layout_name == 'mailer'
12
+
13
+ original_mailer = File.join(layouts_base_dir, 'mailer.html.erb')
14
+ rename_filename = File.join(layouts_base_dir, "old_mailer_#{Time.now.to_i}.html.erb")
15
+ File.rename(original_mailer, rename_filename) if File.exists? original_mailer
16
+ end
17
+
18
+ def create_mailer_stylesheet
19
+ template 'foundation_emails.scss', File.join(stylesheets_base_dir, 'foundation_emails.scss')
20
+ end
21
+
22
+ def create_mailer_layout
23
+ template 'mailer_layout.html.erb', File.join(layouts_base_dir, "#{layout_name.underscore}.html.erb")
24
+ end
25
+
26
+ private
27
+
28
+ def stylesheets_base_dir
29
+ File.join('app', 'assets', 'stylesheets')
30
+ end
31
+
32
+ def layouts_base_dir
33
+ File.join('app', 'views', 'layouts')
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1 @@
1
+ @import "foundation-emails";
@@ -0,0 +1,21 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <meta name="viewport" content="width=device-width" />
6
+
7
+ <%%= stylesheet_link_tag "foundation_emails" %>
8
+ </head>
9
+
10
+ <body>
11
+ <table class="body" data-made-with-foundation>
12
+ <tr>
13
+ <td class="center" align="center" valign="top">
14
+ <center>
15
+ <%%= yield %>
16
+ </center>
17
+ </td>
18
+ </tr>
19
+ </table>
20
+ </body>
21
+ </html>
@@ -1,5 +1,5 @@
1
1
  module Inky
2
2
  module Rails
3
- VERSION = "1.3.6.0"
3
+ VERSION = "1.3.6.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inky-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.6.0
4
+ version: 1.3.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ZURB
@@ -68,6 +68,9 @@ files:
68
68
  - Rakefile
69
69
  - inky.gemspec
70
70
  - lib/component_factory.rb
71
+ - lib/generators/inky/install_generator.rb
72
+ - lib/generators/inky/templates/foundation_emails.scss
73
+ - lib/generators/inky/templates/mailer_layout.html.erb
71
74
  - lib/inky.rb
72
75
  - lib/inky/rails/engine.rb
73
76
  - lib/inky/rails/template_handler.rb
@@ -94,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
97
  version: '0'
95
98
  requirements: []
96
99
  rubyforge_project:
97
- rubygems_version: 2.6.4
100
+ rubygems_version: 2.5.1
98
101
  signing_key:
99
102
  specification_version: 4
100
103
  summary: Inky is an HTML-based templating language that converts simple HTML into
@@ -104,4 +107,3 @@ test_files:
104
107
  - spec/components_spec.rb
105
108
  - spec/grid_spec.rb
106
109
  - spec/spec_helper.rb
107
- has_rdoc: