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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '01907552b34958af3e345325340d7c93d23fff1ab5510b8a0af948b2f58b66f1'
4
- data.tar.gz: 7cf08f76b582345db1a6e445c88bdb347031fa090e4af5aaa155d4fe834b31ef
3
+ metadata.gz: 5a38b98e1971fed4a869a93244e2c8f1ad40d101e84722e8edffd8f2fed929a1
4
+ data.tar.gz: e75512c3a3897b8b56216d209d0b815685ccedb1a6826caaed61d85a9bd9b26a
5
5
  SHA512:
6
- metadata.gz: 562b509f671c502a942e0ba76501441d0cad4670ca73514ae43ad82814f5e9e0bb853a89c8128617f3a7026cd0a7c591b43b999d3cc7bc2aed45b5e975f2ba63
7
- data.tar.gz: e57778aadf44939220cce799f9b80eab9e517c6c3d69fecf00fb8f35ddf7ec1a7ef517060ac63804606a23a93c834b7a9a9ca0635cbc9fd994ea266f74c89590
6
+ metadata.gz: 33c8776a5b4d5e54d12df6bccf63135947576b93d5fa37814f7617c3345730fb6d997ae90a273f12bc8030c6055632f17a6017b03bbed567a678a292e812f536
7
+ data.tar.gz: 4c8af93e7581f187e8d27df1347e638ea357ccdcb8308f16666b7b6581244e1eb0f4f356c2b4d26fabfa556271ff2a56f1cd59b75664bd89db4485a240a47ecc
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/mjml/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Mjml
4
4
  # Version number no longer matches MJML.io version
5
- VERSION = '4.12.1'
5
+ VERSION = '4.13.0'
6
6
  end
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('bun', 'pm bin', ['mjml']) ||
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.12.1
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: 2024-09-06 00:00:00.000000000 Z
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.11
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