mail_fetcher 0.0.2 → 0.0.3

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: b2b9c145d27321e349f33b17aa56c5dcc796c899
4
- data.tar.gz: 01f673555ae9c88ba16fd3d1c304b1e180940489
3
+ metadata.gz: df4344782b7cc7ba4d2606056cf8944b31abf2b0
4
+ data.tar.gz: ba628486ef7ce1f2cb17c9ea79e84c547760309e
5
5
  SHA512:
6
- metadata.gz: 4aa76e4a22aaa7b6f76825181b4f9330d5ca89e8b1799da2ef3a8ef13b1de1a9dfc1b4121d958f8dd5086f603e0f39eac01926f358b5a129fa279f3854ee50fe
7
- data.tar.gz: df19f660f6d909c2758cae2540b4d893a9985139abc70b426c2ff4a54c9d482d93404bc0e63b21b647d016301308aebe317fd67b0956135d89b26e1060599e62
6
+ metadata.gz: 7bad50e3549201746fb7b749b845e35c4a95328aa54fb37c0a5b177d2234f80c41b44b1c3b17bda98faa2fb4a79c2a3183cc17ab57efadec169f34a36aeaa958
7
+ data.tar.gz: 7db1f79c5a39dc6594711934234736720270a5f1deeb1c53f5a58e84c168b047e03a3cfd20a34e1543cd52fb12cd236e5d09ab6e2c02663f5f7dfc791e129a6a
@@ -37,7 +37,7 @@ module MailFetcher
37
37
  else
38
38
  raise InvalidArgument.new('Unsupported server type')
39
39
  end
40
- _client.logger = self.logger if self.logger
40
+ _client.logger = logger
41
41
  _client
42
42
  end
43
43
 
@@ -28,9 +28,11 @@ module MailFetcher
28
28
  @connection.examine('INBOX')
29
29
  search_filter = ['TO', recipient, 'SUBJECT', subject]
30
30
  results = @connection.search(search_filter)
31
- logger.error("Inbox contains #{results.length} messages matching search criteria") if logger && results.length > 1
31
+ puts logger.class if logger
32
+ logger.debug("Inbox contains #{results.length} messages matching search criteria") if logger
32
33
  results.first
33
34
  rescue => e
35
+ puts e.message
34
36
  logger.error("Error while trying trying to find a message in INBOX (#{e.message})") if logger
35
37
  nil
36
38
  end
@@ -1,3 +1,3 @@
1
1
  module MailFetcher
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mail_fetcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitalii Grygoruk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-10 00:00:00.000000000 Z
11
+ date: 2015-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler