postmark 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
- ---
2
- SHA1:
3
- metadata.gz: c414ac502ae3d54ffecc5b0d6a04a667c1a654c2
4
- data.tar.gz: 908d808ab21e2e296464ba06e7d27e4d8af39585
5
- SHA512:
6
- metadata.gz: 6a4f9cf05ae33f8f0ca016a652cf64bf9efd2c7963c7fd48880f6ea7656247267802a3da886ee43174e8ceecdde33056d8e0339de8ca6a64473e0154ab5f6728
7
- data.tar.gz: da5f57cc564fa14b9110b36e5bd2f6adcf6dc149ba03d092ba1affc0eef337afc3c6ee1be12a3069bc57f37e2b1f34ca177dc684ca4522c5de7f136e6a2a6add
1
+ ---
2
+ SHA1:
3
+ data.tar.gz: cb99b9ac9a2d5bdf8e7821b7ba920c6ef5c130c9
4
+ metadata.gz: 83c5dc42e240a0dd0b400560b5b5f9621ca79e47
5
+ SHA512:
6
+ data.tar.gz: 562a81cdfc164088c052fb8a92293d7e4049381ea248ed8a4b9badc6075c77544d1a54e4113aea20a8a079bd647f0c90930f2c6778bfc4de9c8ccaee404fcdff
7
+ metadata.gz: f7074eea782237a6419e729f37492b89e441647a2a6fe68014db990a683bda16f431f119aa90ac51eb0182efdbc0b4ed317e5f03a24bda04239c62077de076f2
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,9 @@
1
1
  = Changelog
2
2
 
3
+ == 1.3.1
4
+
5
+ * Allow track_open header to be String for compatibility with older versions of the mail gem.
6
+
3
7
  == 1.3.0
4
8
 
5
9
  * Add support for TrackOpens flag of the Delivery API.
data/README.md CHANGED
@@ -366,7 +366,7 @@ message = Mail.new do
366
366
  body '<p>Any group big enough to trample me to death. General ' \
367
367
  'rule of thumb is 36 adults or 70 children.</p>'
368
368
 
369
- track_opens true
369
+ track_opens "true" # Fee free to use true on mail >= 2.3.0
370
370
 
371
371
  delivery_method Mail::Postmark, :api_key => 'your-postmark-api-key'
372
372
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0
1
+ 1.3.1
@@ -30,7 +30,7 @@ module Postmark
30
30
  'Subject' => @message.subject,
31
31
  'Headers' => @message.export_headers,
32
32
  'Tag' => @message.tag.to_s,
33
- 'TrackOpens' => !!@message.track_opens
33
+ 'TrackOpens' => cast_to_bool(@message.track_opens)
34
34
  }
35
35
  end
36
36
 
@@ -42,6 +42,18 @@ module Postmark
42
42
  }
43
43
  end
44
44
 
45
+ protected
46
+
47
+ def cast_to_bool(val)
48
+ if val.is_a?(TrueClass) || val.is_a?(FalseClass)
49
+ val
50
+ elsif val.is_a?(String) && val.downcase == "true"
51
+ true
52
+ else
53
+ false
54
+ end
55
+ end
56
+
45
57
  end
46
58
 
47
59
  end
@@ -1,3 +1,3 @@
1
1
  module Postmark
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.1"
3
3
  end
metadata CHANGED
@@ -1,101 +1,78 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: postmark
3
- version: !ruby/object:Gem::Version
4
- version: 1.3.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.3.1
5
5
  platform: ruby
6
- authors:
6
+ authors:
7
7
  - Petyo Ivanov
8
8
  - Ilya Sabanin
9
9
  - Artem Chistyakov
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-06-05 00:00:00.000000000 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
13
+
14
+ date: 2014-06-05 00:00:00 Z
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
16
17
  name: rake
17
- requirement: !ruby/object:Gem::Requirement
18
- requirements:
19
- - - ">="
20
- - !ruby/object:Gem::Version
21
- version: '0'
22
- type: :runtime
23
18
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- version: '0'
29
- - !ruby/object:Gem::Dependency
30
- name: json
31
- requirement: !ruby/object:Gem::Requirement
32
- requirements:
33
- - - ">="
34
- - !ruby/object:Gem::Version
35
- version: '0'
19
+ requirement: &id001 !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - &id002
22
+ - ">="
23
+ - !ruby/object:Gem::Version
24
+ version: "0"
25
+ version_requirements: *id001
36
26
  type: :runtime
27
+ - !ruby/object:Gem::Dependency
28
+ name: json
37
29
  prerelease: false
38
- version_requirements: !ruby/object:Gem::Requirement
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- version: '0'
43
- - !ruby/object:Gem::Dependency
30
+ requirement: &id003 !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - *id002
33
+ version_requirements: *id003
34
+ type: :runtime
35
+ - !ruby/object:Gem::Dependency
44
36
  name: mail
45
- requirement: !ruby/object:Gem::Requirement
46
- requirements:
47
- - - ">="
48
- - !ruby/object:Gem::Version
49
- version: '0'
50
- type: :development
51
37
  prerelease: false
52
- version_requirements: !ruby/object:Gem::Requirement
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- version: '0'
57
- - !ruby/object:Gem::Dependency
58
- name: activesupport
59
- requirement: !ruby/object:Gem::Requirement
60
- requirements:
61
- - - "~>"
62
- - !ruby/object:Gem::Version
63
- version: '3.0'
38
+ requirement: &id004 !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - *id002
41
+ version_requirements: *id004
64
42
  type: :development
43
+ - !ruby/object:Gem::Dependency
44
+ name: activesupport
65
45
  prerelease: false
66
- version_requirements: !ruby/object:Gem::Requirement
67
- requirements:
68
- - - "~>"
69
- - !ruby/object:Gem::Version
70
- version: '3.0'
71
- - !ruby/object:Gem::Dependency
72
- name: yajl-ruby
73
- requirement: !ruby/object:Gem::Requirement
74
- requirements:
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- version: '0'
46
+ requirement: &id005 !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ~>
49
+ - !ruby/object:Gem::Version
50
+ version: "3.0"
51
+ version_requirements: *id005
78
52
  type: :development
53
+ - !ruby/object:Gem::Dependency
54
+ name: yajl-ruby
79
55
  prerelease: false
80
- version_requirements: !ruby/object:Gem::Requirement
81
- requirements:
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- version: '0'
85
- description: Use this gem to send emails through Postmark HTTP API and retrieve info
86
- about bounces.
56
+ requirement: &id006 !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - *id002
59
+ version_requirements: *id006
60
+ type: :development
61
+ description: Use this gem to send emails through Postmark HTTP API and retrieve info about bounces.
87
62
  email: ilya@wildbit.com
88
63
  executables: []
64
+
89
65
  extensions: []
90
- extra_rdoc_files:
66
+
67
+ extra_rdoc_files:
91
68
  - LICENSE
92
69
  - README.md
93
- files:
94
- - ".document"
95
- - ".gitignore"
96
- - ".rake_tasks"
97
- - ".rspec"
98
- - ".travis.yml"
70
+ files:
71
+ - .document
72
+ - .gitignore
73
+ - .rake_tasks
74
+ - .rspec
75
+ - .travis.yml
99
76
  - CHANGELOG.rdoc
100
77
  - Gemfile
101
78
  - LICENSE
@@ -146,34 +123,31 @@ files:
146
123
  - spec/unit/postmark/message_extensions/mail_spec.rb
147
124
  - spec/unit/postmark_spec.rb
148
125
  homepage: http://postmarkapp.com
149
- licenses:
126
+ licenses:
150
127
  - MIT
151
128
  metadata: {}
152
- post_install_message: "\n ==================\n Thanks for installing the postmark
153
- gem. If you don't have an account, please\n sign up at http://postmarkapp.com/.\n\n
154
- \ Review the README.md for implementation details and examples.\n ==================\n
155
- \ "
156
- rdoc_options:
157
- - "--charset=UTF-8"
158
- require_paths:
129
+
130
+ post_install_message: "\n ==================\n Thanks for installing the postmark gem. If you don't have an account, please\n sign up at http://postmarkapp.com/.\n\n Review the README.md for implementation details and examples.\n ==================\n "
131
+ rdoc_options:
132
+ - --charset=UTF-8
133
+ require_paths:
159
134
  - lib
160
- required_ruby_version: !ruby/object:Gem::Requirement
161
- requirements:
162
- - - ">="
163
- - !ruby/object:Gem::Version
164
- version: '0'
165
- required_rubygems_version: !ruby/object:Gem::Requirement
166
- requirements:
135
+ required_ruby_version: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - *id002
138
+ required_rubygems_version: !ruby/object:Gem::Requirement
139
+ requirements:
167
140
  - - ">="
168
- - !ruby/object:Gem::Version
141
+ - !ruby/object:Gem::Version
169
142
  version: 1.3.7
170
143
  requirements: []
144
+
171
145
  rubyforge_project:
172
- rubygems_version: 2.2.1
146
+ rubygems_version: 2.0.14
173
147
  signing_key:
174
148
  specification_version: 4
175
149
  summary: Official Postmark API wrapper.
176
- test_files:
150
+ test_files:
177
151
  - spec/data/empty.gif
178
152
  - spec/integration/account_api_client_spec.rb
179
153
  - spec/integration/api_client_hashes_spec.rb