herbes 0.0.7 → 0.0.8

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: 606c1b624127d6aacf29b9d8fd6e9ec8882bd1c9310e333cd30686f89664b538
4
- data.tar.gz: d9020b237aa2442f3421166e7cc3613ab5461d4eea6d8b4969456d2c8046408c
3
+ metadata.gz: 2bf4544710790140678482a730056a7c022339651069dc5ee99c688789fb6b56
4
+ data.tar.gz: a7fd826fd9e4916c7868a32db3a09ab4d83224cf08073a0355c800de4de43e45
5
5
  SHA512:
6
- metadata.gz: 85cb1f13d37eb375cb5997a0970e0646ec1e5772dedff6ccd2afed22aa15717bddc1e96fdd4fd970c4e8839a7b1a9678ee2df3c95510b70702c7aa59a9474cf3
7
- data.tar.gz: 494753e103954369d176051f0a027e6e1f31b2b0d91484893736a13a275cc2abda6303525d7afdd202a9259d771f20c4f8361447999358be91ee049567e79952
6
+ metadata.gz: 88b3e75ee4e9646d12cf1927949d45a821cc110c7787cb866a496c069d345af38b10ecaeb9e74a6c5096880cdb3cd86bb0c0bd2d8b78c784af7b55daa4060afe
7
+ data.tar.gz: 4cab455ec4992bb19dd43d9791a0b63fddba33a799cd120b219dec148eb38b4787b0f653dc744be77189a0377c4c3f5940cbd3da64cc0d34da0b4490b1737e90
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- herbes (0.0.7)
4
+ herbes (0.0.8)
5
5
  nokogiri
6
6
  premailer
7
7
 
data/README.md CHANGED
@@ -63,3 +63,12 @@ Herbes::Email.render(params, template_path: 'template.html.erb', style_path: 'st
63
63
  Herbes::Email.render(params, style_string: custom_css)
64
64
 
65
65
  ```
66
+
67
+ #### extending default style
68
+
69
+ ```ruby
70
+
71
+ Herbes::Email.render(params, extend_default_style: true, style_string: custom_css)
72
+ Herbes::Email.render(params, extend_default_style: true, style_path: 'style.css')
73
+
74
+ ```
@@ -6,7 +6,7 @@ require 'premailer'
6
6
 
7
7
  module Herbes
8
8
  class Email < OpenStruct
9
- def render_style(path = Herbes::Constants::DEFAULT_EMAIL_STYLE_PATH)
9
+ def render_style(path = Constants::DEFAULT_EMAIL_STYLE_PATH)
10
10
  File.read(path)
11
11
  end
12
12
 
@@ -29,12 +29,12 @@ module Herbes
29
29
  end
30
30
 
31
31
  def render_template(path = nil)
32
- path ||= Herbes::Constants::DEFAULT_EMAIL_TEMPLATE_PATH
32
+ path ||= Constants::DEFAULT_EMAIL_TEMPLATE_PATH
33
33
  render_html(File.read(path))
34
34
  end
35
35
 
36
36
  def render_inline_template(path = nil, premailer_options = {})
37
- path ||= Herbes::Constants::DEFAULT_EMAIL_TEMPLATE_PATH
37
+ path ||= Constants::DEFAULT_EMAIL_TEMPLATE_PATH
38
38
  Premailer.new(
39
39
  render_template(path),
40
40
  [
@@ -51,9 +51,9 @@ module Herbes
51
51
  premailer = options[:premailer] || {}
52
52
 
53
53
  # remove unicode space as it fails aws cognito regex
54
- Herbes::Email.new(params, options)
55
- .render_inline_template(path, premailer)
56
- .gsub("\u00A0", '')
54
+ new(params, options)
55
+ .render_inline_template(path, premailer)
56
+ .gsub("\u00A0", '')
57
57
  end
58
58
  end
59
59
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Herbes
4
- VERSION = '0.0.7'
4
+ VERSION = '0.0.8'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: herbes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - haydenmcfarland