omah-plugin-sps 0.1.0
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 +7 -0
- checksums.yaml.gz.sig +1 -0
- data.tar.gz.sig +0 -0
- data/lib/omah-plugin-sps.rb +30 -0
- metadata +88 -0
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c64576b308ec00ae93dde5c0845f343c39650f0c
|
4
|
+
data.tar.gz: 41b772defa88198b4a3544b98d2a9c82e2fce775
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a987819ac63bf8c2a4b02b08350de88c993412a86f321be98e1c39c2afeac8d1da533522778aeb8e4b29520a38f25a75a33cd66e2c067764e3c9cf2533aff9cd
|
7
|
+
data.tar.gz: d3e7e10d69541610dd4c83e3547db80c9a18b8e540aa2675e2859a7d1950a0e530624748ca03aab6c0f89aac395887feebf16604a3060aac1d7ed06a247b346b
|
checksums.yaml.gz.sig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
q9̎�-D��q|
|
data.tar.gz.sig
ADDED
Binary file
|
@@ -0,0 +1,30 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
|
3
|
+
# file: omah-plugin-sps.rb
|
4
|
+
|
5
|
+
require 'sps-pub'
|
6
|
+
|
7
|
+
class OmahPluginSps
|
8
|
+
|
9
|
+
def initialize(settings: {address: 'localhost', port: 59000}, variables: {})
|
10
|
+
|
11
|
+
address, port = settings[:address], settings[:port]
|
12
|
+
@sps = SPSPub.new(address: address, port: port)
|
13
|
+
|
14
|
+
h = variables
|
15
|
+
@email_address = h[:email_address] ? h[:email_address] : \
|
16
|
+
h[:user_name] + '@' + h[:address].split('.')[1..-1].join('.')
|
17
|
+
end
|
18
|
+
|
19
|
+
def on_newmail(messages, doc)
|
20
|
+
|
21
|
+
m = 'message'
|
22
|
+
m += 's' if messages.length > 1
|
23
|
+
fqm = "email/new: %s received %s new %s" \
|
24
|
+
% [@email_address, messages.length, m]
|
25
|
+
|
26
|
+
@sps.notice fqm
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: omah-plugin-sps
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- James Robertson
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
|
14
|
+
YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
|
15
|
+
8ixkARkWAmV1MB4XDTE1MDUyNTE5MzcwMloXDTE2MDUyNDE5MzcwMlowSDESMBAG
|
16
|
+
A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
|
17
|
+
EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
|
18
|
+
ggEBAMEpAzf7aFYf4xLSI2LM10CLCVlh9LN6FCc2OIBKaZ42hY+uehCpv+nv3Gz3
|
19
|
+
q83En3ALTPLuR3deGR7j8lP8Jmv/U1M5cuRE18sAslakXDjPFrqo6gTnz7KWPwA7
|
20
|
+
ymcZx4kORdHWyRqWS6LS9UrZHvgP8Z+Ezu74LQLfn5X9JfTem9qSC21USpnpR+sd
|
21
|
+
ed4uic4XscsPVeqJXt0gig+ZDLDhoITTOqFzdBKYRht1CkV+DHxwOkCuo/pIb6w5
|
22
|
+
eln2G2pjjG9peNdFdajS7k4yfpM5dgZPG5CG4RquucWxHO7t04TVyOJ0xucKoCKi
|
23
|
+
w8CM1O0Lv+9raMa2aYCbs/AGbAECAwEAAaOBijCBhzAJBgNVHRMEAjAAMAsGA1Ud
|
24
|
+
DwQEAwIEsDAdBgNVHQ4EFgQUXUxxnBCBtzhwP11tshFYuhv+pfkwJgYDVR0RBB8w
|
25
|
+
HYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1h
|
26
|
+
c3RlckBqYW1lc3JvYmVydHNvbi5ldTANBgkqhkiG9w0BAQUFAAOCAQEAPgW7IJ8C
|
27
|
+
BNKf+NUfThYwNK3iLDsGXh/9TbcwQmwhzxiu5tNejUDxhwsn4YgBxX7uwvVCw0Uu
|
28
|
+
Zgk4z3V7CLdyt6e6l/2rz/XHRnc5C0E6e7KnTfum99zgqWDgr+tIQdBTMjfL+Ibr
|
29
|
+
Wul7tggoCd2vFDnxvnMPXU6vqRobKnWhtZskX47zztnnnN7Q17OKEHVt++i17X1H
|
30
|
+
9Lr4mWw0hdnUhUm6R9OSwcbY1B2FMV57tAs9udzQkJLL6xKUyTFbRDsqGzStP73s
|
31
|
+
gb2OB4vHgNi+hHcDHbowXiU5swQeZRdLrTJggZ2IwEv5/cPckrldrdQbpP8zov8A
|
32
|
+
4Bch4Yu1Q70AOg==
|
33
|
+
-----END CERTIFICATE-----
|
34
|
+
date: 2015-05-25 00:00:00.000000000 Z
|
35
|
+
dependencies:
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: sps-pub
|
38
|
+
requirement: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - "~>"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '0.4'
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 0.4.0
|
46
|
+
type: :runtime
|
47
|
+
prerelease: false
|
48
|
+
version_requirements: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - "~>"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '0.4'
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 0.4.0
|
56
|
+
description:
|
57
|
+
email: james@r0bertson.co.uk
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- lib/omah-plugin-sps.rb
|
63
|
+
homepage: https://github.com/jrobertson/omah-plugin-sps
|
64
|
+
licenses:
|
65
|
+
- MIT
|
66
|
+
metadata: {}
|
67
|
+
post_install_message:
|
68
|
+
rdoc_options: []
|
69
|
+
require_paths:
|
70
|
+
- lib
|
71
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0'
|
81
|
+
requirements: []
|
82
|
+
rubyforge_project:
|
83
|
+
rubygems_version: 2.4.6
|
84
|
+
signing_key:
|
85
|
+
specification_version: 4
|
86
|
+
summary: An Omah gem plugin for publishing a SimplePubSub message when new mail arrives.
|
87
|
+
Suitable for use with either the Gmail_omah gem or the Classic_omah gem
|
88
|
+
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|