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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 90aa927924c06369b38fe9fd749e8e2cd5cbd1aa
4
- data.tar.gz: be0e3502cac365f7722e05f448f9677321ca830f
3
+ metadata.gz: f1e3406d341c988cde361573f865b64aeb4ac361
4
+ data.tar.gz: 72134565ee83bfa60b68169c81114a02cfdfe91d
5
5
  SHA512:
6
- metadata.gz: 5c7b68791a4b48c12b33a57259ead315c3ce8099df5cd3d44e600397f8947bcc37662115a182d69c25407854b2f79995031a460253ee33a9147674afec6c8802
7
- data.tar.gz: b25e0951e10b359009e7fa1ee82fe877f21f92afe64a68c94113104d0a9c2ad72c46f98ff1581a6b999442c4494d182bb567aaf63ea52adc5f191f55c6aa42dc
6
+ metadata.gz: f2a2038c45c286df78362cb06f2b38d02fdd480d2090926080513078d6af5800428490119ae4f2f3fb388dcae1c9004fa95d51deb91bd27ddf58b18fe6af306f
7
+ data.tar.gz: 5ce9505522fa84bbd8a6f30b671df5cd230c6b5e37ad81b6a6f645693a8599a94451139e0900d65b2e08e515a407e8cd48c16d93941396e103d1bf6598d01945
@@ -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
- uidls = pop.mails.map(&:uidl)
87
- last_uidl(
88
- account.name,
89
- uidls
90
- )
91
- Popper.log.info "success prepop #{account.name} mail count:#{uidls.count}"
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
@@ -1,3 +1,3 @@
1
1
  module Popper
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
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.6
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-14 00:00:00.000000000 Z
11
+ date: 2015-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor