mjml-rails 4.12.0 → 4.12.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/mjml/version.rb +1 -1
- data/lib/mjml.rb +10 -3
- data/test/mjml_test.rb +11 -0
- data.tar.gz.sig +0 -0
- metadata +2 -2
- 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: '01907552b34958af3e345325340d7c93d23fff1ab5510b8a0af948b2f58b66f1'
|
|
4
|
+
data.tar.gz: 7cf08f76b582345db1a6e445c88bdb347031fa090e4af5aaa155d4fe834b31ef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 562b509f671c502a942e0ba76501441d0cad4670ca73514ae43ad82814f5e9e0bb853a89c8128617f3a7026cd0a7c591b43b999d3cc7bc2aed45b5e975f2ba63
|
|
7
|
+
data.tar.gz: e57778aadf44939220cce799f9b80eab9e517c6c3d69fecf00fb8f35ddf7ec1a7ef517060ac63804606a23a93c834b7a9a9ca0635cbc9fd994ea266f74c89590
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/mjml/version.rb
CHANGED
data/lib/mjml.rb
CHANGED
|
@@ -74,8 +74,10 @@ module Mjml
|
|
|
74
74
|
end
|
|
75
75
|
|
|
76
76
|
def self.check_for_mjml_package(package_manager, bin_command, binary_path)
|
|
77
|
-
|
|
78
|
-
return
|
|
77
|
+
stdout, _, status = Open3.capture3("which #{package_manager}")
|
|
78
|
+
return unless status.success?
|
|
79
|
+
|
|
80
|
+
pm_bin = stdout.chomp
|
|
79
81
|
|
|
80
82
|
stdout, _, status = Open3.capture3("#{pm_bin} #{bin_command}")
|
|
81
83
|
return unless status.success?
|
|
@@ -93,11 +95,16 @@ module Mjml
|
|
|
93
95
|
end
|
|
94
96
|
|
|
95
97
|
def self.check_for_global_mjml_binary
|
|
96
|
-
|
|
98
|
+
stdout, _, status = Open3.capture3('which mjml')
|
|
99
|
+
return unless status.success?
|
|
100
|
+
|
|
101
|
+
mjml_bin = stdout.chomp
|
|
97
102
|
return mjml_bin if mjml_bin.present? && check_version(mjml_bin)
|
|
98
103
|
end
|
|
99
104
|
|
|
100
105
|
def self.check_for_mrml_binary
|
|
106
|
+
return unless Mjml.use_mrml
|
|
107
|
+
|
|
101
108
|
MRML.present?
|
|
102
109
|
rescue NameError
|
|
103
110
|
Mjml.mjml_binary_error_string = 'Couldn\'t find MRML - did you add \'mrml\' to your Gemfile?'
|
data/test/mjml_test.rb
CHANGED
|
@@ -168,8 +168,19 @@ describe Mjml do
|
|
|
168
168
|
|
|
169
169
|
Mjml.valid_mjml_binary = nil
|
|
170
170
|
MRML.stubs(:present?).raises(NameError)
|
|
171
|
+
Mjml.stubs(:puts) # silence printed error message from test output
|
|
171
172
|
assert_nil(Mjml.valid_mjml_binary)
|
|
172
173
|
expect(Mjml.mjml_binary_error_string).must_equal 'Couldn\'t find MRML - did you add \'mrml\' to your Gemfile?'
|
|
173
174
|
end
|
|
175
|
+
|
|
176
|
+
it 'with nothing on the path, sets valid_mjml_binary to nil' do
|
|
177
|
+
old_path = ENV['PATH']
|
|
178
|
+
ENV['PATH'] = './test/fixtures/valid-mjml-binary/empty-path/'
|
|
179
|
+
|
|
180
|
+
Mjml.stubs(:puts) # silence printed error message from test output
|
|
181
|
+
assert_nil(Mjml.valid_mjml_binary)
|
|
182
|
+
ensure
|
|
183
|
+
ENV['PATH'] = old_path
|
|
184
|
+
end
|
|
174
185
|
end
|
|
175
186
|
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.12.
|
|
4
|
+
version: 4.12.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Simon Loffler
|
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
|
36
36
|
Qqk2dn/fFE9vdcl9OaOw2Zizne/1VFL/jkzXLqnLgbKD/q129mVCBgw2CKYnQfMN
|
|
37
37
|
4RwBjPyqnMxWnSq6Ycn7HdFEkgyf2cAxFfH5QtDsjEuca+/LAJMeAQ==
|
|
38
38
|
-----END CERTIFICATE-----
|
|
39
|
-
date: 2024-
|
|
39
|
+
date: 2024-09-06 00:00:00.000000000 Z
|
|
40
40
|
dependencies:
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: byebug
|
metadata.gz.sig
CHANGED
|
Binary file
|