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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b3d137a0ba115d3aa8b2841ae80617101d6a620
4
- data.tar.gz: fe998b964619967541401b13519d14b3f121256f
3
+ metadata.gz: 528ac2061b421fa9445d38c625cc2545a7b7411e
4
+ data.tar.gz: 664509802bdb70d4963d8f63679f7d044ba83b96
5
5
  SHA512:
6
- metadata.gz: 2222f785166ad7fcd7cab236936edebab8a45ec55df6c6b6f41c50c07fca75d8265756ebfae5f680b5f7231e79e89366f056382ec58ccfa0d6a9b6ee765b9ddc
7
- data.tar.gz: d02bdc75f132243fff4bbf16c22c87e5a4e346c12cf656c28c8dc9ce525b47a67f3860fec4647dac36cf7d9de5e050dfcdbe8a7d036c953d5dbaf9f3a2ea7e74
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
- ���1Jx�T�:���N��K
2
- �`�������X� j4��#@�J�Z�)}�nx���p�ÇBZW|�O� �9V���Kv��#K�/`�F���faz\�)$L�UP���B��ڲ�G�ޑ�nQQ&k�E�)�B#�+t.FK����~��rV��&�`ּr v���/L��خ6iH<�=�Ҁ?��\'l������h�RF�K`?��s�56{dz3ض\�P��D>��C���g_�wm�`/Kg�M
1
+ �:���D���No�ڊ��uE����8�� fz���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
- def initialize(user: 'user', filepath: '.', mail: {}, sps: {}, email_address: nil)
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
- Dir.chdir filepath
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
- o = Omah.new user: @user
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
- fqm
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.1.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-23 00:00:00.000000000 Z
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.4'
42
+ version: '0.6'
43
43
  - - ">="
44
44
  - !ruby/object:Gem::Version
45
- version: 0.4.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.4'
52
+ version: '0.6'
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: 0.4.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