clacks 1.0.4 → 1.0.5
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 +9 -9
- data/clacks.gemspec +1 -0
- data/lib/clacks/service.rb +4 -3
- data/lib/clacks/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
YWM1MmUwNDEzYTU0NmY0M2FlZWVkODUxN2U1MGUyYWEwZTI0NWQ2Zg==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
ZjI2OTQ4ZTBkYjNhMjU5MjExMDFjMzk5OWQyMzk2NDFjNzA1N2E4OA==
|
|
7
|
+
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
ZDZiZjU5MGViYTY1MzUzZjNiZTEzOTk0MmE4NDljNWZjMjVjNDc4ZTVmMGI4
|
|
10
|
+
ZjNlMDE1OTBiZmRiMDE5MzAxNTMwNjRkM2FkZTVlYjQzMjZjMmYzODU3Y2Ix
|
|
11
|
+
ZGFhMDAyYjZmZmQ5YmJiMDE3YmM0YzAxMTk5MDI4ZDYxNjViMDE=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
ZWZlMDZmYTM3MTZjMGFmNjQ2YmRlNWNiYzQ1YzkwNDhjZjM1NGJhYTk4MjZk
|
|
14
|
+
NzVhMzdiNzE2YmQ5MjY1N2E3MzQ3MzMyYmYxYjNhZDYzNDg0N2ZlYTk3MWY3
|
|
15
|
+
MjhlYTUxMjcyYzZlYmMzNWQxM2JkMTZjZjM0ZTE2OGFkZDJkMmM=
|
data/clacks.gemspec
CHANGED
|
@@ -8,6 +8,7 @@ Gem::Specification.new do |s|
|
|
|
8
8
|
s.platform = Gem::Platform::RUBY
|
|
9
9
|
s.authors = ["ITRP"]
|
|
10
10
|
s.email = %q{mathijs.sterk@itrp.com}
|
|
11
|
+
s.license = 'MIT'
|
|
11
12
|
s.homepage = %q{http://github.com/itrp/clacks}
|
|
12
13
|
s.summary = %q{Clacks system for receiving emails}
|
|
13
14
|
s.description = %q{Clacks system for receiving emails to be processed in ruby}
|
data/lib/clacks/service.rb
CHANGED
|
@@ -139,9 +139,10 @@ module Clacks
|
|
|
139
139
|
break if stopping?
|
|
140
140
|
source = imap.uid_fetch(uid, ['RFC822']).first.attr['RFC822']
|
|
141
141
|
break if stopping?
|
|
142
|
-
mail =
|
|
143
|
-
mail.mark_for_delete = true if options[:delete_after_find]
|
|
142
|
+
mail = nil
|
|
144
143
|
begin
|
|
144
|
+
mail = Mail.new(source)
|
|
145
|
+
mail.mark_for_delete = true if options[:delete_after_find]
|
|
145
146
|
Clacks.config[:on_mail].call(mail)
|
|
146
147
|
rescue Exception => e
|
|
147
148
|
Clacks.logger.debug(e.message)
|
|
@@ -149,7 +150,7 @@ module Clacks
|
|
|
149
150
|
end
|
|
150
151
|
begin
|
|
151
152
|
imap.uid_copy(uid, options[:archivebox]) if options[:archivebox]
|
|
152
|
-
if options[:delete_after_find] && mail.is_marked_for_delete?
|
|
153
|
+
if options[:delete_after_find] && (mail.nil? || mail.is_marked_for_delete?)
|
|
153
154
|
imap.uid_store(uid, "+FLAGS", [Net::IMAP::DELETED])
|
|
154
155
|
end
|
|
155
156
|
rescue Exception => e
|
data/lib/clacks/version.rb
CHANGED
metadata
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
name: clacks
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
version: !binary |-
|
|
5
|
-
|
|
5
|
+
MS4wLjU=
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- ITRP
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2014-05-16 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: mail
|
|
@@ -72,7 +72,8 @@ files:
|
|
|
72
72
|
- clacks.gemspec
|
|
73
73
|
- bin/clacks
|
|
74
74
|
homepage: http://github.com/itrp/clacks
|
|
75
|
-
licenses:
|
|
75
|
+
licenses:
|
|
76
|
+
- MIT
|
|
76
77
|
metadata: {}
|
|
77
78
|
post_install_message:
|
|
78
79
|
rdoc_options:
|
|
@@ -91,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
91
92
|
version: '0'
|
|
92
93
|
requirements: []
|
|
93
94
|
rubyforge_project:
|
|
94
|
-
rubygems_version: 2.
|
|
95
|
+
rubygems_version: 2.1.11
|
|
95
96
|
signing_key:
|
|
96
97
|
specification_version: 4
|
|
97
98
|
summary: Clacks system for receiving emails
|