gmail_omah 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +3 -2
- data/lib/gmail_omah.rb +11 -17
- metadata +6 -26
- 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: 528ac2061b421fa9445d38c625cc2545a7b7411e
|
4
|
+
data.tar.gz: 664509802bdb70d4963d8f63679f7d044ba83b96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92286a0baa7065a661e6c2744059fdec4e449b6c658875c9bc9d23c0833718e85323380e987935c490f3e8b61c2ecd1a64fda8762e6fe87d5831da9cd9b223fd
|
7
|
+
data.tar.gz: 125029198d436636d78e3acea09ed37a2ba8220be9e8ca9c365c23eddd545b44786c940ed796b4a898331c3ecb95c1d160122f3c63889815257e519980a8cfc4
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
�:���D���No�ڊ��uE����8�� f�z���S���o�\�����SK�js{�-��4������N���,����}V���s�[gp\����Џ��AR����u�P-r�D���;~S��k��v�@Z��-{?
|
2
|
+
�/6��0��r�W��]�,��
|
3
|
+
���T�=��w�?��
|
data/lib/gmail_omah.rb
CHANGED
@@ -4,11 +4,12 @@
|
|
4
4
|
|
5
5
|
require 'gmail'
|
6
6
|
require 'omah'
|
7
|
-
require 'sps-pub'
|
8
7
|
|
9
|
-
class GmailOmah
|
10
8
|
|
11
|
-
|
9
|
+
class GmailOmah < Omah
|
10
|
+
|
11
|
+
def initialize(user: 'user', filepath: '.', mail: {}, \
|
12
|
+
options: {xslt: 'listing.xsl'}, plugins: [])
|
12
13
|
|
13
14
|
@user = user
|
14
15
|
@mail = {user_name: '', password: '' }.merge mail
|
@@ -16,10 +17,11 @@ class GmailOmah
|
|
16
17
|
field = %i(user_name password).detect {|x| @mail[x].empty?}
|
17
18
|
return "GmailOmah: missing %s" % field if field
|
18
19
|
|
19
|
-
@sps = SPSPub.new(address: sps[:address], port: sps[:port]) if sps
|
20
20
|
@email_address = @mail[:user_name]
|
21
21
|
|
22
|
-
|
22
|
+
@variables = {user_name: @mail[:user_name], email_address: @email_address}
|
23
|
+
|
24
|
+
super(user: user, filepath: filepath, plugins: plugins, options: options)
|
23
25
|
|
24
26
|
end
|
25
27
|
|
@@ -59,19 +61,11 @@ class GmailOmah
|
|
59
61
|
|
60
62
|
end
|
61
63
|
|
62
|
-
|
63
|
-
|
64
|
-
# messages are stored to the file dynarexdaily.xml
|
65
|
-
o.store messages
|
66
|
-
|
67
|
-
m = 'message'
|
68
|
-
m += 's' if messages.length > 1
|
69
|
-
fqm = "email/new: %s received %s new %s" \
|
70
|
-
% [@email_address, messages.length, m]
|
71
|
-
|
72
|
-
@sps.notice fqm if @sps
|
64
|
+
# messages are stored in the file dynarexdaily.xml
|
65
|
+
self.store messages
|
73
66
|
|
74
67
|
a.each {|email| email.delete! }
|
75
|
-
|
68
|
+
messages.length.to_s + " new messages"
|
69
|
+
|
76
70
|
end
|
77
71
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gmail_omah
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
ndSRFD0AP3Aqx2T6Vl7mAQAlA2HfWcoImcyhITujG4RG/ucFJuXOE7REl/3kX9Z/
|
32
32
|
jVQ/sDgShsz7Ig==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2015-05-
|
34
|
+
date: 2015-05-25 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.6'
|
43
43
|
- - ">="
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.
|
45
|
+
version: 0.6.1
|
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.6'
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.
|
55
|
+
version: 0.6.1
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: gmail
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,26 +73,6 @@ dependencies:
|
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 0.5.0
|
76
|
-
- !ruby/object:Gem::Dependency
|
77
|
-
name: sps-pub
|
78
|
-
requirement: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0.4'
|
83
|
-
- - ">="
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: 0.4.0
|
86
|
-
type: :runtime
|
87
|
-
prerelease: false
|
88
|
-
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
requirements:
|
90
|
-
- - "~>"
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
version: '0.4'
|
93
|
-
- - ">="
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
version: 0.4.0
|
96
76
|
description:
|
97
77
|
email: james@r0bertson.co.uk
|
98
78
|
executables: []
|
metadata.gz.sig
CHANGED
Binary file
|