sendpulse 0.0.3 → 0.0.4
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 +4 -4
- data/README.md +2 -35
- data/lib/sendpulse/{smtp.rb → smtp_service.rb} +1 -1
- data/lib/sendpulse/version.rb +1 -1
- data/spec/lib/sendpulse/{smtp_spec.rb → smtp_service_spec.rb} +2 -2
- data/spec/spec_helper.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bdd3419df041ca691f66b0079cb163e7d2e22154
|
|
4
|
+
data.tar.gz: d82ac8e49f0d8b1bbde5c7c47636c50f1e96c46d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 483017ffb051c6135e654db121d29b5dd5618a89271f15a0581f8d0e73531c80bea0762ebf58cbae04713f0a4c9f07db2c19ad11df4566fdf343a6e632894c7f
|
|
7
|
+
data.tar.gz: 4ad4d39e5e2b1434a15273a0d1b60511130c79ba8e193d352552de95f101c79c526555b9800c073fc47420c83af5272c254370a57a1893ab921afd6ffd75bee0
|
data/README.md
CHANGED
|
@@ -9,41 +9,8 @@ Ruby client for [SendPulse](https://sendpulse.com/)
|
|
|
9
9
|
### Email Service
|
|
10
10
|
1. [Mailing lists](https://github.com/yogahp/SendPulse/wiki/Mailing-lists)
|
|
11
11
|
|
|
12
|
-
### SMTP
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
```ruby
|
|
16
|
-
require 'sendpulse/smtp'
|
|
17
|
-
|
|
18
|
-
email = {
|
|
19
|
-
html: '<html><body><h1>HTML</h1></body></html>',
|
|
20
|
-
text: 'Text',
|
|
21
|
-
subject: 'Subject',
|
|
22
|
-
from: {
|
|
23
|
-
name: 'Sender Name',
|
|
24
|
-
email: 'sender@example.com'
|
|
25
|
-
},
|
|
26
|
-
to: [
|
|
27
|
-
{
|
|
28
|
-
name: 'Receiver Name',
|
|
29
|
-
email: 'receiver@example.com'
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
sendpulse_smtp = SendPulse::Smtp.new(your_client_id, your_client_secret, 'https', nil)
|
|
35
|
-
sendpulse_smtp.send_email(email)
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
#### Retrieve Emails
|
|
39
|
-
|
|
40
|
-
```ruby
|
|
41
|
-
require 'sendpulse/smtp'
|
|
42
|
-
|
|
43
|
-
sendpulse_smtp = SendPulse::Smtp.new(your_client_id, your_client_secret, 'https', nil)
|
|
44
|
-
sendpulse_smtp.retrieve_emails
|
|
45
|
-
```
|
|
46
|
-
|
|
12
|
+
### SMTP Service
|
|
13
|
+
[SMTP Service](https://github.com/yogahp/SendPulse/wiki/SMTP)
|
|
47
14
|
|
|
48
15
|
[Here](https://sendpulse.com/integrations/api) is SendPulse API specification.
|
|
49
16
|
|
data/lib/sendpulse/version.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
2
|
require 'faker'
|
|
3
3
|
|
|
4
|
-
describe SendPulse::
|
|
4
|
+
describe SendPulse::SmtpService do
|
|
5
5
|
before(:each) do
|
|
6
6
|
@client_id = ENV['CLIENT_ID']
|
|
7
7
|
@client_secret = ENV['CLIENT_SECRET']
|
|
@@ -29,7 +29,7 @@ describe SendPulse::Smtp do
|
|
|
29
29
|
let(:retrieve_emails) { sendpulse_smtp.retrieve_emails }
|
|
30
30
|
|
|
31
31
|
it do
|
|
32
|
-
expect(sendpulse_smtp).to be_a SendPulse::
|
|
32
|
+
expect(sendpulse_smtp).to be_a SendPulse::SmtpService
|
|
33
33
|
expect(send_email[:data]).to eql({ "result" => true })
|
|
34
34
|
expect(retrieve_emails[:data][0]).to include("id")
|
|
35
35
|
expect(retrieve_emails[:data][0]).to include("sender")
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sendpulse
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yoga Hapriana
|
|
@@ -98,11 +98,11 @@ files:
|
|
|
98
98
|
- lib/sendpulse/api.rb
|
|
99
99
|
- lib/sendpulse/email_service/mailing_list.rb
|
|
100
100
|
- lib/sendpulse/host.rb
|
|
101
|
-
- lib/sendpulse/
|
|
101
|
+
- lib/sendpulse/smtp_service.rb
|
|
102
102
|
- lib/sendpulse/version.rb
|
|
103
103
|
- spec/lib/sendpulse/api_spec.rb
|
|
104
104
|
- spec/lib/sendpulse/email_service/mailing_list_spec.rb
|
|
105
|
-
- spec/lib/sendpulse/
|
|
105
|
+
- spec/lib/sendpulse/smtp_service_spec.rb
|
|
106
106
|
- spec/spec_helper.rb
|
|
107
107
|
homepage: https://github.com/yogahp/SendPulse
|
|
108
108
|
licenses:
|
|
@@ -131,5 +131,5 @@ summary: Client to http://sendpulse.com/ API.
|
|
|
131
131
|
test_files:
|
|
132
132
|
- spec/lib/sendpulse/api_spec.rb
|
|
133
133
|
- spec/lib/sendpulse/email_service/mailing_list_spec.rb
|
|
134
|
-
- spec/lib/sendpulse/
|
|
134
|
+
- spec/lib/sendpulse/smtp_service_spec.rb
|
|
135
135
|
- spec/spec_helper.rb
|