mjml-rails 4.7.1 → 4.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
- checksums.yaml.gz.sig +0 -0
- data/lib/mjml/parser.rb +6 -1
- data/lib/mjml/version.rb +1 -1
- data/test/parser_test.rb +9 -2
- data.tar.gz.sig +0 -0
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0a8228a5acfd5b16debb4c6a1bdcf9a7b6ee3efd48b4004ac63b1cb94814f7e
|
4
|
+
data.tar.gz: 1d34c76fff5718954beeccaeb0b5cef3876362ffe11d9b1b7338bcb72fc843cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb7051418c7a08f8c8927abd5d87ad1569ce366d319f683a7bf9d195263e596cca7a159a964d4d4593463308e25e38510b80dddf74df19913f9ff008b9a9a7f4
|
7
|
+
data.tar.gz: 373e935513e3a3079273505731d272f8d031549e7dc2b6a64b8c1cd688340db0f3439cb1719529406ce755a38e079477b8b58e28701b18cf06b8befca3578abb
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/mjml/parser.rb
CHANGED
@@ -41,7 +41,12 @@ module Mjml
|
|
41
41
|
command = "-r #{in_tmp_file} -o #{out_tmp_file.path} " \
|
42
42
|
"--config.beautify #{beautify} --config.minify #{minify} --config.validationLevel #{validation_level}"
|
43
43
|
_, stderr, status = Mjml.run_mjml(command)
|
44
|
-
|
44
|
+
|
45
|
+
unless status.success?
|
46
|
+
# The process status ist quite helpful in case of dying processes without STDERR output.
|
47
|
+
# Node exit codes are documented here: https://node.readthedocs.io/en/latest/api/process/#exit-codes
|
48
|
+
raise ParseError, "#{stderr.chomp}\n(process status: #{status})"
|
49
|
+
end
|
45
50
|
|
46
51
|
Mjml.logger.warn(stderr.chomp) if stderr.present?
|
47
52
|
out_tmp_file.read
|
data/lib/mjml/version.rb
CHANGED
data/test/parser_test.rb
CHANGED
@@ -66,9 +66,16 @@ describe Mjml::Parser do
|
|
66
66
|
|
67
67
|
describe '#run' do
|
68
68
|
describe 'when shell command failed' do
|
69
|
+
let(:error_msg) do
|
70
|
+
expect { parser.run '/tmp/non_existent_file.mjml' }.must_raise(Mjml::Parser::ParseError).message
|
71
|
+
end
|
72
|
+
|
69
73
|
it 'raises exception' do
|
70
|
-
|
71
|
-
|
74
|
+
expect(error_msg).must_include 'Command line error'
|
75
|
+
end
|
76
|
+
|
77
|
+
it 'includes process status' do
|
78
|
+
expect(error_msg).must_match(/\(process status: .+\)/)
|
72
79
|
end
|
73
80
|
end
|
74
81
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mjml-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.7.
|
4
|
+
version: 4.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Loffler
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
R9NsaxhBfawJEJcYoPZflGkLjJU8pjSuvIW5+rNgAiqY8D37hTtZMu/n2Fz8Qp24
|
36
36
|
7EZetZmcvBzARf8vQSJjga3y0Bftk8u7LmblOEWddzE=
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date:
|
38
|
+
date: 2022-01-21 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: byebug
|
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
175
|
- !ruby/object:Gem::Version
|
176
176
|
version: '0'
|
177
177
|
requirements: []
|
178
|
-
rubygems_version: 3.
|
178
|
+
rubygems_version: 3.3.5
|
179
179
|
signing_key:
|
180
180
|
specification_version: 4
|
181
181
|
summary: MJML + ERb templates
|
metadata.gz.sig
CHANGED
Binary file
|