lipwig 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: b7edc14564c6463b4e40b18ecc6833aadbfc1e3c
4
- data.tar.gz: 2f4b269b1116a5ca9fe849d2ae182cd391724d4a
3
+ metadata.gz: 7e8322129e2a9b3ce9a606691507007c3012cdea
4
+ data.tar.gz: 88f4d66c7777e5f57abadbe2d419cb9823099ea7
5
5
  SHA512:
6
- metadata.gz: 93d2fcf69d63fd149ff11650a011bc16491f95aaef75fb110d02d630e93399b266851b33a83d3c075341212e55e28c8d11a37dbe043376a5a6c3e80bfe08879f
7
- data.tar.gz: 049cdea1040d2484d90c0bf7de82426d63ade663bafeec0d6d89c3d676b34218548aefffa75410f403e369a1f6358ec13f53ab9af998d265637c469c90e7a6c9
6
+ metadata.gz: 7e3281a31b8d97a14bc2b7b3015c3bc2ec81ea58b8b2adc4d641d6beeaa87504163456a144ea8577059a2efe8be45c02f5d85376d30bac9c12247a08a0006652
7
+ data.tar.gz: a74d4c209b2d6802b3ad6a8d57b321836865f85544f8d7339a9e8ab7331d7e16768a2ce888c23e4dda419410622925b10c8ed6621c40721f04cbb3cd5a0afdc9
@@ -1,6 +1,6 @@
1
1
  # Lipwig
2
2
 
3
- Lipwig is a small tool that for sending bulk emails in a slightly more friendly vibe than BCC'ing everyone.
3
+ Lipwig is a small tool for sending bulk emails in a slightly more friendly vibe than BCC'ing everyone.
4
4
 
5
5
  ## Why?
6
6
 
@@ -31,6 +31,7 @@ Similar to Jekyll, Lipwig expects email files to be a mixture of YAML and Markdo
31
31
  - - "finn@obfuscated.email.com"
32
32
  - "poe@obfuscated.email.com"
33
33
  - "Kylo Ren <ben@obfuscated.email.com>"
34
+ cc: "General Organa <organa@obfuscated.email.com"
34
35
  ---
35
36
  Hi everyone,
36
37
 
@@ -38,17 +39,19 @@ Similar to Jekyll, Lipwig expects email files to be a mixture of YAML and Markdo
38
39
 
39
40
  As you can see, the recipients value expects an array, and it can contain arrays to send a single email to more than one person. Everything that follows after the `---` is Markdown, and will be rendered as HTML in the resulting email.
40
41
 
42
+ Please note that the CC list accepts either a single value or an array of strings, and will apply to every email.
43
+
41
44
  ### Sending Configuration
42
45
 
43
46
  If you're using Postmark's API, then all you need to set is the `LIPWIG_POSTMARK_API_KEY` environment variable.
44
47
 
45
48
  For SMTP, there's a handful of required environment variables:
46
49
 
47
- * LIPWIG_SMTP_ADDRESS
48
- * LIPWIG_SMTP_PORT
49
- * LIPWIG_SMTP_USERNAME
50
- * LIPWIG_SMTP_PASSWORD
51
- * LIPWIG_SMTP_DOMAIN
50
+ * `LIPWIG_SMTP_ADDRESS`
51
+ * `LIPWIG_SMTP_PORT`
52
+ * `LIPWIG_SMTP_USERNAME`
53
+ * `LIPWIG_SMTP_PASSWORD`
54
+ * `LIPWIG_SMTP_DOMAIN`
52
55
 
53
56
  If you're using SMTP and sending many emails, it's recommended you use the persistent connection approach if your provider supports it, by setting `LIPWIG_SMTP_CONNECTION=true`.
54
57
 
@@ -1,3 +1,3 @@
1
1
  class Lipwig::Email
2
- attr_accessor :from, :subject, :body, :recipients
2
+ attr_accessor :from, :subject, :body, :recipients, :ccs
3
3
  end
@@ -14,6 +14,7 @@ class Lipwig::Parser
14
14
  email.from = frontmatter['from']
15
15
  email.subject = frontmatter['subject']
16
16
  email.recipients = frontmatter['recipients']
17
+ email.ccs = Array frontmatter['cc']
17
18
  email.body = html
18
19
  email
19
20
  end
@@ -23,7 +23,8 @@ class Lipwig::Senders::Postmark < Lipwig::Senders::Abstract
23
23
  :from => from,
24
24
  :to => recipient,
25
25
  :subject => email.subject,
26
- :html_body => email.body
26
+ :html_body => email.body,
27
+ :cc => email.ccs
27
28
  }
28
29
  end
29
30
  end
@@ -11,6 +11,7 @@ class Lipwig::Senders::SMTP < Lipwig::Senders::Abstract
11
11
  mail.to = recipient
12
12
  mail.subject = email.subject
13
13
  mail.body = email.body
14
+ mail.cc = email.ccs
14
15
 
15
16
  begin
16
17
  puts "Delivery To: #{Array(recipient).join(', ')}"
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "lipwig"
5
- spec.version = '0.1.0'
5
+ spec.version = '0.1.1'
6
6
  spec.authors = ["Pat Allan"]
7
7
  spec.email = ["pat@freelancing-gods.com"]
8
8
 
9
- spec.summary = %q{Write group emails in Markdown, send via Postmark.}
9
+ spec.summary = %q{Write group emails in Markdown, send via Postmark or SMTP.}
10
10
  spec.homepage = "https://github.com/pat/lipwig"
11
11
 
12
12
  spec.files = `git ls-files -z`.split("\x0").reject do |file|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lipwig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pat Allan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-11 00:00:00.000000000 Z
11
+ date: 2017-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redcarpet
@@ -85,8 +85,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
85
  version: '0'
86
86
  requirements: []
87
87
  rubyforge_project:
88
- rubygems_version: 2.5.1
88
+ rubygems_version: 2.6.11
89
89
  signing_key:
90
90
  specification_version: 4
91
- summary: Write group emails in Markdown, send via Postmark.
91
+ summary: Write group emails in Markdown, send via Postmark or SMTP.
92
92
  test_files: []