mjml-rails 4.8.0 → 4.9.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: 79d635939113a77bdcfa96934cafa71e52a13c71171eb36c138250952e0df2de
4
- data.tar.gz: 5943d70d89ef0d1ce8ba63c32dd72e6837982938b4fbe59e6e4cf5088f04b16b
3
+ metadata.gz: 63fb17f29c1ab7539b3b53470787d35246e9536ee960a1493c02806c8119de75
4
+ data.tar.gz: 50fd2491ce1bdef74e0eaf080687ef7e5ce5c23a423f8748eba62e27dcc3dfae
5
5
  SHA512:
6
- metadata.gz: 00a5e9270464c12f16f0b7b8f3e32dc9c0c20413d34063c33c4b86bec08eb7df1c2d5ae20beb61d9f708242203c6c33b663652a207e135ef658cc6636497dcec
7
- data.tar.gz: bab11c714982bca667864e180e9c6066c4a22221dff010a19ffd179b25f79dff8a9de4809af5217ec82d62291835aecf231d79b6ecd255f5bd71e4ba3829365e
6
+ metadata.gz: 9cb24065a5430452f98fffbcc54c81da74dfb97c91ba85f64d4f16ceb8fbd302bb0483bc2705ce03027a22ce026f8f852d0a3274b0905c53f1ce94d485c6fab7
7
+ data.tar.gz: 91ffeea703562d051c68dbabaad228efd2f6b07daa4cb750625727332363f95a184b42b500501c23e90a6714ca48eb6e3d63fbd7c90f58cf93ec8eaf4c2fb479
checksums.yaml.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- zh^KžC����r.��D����2 V�8)���b#���� �KcBl{]9�ۖ�L�淜�S��Y-��#%aO����M�Gj�����鵝Lk�V��ѵ-A��]�.鐼�\�'8�:�,_(5�� 5u���J{N � � ����bSQ�>�'e,~�Ё8C���"n�=y�<}����r��k\^�|�Ԑگ���EA���+�?�m��o �G��x岴r��ً>_Y+{�b�EݢdH��!S�%�涼3���
2
- �%�.�71lp�eD�z��'�KLv2��A����%�߉
1
+ ��+k��EI��U]�ݬ�Z*���t��^h�*���?."Y<��2f�W���Q���r�_'Β����F,�}�V���_��V�=�(j��(���|���KK��S+?��4�%�9E ���Ē���#�kn���=�\��v�%-E\�����h����y����P2=28���7V�9�?�xcB���+��f"� <z�5�Ȇ�Y��sla��1��\]�}�+��qp�+g��t� �n{�(�����Ye�i�?����P��X� �<r�?���;)UuTo������f���J6[��p/R *�c*
2
+ �CΎ�q�����a{�kKz������fM��#0�j�8G��
data/README.md CHANGED
@@ -72,6 +72,9 @@ Add the MJML parser to your project with your favourite package manager:
72
72
  # with npm
73
73
  npm install mjml
74
74
 
75
+ # or install it globally (The best way for Rails 7.x.x with importmaps)
76
+ npm install -g mjml
77
+
75
78
  # with yarn
76
79
  yarn add mjml
77
80
  ```
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.8.0'
5
+ VERSION = '4.9.0'
6
6
  end
data/lib/mjml.rb CHANGED
@@ -71,18 +71,28 @@ module Mjml
71
71
 
72
72
  def self.check_for_yarn_mjml_binary
73
73
  yarn_bin = `which yarn`.chomp
74
- return unless yarn_bin.present? && (installer_path = bin_path_from(yarn_bin)).present?
74
+ return if yarn_bin.blank?
75
75
 
76
- mjml_bin = File.join(installer_path, 'mjml')
76
+ stdout, _, status = Open3.capture3("#{yarn_bin} bin mjml")
77
+ return unless status.success?
78
+
79
+ mjml_bin = stdout.chomp
77
80
  return mjml_bin if check_version(mjml_bin)
81
+ rescue Errno::ENOENT # package manager is not installed
82
+ nil
78
83
  end
79
84
 
80
85
  def self.check_for_npm_mjml_binary
81
86
  npm_bin = `which npm`.chomp
82
- return unless npm_bin.present? && (installer_path = bin_path_from(npm_bin)).present?
87
+ return if npm_bin.blank?
83
88
 
84
- mjml_bin = File.join(installer_path, 'mjml')
89
+ stdout, _, status = Open3.capture3("#{npm_bin} root")
90
+ return unless status.success?
91
+
92
+ mjml_bin = File.join(stdout.chomp, '.bin', 'mjml')
85
93
  return mjml_bin if check_version(mjml_bin)
94
+ rescue Errno::ENOENT # package manager is not installed
95
+ nil
86
96
  end
87
97
 
88
98
  def self.check_for_global_mjml_binary
@@ -90,16 +100,6 @@ module Mjml
90
100
  return mjml_bin if mjml_bin.present? && check_version(mjml_bin)
91
101
  end
92
102
 
93
- def self.bin_path_from(package_manager)
94
- stdout, _, status = Open3.capture3("#{package_manager} bin")
95
-
96
- return unless status.success?
97
-
98
- stdout.chomp
99
- rescue Errno::ENOENT # package manager is not installed
100
- nil
101
- end
102
-
103
103
  def self.discover_mjml_bin
104
104
  logger.warn('`Mjml.discover_mjml_bin` is deprecated and has no effect anymore! ' \
105
105
  'Please use `Mjml.mjml_binary=` to set a custom MJML binary.')
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.8.0
4
+ version: 4.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Loffler
@@ -11,31 +11,32 @@ bindir: bin
11
11
  cert_chain:
12
12
  - |
13
13
  -----BEGIN CERTIFICATE-----
14
- MIIEPDCCAqSgAwIBAgIBATANBgkqhkiG9w0BAQsFADAkMSIwIAYDVQQDDBlzaWdo
15
- bW9uL0RDPXNpZ2htb24vREM9Y29tMB4XDTIxMTIxODA1MDcyM1oXDTIyMTIxODA1
16
- MDcyM1owJDEiMCAGA1UEAwwZc2lnaG1vbi9EQz1zaWdobW9uL0RDPWNvbTCCAaIw
17
- DQYJKoZIhvcNAQEBBQADggGPADCCAYoCggGBALvTbM9xGlGQ9pByLEAJjAqc6U76
18
- 64uCOSIkgIFbC4iQdU5vzB/w4Y+mjgkH4oMsuW2NQfFBV+xI3jxQA0dN4qMgHooB
19
- AWT/CSk0AAqTY1qCfCSASHLUWb5ZxURvsHmlXX/HCLX9bPcaYB0nQ+VT/u0lCicZ
20
- beXMczHsNAj8f3ZJWDR9mw5OYc6cdGHM7Se3sqrmEsMYL9s8d08tChDcllx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pZ2htb25Ac2lnaG1vbi5jb20wDQYJKoZIhvcNAQELBQADggGBAA62EngIqmTY
30
+ f79wEueZU4P8o10SelwvawXFUkPrOyvDoGx/ZmZ7vpo3STuTN7ywS4h+P3V8t9Zt
31
+ e8eQ7Slk99lFuRbDoMaX3ARnB3EMjbpNbh3H+8xo5CrzJpklmU5BV6B91Clz3Bou
32
+ 3vdY9D4lZ01s0LgMQsfLwOsKyHeWCEPVwkGdXl4bb/FKpsm0veicKxW3+3F5J+nB
33
+ zGDjFWsrjpgaq1wYzfO79NEmqrJwZFQM8SoOG89Jwo3iPzJ1mC0UlQx1E+wDakRQ
34
+ fjE20735cJoU1+WIKO6DLH/mHXDQ+Nrw+9zOWTizoV6at1QSvR1r4cM3u8TQGpIv
35
+ yjLIXbfSrriclRt4wg6Xlra1F3Jlm3DJMp9w5cRT+knQdTprNEft1lA2cVjczatt
36
+ RhdbGYd5Hku1QRVeQ+tN2OYG1/vZeRTqZ4MGLdl6r4iO5XGtWWoR2alg8kKc6yLx
37
+ P5J+9tLKId50fAv4voQg//wRwePPNiWIXsLUa1LPYWTAznKTvi3dAQ==
37
38
  -----END CERTIFICATE-----
38
- date: 2022-10-02 00:00:00.000000000 Z
39
+ date: 2023-05-12 00:00:00.000000000 Z
39
40
  dependencies:
40
41
  - !ruby/object:Gem::Dependency
41
42
  name: byebug
@@ -175,12 +176,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
176
  - !ruby/object:Gem::Version
176
177
  version: '0'
177
178
  requirements: []
178
- rubygems_version: 3.1.6
179
+ rubygems_version: 3.4.10
179
180
  signing_key:
180
181
  specification_version: 4
181
182
  summary: MJML + ERb templates
182
183
  test_files:
183
184
  - test/generator_test.rb
184
- - test/parser_test.rb
185
185
  - test/mjml_test.rb
186
+ - test/parser_test.rb
186
187
  - test/test_helper.rb
metadata.gz.sig CHANGED
Binary file