classic_omah 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/classic_omah.rb +11 -7
- data.tar.gz.sig +0 -0
- metadata +22 -22
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bdd7fa233d0051e357941199077bb50038cad33
|
4
|
+
data.tar.gz: cb58d505539d24d87776914add1f28734f6db554
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f24e3e02f788e55daff5361a1e72b0e6a00e2e1162de017c1918f42af6c95f70d1ccd3c2f4f42d7572da1e483a1ff1fd0611bbbe07714a5355b05145f03ec891
|
7
|
+
data.tar.gz: 97ef7e4111dc413541847463cb7f45bc8dad4d36bfe93b15d5a55911572a344eb4194716846d7f1a1e80cc7d3890c41995769d6ca22e8ff2f68de79b683ffc25
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/classic_omah.rb
CHANGED
@@ -6,20 +6,23 @@ require 'mail'
|
|
6
6
|
require 'omah'
|
7
7
|
|
8
8
|
|
9
|
+
class ClassicOmahException < Exception
|
10
|
+
end
|
11
|
+
|
9
12
|
class ClassicOmah < Omah
|
10
13
|
|
11
14
|
def initialize(user: 'user', filepath: '.', mail: {}, \
|
12
15
|
email_address: nil, options: {xslt: 'listing.xsl'}, plugins: [])
|
13
|
-
|
14
|
-
|
16
|
+
|
15
17
|
@mail = { address: '',
|
16
18
|
port: 110,
|
17
19
|
user_name: '',
|
18
20
|
password: '',
|
19
21
|
enable_ssl: false }.merge mail
|
20
22
|
|
21
|
-
field = %i(address user_name password).detect {|x| @mail[x].empty?}
|
22
|
-
|
23
|
+
field = %i(address user_name password).detect {|x| @mail[x].to_s.empty?}
|
24
|
+
|
25
|
+
raise ClassicOmahException, "missing %s" % field if field
|
23
26
|
|
24
27
|
@variables = {user_name: @mail[:user_name] , \
|
25
28
|
address: @mail[:address], email_address: email_address}
|
@@ -35,10 +38,11 @@ class ClassicOmah < Omah
|
|
35
38
|
Mail.defaults { retriever_method(:pop3, mail) }
|
36
39
|
|
37
40
|
email = Mail.all
|
41
|
+
|
38
42
|
return 'no new messages' unless email.any?
|
39
43
|
|
40
44
|
messages = email.map.with_index.inject([]) do |r, x|
|
41
|
-
|
45
|
+
|
42
46
|
msg, i = x
|
43
47
|
|
44
48
|
begin
|
@@ -58,12 +62,12 @@ class ClassicOmah < Omah
|
|
58
62
|
r
|
59
63
|
|
60
64
|
end
|
61
|
-
|
62
|
-
|
65
|
+
|
63
66
|
# messages are stored in the file dynarexdaily.xml
|
64
67
|
self.store messages
|
65
68
|
|
66
69
|
Mail.delete_all
|
70
|
+
|
67
71
|
messages.length.to_s + " new messages"
|
68
72
|
end
|
69
73
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: classic_omah
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -12,26 +12,26 @@ cert_chain:
|
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
13
|
MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
|
14
14
|
YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
|
15
|
-
|
15
|
+
8ixkARkWAmV1MB4XDTE2MDcxOTEyMDcwNFoXDTE3MDcxOTEyMDcwNFowSDESMBAG
|
16
16
|
A1UEAwwJZ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uRB7/JGODEFCrklZzxiGPKhU/TXp58IlmGWLMYFg1dC2C9zieWjXMhIMJfKg
|
30
|
+
hZEzJc+/L+AZleezk/ZoRNacA0rwMWTGO529xBWF3ubkG5PSJMo1jo1NEUM1MYCe
|
31
|
+
D07MglReWuT4LwOobcQDLoWfaUllIE1b/IVKmv5LjG27uDTSNCPP+Oai1EDah33t
|
32
|
+
0J9xBNAoDndYfA==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
34
|
+
date: 2016-07-19 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: omah
|
@@ -39,20 +39,20 @@ dependencies:
|
|
39
39
|
requirements:
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '0.
|
42
|
+
version: '0.7'
|
43
43
|
- - ">="
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.
|
45
|
+
version: 0.7.0
|
46
46
|
type: :runtime
|
47
47
|
prerelease: false
|
48
48
|
version_requirements: !ruby/object:Gem::Requirement
|
49
49
|
requirements:
|
50
50
|
- - "~>"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '0.
|
52
|
+
version: '0.7'
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.
|
55
|
+
version: 0.7.0
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: mail
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
version: '0'
|
101
101
|
requirements: []
|
102
102
|
rubyforge_project:
|
103
|
-
rubygems_version: 2.
|
103
|
+
rubygems_version: 2.5.1
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: Mail gem + Omah (Offline Mail Helper) gem
|
metadata.gz.sig
CHANGED
Binary file
|