mjml-premailer 0.0.2 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2a358282013850d34f730c47e0fff480c6299e97a110f54f5bf2a0702bd5f86d
4
- data.tar.gz: '038f27861c72bbdb7ad86e1630b9aeefca0c34b35ae9a31171003cbf73f4a96c'
3
+ metadata.gz: da90380f48d39def20d78e2974c484dbb540176bf4010196ed5ab36fb44f6f24
4
+ data.tar.gz: ca70ccb98338a08d6d71fc46cfaa71c41408197096f1ceb79110d62972c960ac
5
5
  SHA512:
6
- metadata.gz: 9cd30f41124459faf0f58918893fa67268cdf0ec18d692216d8bdcc66cfa7f0fea2122352f51ac6feb5fecab63f53eb8e49f894961616d081c2e9899aad92879
7
- data.tar.gz: 70caf40a5cdb125f6398986900861533f5f5725660ae3de954cf1cc40d5d82ff5de4a49da7af57d08780ae65967cda2f977144eb889327745f036a1994d14f36
6
+ metadata.gz: 97fd7a408ea16dcaabbb047b3c1d2154fb00002a0381622d59ff8d0008eda242f1783bd356ecb5689f45215c3ca2ec46945014688c4a96587fffb807d4bd0818
7
+ data.tar.gz: 440b42486fb8d56525d5c62c2b279ebf41423ee42f29779d6ce20c8d1ae1c35e8987206e834c033f585699700370977fe8a3888f0a8ddbbbf3e7e75ef9734b58
@@ -21,9 +21,28 @@ Layout/MultilineMethodCallIndentation:
21
21
  Exclude:
22
22
  - 'spec/**/*'
23
23
 
24
- Style/IndentArray:
24
+ Layout/IndentArray:
25
+ Enabled: true
26
+ EnforcedStyle: consistent
27
+
28
+ Layout/IndentHash:
25
29
  Enabled: true
26
30
  EnforcedStyle: consistent
27
31
 
28
32
  Style/ModuleFunction:
29
33
  Enabled: false
34
+
35
+ Style/StringLiterals:
36
+ EnforcedStyle: 'double_quotes'
37
+
38
+ Style/TrailingCommaInHashLiteral:
39
+ EnforcedStyleForMultiline: comma
40
+
41
+ Style/TrailingCommaInArrayLiteral:
42
+ EnforcedStyleForMultiline: comma
43
+
44
+ Layout/AlignHash:
45
+ Enabled: true
46
+ EnforcedHashRocketStyle: table
47
+ EnforcedColonStyle: table
48
+ EnforcedLastArgumentHashStyle: ignore_implicit
data/README.md CHANGED
@@ -101,7 +101,6 @@ MjmlPremailer.config.merge!(
101
101
 
102
102
  More about options [here](https://mjml.io/documentation/#command-line-interface)
103
103
 
104
-
105
104
  ## Difference from other gems
106
105
 
107
106
  [sighmon/mjml-rails](https://github.com/sighmon/mjml-rails):
@@ -111,3 +110,11 @@ More about options [here](https://mjml.io/documentation/#command-line-interface)
111
110
  - best gem I found, this gem is based on it, thanks [kolybasov](https://github.com/kolybasov) for his work
112
111
  - doesnt support mjml v4 (at time of writing)
113
112
  - doesnt support template languages other then erb (at least I didnt managed)
113
+
114
+ ## Hacking
115
+
116
+ ```
117
+ make run_env
118
+ make test
119
+ make publish
120
+ ```
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -1,21 +1,21 @@
1
- require 'mjml-premailer/version'
2
- require 'mjml-premailer/debug'
3
- require 'mjml-premailer/find_executable'
1
+ require "mjml-premailer/version"
2
+ require "mjml-premailer/debug"
3
+ require "mjml-premailer/find_mjml_executable"
4
4
 
5
- require 'mjml-premailer/transform_html'
6
- require 'mjml-premailer/transform_mail'
5
+ require "mjml-premailer/transform_html"
6
+ require "mjml-premailer/transform_mail"
7
7
 
8
- require 'mjml-premailer/mjml_mail'
8
+ require "mjml-premailer/mjml_mail"
9
9
 
10
10
  class MjmlPremailer
11
11
  # from https://github.com/kolybasov/mjml-ruby/blob/master/lib/mjml.rb#L33
12
12
  @config = {
13
- bin: MjmlPremailer::FindExecutable.find_executable,
13
+ bin: MjmlPremailer::FindMjmlExecutable.find_mjml_executable,
14
14
  debug: false,
15
15
  beautify: true,
16
16
  minify: false,
17
17
  keep_comments: false,
18
- validation_level: :skip # :strict/:soft/:skip
18
+ validation_level: :skip, # :strict/:soft/:skip
19
19
  }
20
20
 
21
21
  class << self
@@ -0,0 +1,14 @@
1
+ require "mkmf"
2
+
3
+ class MjmlPremailer
4
+ module FindMjmlExecutable
5
+ extend self
6
+
7
+ def find_mjml_executable
8
+ local_path = File.expand_path("node_modules/.bin/mjml", Dir.pwd)
9
+ return local_path if File.file?(local_path)
10
+
11
+ find_executable("mjml")
12
+ end
13
+ end
14
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mjml-premailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Homa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-08 00:00:00.000000000 Z
11
+ date: 2019-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer
@@ -102,7 +102,7 @@ files:
102
102
  - VERSION
103
103
  - lib/mjml-premailer.rb
104
104
  - lib/mjml-premailer/debug.rb
105
- - lib/mjml-premailer/find_executable.rb
105
+ - lib/mjml-premailer/find_mjml_executable.rb
106
106
  - lib/mjml-premailer/mjml_mail.rb
107
107
  - lib/mjml-premailer/transform_html.rb
108
108
  - lib/mjml-premailer/transform_mail.rb
@@ -1,11 +0,0 @@
1
- class MjmlPremailer
2
- module FindExecutable
3
- extend self
4
-
5
- def find_executable
6
- local_path = File.expand_path('node_modules/.bin/mjml', Dir.pwd)
7
- return local_path if File.file?(local_path)
8
- `/usr/bin/env bash -c "which mjml"`.strip
9
- end
10
- end
11
- end