popper 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/popper/pop.rb +11 -6
- data/lib/popper/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1e3406d341c988cde361573f865b64aeb4ac361
|
4
|
+
data.tar.gz: 72134565ee83bfa60b68169c81114a02cfdfe91d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2a2038c45c286df78362cb06f2b38d02fdd480d2090926080513078d6af5800428490119ae4f2f3fb388dcae1c9004fa95d51deb91bd27ddf58b18fe6af306f
|
7
|
+
data.tar.gz: 5ce9505522fa84bbd8a6f30b671df5cd230c6b5e37ad81b6a6f645693a8599a94451139e0900d65b2e08e515a407e8cd48c16d93941396e103d1bf6598d01945
|
data/lib/popper/pop.rb
CHANGED
@@ -20,6 +20,7 @@ module Popper
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def self.pop(account)
|
23
|
+
done_uidls = []
|
23
24
|
error_uidls = []
|
24
25
|
Popper.log.info "start popper #{account.name}"
|
25
26
|
connection(account) do |pop|
|
@@ -33,6 +34,10 @@ module Popper
|
|
33
34
|
Popper.log.info "do action:#{mail.subject}"
|
34
35
|
Popper::Action::Git.run(account.action_by_rule(rule), mail) if account.action_by_rule(rule)
|
35
36
|
end
|
37
|
+
done_uidls << m.uidl
|
38
|
+
rescue Net::POPError => e
|
39
|
+
last_uidl(account.name, last_uidl(account.name) + done_uidls)
|
40
|
+
raise e
|
36
41
|
rescue => e
|
37
42
|
error_uidls << m.uidl
|
38
43
|
Popper.log.warn e
|
@@ -83,12 +88,12 @@ module Popper
|
|
83
88
|
Popper.log.info "start prepop #{account.name}"
|
84
89
|
begin
|
85
90
|
connection(account) do |pop|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
91
|
+
uidls = pop.mails.map(&:uidl)
|
92
|
+
last_uidl(
|
93
|
+
account.name,
|
94
|
+
uidls
|
95
|
+
)
|
96
|
+
Popper.log.info "success prepop #{account.name} mail count:#{uidls.count}"
|
92
97
|
end
|
93
98
|
rescue => e
|
94
99
|
Popper.log.warn e
|
data/lib/popper/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: popper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pyama86
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|