simple_postmark18 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,185 +1,133 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: simple_postmark18
3
- version: !ruby/object:Gem::Version
4
- hash: 15
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.1
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 4
9
- - 0
10
- version: 0.4.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Mario Uher
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-02-12 00:00:00 +01:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2012-04-06 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: activesupport
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70141770828260 !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
18
+ requirements:
27
19
  - - ~>
28
- - !ruby/object:Gem::Version
29
- hash: 7
30
- segments:
31
- - 3
32
- - 0
33
- version: "3.0"
20
+ - !ruby/object:Gem::Version
21
+ version: '3.0'
34
22
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: httparty
38
23
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *70141770828260
25
+ - !ruby/object:Gem::Dependency
26
+ name: httparty
27
+ requirement: &70141770827860 !ruby/object:Gem::Requirement
40
28
  none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- hash: 3
45
- segments:
46
- - 0
47
- version: "0"
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
48
33
  type: :runtime
49
- version_requirements: *id002
50
- - !ruby/object:Gem::Dependency
51
- name: json
52
34
  prerelease: false
53
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *70141770827860
36
+ - !ruby/object:Gem::Dependency
37
+ name: json
38
+ requirement: &70141770827400 !ruby/object:Gem::Requirement
54
39
  none: false
55
- requirements:
56
- - - ">="
57
- - !ruby/object:Gem::Version
58
- hash: 3
59
- segments:
60
- - 0
61
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
62
44
  type: :runtime
63
- version_requirements: *id003
64
- - !ruby/object:Gem::Dependency
65
- name: mail
66
45
  prerelease: false
67
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *70141770827400
47
+ - !ruby/object:Gem::Dependency
48
+ name: mail
49
+ requirement: &70141770826980 !ruby/object:Gem::Requirement
68
50
  none: false
69
- requirements:
70
- - - ">="
71
- - !ruby/object:Gem::Version
72
- hash: 3
73
- segments:
74
- - 0
75
- version: "0"
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
76
55
  type: :runtime
77
- version_requirements: *id004
78
- - !ruby/object:Gem::Dependency
79
- name: minitest
80
56
  prerelease: false
81
- requirement: &id005 !ruby/object:Gem::Requirement
57
+ version_requirements: *70141770826980
58
+ - !ruby/object:Gem::Dependency
59
+ name: minitest
60
+ requirement: &70141770826560 !ruby/object:Gem::Requirement
82
61
  none: false
83
- requirements:
84
- - - ">="
85
- - !ruby/object:Gem::Version
86
- hash: 3
87
- segments:
88
- - 0
89
- version: "0"
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
90
66
  type: :development
91
- version_requirements: *id005
92
- - !ruby/object:Gem::Dependency
93
- name: purdytest
94
67
  prerelease: false
95
- requirement: &id006 !ruby/object:Gem::Requirement
68
+ version_requirements: *70141770826560
69
+ - !ruby/object:Gem::Dependency
70
+ name: purdytest
71
+ requirement: &70141770826140 !ruby/object:Gem::Requirement
96
72
  none: false
97
- requirements:
98
- - - ">="
99
- - !ruby/object:Gem::Version
100
- hash: 3
101
- segments:
102
- - 0
103
- version: "0"
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
104
77
  type: :development
105
- version_requirements: *id006
106
- - !ruby/object:Gem::Dependency
107
- name: rails
108
78
  prerelease: false
109
- requirement: &id007 !ruby/object:Gem::Requirement
79
+ version_requirements: *70141770826140
80
+ - !ruby/object:Gem::Dependency
81
+ name: rails
82
+ requirement: &70141770874740 !ruby/object:Gem::Requirement
110
83
  none: false
111
- requirements:
84
+ requirements:
112
85
  - - ~>
113
- - !ruby/object:Gem::Version
114
- hash: 7
115
- segments:
116
- - 3
117
- - 0
118
- version: "3.0"
86
+ - !ruby/object:Gem::Version
87
+ version: '3.0'
119
88
  type: :development
120
- version_requirements: *id007
121
- - !ruby/object:Gem::Dependency
122
- name: webmock
123
89
  prerelease: false
124
- requirement: &id008 !ruby/object:Gem::Requirement
90
+ version_requirements: *70141770874740
91
+ - !ruby/object:Gem::Dependency
92
+ name: webmock
93
+ requirement: &70141770874320 !ruby/object:Gem::Requirement
125
94
  none: false
126
- requirements:
127
- - - ">="
128
- - !ruby/object:Gem::Version
129
- hash: 3
130
- segments:
131
- - 0
132
- version: "0"
95
+ requirements:
96
+ - - ! '>='
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
133
99
  type: :development
134
- version_requirements: *id008
135
- description: "SimplePostmark makes it easy to send mails via Postmark\xE2\x84\xA2 using Rails 3's ActionMailer."
100
+ prerelease: false
101
+ version_requirements: *70141770874320
102
+ description: SimplePostmark makes it easy to send mails via Postmark™ using Rails
103
+ 3's ActionMailer.
136
104
  email: uher.mario@gmail.com
137
105
  executables: []
138
-
139
106
  extensions: []
140
-
141
107
  extra_rdoc_files: []
142
-
143
- files:
144
- - lib/simple_postmark/delivery_method.rb
145
- - lib/simple_postmark/mail_ext/message.rb
146
- - lib/simple_postmark/mail_ext/part.rb
147
- - lib/simple_postmark/railtie.rb
148
- - lib/simple_postmark/version.rb
149
- - lib/simple_postmark.rb
150
- has_rdoc: true
151
- homepage: https://www.github.com/haihappen/simple_postmark
108
+ files: []
109
+ homepage: http://haihappen.github.com/simple_postmark
152
110
  licenses: []
153
-
154
111
  post_install_message:
155
112
  rdoc_options: []
156
-
157
- require_paths:
113
+ require_paths:
158
114
  - lib
159
- required_ruby_version: !ruby/object:Gem::Requirement
115
+ required_ruby_version: !ruby/object:Gem::Requirement
160
116
  none: false
161
- requirements:
162
- - - ">="
163
- - !ruby/object:Gem::Version
164
- hash: 3
165
- segments:
166
- - 0
167
- version: "0"
168
- required_rubygems_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ! '>='
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
121
+ required_rubygems_version: !ruby/object:Gem::Requirement
169
122
  none: false
170
- requirements:
171
- - - ">="
172
- - !ruby/object:Gem::Version
173
- hash: 3
174
- segments:
175
- - 0
176
- version: "0"
123
+ requirements:
124
+ - - ! '>='
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
177
127
  requirements: []
178
-
179
128
  rubyforge_project:
180
- rubygems_version: 1.6.2
129
+ rubygems_version: 1.8.11
181
130
  signing_key:
182
131
  specification_version: 3
183
- summary: "A simple way to use Postmark\xE2\x84\xA2 with your Rails app."
132
+ summary: A simple way to use Postmark with your Rails app.
184
133
  test_files: []
185
-
@@ -1,19 +0,0 @@
1
- module Mail
2
- class SimplePostmark
3
- include HTTParty
4
-
5
- def initialize(values)
6
- self.settings = { :api_key => '********-****-****-****-************' }.merge(values)
7
- end
8
-
9
- attr_accessor :settings
10
- base_uri 'http://api.postmarkapp.com'
11
- headers 'Accept' => 'application/json', 'ContentType' => 'application/json'
12
-
13
- def deliver!(mail)
14
- api_key = { 'X-Postmark-Server-Token' => settings[:api_key].to_s }
15
-
16
- self.class.post('/email', :headers => self.class.headers.merge(api_key), :body => mail.to_postmark.to_json)
17
- end
18
- end
19
- end
@@ -1,37 +0,0 @@
1
- module Mail
2
- class Message
3
- def html_body
4
- if html_part.present?
5
- html_part.to_postmark['Content']
6
- else
7
- body if content_type.to_s.include?('text/html')
8
- end
9
- end
10
-
11
- def tag(val = nil)
12
- default(:tag, val)
13
- end
14
-
15
- def tag=(val)
16
- header[:tag] = val
17
- end
18
-
19
- def text_body
20
- text_part.present? ? text_part.to_postmark['Content'] : body
21
- end
22
-
23
- def to_postmark
24
- hash = {}
25
-
26
- %w[attachments bcc cc from html_body reply_to subject tag text_body to].each do |key|
27
- hash[key.camelcase] = case (value = send(key).presence or next)
28
- when AttachmentsList then value.map(&:to_postmark)
29
- when Array then value.join(', ')
30
- else value.to_s
31
- end
32
- end
33
-
34
- hash
35
- end
36
- end
37
- end
@@ -1,11 +0,0 @@
1
- module Mail
2
- class Part
3
- def to_postmark
4
- {}.tap do |hash|
5
- hash['Content'] = attachment? ? [read].pack('m') : body.to_s
6
- hash['ContentType'] = mime_type
7
- hash['Name'] = filename
8
- end
9
- end
10
- end
11
- end
@@ -1,5 +0,0 @@
1
- module SimplePostmark
2
- class Railtie < ::Rails::Railtie
3
- ActionMailer::Base.add_delivery_method(:simple_postmark, Mail::SimplePostmark, :api_key => nil)
4
- end
5
- end
@@ -1,3 +0,0 @@
1
- module SimplePostmark
2
- VERSION = '0.4.0'
3
- end
@@ -1,14 +0,0 @@
1
- require 'active_support/core_ext/object/blank'
2
- require 'active_support/inflector/methods'
3
- require 'httparty'
4
- require 'json'
5
- require 'mail'
6
-
7
- module SimplePostmark
8
- require 'simple_postmark/mail_ext/message'
9
- require 'simple_postmark/mail_ext/part'
10
-
11
- require 'simple_postmark/delivery_method'
12
-
13
- require 'simple_postmark/railtie' if defined?(Rails)
14
- end