imapget 0.2.1 → 0.3.0

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
- SHA1:
3
- metadata.gz: 5e94a9f7f03036a34e0f4274ab184f5a58f155b9
4
- data.tar.gz: 538d14e4e20394265dfa74e7407be78141eb9745
2
+ SHA256:
3
+ metadata.gz: fe656b65453bccee9c4e108fa5c88f00647beeaccaae7b579cf5892f9e8c4236
4
+ data.tar.gz: d3a01358001af8415f4aff124863f7f5cc59008408cf14a8c2f034298eb043c4
5
5
  SHA512:
6
- metadata.gz: fcc4ebefc4831ba03592c01754650e5159818117351aef8019b159d7a7d3a4b23aef270e0c240b0718bee73dad2a8b02cd58d781d914b3137f2f8db4cc47749b
7
- data.tar.gz: 32050e2a480c3f91f3345e6c82dbe6227e1db26138e87db99b5ad37198d722f55e18db947c318860e9fd9f64c6da503ea00d65ea87c57ee9117e8c63a0f4a175
6
+ metadata.gz: 431bc3e4b193c523cc044fcba3c5c49ca8d18daeabd28387170e5eabede4cf674fdec6eb8b95a7fe59bee399b85ef23daa0dd32ee8d15319333f4038a1863a37
7
+ data.tar.gz: 5a06d9e2e9898dc41bc1ada7ef41c083683d94bb7c5e34ab92c2bc6f5e778d9dcb9d1531123f73d5b91e0a9a434fe89412b9ec8b69d670dc743f9dd2e0bae29b
data/ChangeLog CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  = Revision history for imapget
4
4
 
5
+ == 0.3.0 [2022-08-19]
6
+
7
+ * Introduced default config section.
8
+ * Switched config to strings.
9
+
5
10
  == 0.2.1 [2016-03-25]
6
11
 
7
12
  * Fixed regression introduced in 0.2.0.
data/README CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  == VERSION
4
4
 
5
- This documentation refers to imapget version 0.2.1
5
+ This documentation refers to imapget version 0.3.0
6
6
 
7
7
 
8
8
  == DESCRIPTION
@@ -14,7 +14,7 @@ server! Thus, it's different from your typical *sync* tool.
14
14
 
15
15
  == LINKS
16
16
 
17
- Documentation:: https://blackwinter.github.com/imapget
17
+ Documentation:: https://blackwinter.github.io/imapget
18
18
  Source code:: https://github.com/blackwinter/imapget
19
19
  RubyGem:: https://rubygems.org/gems/imapget
20
20
 
@@ -26,7 +26,7 @@ RubyGem:: https://rubygems.org/gems/imapget
26
26
 
27
27
  == LICENSE AND COPYRIGHT
28
28
 
29
- Copyright (C) 2009-2016 Jens Wille
29
+ Copyright (C) 2009-2022 Jens Wille
30
30
 
31
31
  imapget is free software: you can redistribute it and/or modify it under
32
32
  the terms of the GNU Affero General Public License as published by the Free
data/Rakefile CHANGED
@@ -13,9 +13,9 @@ begin
13
13
  email: %q{jens.wille@gmail.com},
14
14
  license: %q{AGPL-3.0},
15
15
  homepage: :blackwinter,
16
- dependencies: { cyclops: '~> 0.2', nuggets: '~> 1.4' },
16
+ dependencies: { cyclops: '~> 0.3', nuggets: '~> 1.5' },
17
17
 
18
- required_ruby_version: '>= 1.9.3'
18
+ required_ruby_version: '>= 2.1'
19
19
  }
20
20
  }}
21
21
  rescue LoadError => err
data/example/config.yaml CHANGED
@@ -1,27 +1,28 @@
1
1
  ### Global settings
2
2
 
3
- :base_dir: /var/backup/mail # Point to storage location or specify on command-line.
4
- :strategy: :exclude # This is the default strategy.
3
+ default_config:
4
+ base_dir: /var/backup/mail # Point to storage location or specify on command-line.
5
+ strategy: exclude # This is the default strategy.
5
6
 
6
7
 
7
8
  ### Profiles
8
9
 
9
10
  # Get all mailboxes (via SSL), *except* Spam and Trash.
10
11
  you-1:
11
- :host: imap.example.com
12
- :port: 123
13
- :ssl: true
14
- :user: login
15
- :exclude:
12
+ host: imap.example.com
13
+ port: 123
14
+ ssl: true
15
+ user: login
16
+ exclude:
16
17
  - Spam
17
18
  - Trash
18
19
 
19
20
  # Get *only* mailboxes INBOX, Sent, and Drafts.
20
21
  you-2:
21
- :host: imap.example.com
22
- :user: login2
23
- :strategy: :include
24
- :include:
22
+ host: imap.example.com
23
+ user: login2
24
+ strategy: include
25
+ include:
25
26
  - INBOX
26
27
  - Sent
27
28
  - Drafts
data/lib/imapget/cli.rb CHANGED
@@ -50,7 +50,7 @@ class IMAPGet
50
50
  end
51
51
 
52
52
  def run(arguments)
53
- profiles, default_config = config.partition { |k,| k.is_a?(String) }
53
+ default_config, profiles = config.delete(:default_config), config.to_a
54
54
 
55
55
  (arguments.empty? ? profiles.map(&:first) : arguments).each { |profile|
56
56
  profile_config = profile_config(profile, profiles, default_config) or next
@@ -67,7 +67,7 @@ class IMAPGet
67
67
  } }
68
68
  else
69
69
  imapget.get(options[:directory] ||
70
- File.join(profile_config[:base_dir] || '.', profile))
70
+ File.join(profile_config[:base_dir] || '.', profile.to_s))
71
71
  end
72
72
  }
73
73
  end
@@ -3,8 +3,8 @@ class IMAPGet
3
3
  module Version
4
4
 
5
5
  MAJOR = 0
6
- MINOR = 2
7
- TINY = 1
6
+ MINOR = 3
7
+ TINY = 0
8
8
 
9
9
  class << self
10
10
 
data/lib/imapget.rb CHANGED
@@ -68,7 +68,7 @@ class IMAPGet
68
68
  end)
69
69
  }
70
70
 
71
- @strategy = options.fetch(:strategy, DEFAULT_STRATEGY)
71
+ @strategy = options.fetch(:strategy, DEFAULT_STRATEGY).to_sym
72
72
  end
73
73
 
74
74
  def mailboxes
@@ -183,7 +183,7 @@ class IMAPGet
183
183
  def fetch(mail, dir, name)
184
184
  uid = mail.attr['UID'].to_s
185
185
  file = File.join(dir, uid)
186
- exists = File.exists?(file)
186
+ exists = File.exist?(file)
187
187
 
188
188
  if deleted?(mail)
189
189
  if exists
metadata CHANGED
@@ -1,35 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imapget
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Wille
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
- cert_chain:
11
- - |
12
- -----BEGIN CERTIFICATE-----
13
- MIIDMDCCAhigAwIBAgIB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GyZvOBuqUp0xostWSk0dfxyn/YQ7eqvQRGBhK1VGa7Tg/KYqnemDE57+VOXrua
30
- 59wzaA==
31
- -----END CERTIFICATE-----
32
- date: 2016-03-25 00:00:00.000000000 Z
10
+ cert_chain: []
11
+ date: 2022-08-19 00:00:00.000000000 Z
33
12
  dependencies:
34
13
  - !ruby/object:Gem::Dependency
35
14
  name: cyclops
@@ -37,48 +16,48 @@ dependencies:
37
16
  requirements:
38
17
  - - "~>"
39
18
  - !ruby/object:Gem::Version
40
- version: '0.2'
19
+ version: '0.3'
41
20
  type: :runtime
42
21
  prerelease: false
43
22
  version_requirements: !ruby/object:Gem::Requirement
44
23
  requirements:
45
24
  - - "~>"
46
25
  - !ruby/object:Gem::Version
47
- version: '0.2'
26
+ version: '0.3'
48
27
  - !ruby/object:Gem::Dependency
49
28
  name: nuggets
50
29
  requirement: !ruby/object:Gem::Requirement
51
30
  requirements:
52
31
  - - "~>"
53
32
  - !ruby/object:Gem::Version
54
- version: '1.4'
33
+ version: '1.5'
55
34
  type: :runtime
56
35
  prerelease: false
57
36
  version_requirements: !ruby/object:Gem::Requirement
58
37
  requirements:
59
38
  - - "~>"
60
39
  - !ruby/object:Gem::Version
61
- version: '1.4'
40
+ version: '1.5'
62
41
  - !ruby/object:Gem::Dependency
63
42
  name: hen
64
43
  requirement: !ruby/object:Gem::Requirement
65
44
  requirements:
66
45
  - - "~>"
67
46
  - !ruby/object:Gem::Version
68
- version: '0.8'
47
+ version: '0.9'
69
48
  - - ">="
70
49
  - !ruby/object:Gem::Version
71
- version: 0.8.3
50
+ version: 0.9.1
72
51
  type: :development
73
52
  prerelease: false
74
53
  version_requirements: !ruby/object:Gem::Requirement
75
54
  requirements:
76
55
  - - "~>"
77
56
  - !ruby/object:Gem::Version
78
- version: '0.8'
57
+ version: '0.9'
79
58
  - - ">="
80
59
  - !ruby/object:Gem::Version
81
- version: 0.8.3
60
+ version: 0.9.1
82
61
  - !ruby/object:Gem::Dependency
83
62
  name: rake
84
63
  requirement: !ruby/object:Gem::Requirement
@@ -118,13 +97,14 @@ licenses:
118
97
  metadata: {}
119
98
  post_install_message: |2+
120
99
 
121
- imapget-0.2.1 [2016-03-25]:
100
+ imapget-0.3.0 [2022-08-19]:
122
101
 
123
- * Fixed regression introduced in 0.2.0.
102
+ * Introduced default config section.
103
+ * Switched config to strings.
124
104
 
125
105
  rdoc_options:
126
106
  - "--title"
127
- - imapget Application documentation (v0.2.1)
107
+ - imapget Application documentation (v0.3.0)
128
108
  - "--charset"
129
109
  - UTF-8
130
110
  - "--line-numbers"
@@ -137,16 +117,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
137
117
  requirements:
138
118
  - - ">="
139
119
  - !ruby/object:Gem::Version
140
- version: 1.9.3
120
+ version: '2.1'
141
121
  required_rubygems_version: !ruby/object:Gem::Requirement
142
122
  requirements:
143
123
  - - ">="
144
124
  - !ruby/object:Gem::Version
145
125
  version: '0'
146
126
  requirements: []
147
- rubyforge_project:
148
- rubygems_version: 2.6.1
149
- signing_key:
127
+ rubygems_version: 3.3.5
128
+ signing_key:
150
129
  specification_version: 4
151
130
  summary: Get IMAP mails.
152
131
  test_files: []
132
+ ...