imap_mogura 0.1.1.pre.dev → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -6
- data/lib/imap_mogura/cli.rb +17 -16
- data/lib/imap_mogura/rules_parser/rule_elements.rb +1 -1
- data/lib/imap_mogura/rules_parser.rb +2 -0
- data/lib/imap_mogura/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f5a65d48e4e81a37e519995c39cddf533e3336477c358044462f51935ee1d0f
|
4
|
+
data.tar.gz: 59975c34bdd3ce2d372c71c5d6b8d9689867e431956104df8cd958294a18dc3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c29a3b716cfde67b59876ad149add941ac2db45fa92154fbaa0a3587e438939568ae6eb536b12ddcc28bd14c0ab131a3f4a5725d0e11775cc3f1a95d30400b84
|
7
|
+
data.tar.gz: fc9c28711eb63e293e09173a3b4eac353e5ca40d4b3d7b01b07ea5f571c80d941d669c1bd93217c21d179a16ff59b116996f0a581b80ad883c5875a590e2f8b2
|
data/README.md
CHANGED
@@ -4,16 +4,13 @@ A mail filtering tool for IMAP.
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
7
|
+
To install this gem, you can get it from RubyGems.org. Just run as following.
|
8
8
|
|
9
9
|
```console
|
10
|
-
$
|
11
|
-
$ cd imap_mogura/
|
10
|
+
$ gem install imap_mogura --pre
|
12
11
|
```
|
13
12
|
|
14
|
-
|
15
|
-
|
16
|
-
$ bundle install
|
13
|
+
(This gem has only released pre-release versions now, so you must specify `--pre` option.)
|
17
14
|
|
18
15
|
## Usage
|
19
16
|
|
data/lib/imap_mogura/cli.rb
CHANGED
@@ -45,10 +45,10 @@ module ImapMogura
|
|
45
45
|
monitored_events = ["RECENT"]
|
46
46
|
search_keys = ["RECENT", *(["UNSEEN"] if filter_unseen)]
|
47
47
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
48
|
+
with_preparation_ready(config_name, host, port, starttls, use_ssl,
|
49
|
+
auth_info: { auth_type: auth_type, user: user, password: password },
|
50
|
+
create_directory: create_directory,
|
51
|
+
dry_run: dry_run) do |imap_handler, rules|
|
52
52
|
warn "* start monitoring recent mails in \"#{target_mailbox}\""
|
53
53
|
|
54
54
|
imap_handler.monitor_events(target_mailbox, monitored_events) do
|
@@ -99,11 +99,11 @@ module ImapMogura
|
|
99
99
|
["ALL"]
|
100
100
|
end
|
101
101
|
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
102
|
+
with_preparation_ready(config_name, host, port, starttls, use_ssl,
|
103
|
+
auth_info: { auth_type: auth_type, user: user, password: password },
|
104
|
+
excluded_mailboxes: exclude_mailboxes,
|
105
|
+
create_directory: create_directory,
|
106
|
+
dry_run: dry_run) do |imap_handler, rules, options|
|
107
107
|
if all_mailbox
|
108
108
|
excluded_mailboxes = options[:excluded_mailboxes]
|
109
109
|
|
@@ -152,13 +152,14 @@ module ImapMogura
|
|
152
152
|
|
153
153
|
private
|
154
154
|
|
155
|
-
def
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
155
|
+
def with_preparation_ready(config_name,
|
156
|
+
host, port,
|
157
|
+
starttls, use_ssl, certs: nil, verify: true,
|
158
|
+
auth_info: nil,
|
159
|
+
excluded_mailboxes: [],
|
160
|
+
create_directory: true,
|
161
|
+
dry_run: false,
|
162
|
+
&block)
|
162
163
|
_, rules = load_and_handle_config(config_name)
|
163
164
|
|
164
165
|
warn "* connecting the server #{host}:#{port}..."
|
data/lib/imap_mogura/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imap_mogura
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.1
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ysk
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: base64
|