sps_chat-cli 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7be26039b58003cf3cba3c8680bbaae3f5ecafa2
4
+ data.tar.gz: 52a8fe6eaa812796a41d6b1e6e0d77a877a09007
5
+ SHA512:
6
+ metadata.gz: d975063100a9418cec70b5b5c2a092d9e7345b73d3053113eafeffb81ebbd3ff58bfc24afe8cee510a2df74b5819218b09b7177ee584bbb8b625f88de81d135a
7
+ data.tar.gz: 02dfa40546700721bd38da30f0521fc5d56d1295867cf71ca4188703e672f735703ed8b8a1322e8b49b23e8d1e2766215b549ebd72b30a055ce709b0623b9721
checksums.yaml.gz.sig ADDED
Binary file
@@ -0,0 +1,58 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # file: sps_chat-cli.rb
4
+
5
+
6
+ require 'sps_chat'
7
+ require 'io/console'
8
+
9
+
10
+ CTRLC = "\u0003"
11
+ BACKSPACE = "\u007F"
12
+
13
+ class SPSChatCli < SPSChat
14
+
15
+ def initialize(host: '127.0.0.1', port: '8080', \
16
+ userid: 'user' + (0..1000).to_a.sample.to_s, room: '')
17
+
18
+ super(host: host, port: port, userid: userid, room: room)
19
+ terminate = false
20
+ sleep 1
21
+ print "\r\n"
22
+
23
+ loop do
24
+
25
+ s = ''
26
+
27
+ print "\r> "
28
+
29
+ begin
30
+
31
+ c = $stdin.getch
32
+ (terminate = true; break) if c == CTRLC
33
+
34
+ unless c == BACKSPACE then
35
+ s += c
36
+ print c
37
+ else
38
+ s.chop!
39
+ print "\r> " + ' ' * s.length
40
+ print "\r> " + s
41
+ end
42
+ end until c == "\r" or terminate
43
+
44
+ break if terminate
45
+
46
+ send s
47
+ print "\r" + @userid + '> ' + s + "\n"
48
+ end
49
+ end
50
+
51
+ def onincoming(sender, msg)
52
+ s = ''
53
+ print "\r%s> %s\n" % [sender.strip, msg]
54
+ print "\r> "
55
+ end
56
+
57
+ end
58
+
data.tar.gz.sig ADDED
@@ -0,0 +1 @@
1
+ G�/���N�)����'��ff�iU�3k��Zv�^��~���
metadata ADDED
@@ -0,0 +1,87 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sps_chat-cli
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
+ 8ixkARkWAmV1MB4XDTE2MDcyNTIzNDI0OVoXDTE3MDcyNTIzNDI0OVowSDESMBAG
16
+ A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
17
+ EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
18
+ ggEBAJoZr3FlQYHxhIQUKZd+eF6W1q+cGvd9FexMyNcGt+PyW6BYvDKEuDEIqBxC
19
+ JWv3bONMs6nrEWGeAR01Fo19sEv7srIPyxlw/N/XC6pmgMYLHtMDAV/nPxhYDjLm
20
+ 9SNddpYmlk1p29YXAUv0UPa6qtIFwO+nxTNCvQQQD/iCbB0+2Ig6McqtuSh8GVaH
21
+ 8OEEtI4uQ9gUNq1D+k6B5o6hQo7DEIaci8ohrOWeMM0+WquFa3pC+DTySR88IdqZ
22
+ nAdJQNTM+jbjy/r+YH/WozbtTlHdG1z09XmOIFYVTUDczc0wJLBRpRowRQgQIN+O
23
+ f5leOcDoPPpaOu3WfwEIVzRQ6yUCAwEAAaOBijCBhzAJBgNVHRMEAjAAMAsGA1Ud
24
+ DwQEAwIEsDAdBgNVHQ4EFgQUZg9eJsTQLAbtFA3jMz6b4NZFNCEwJgYDVR0RBB8w
25
+ HYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1h
26
+ c3RlckBqYW1lc3JvYmVydHNvbi5ldTANBgkqhkiG9w0BAQUFAAOCAQEACfvYFbHo
27
+ TvNJiBogPaL3W6HNmaoxuSD5AXUVCmKyMWOJkqekbSU7rI9FaQONL+U8b+gNwvTp
28
+ V/3LDiAwgVu0CFAjlD1kl0m2yJFT33UULNV2moW5f1RJ47vT1SkfiFOArFd2kdGP
29
+ z4YqQBoru378bWbPSXfrZCe+ND6g8g1fE2SCecREQP1pFWqet4+gKvV3uqn26xon
30
+ o2AxFwG6na2C2C2SvLDg6I5fN3RGStBaAmxcgzhGkaCudPUUw+ulvKa3W+HiTCci
31
+ S93hTip+l2DKiPUPFdQEWto/f5Yjg6Oq5Z+zegu+tA26pxZcpxHwqLq2Q0Ee87Iy
32
+ 90HSKjXEO3y4SA==
33
+ -----END CERTIFICATE-----
34
+ date: 2016-07-25 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.1
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.1
56
+ description:
57
+ email: james@r0bertson.co.uk
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - lib/sps_chat-cli.rb
63
+ homepage: https://github.com/jrobertson/sps_chat-cli
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.5.1
84
+ signing_key:
85
+ specification_version: 4
86
+ summary: A simplistic interactive chat console using the sps_chat gem.
87
+ test_files: []
metadata.gz.sig ADDED
@@ -0,0 +1 @@
1
+ ghvf5� Y*�L�H