sps_bot 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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ce530ef25261caba1cf7366d6e444388dc7655c4
4
+ data.tar.gz: 6300de20701965b373e1926b8dedeafb01da6725
5
+ SHA512:
6
+ metadata.gz: f03b4dfb5839660f60eb81048e1ba98961a5d8cefe85d3a0aeca441679851b9a4a29d93d49190632acef00de12e2a1e33550fa9151bfe85dcaa8691fa3196075
7
+ data.tar.gz: 0bd661ef61ec15ff0515ffa6761cfd864563dc01b13415c242d77e8ec9acabae388a5d64556d29e72a2d2e8ae1ccdc055a9d4b249cd97cfde9249abfa41cc8e4
checksums.yaml.gz.sig ADDED
Binary file
data.tar.gz.sig ADDED
@@ -0,0 +1,3 @@
1
+ +��a-��w�m���{�h|��Lq�'�U� �:����+�u��~�/�����AJ�m�oY&��6@���Z� ���߹��
2
+ �R�`i��<���Z�S�UǠ���E�t�l��
3
+ x��C@M�>a��X��^�ɦ#�g���Ոqā�K�J�C8�Sy*Qv����hN=���d,JV�J��p�jك��\O7��m���f�%�B���{-9 �}��Z&�"�g�Y�����Se-oa���ΰ��\d�a"��
data/lib/sps_bot.rb ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # file: sps_bot.rb
4
+
5
+ require 'sps_chat'
6
+
7
+
8
+ class SpsBot < SPSChat
9
+
10
+ def initialize(host: 'localhost', port: '8080', userid: 'bot')
11
+
12
+ super(host: host, port: port, userid: userid)
13
+
14
+ end
15
+
16
+ def onincoming(sender, msg)
17
+
18
+ case msg
19
+ when /what's the time\?/i
20
+ self.send 'The time is ' + Time.now.strftime("%-I:%M%p")
21
+ when /hello?/i
22
+ self.send "hello #{sender}, how can I help you?" % sender
23
+ else
24
+ self.send "I'm sorry, I don't understand what you said."
25
+ end
26
+
27
+ end
28
+
29
+ end
metadata ADDED
@@ -0,0 +1,88 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sps_bot
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
+ 8ixkARkWAmV1MB4XDTE1MTExNjIzNDMwOFoXDTE2MTExNTIzNDMwOFowSDESMBAG
16
+ A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
17
+ EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
18
+ ggEBAPA+x1JF2k0+ljqvPy17zMbwnCAN07JF9lvdhikeAPyTNDk79r4xBAo45ooL
19
+ fj4Yt4Fs7MjSExEWg5PO46H9hos8hU13+GO7TfMMoQ2KGEBUbjec2G9VauplBz3u
20
+ VnBLF93ullpAoSRB9onJXiHjgxnmC2q14FygBBy9BP1p5VpSjaBH7owN4vhbWdHz
21
+ dBVH6WhdORTlHZmrQO7hCPN8hsq59TTAC6oJD6Lt4yW8v5+rHKmIH9w6NgcQ/8eJ
22
+ EI13PjVmVAm6V/3S4emeNwEnBKH3CgetsX9Ke4b0G+zWRMkkkxAssV4z0co1D3A1
23
+ EbrlEAK5u69lOn/tjk9BsIZEcXkCAwEAAaOBijCBhzAJBgNVHRMEAjAAMAsGA1Ud
24
+ DwQEAwIEsDAdBgNVHQ4EFgQUtbXwIf06Xxv/htbrUohr8BIi1zIwJgYDVR0RBB8w
25
+ HYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1h
26
+ c3RlckBqYW1lc3JvYmVydHNvbi5ldTANBgkqhkiG9w0BAQUFAAOCAQEAUhs7buI0
27
+ +UMaDl4PGnhKVR8CgsrqeZjudK6kR0Hz4Sp4kiu5AjN3VwDmMTuV81JmoVoCj762
28
+ +hZpnyGaWLUssRewQTPrD7FN6m7XqMMWNRdVJO80GeY7vhmGDupfM0Nm8EDLx24m
29
+ tFJb82ofIueUsUVe25V4pTDpj+nx7uoQLby+W3i1T8gTSQ6ZCa/BWP6oQk/7q+Gl
30
+ 90h7iLQ/hv5QWB5jGj/IB18MpI224cmK0Y+9x01d7sMdvREDJbstyL+7S4qStDuM
31
+ C9953c/cW9RSvURZAGzbWWYlJrpUPx8rLJTUfpphqF+p4HssT5ddVIfb9sGiiRrL
32
+ FproyCdNk6P65Q==
33
+ -----END CERTIFICATE-----
34
+ date: 2015-11-16 00:00:00.000000000 Z
35
+ dependencies:
36
+ - !ruby/object:Gem::Dependency
37
+ name: sps_chat
38
+ requirement: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '0.1'
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: 0.1.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.1'
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 0.1.0
56
+ description:
57
+ email: james@r0bertson.co.uk
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - lib/sps_bot.rb
63
+ homepage: https://github.com/jrobertson/sps_bot
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.8
84
+ signing_key:
85
+ specification_version: 4
86
+ summary: The sps_bot gem allows you to chat with your very own bot through the sps_chat
87
+ gem.
88
+ test_files: []
metadata.gz.sig ADDED
@@ -0,0 +1 @@
1
+ @U)6�Q�:�Ϋ�$�F��N2 ��y'bj����E�A��q�oR�`���ɠM�yZ92=|D�2�E����'O��޲ڃ�"�A�ؾ�X݇�ņb�6�oWQ�LU��%�&��4l����>����Gx�t�ь,�&Z ��A�5�բވ�M�nZĜ�B�z�Z�7* ]�[�C�pen<o�##�z��"C>����