inky-rb 1.3.7.3 → 1.3.7.4

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
- SHA256:
3
- metadata.gz: 6f128cd66f4c50d6498301a720c686a24f75afb6121f7574fcf38ae4e4197e39
4
- data.tar.gz: 9953f571f49f8fe6712a89331726eca0e1c6756129d75d782e12685190549487
2
+ SHA1:
3
+ metadata.gz: 11e20b7691dbedbdf57290098bb3c04de1661229
4
+ data.tar.gz: a31e9746597220dcf68b68597d6f403065d03f27
5
5
  SHA512:
6
- metadata.gz: a0c09ee38d1611662c935d09e4326fde73ff2261ff1cd45f457e693d37b640f4303da063269ae663fdf574564cdc368f0877a8219ade38a174d0f474e6e2ca61
7
- data.tar.gz: b3154afa14af608c817f92b20a2763de1e681eb8b253aae12e76c85b5c7859e937afd7da7cee3243a86842f20611b69e151ae15291301f0a6d907f2dc66e745c
6
+ metadata.gz: 2584dea335782a7d206f500fbf4f9c4f167e619980b95c2ccb50bcc4796d471d308a1d372c2e3a13ea6eff0075d73394f647e3fb9755a0e5f89e66b2be37ac52
7
+ data.tar.gz: 33324d1b9d50d358dee7ab497f98754f8ea1e911815f771e8138551190f82882432710d15f63c95c3ba0e5fe0f1393727201e29004daf58b88e340483d6f34e1
data/.gitignore CHANGED
@@ -3,3 +3,4 @@ pkg
3
3
  spec/_cases_output
4
4
  spec/test_app/log/*.log
5
5
  spec/test_app/tmp/
6
+ Gemfile.lock
@@ -2,15 +2,17 @@ sudo: false
2
2
  language: ruby
3
3
  rvm:
4
4
  - 2.0.0
5
- - 2.4.1
5
+ - 2.6.1
6
6
  gemfile:
7
7
  - gemfiles/rails_3.gemfile
8
8
  - gemfiles/rails_4.gemfile
9
9
  - gemfiles/rails_5.gemfile
10
+ - gemfiles/rails_6.gemfile
10
11
  matrix:
11
12
  exclude:
12
13
  - rvm: 2.0.0
13
14
  gemfile: gemfiles/rails_5.gemfile
15
+ - rvm: 2.0.0
16
+ gemfile: gemfiles/rails_6.gemfile
14
17
  before_install:
15
- - gem install bundler
16
18
  - 'npm install -g inky-cli'
data/README.md CHANGED
@@ -163,4 +163,4 @@ The Inky parser can be accessed directly for programmatic use.
163
163
  Inky-rb currently requires:
164
164
 
165
165
  * Ruby 2.0+
166
- * Rails 3, 4 or 5
166
+ * Rails 3, 4, 5 or 6
@@ -0,0 +1,5 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "rails", ">=6.0.0.beta"
4
+
5
+ gemspec path: "../"
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
18
18
 
19
19
  s.add_dependency "foundation_emails", "~> 2"
20
20
  s.add_dependency "nokogiri"
21
- s.add_development_dependency "bundler", "~> 1.6"
21
+ s.add_development_dependency "bundler"
22
22
  s.add_development_dependency "capybara"
23
23
  s.add_development_dependency "rails"
24
24
  s.add_development_dependency "rake"
@@ -13,9 +13,13 @@ module Inky
13
13
  raise("No template handler found for #{type}")
14
14
  end
15
15
 
16
- def call(template)
17
- compiled_source = engine_handler.call(template)
18
-
16
+ def call(template, source = nil)
17
+ compiled_source =
18
+ if source
19
+ engine_handler.call(template, source)
20
+ else
21
+ engine_handler.call(template)
22
+ end
19
23
  "Inky::Core.new.release_the_kraken(begin; #{compiled_source};end)"
20
24
  end
21
25
 
@@ -1,6 +1,6 @@
1
1
  module Inky
2
2
  module Rails
3
- VERSION = '1.3.7.3'.freeze
3
+ VERSION = '1.3.7.4'.freeze
4
4
  end
5
5
  NODE_VERSION, GEM_VERSION = Rails::VERSION.rpartition('.').map(&:freeze)
6
6
  end
@@ -10,6 +10,7 @@ def reformat_html(html)
10
10
  .gsub(/ "/, '"').gsub(/\=" /, '="') # Remove leading/trailing spaces inside attributes
11
11
  .gsub(/ </, '<').gsub(/> /, '>') # Remove leading/trailing spaces inside tags
12
12
  .gsub(' data-parsed=""', '') # Don't consider this known inky-node artefact
13
+ .gsub(' data-parsed>', '>') # Ditto
13
14
  .gsub('&#xA0;', ' ') # These are the same entity...
14
15
  .gsub(/(align="[^"]+") (class="[^"]+")/, '\2 \1') # Tweak order to match inky-node on container
15
16
  .gsub(/class\="([^"]+)"/) do # Sort class names
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.3
4
+ version: 1.3.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - ZURB
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-23 00:00:00.000000000 Z
11
+ date: 2019-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: foundation_emails
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '1.6'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '1.6'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: capybara
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -149,13 +149,13 @@ files:
149
149
  - ".rubocop.yml"
150
150
  - ".travis.yml"
151
151
  - Gemfile
152
- - Gemfile.lock
153
152
  - LICENSE.txt
154
153
  - README.md
155
154
  - Rakefile
156
155
  - gemfiles/rails_3.gemfile
157
156
  - gemfiles/rails_4.gemfile
158
157
  - gemfiles/rails_5.gemfile
158
+ - gemfiles/rails_6.gemfile
159
159
  - inky.gemspec
160
160
  - lib/generators/inky/install_generator.rb
161
161
  - lib/generators/inky/templates/foundation_emails.scss
@@ -168,6 +168,35 @@ files:
168
168
  - lib/inky/rails/engine.rb
169
169
  - lib/inky/rails/template_handler.rb
170
170
  - lib/inky/rails/version.rb
171
+ - spec/_cases_output/button/no_link.inky
172
+ - spec/_cases_output/button/with_expand_class.inky
173
+ - spec/_cases_output/button/with_image.inky
174
+ - spec/_cases_output/button/with_link.inky
175
+ - spec/_cases_output/button/with_tricky_class.inky
176
+ - spec/_cases_output/callout/basic.inky
177
+ - spec/_cases_output/callout/with_attributes.inky
178
+ - spec/_cases_output/general/empty_attributes.inky
179
+ - spec/_cases_output/general/multiple_root.inky
180
+ - spec/_cases_output/general/no_tag.inky
181
+ - spec/_cases_output/general/root_within_text.inky
182
+ - spec/_cases_output/general/void_html_elements.inky
183
+ - spec/_cases_output/grid/columns.inky
184
+ - spec/_cases_output/grid/container.inky
185
+ - spec/_cases_output/grid/container_with_align.inky
186
+ - spec/_cases_output/grid/row.inky
187
+ - spec/_cases_output/grid/row_with_columns.inky
188
+ - spec/_cases_output/menu/item.inky
189
+ - spec/_cases_output/menu/menu.inky
190
+ - spec/_cases_output/menu/menu_with_align.inky
191
+ - spec/_cases_output/menu/menu_with_items.inky
192
+ - spec/_cases_output/spacer/basic.inky
193
+ - spec/_cases_output/spacer/with_size.inky
194
+ - spec/_cases_output/spacer/with_size_lg.inky
195
+ - spec/_cases_output/spacer/with_size_sm.inky
196
+ - spec/_cases_output/spacer/with_size_sm_and_lg.inky
197
+ - spec/_cases_output/wrapper/basic.inky
198
+ - spec/_cases_output/wrapper/with_align.inky
199
+ - spec/_cases_output/wrapper/with_attributes.inky
171
200
  - spec/cases/button/no_link.inky
172
201
  - spec/cases/button/with_expand_class.inky
173
202
  - spec/cases/button/with_image.inky
@@ -242,6 +271,7 @@ files:
242
271
  - spec/test_app/config/secrets.yml
243
272
  - spec/test_app/config/spring.rb
244
273
  - spec/test_app/log/.keep
274
+ - spec/test_app/log/test.log
245
275
  - spec/test_app/spec/features/inky_spec.rb
246
276
  - spec/test_app/spec/helper.rb
247
277
  homepage: https://github.com/zurb/inky-rb
@@ -264,7 +294,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
264
294
  version: '0'
265
295
  requirements: []
266
296
  rubyforge_project:
267
- rubygems_version: 2.7.6
297
+ rubygems_version: 2.6.13
268
298
  signing_key:
269
299
  specification_version: 4
270
300
  summary: Inky is an HTML-based templating language that converts simple HTML into
@@ -313,9 +343,39 @@ test_files:
313
343
  - spec/test_app/spec/helper.rb
314
344
  - spec/test_app/spec/features/inky_spec.rb
315
345
  - spec/test_app/Rakefile
346
+ - spec/test_app/log/test.log
316
347
  - spec/cases_spec.rb
317
348
  - spec/grid_spec.rb
318
349
  - spec/configuration_spec.rb
350
+ - spec/_cases_output/wrapper/basic.inky
351
+ - spec/_cases_output/wrapper/with_align.inky
352
+ - spec/_cases_output/wrapper/with_attributes.inky
353
+ - spec/_cases_output/general/no_tag.inky
354
+ - spec/_cases_output/general/multiple_root.inky
355
+ - spec/_cases_output/general/void_html_elements.inky
356
+ - spec/_cases_output/general/empty_attributes.inky
357
+ - spec/_cases_output/general/root_within_text.inky
358
+ - spec/_cases_output/spacer/basic.inky
359
+ - spec/_cases_output/spacer/with_size_sm.inky
360
+ - spec/_cases_output/spacer/with_size_lg.inky
361
+ - spec/_cases_output/spacer/with_size_sm_and_lg.inky
362
+ - spec/_cases_output/spacer/with_size.inky
363
+ - spec/_cases_output/callout/basic.inky
364
+ - spec/_cases_output/callout/with_attributes.inky
365
+ - spec/_cases_output/button/with_tricky_class.inky
366
+ - spec/_cases_output/button/with_expand_class.inky
367
+ - spec/_cases_output/button/with_link.inky
368
+ - spec/_cases_output/button/no_link.inky
369
+ - spec/_cases_output/button/with_image.inky
370
+ - spec/_cases_output/menu/menu_with_items.inky
371
+ - spec/_cases_output/menu/menu_with_align.inky
372
+ - spec/_cases_output/menu/menu.inky
373
+ - spec/_cases_output/menu/item.inky
374
+ - spec/_cases_output/grid/row.inky
375
+ - spec/_cases_output/grid/row_with_columns.inky
376
+ - spec/_cases_output/grid/columns.inky
377
+ - spec/_cases_output/grid/container.inky
378
+ - spec/_cases_output/grid/container_with_align.inky
319
379
  - spec/cases/wrapper/basic.inky
320
380
  - spec/cases/wrapper/with_align.inky
321
381
  - spec/cases/wrapper/with_attributes.inky
@@ -1,188 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- inky-rb (1.3.7.2)
5
- foundation_emails (~> 2)
6
- nokogiri
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- actioncable (5.2.1)
12
- actionpack (= 5.2.1)
13
- nio4r (~> 2.0)
14
- websocket-driver (>= 0.6.1)
15
- actionmailer (5.2.1)
16
- actionpack (= 5.2.1)
17
- actionview (= 5.2.1)
18
- activejob (= 5.2.1)
19
- mail (~> 2.5, >= 2.5.4)
20
- rails-dom-testing (~> 2.0)
21
- actionpack (5.2.1)
22
- actionview (= 5.2.1)
23
- activesupport (= 5.2.1)
24
- rack (~> 2.0)
25
- rack-test (>= 0.6.3)
26
- rails-dom-testing (~> 2.0)
27
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
28
- actionview (5.2.1)
29
- activesupport (= 5.2.1)
30
- builder (~> 3.1)
31
- erubi (~> 1.4)
32
- rails-dom-testing (~> 2.0)
33
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
- activejob (5.2.1)
35
- activesupport (= 5.2.1)
36
- globalid (>= 0.3.6)
37
- activemodel (5.2.1)
38
- activesupport (= 5.2.1)
39
- activerecord (5.2.1)
40
- activemodel (= 5.2.1)
41
- activesupport (= 5.2.1)
42
- arel (>= 9.0)
43
- activestorage (5.2.1)
44
- actionpack (= 5.2.1)
45
- activerecord (= 5.2.1)
46
- marcel (~> 0.3.1)
47
- activesupport (5.2.1)
48
- concurrent-ruby (~> 1.0, >= 1.0.2)
49
- i18n (>= 0.7, < 2)
50
- minitest (~> 5.1)
51
- tzinfo (~> 1.1)
52
- addressable (2.5.2)
53
- public_suffix (>= 2.0.2, < 4.0)
54
- arel (9.0.0)
55
- ast (2.4.0)
56
- builder (3.2.3)
57
- capybara (3.9.0)
58
- addressable
59
- mini_mime (>= 0.1.3)
60
- nokogiri (~> 1.8)
61
- rack (>= 1.6.0)
62
- rack-test (>= 0.6.3)
63
- xpath (~> 3.1)
64
- concurrent-ruby (1.0.5)
65
- crass (1.0.4)
66
- diff-lcs (1.3)
67
- erubi (1.7.1)
68
- foundation_emails (2.2.1.0)
69
- globalid (0.4.1)
70
- activesupport (>= 4.2.0)
71
- i18n (1.1.1)
72
- concurrent-ruby (~> 1.0)
73
- jaro_winkler (1.5.1)
74
- loofah (2.2.2)
75
- crass (~> 1.0.2)
76
- nokogiri (>= 1.5.9)
77
- mail (2.7.1)
78
- mini_mime (>= 0.1.1)
79
- marcel (0.3.3)
80
- mimemagic (~> 0.3.2)
81
- method_source (0.9.0)
82
- mimemagic (0.3.2)
83
- mini_mime (1.0.1)
84
- mini_portile2 (2.3.0)
85
- minitest (5.11.3)
86
- nio4r (2.3.1)
87
- nokogiri (1.8.5)
88
- mini_portile2 (~> 2.3.0)
89
- parallel (1.12.1)
90
- parser (2.5.1.2)
91
- ast (~> 2.4.0)
92
- powerpack (0.1.2)
93
- public_suffix (3.0.3)
94
- rack (2.0.5)
95
- rack-test (1.1.0)
96
- rack (>= 1.0, < 3)
97
- rails (5.2.1)
98
- actioncable (= 5.2.1)
99
- actionmailer (= 5.2.1)
100
- actionpack (= 5.2.1)
101
- actionview (= 5.2.1)
102
- activejob (= 5.2.1)
103
- activemodel (= 5.2.1)
104
- activerecord (= 5.2.1)
105
- activestorage (= 5.2.1)
106
- activesupport (= 5.2.1)
107
- bundler (>= 1.3.0)
108
- railties (= 5.2.1)
109
- sprockets-rails (>= 2.0.0)
110
- rails-dom-testing (2.0.3)
111
- activesupport (>= 4.2.0)
112
- nokogiri (>= 1.6)
113
- rails-html-sanitizer (1.0.4)
114
- loofah (~> 2.2, >= 2.2.2)
115
- railties (5.2.1)
116
- actionpack (= 5.2.1)
117
- activesupport (= 5.2.1)
118
- method_source
119
- rake (>= 0.8.7)
120
- thor (>= 0.19.0, < 2.0)
121
- rainbow (3.0.0)
122
- rake (12.3.1)
123
- rspec-core (3.8.0)
124
- rspec-support (~> 3.8.0)
125
- rspec-expectations (3.8.2)
126
- diff-lcs (>= 1.2.0, < 2.0)
127
- rspec-support (~> 3.8.0)
128
- rspec-mocks (3.8.0)
129
- diff-lcs (>= 1.2.0, < 2.0)
130
- rspec-support (~> 3.8.0)
131
- rspec-rails (3.8.0)
132
- actionpack (>= 3.0)
133
- activesupport (>= 3.0)
134
- railties (>= 3.0)
135
- rspec-core (~> 3.8.0)
136
- rspec-expectations (~> 3.8.0)
137
- rspec-mocks (~> 3.8.0)
138
- rspec-support (~> 3.8.0)
139
- rspec-support (3.8.0)
140
- rubocop (0.59.2)
141
- jaro_winkler (~> 1.5.1)
142
- parallel (~> 1.10)
143
- parser (>= 2.5, != 2.5.1.1)
144
- powerpack (~> 0.1)
145
- rainbow (>= 2.2.2, < 4.0)
146
- ruby-progressbar (~> 1.7)
147
- unicode-display_width (~> 1.0, >= 1.0.1)
148
- ruby-progressbar (1.10.0)
149
- slim (4.0.1)
150
- temple (>= 0.7.6, < 0.9)
151
- tilt (>= 2.0.6, < 2.1)
152
- sprockets (3.7.2)
153
- concurrent-ruby (~> 1.0)
154
- rack (> 1, < 3)
155
- sprockets-rails (3.2.1)
156
- actionpack (>= 4.0)
157
- activesupport (>= 4.0)
158
- sprockets (>= 3.0.0)
159
- temple (0.8.0)
160
- thor (0.20.0)
161
- thread_safe (0.3.6)
162
- tilt (2.0.8)
163
- tzinfo (1.2.5)
164
- thread_safe (~> 0.1)
165
- unicode-display_width (1.4.0)
166
- websocket-driver (0.7.0)
167
- websocket-extensions (>= 0.1.0)
168
- websocket-extensions (0.1.3)
169
- xpath (3.2.0)
170
- nokogiri (~> 1.8)
171
-
172
- PLATFORMS
173
- ruby
174
-
175
- DEPENDENCIES
176
- bundler (~> 1.6)
177
- capybara
178
- inky-rb!
179
- rails
180
- rake
181
- rspec-core
182
- rspec-expectations
183
- rspec-rails
184
- rubocop
185
- slim
186
-
187
- BUNDLED WITH
188
- 1.16.4