mailhandler 1.0.34 → 1.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2b329d4b975268c0863e22ca7bdd1c6b0b68749d
4
- data.tar.gz: 8f0a8df3543fb535647995c00d3f7a41fa96c5e2
3
+ metadata.gz: ce6a144521ea4123b5695c64ea2e6d35225405cd
4
+ data.tar.gz: 8c33ce15af819275d7ccb7cae0247586ac7cda18
5
5
  SHA512:
6
- metadata.gz: ae8c4663433e1ba91a603168f90f18b041619559b2e8019d5de1662b72e0670f3d3d1eb04b82a4765953d1afdc00dea0fc55dc7acd7ce50ec0bed0417621d908
7
- data.tar.gz: 1db0cc12950ec81b530da34560536fe834aaac86c606e5f1696ca65ccf30d58c87a829acc762ae4c176142a73609403e5266544b203fd76d4965d9ab0f29ab0e
6
+ metadata.gz: 1e128fa32f6e094999bf2a745461a81fa6e762f2037edbe74be223fd7271b68aa8b37515315af6265613a00e631fc4e79bbb4e6f5b72aabeae5fcbd8ae73f010
7
+ data.tar.gz: da4d35f2fcd17dd90a231b6df1af27f08313468dcc103a5a3253ffd6ec91109f27b851170080219d16f710954f89201ad24ae571743667fc61c22800295a8009
data/.gitignore CHANGED
@@ -2,4 +2,5 @@
2
2
  **/*.rvm
3
3
  **/*.DS_Store
4
4
  **/*.idea
5
+ Gemfile.lock
5
6
 
@@ -11,37 +11,34 @@ module MailHandler
11
11
  attr_accessor :host,
12
12
  :api_token,
13
13
  :use_ssl,
14
- :client
14
+ :client,
15
+ :http_open_timeout,
16
+ :http_read_timeout
15
17
 
16
18
  def initialize(api_token = nil)
17
-
18
19
  @type = :postmark_api
19
20
  @host = DEFAULT_HOST
20
21
  @api_token = api_token
21
22
  @use_ssl = false
22
23
 
24
+ @http_open_timeout = 15
25
+ @http_read_timeout = 15
23
26
  end
24
27
 
25
28
  def send(email)
26
-
27
29
  verify_email(email)
28
30
  init_client
29
31
  client.deliver_message(email)
30
-
31
32
  end
32
33
 
33
34
  def init_client
34
-
35
35
  @client = setup_sending_client
36
-
37
36
  end
38
37
 
39
38
  def setup_sending_client
40
-
41
39
  # clearing cache so valid host is accepted, and not the cached one
42
40
  Postmark::HttpClient.instance_variable_set('@http', nil)
43
- Postmark::ApiClient.new(api_token, http_open_timeout: 15, host: host, secure: @use_ssl)
44
-
41
+ Postmark::ApiClient.new(api_token, http_open_timeout: http_open_timeout, http_read_timeout: http_read_timeout, host: host, secure: @use_ssl)
45
42
  end
46
43
 
47
44
  protected
@@ -1,5 +1,3 @@
1
1
  module MailHandler
2
-
3
- VERSION = '1.0.34'
4
-
2
+ VERSION = '1.0.35'
5
3
  end
data/readme.md CHANGED
@@ -1,4 +1,4 @@
1
- <img src="http://assets.wildbit.com/postmark/blog/images/mailhandler-logo.png" alt="MailHandler Logo" title="MailHandler" width="148" height="149">
1
+ <img src="http://assets.wildbit.com/postmark/misc/mailhandler-logo@2x.png" alt="MailHandler Logo" title="MailHandler" width="148" height="148" align="right">
2
2
 
3
3
  # MailHandler Gem
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailhandler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.34
4
+ version: 1.0.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Balos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-06 00:00:00.000000000 Z
11
+ date: 2018-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mail
@@ -50,7 +50,6 @@ files:
50
50
  - ".gitignore"
51
51
  - ".travis.yml"
52
52
  - Gemfile
53
- - Gemfile.lock
54
53
  - LICENSE
55
54
  - Rakefile
56
55
  - lib/mailhandler.rb
@@ -115,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
114
  version: 1.9.3
116
115
  requirements: []
117
116
  rubyforge_project:
118
- rubygems_version: 2.5.1
117
+ rubygems_version: 2.6.14
119
118
  signing_key:
120
119
  specification_version: 4
121
120
  summary: Postmark email receiving and sending handler.
@@ -1,46 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- coderay (1.1.1)
5
- diff-lcs (1.2.5)
6
- json (2.0.2)
7
- mail (2.6.4)
8
- mime-types (>= 1.16, < 4)
9
- method_source (0.8.2)
10
- mime-types (3.1)
11
- mime-types-data (~> 3.2015)
12
- mime-types-data (3.2016.0521)
13
- postmark (1.9.1)
14
- json
15
- rake
16
- pry (0.10.4)
17
- coderay (~> 1.1.0)
18
- method_source (~> 0.8.1)
19
- slop (~> 3.4)
20
- rake (11.3.0)
21
- rspec (3.5.0)
22
- rspec-core (~> 3.5.0)
23
- rspec-expectations (~> 3.5.0)
24
- rspec-mocks (~> 3.5.0)
25
- rspec-core (3.5.4)
26
- rspec-support (~> 3.5.0)
27
- rspec-expectations (3.5.0)
28
- diff-lcs (>= 1.2.0, < 2.0)
29
- rspec-support (~> 3.5.0)
30
- rspec-mocks (3.5.0)
31
- diff-lcs (>= 1.2.0, < 2.0)
32
- rspec-support (~> 3.5.0)
33
- rspec-support (3.5.0)
34
- slop (3.6.0)
35
-
36
- PLATFORMS
37
- ruby
38
-
39
- DEPENDENCIES
40
- mail
41
- postmark
42
- pry
43
- rspec
44
-
45
- BUNDLED WITH
46
- 1.13.1