popper 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/popper/config.rb +1 -1
- data/lib/popper/mail_account.rb +3 -3
- data/lib/popper/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1f177574cbba416abc0f15dbfb541ac2ae23673fb8ec6e9be01cee28c8f06f6d
|
4
|
+
data.tar.gz: d1b341b3f9c1c9a0585ce8014fc505bafc27e82d1427e82bfb6fd2139885f4a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d01e96981d57441ed98fe50ed76d7245b37f9117099a371cdd3090fa7574e1e90cc26645bd8be32b12852c80cfec7518d510e2e526fbfc0f8415c8eac4f0a0e5
|
7
|
+
data.tar.gz: 4179b85dcb9b0d32ae5e68e9d2dd810bcf4e10c7de241d26b9f262fda8447b1258b078d496e1845a273dfe25a151933e4fe6c73e6d9ad63cf40d6b9379f0d33b
|
data/lib/popper/config.rb
CHANGED
data/lib/popper/mail_account.rb
CHANGED
@@ -47,7 +47,7 @@ module Popper
|
|
47
47
|
def check_and_action(m)
|
48
48
|
mail = EncodeMail.new(m.mail)
|
49
49
|
Popper.log.info "check mail:#{mail.date.to_s} #{mail.subject}"
|
50
|
-
|
50
|
+
match_rules?(mail).each do |rule|
|
51
51
|
Popper.log.info "do action:#{mail.subject}"
|
52
52
|
Popper::Action::ExecCmd.run(config.action_by_rule(rule), mail) if config.action_by_rule(rule)
|
53
53
|
end
|
@@ -85,8 +85,8 @@ module Popper
|
|
85
85
|
conn.mails.select {|_m|uidl_list.include?(_m.uidl)}
|
86
86
|
end
|
87
87
|
|
88
|
-
def
|
89
|
-
config.
|
88
|
+
def match_rules?(mail)
|
89
|
+
config.rule_with_conditions_select do |rule,mail_header,conditions|
|
90
90
|
conditions.all? do |condition|
|
91
91
|
mail.respond_to?(mail_header) && mail.send(mail_header).to_s.match(/#{condition}/)
|
92
92
|
end
|
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.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pyama86
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
173
|
version: '0'
|
174
174
|
requirements: []
|
175
175
|
rubyforge_project:
|
176
|
-
rubygems_version: 2.6
|
176
|
+
rubygems_version: 2.7.6
|
177
177
|
signing_key:
|
178
178
|
specification_version: 4
|
179
179
|
summary: email notification tool
|