apostle 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +7 -0
- data/README.md +12 -2
- data/Rakefile +8 -0
- data/apostle.gemspec +1 -0
- data/lib/apostle/queue.rb +2 -1
- data/lib/apostle/version.rb +1 -1
- data/spec/mail_spec.rb +0 -5
- data/spec/queue_spec.rb +4 -1
- metadata +36 -18
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6dcd90279af99379f9fffe8cfa38fee0d13c8d4a
|
4
|
+
data.tar.gz: 826f4ef613aefb989dc3bbe7b7dcefd56f529dcf
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 943f3847f1295a093c4ce3e9196730720e4e3dcd496643f4d8ad1e9f7fa825961278e3d54b6520c16bb05c08e247af7d1906b819b0c0998d572e19e4377c48cf
|
7
|
+
data.tar.gz: bd0efc035aadf0d7635260bcb0481b438bc62c3015464ae5280be98d364fafbdf2d8950e0cbcba3e2bd3c72be9194487d46eb6dae64d770834e5820dd09a0d64
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
|
-
# Apostle
|
1
|
+
# Apostle Ruby
|
2
|
+
[![Build Status](https://travis-ci.org/apostle/apostle-ruby.png?branch=master)](https://travis-ci.org/apostle/apostle-ruby)
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/apostle.png)](http://badge.fury.io/rb/apostle)
|
2
4
|
|
3
|
-
|
5
|
+
Ruby bindings for [Apostle.io](http://apostle.io)
|
6
|
+
|
7
|
+
## Rails
|
8
|
+
If you're using Rails, you should know that [apostle-rails](https://github.com/apostle/apostle-rails) exists. Knowledge of this Gem is still important however, as `apostle-rails` will bring this gem along for the ride.
|
4
9
|
|
5
10
|
## Installation
|
6
11
|
|
@@ -155,6 +160,11 @@ If delivery to Apostle fails, an exception will be raised. There are various eve
|
|
155
160
|
* `Apostle::Forbidden`: The server returned a 403 response. This should not occur on the delivery API
|
156
161
|
* `Apostle::DeliveryError`: Anything which isn't covered by the above exceptions
|
157
162
|
|
163
|
+
|
164
|
+
## Who
|
165
|
+
Created with ♥ by [Mal Curtis](http://github.com/snikch) ([@snikchnz](http://twitter.com/snikchnz))
|
166
|
+
|
167
|
+
|
158
168
|
## Contributing
|
159
169
|
|
160
170
|
1. Fork it
|
data/Rakefile
CHANGED
data/apostle.gemspec
CHANGED
data/lib/apostle/queue.rb
CHANGED
@@ -101,7 +101,8 @@ module Apostle
|
|
101
101
|
|
102
102
|
req = Net::HTTP::Post.new(
|
103
103
|
"/",
|
104
|
-
'Content-Type' =>'application/json',
|
104
|
+
'Content-Type' => 'application/json',
|
105
|
+
'Apostle-Client' => 'Ruby/' + Apostle::VERSION,
|
105
106
|
"Authorization" => "Bearer #{Apostle.domain_key}")
|
106
107
|
if delivery_api.user
|
107
108
|
req.basic_auth delivery_api.user, delivery_api.password
|
data/lib/apostle/version.rb
CHANGED
data/spec/mail_spec.rb
CHANGED
@@ -21,11 +21,6 @@ describe Apostle::Mail do
|
|
21
21
|
end
|
22
22
|
|
23
23
|
describe "#deliver!" do
|
24
|
-
it "returns raises an exception without a template id" do
|
25
|
-
mail = Apostle::Mail.new nil
|
26
|
-
expect(mail.deliver!).to raise_error(Apostle::DeliveryError, "No template")
|
27
|
-
end
|
28
|
-
|
29
24
|
it "delegates to a queue" do
|
30
25
|
end
|
31
26
|
|
data/spec/queue_spec.rb
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
require_relative 'spec_helper'
|
2
2
|
|
3
|
-
Apostle.domain_key = "abc123"
|
4
3
|
|
5
4
|
describe Apostle::Queue do
|
5
|
+
before do
|
6
|
+
Apostle.domain_key = "abc123"
|
7
|
+
end
|
8
|
+
|
6
9
|
it "sends the auth header" do
|
7
10
|
stub = stub_request(:any, Apostle.delivery_host.to_s).with(
|
8
11
|
headers: { "Authorization" => "Bearer abc123" }
|
metadata
CHANGED
@@ -1,38 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apostle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Mal Curtis
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-12-17 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: minitest
|
16
|
-
requirement:
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
25
27
|
- !ruby/object:Gem::Dependency
|
26
28
|
name: webmock
|
27
|
-
requirement:
|
28
|
-
none: false
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
|
-
- -
|
31
|
+
- - '>='
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: '0'
|
33
34
|
type: :development
|
34
35
|
prerelease: false
|
35
|
-
version_requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
36
55
|
description: ': Send emails via Apostle'
|
37
56
|
email:
|
38
57
|
- mal@sitepoint.com
|
@@ -41,6 +60,7 @@ extensions: []
|
|
41
60
|
extra_rdoc_files: []
|
42
61
|
files:
|
43
62
|
- .gitignore
|
63
|
+
- .travis.yml
|
44
64
|
- Gemfile
|
45
65
|
- LICENSE
|
46
66
|
- README.md
|
@@ -55,30 +75,28 @@ files:
|
|
55
75
|
- spec/spec_helper.rb
|
56
76
|
homepage: http://apostle.io
|
57
77
|
licenses: []
|
78
|
+
metadata: {}
|
58
79
|
post_install_message:
|
59
80
|
rdoc_options: []
|
60
81
|
require_paths:
|
61
82
|
- lib
|
62
83
|
required_ruby_version: !ruby/object:Gem::Requirement
|
63
|
-
none: false
|
64
84
|
requirements:
|
65
|
-
- -
|
85
|
+
- - '>='
|
66
86
|
- !ruby/object:Gem::Version
|
67
87
|
version: '0'
|
68
88
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
|
-
none: false
|
70
89
|
requirements:
|
71
|
-
- -
|
90
|
+
- - '>='
|
72
91
|
- !ruby/object:Gem::Version
|
73
92
|
version: '0'
|
74
93
|
requirements: []
|
75
94
|
rubyforge_project:
|
76
|
-
rubygems_version:
|
95
|
+
rubygems_version: 2.0.3
|
77
96
|
signing_key:
|
78
|
-
specification_version:
|
97
|
+
specification_version: 4
|
79
98
|
summary: ': Send emails via Apostle'
|
80
99
|
test_files:
|
81
100
|
- spec/mail_spec.rb
|
82
101
|
- spec/queue_spec.rb
|
83
102
|
- spec/spec_helper.rb
|
84
|
-
has_rdoc:
|