ferris 0.0.0 → 0.0.1

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: 44f7b3f20a88bfe85335fca5585c9defa5d0f49f
4
- data.tar.gz: ef9e9b221ab4401946e385b6e9ec6325fcad3c87
3
+ metadata.gz: f02e4149684c5f245cd8c6c07a2c0b73d00a0335
4
+ data.tar.gz: edaaffa9bd477fe1b3731f19610a208c1c95ef9b
5
5
  SHA512:
6
- metadata.gz: e66d90192fe63c8c05216225a5dc15f9597895a1d4506a45cd2d4dceb8701bc7a7ae3c4559bc2fff95b593b02ed7b27a443e99e0ffb605c7a205791b40e74f03
7
- data.tar.gz: 0fca2026e06abb0f329b565b57d84e658a979f347dd1a1624954b31764d16d57e87f0e4a4702d62a85d93becbf7a651138ae1432b556baed4d3186258601790f
6
+ metadata.gz: a3e236e442ce7164231c40341f108dd21187e7895e7debf58c47a490f095215ad8a1d1445cb76a16e580e2d3036cc2c902b4593a7df03138385da02d7592d7dc
7
+ data.tar.gz: 46acefa49dd04ab30fd417826c7fcf5a022e80243291d65b418d38d673ec6e1f8fbd9a3baaaa55c5a18bab57914ff09e9e82577ce2e081271a53a29930a2570d
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.0
1
+ 0.0.1
@@ -22,6 +22,8 @@ module Ferris
22
22
  TRAVELING_RUBY_BUCKET = 'http://d6r77u77i8pq3.cloudfront.net'
23
23
  TRAVELING_RUBY_VERSION = '20150715-2.2.2'
24
24
  EM_VERSION = '1.0.4'
25
+ FFI_VERSION = '1.9.6'
26
+ JSON_VERSION = '1.8.2'
25
27
 
26
28
  # Every project deserves its own ASCII art
27
29
  ART = <<-'EOART' % VERSION
@@ -11,9 +11,23 @@ Thread.abort_on_exception = true
11
11
 
12
12
  module Ferris
13
13
  class RTM
14
+ class WebSocketWriter
15
+ attr_reader :url, :socket
16
+
17
+ def initialize url, socket
18
+ @url = url
19
+ @socket = socket
20
+ end
21
+
22
+ def write *args
23
+ socket.write *args
24
+ end
25
+ end
26
+
14
27
  HTTPS_PORT = 443
15
28
  SOCKET_READ_SIZE = 1024
16
29
 
30
+
17
31
  def initialize options={}
18
32
  @id = 0
19
33
  @jobs = []
@@ -100,22 +114,13 @@ module Ferris
100
114
  end
101
115
 
102
116
 
103
- def wrapper socket
104
- s = Struct.new :url, :socket do
105
- def write *args
106
- self.socket.write *args
107
- end
108
- end
109
- s.new @wss_uri.to_s, socket
110
- end
111
-
112
-
113
117
  def connect
114
118
  tcp_socket = TCPSocket.new @wss_uri.host, HTTPS_PORT
115
119
  ssl_socket = OpenSSL::SSL::SSLSocket.new tcp_socket
116
120
  ssl_socket.connect
117
121
 
118
- driver = WebSocket::Driver.client wrapper(ssl_socket)
122
+ writer = WebSocketWriter.new @wss_uri.to_s, ssl_socket
123
+ driver = WebSocket::Driver.client writer
119
124
 
120
125
  driver.on :open do |_|
121
126
  log.trace event: 'driver open'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ferris
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Clemmer
@@ -66,6 +66,34 @@ dependencies:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.0.4
69
+ - !ruby/object:Gem::Dependency
70
+ name: ffi
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '='
74
+ - !ruby/object:Gem::Version
75
+ version: 1.9.6
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '='
81
+ - !ruby/object:Gem::Version
82
+ version: 1.9.6
83
+ - !ruby/object:Gem::Dependency
84
+ name: json
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '='
88
+ - !ruby/object:Gem::Version
89
+ version: 1.8.2
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '='
95
+ - !ruby/object:Gem::Version
96
+ version: 1.8.2
69
97
  description: A simple Slack client for Ruby.
70
98
  email: sclemmer@bluejeans.com
71
99
  executables: []
@@ -104,4 +132,3 @@ signing_key:
104
132
  specification_version: 4
105
133
  summary: A simple Slack client for Ruby
106
134
  test_files: []
107
- has_rdoc: