mjml-rails 4.12.1 → 4.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/mjml/version.rb +1 -1
- data/lib/mjml.rb +12 -2
- data/test/mjml_test.rb +1 -0
- 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: 5a38b98e1971fed4a869a93244e2c8f1ad40d101e84722e8edffd8f2fed929a1
|
4
|
+
data.tar.gz: e75512c3a3897b8b56216d209d0b815685ccedb1a6826caaed61d85a9bd9b26a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33c8776a5b4d5e54d12df6bccf63135947576b93d5fa37814f7617c3345730fb6d997ae90a273f12bc8030c6055632f17a6017b03bbed567a678a292e812f536
|
7
|
+
data.tar.gz: 4c8af93e7581f187e8d27df1347e638ea357ccdcb8308f16666b7b6581244e1eb0f4f356c2b4d26fabfa556271ff2a56f1cd59b75664bd89db4485a240a47ecc
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/mjml/version.rb
CHANGED
data/lib/mjml.rb
CHANGED
@@ -48,6 +48,7 @@ module Mjml
|
|
48
48
|
def self.valid_mjml_binary
|
49
49
|
self.valid_mjml_binary = @@valid_mjml_binary ||
|
50
50
|
check_for_custom_mjml_binary ||
|
51
|
+
check_for_bun_mjml_binary ||
|
51
52
|
check_for_package_mjml_binary ||
|
52
53
|
check_for_global_mjml_binary ||
|
53
54
|
check_for_mrml_binary
|
@@ -88,9 +89,18 @@ module Mjml
|
|
88
89
|
nil
|
89
90
|
end
|
90
91
|
|
92
|
+
def self.check_for_bun_mjml_binary
|
93
|
+
_, _, status = Open3.capture3('which bun')
|
94
|
+
return unless status.success?
|
95
|
+
|
96
|
+
# HINT: Bun always prioritizes local bins first and falls back to global installations
|
97
|
+
mjml_bin = 'bun run mjml'
|
98
|
+
|
99
|
+
return mjml_bin if check_version(mjml_bin)
|
100
|
+
end
|
101
|
+
|
91
102
|
def self.check_for_package_mjml_binary
|
92
|
-
check_for_mjml_package('
|
93
|
-
check_for_mjml_package('npm', 'root', ['.bin', 'mjml']) ||
|
103
|
+
check_for_mjml_package('npm', 'root', ['.bin', 'mjml']) ||
|
94
104
|
check_for_mjml_package('yarn', 'bin mjml', [])
|
95
105
|
end
|
96
106
|
|
data/test/mjml_test.rb
CHANGED
@@ -162,6 +162,7 @@ describe Mjml do
|
|
162
162
|
it 'can use MRML and check for a valid binary' do
|
163
163
|
Mjml.use_mrml = true
|
164
164
|
Mjml.stubs(:check_for_custom_mjml_binary).returns(false)
|
165
|
+
Mjml.stubs(:check_for_bun_mjml_binary).returns(false)
|
165
166
|
Mjml.stubs(:check_for_package_mjml_binary).returns(false)
|
166
167
|
Mjml.stubs(:check_for_global_mjml_binary).returns(false)
|
167
168
|
expect(Mjml.valid_mjml_binary).must_equal(true)
|
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.
|
4
|
+
version: 4.13.0
|
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:
|
39
|
+
date: 2025-01-03 00:00:00.000000000 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: byebug
|
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
192
|
- !ruby/object:Gem::Version
|
193
193
|
version: '0'
|
194
194
|
requirements: []
|
195
|
-
rubygems_version: 3.5.
|
195
|
+
rubygems_version: 3.5.22
|
196
196
|
signing_key:
|
197
197
|
specification_version: 4
|
198
198
|
summary: MJML + ERb templates
|
metadata.gz.sig
CHANGED
Binary file
|