garufa 0.0.1.alpha.1 → 0.0.1.alpha.2

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: fd5414b2501df19636874c36d690a62cd7d75797
4
- data.tar.gz: a2ad215fe5d4976b10dda84f2de45e3ab2fb3624
3
+ metadata.gz: 6aae7d9943c8813bcc3abf3dd5c8859bbb54afe2
4
+ data.tar.gz: 2eae84445cac472c01ad9d069fc554e1ca7ac91a
5
5
  SHA512:
6
- metadata.gz: fed179df6b9ce97ce73aefe8b2b9ab76996764ebf1a383fded17613501cc42754f884f7276e326258ed4393833cb021bc9101d661f57bf266105fef8c012c578
7
- data.tar.gz: 148d19e5be686167b5a4391d0e66277397a93b8444c90051be36ea05a3a6bacbdc80cfa632af0e4778d05458cc15be9ed18e9d61a15b31fb8a484782a117412c
6
+ metadata.gz: b5a0f00ef6a6f7f5fa06db25c4b956d8efb5a87a75c22cbc97cbfd1764fc535f40d539897e241d0e35f849819c5ea2c038e5c6a4bc133f482ffcb1f5ea6ff257
7
+ data.tar.gz: 873cbbd8d23455cdf71ddb005df15e4dbc3f0fa7e440f3515f9f1f17fa40acb3e2e579cd05a9a90299a6616f368f363ac4bf3f258c4d4013aa3dae116ae86393
data/README.md CHANGED
@@ -1,7 +1,9 @@
1
+ [![Build Status](https://travis-ci.org/Juanmcuello/garufa.png?branch=master)](https://travis-ci.org/Juanmcuello/garufa)
2
+
1
3
  Garufa
2
4
  ====
3
5
 
4
- A websocket server compatible with the Pusher protocol.
6
+ An open source server implementation of the [Pusher][pusher] protocol.
5
7
 
6
8
  **IMPORTANT:** Garufa is currently in alpha version, which means it is not
7
9
  production ready, but you are free to use it and test it. Any feedback is
@@ -10,9 +12,9 @@ welcome.
10
12
  Intro
11
13
  -----
12
14
 
13
- Garufa is a websocket server which implements the [Pusher][pusher] protocol. It
14
- was built on top of [Goliath][goliath], a high performance non-blocking web
15
- server and based on [Slanger][slanger], another server compatible with Pusher.
15
+ Garufa is a Ruby websocket server which implements the Pusher protocol. It was
16
+ built on top of [Goliath][goliath], a high performance non-blocking web server,
17
+ and inspired by [Slanger][slanger], another server compatible with Pusher.
16
18
 
17
19
  [pusher]: http://pusher.com
18
20
  [goliath]: https://github.com/postrank-labs/goliath/
@@ -0,0 +1 @@
1
+ 27355
@@ -28,4 +28,5 @@ Gem::Specification.new do |s|
28
28
  s.add_dependency "faye-websocket", '~> 0.7.2'
29
29
  s.add_dependency "cuba"
30
30
  s.add_dependency "signature"
31
+ s.add_development_dependency "rake"
31
32
  end
@@ -40,7 +40,7 @@ module Garufa
40
40
  end
41
41
 
42
42
  def send_message(message)
43
- @logger.debug "Outgoing message: #{message.to_json}"
43
+ @logger.debug "Outgoing message. #{@socket_id}: #{message.to_json}"
44
44
 
45
45
  @socket.send message.to_json
46
46
  end
@@ -49,6 +49,11 @@ module Garufa
49
49
  @socket.close
50
50
  end
51
51
 
52
+ def cleanup
53
+ @subscriptions.values.each(&:unsubscribe)
54
+ @subscriptions.clear
55
+ end
56
+
52
57
  private
53
58
 
54
59
  def handle_pusher_event(event, data)
@@ -1,4 +1,4 @@
1
1
  module Garufa
2
- VERSION = '0.0.1.alpha.1'
2
+ VERSION = '0.0.1.alpha.2'
3
3
  end
4
4
 
@@ -16,6 +16,8 @@ module Garufa
16
16
  end
17
17
 
18
18
  socket.on :close do |event|
19
+ connection.cleanup
20
+ connection = nil
19
21
  socket = nil
20
22
  end
21
23
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: garufa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.alpha.1
4
+ version: 0.0.1.alpha.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Manuel Cuello
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-04 00:00:00.000000000 Z
11
+ date: 2014-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: goliath
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  description: Garufa is a websocket server compatible with the Pusher service protocol.
70
84
  email:
71
85
  - juanmacuello@gmail.com
@@ -88,6 +102,7 @@ files:
88
102
  - lib/garufa/garufa_app.rb
89
103
  - lib/garufa/connection.rb
90
104
  - lib/garufa.rb
105
+ - bin/garufa.pid
91
106
  - bin/garufa
92
107
  - garufa.gemspec
93
108
  - test/helper.rb