sendgrid_toolkit 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.1
1
+ 1.0.2
@@ -18,7 +18,9 @@ module SendgridToolkit
18
18
 
19
19
  def delete(options = {})
20
20
  response = api_post(module_name, 'delete', options)
21
- raise EmailDoesNotExist if response['message'].include?('does not exist')
21
+ if !response["message"].nil?
22
+ raise EmailDoesNotExist if response['message'].include?('does not exist')
23
+ end
22
24
  response
23
25
  end
24
26
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sendgrid_toolkit}
8
- s.version = "1.0.1"
8
+ s.version = "1.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Robby Grossman"]
12
- s.date = %q{2010-09-10}
12
+ s.date = %q{2010-09-27}
13
13
  s.description = %q{A Ruby wrapper and utility library for communicating with the Sendgrid API}
14
14
  s.email = %q{robby@freerobby.com}
15
15
  s.extra_rdoc_files = [
@@ -41,6 +41,12 @@ describe SendgridToolkit::Bounces do
41
41
  @obj.delete :email => "user@domain.com"
42
42
  }.should raise_error SendgridToolkit::EmailDoesNotExist
43
43
  end
44
+ it "does not choke if response does not have a 'message' field" do
45
+ FakeWeb.register_uri(:post, %r|https://sendgrid\.com/api/bounces\.delete\.json\?.*email=.+|, :body => 'An internal server error occurred. Please try again later.')
46
+ lambda {
47
+ @obj.delete :email => "user@domain.com"
48
+ }.should_not raise_error
49
+ end
44
50
  end
45
51
 
46
52
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sendgrid_toolkit
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 1
10
- version: 1.0.1
9
+ - 2
10
+ version: 1.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Robby Grossman
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-10 00:00:00 -04:00
18
+ date: 2010-09-27 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency