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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 45e723926ac1c3cfea8a73810dec40bd439df1f8
4
- data.tar.gz: 0b44ee6246a676772dc86c45fd0dbfa3c53afcf2
3
+ metadata.gz: bdd3419df041ca691f66b0079cb163e7d2e22154
4
+ data.tar.gz: d82ac8e49f0d8b1bbde5c7c47636c50f1e96c46d
5
5
  SHA512:
6
- metadata.gz: 9344fa6c976b5ded44ca09198615b6bf86b25c39102957c8af93e8f7c55314ac712f607df87a2fbfb0e6446d30f657f174ba21aed6682bcf0681c58a76c1e5bf
7
- data.tar.gz: e0a1e977e21981b8f4f5f658a82a221eed32e9e85acf1f5ba3e6722c6f1db050ef92b58a92be2974055bb36a0743be3479db2a7d8372ffb76aafee3001220310
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
- #### Send Email
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
 
@@ -2,7 +2,7 @@ require 'sendpulse/api'
2
2
  require 'base64'
3
3
 
4
4
  module SendPulse
5
- class Smtp < SendPulse::Api
5
+ class SmtpService < SendPulse::Api
6
6
  def send_email(email)
7
7
  return handle_error('Empty email') if email.empty?
8
8
  email[:html] = Base64.encode64(email[:html])
@@ -1,3 +1,3 @@
1
1
  module SendPulse
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
  require 'faker'
3
3
 
4
- describe SendPulse::Smtp do
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::Smtp
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")
@@ -4,5 +4,5 @@ require 'json'
4
4
  Dotenv.load
5
5
 
6
6
  require 'sendpulse/api'
7
- require 'sendpulse/smtp'
7
+ require 'sendpulse/smtp_service'
8
8
  require 'sendpulse/email_service/mailing_list'
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.3
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/smtp.rb
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/smtp_spec.rb
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/smtp_spec.rb
134
+ - spec/lib/sendpulse/smtp_service_spec.rb
135
135
  - spec/spec_helper.rb