postmark 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,10 @@
1
1
  = Changelog
2
2
 
3
+ == 0.9.1
4
+
5
+ * Fixed TypeError when calling Bounce.all.
6
+ * Fixed NoMethodError when trying to read bounce info.
7
+
3
8
  == 0.9.0
4
9
 
5
10
  * Added support for attachments.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.0
1
+ 0.9.1
@@ -1,19 +1,21 @@
1
+ require 'time'
2
+
1
3
  module Postmark
2
4
  class Bounce
3
5
 
4
6
  attr_reader :email, :bounced_at, :type, :details, :name, :id, :server_id, :tag
5
7
 
6
8
  def initialize(values = {})
7
- @id = values["ID"]
8
- @email = values["Email"]
9
- @bounced_at = Time.parse(values["BouncedAt"])
10
- @type = values["Type"]
11
- @name = values["Name"]
12
- @details = values["Details"]
13
- @tag = values["Tag"]
9
+ @id = values["ID"]
10
+ @email = values["Email"]
11
+ @bounced_at = Time.parse(values["BouncedAt"])
12
+ @type = values["Type"]
13
+ @name = values["Name"]
14
+ @details = values["Details"]
15
+ @tag = values["Tag"]
14
16
  @dump_available = values["DumpAvailable"]
15
- @inactive = values["Inactive"]
16
- @can_activate = values["CanActivate"]
17
+ @inactive = values["Inactive"]
18
+ @can_activate = values["CanActivate"]
17
19
  end
18
20
 
19
21
  def inactive?
@@ -42,9 +44,9 @@ module Postmark
42
44
  end
43
45
 
44
46
  def all(options = {})
45
- options[:count] ||= 30
47
+ options[:count] ||= 30
46
48
  options[:offset] ||= 0
47
- Postmark::HttpClient.get("bounces", options).map { |bounce_json| Bounce.new(bounce_json) }
49
+ Postmark::HttpClient.get("bounces", options)['Bounces'].map { |bounce_json| Bounce.new(bounce_json) }
48
50
  end
49
51
 
50
52
  def tags
data/postmark.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{postmark}
8
- s.version = "0.9.0"
8
+ s.version = "0.9.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Petyo Ivanov", "Ilya Sabanin"]
12
- s.date = %q{2010-09-17}
12
+ s.date = %q{2010-09-20}
13
13
  s.description = %q{Ruby gem for sending emails through http://postmarkapp.com HTTP API. It relieas on TMail::Mail for message construction.}
14
14
  s.email = %q{underlog@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -59,7 +59,7 @@ Gem::Specification.new do |s|
59
59
  }
60
60
  s.rdoc_options = ["--charset=UTF-8"]
61
61
  s.require_paths = ["lib"]
62
- s.rubygems_version = %q{1.3.6}
62
+ s.rubygems_version = %q{1.3.7}
63
63
  s.summary = %q{Ruby gem for sending emails through http://postmarkapp.com HTTP API}
64
64
  s.test_files = [
65
65
  "spec/bounce_spec.rb",
@@ -71,7 +71,7 @@ Gem::Specification.new do |s|
71
71
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
72
72
  s.specification_version = 3
73
73
 
74
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
74
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
75
75
  s.add_development_dependency(%q<rspec>, [">= 0"])
76
76
  s.add_development_dependency(%q<cucumber>, [">= 0"])
77
77
  s.add_runtime_dependency(%q<tmail>, [">= 0"])
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postmark
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 57
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 9
8
- - 0
9
- version: 0.9.0
9
+ - 1
10
+ version: 0.9.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Petyo Ivanov
@@ -15,16 +16,18 @@ autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2010-09-17 00:00:00 +02:00
19
+ date: 2010-09-20 00:00:00 +08:00
19
20
  default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
22
23
  name: rspec
23
24
  prerelease: false
24
25
  requirement: &id001 !ruby/object:Gem::Requirement
26
+ none: false
25
27
  requirements:
26
28
  - - ">="
27
29
  - !ruby/object:Gem::Version
30
+ hash: 3
28
31
  segments:
29
32
  - 0
30
33
  version: "0"
@@ -34,9 +37,11 @@ dependencies:
34
37
  name: cucumber
35
38
  prerelease: false
36
39
  requirement: &id002 !ruby/object:Gem::Requirement
40
+ none: false
37
41
  requirements:
38
42
  - - ">="
39
43
  - !ruby/object:Gem::Version
44
+ hash: 3
40
45
  segments:
41
46
  - 0
42
47
  version: "0"
@@ -46,9 +51,11 @@ dependencies:
46
51
  name: tmail
47
52
  prerelease: false
48
53
  requirement: &id003 !ruby/object:Gem::Requirement
54
+ none: false
49
55
  requirements:
50
56
  - - ">="
51
57
  - !ruby/object:Gem::Version
58
+ hash: 3
52
59
  segments:
53
60
  - 0
54
61
  version: "0"
@@ -106,23 +113,27 @@ rdoc_options:
106
113
  require_paths:
107
114
  - lib
108
115
  required_ruby_version: !ruby/object:Gem::Requirement
116
+ none: false
109
117
  requirements:
110
118
  - - ">="
111
119
  - !ruby/object:Gem::Version
120
+ hash: 3
112
121
  segments:
113
122
  - 0
114
123
  version: "0"
115
124
  required_rubygems_version: !ruby/object:Gem::Requirement
125
+ none: false
116
126
  requirements:
117
127
  - - ">="
118
128
  - !ruby/object:Gem::Version
129
+ hash: 3
119
130
  segments:
120
131
  - 0
121
132
  version: "0"
122
133
  requirements: []
123
134
 
124
135
  rubyforge_project:
125
- rubygems_version: 1.3.6
136
+ rubygems_version: 1.3.7
126
137
  signing_key:
127
138
  specification_version: 3
128
139
  summary: Ruby gem for sending emails through http://postmarkapp.com HTTP API