funl 0.6 → 0.7

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: 0b5ff91baeb01956c2e26427666b5ce60086a777
4
- data.tar.gz: 49f96709858f97aa437782f3059dcda83d69cc39
3
+ metadata.gz: f7052cdcfcfbc11611386090111ff18932e150dc
4
+ data.tar.gz: 8d406bc8f898c87a82240a689fec27dc2fe6bf3d
5
5
  SHA512:
6
- metadata.gz: 022c1cfec28b024802f721039fbfe7aa5a4adff0f11b2f3bac58507dbdf6142a0507f340a85c9ce04d106424d617bd960911cb47fedb38431ed5735897e30217
7
- data.tar.gz: fc5c636c27a20f99600f1c8fa208794cade737d11a225d6f9d054ead7fa033c42c0c24e7130a69ce69e9f3fee481349f7a1c5c7560eb59cea4d08e97f21b1571
6
+ metadata.gz: a69cb87e3c8960f9c354d3ab5bfbe561d54e07088bbcf3f22e479789e17a8bca00b29fde36ecc9a8872a6dec8e9c65bac1bc6b13c8c3a3f115cc96e4c188d4a6
7
+ data.tar.gz: 2b1fd03f61eb10df1f4f0b71e72991b7b75469f286c08991605a8c7aaccb962ef4045c7b5869f2e667be768ebb445eca6ad3fe0164b8c26f25fe04bb4c58119c
data/COPYING CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013, Joel VanderWerf, vjoel@users.sourceforge.net
1
+ Copyright (c) 2013-2014, Joel VanderWerf, vjoel@users.sourceforge.net
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without
@@ -107,7 +107,7 @@ module Funl
107
107
  readable.read do |msg|
108
108
  msgs << msg
109
109
  end
110
- rescue IOError, SystemCallError => ex
110
+ rescue ObjectStream::StreamError, IOError, SystemCallError => ex
111
111
  log.debug {"closing #{readable}: #{ex}"}
112
112
  reject_stream readable
113
113
  else
@@ -5,7 +5,7 @@ module Funl
5
5
  UNSUBSCRIBE = "unsubscribe".freeze
6
6
  SUBSCRIBE_ALL = "subscribe_all".freeze
7
7
  UNSUBSCRIBE_ALL = "unsubscribe_all".freeze
8
-
8
+
9
9
  # Mixin depends on stream_type, log, client_id, message_class.
10
10
  module Stream
11
11
  def client_stream_for io, type: stream_type
@@ -18,6 +18,7 @@ module Funl
18
18
  def server_stream_for io, type: stream_type
19
19
  ObjectStreamWrapper.new(io, type: type).tap do |stream|
20
20
  stream.consume do |h|
21
+ raise StreamError, "bad handshake: #{h.class}" unless h.kind_of? Hash
21
22
  client_id = h["client_id"]
22
23
  stream.peer_name = "client #{client_id}"
23
24
  log.info "peer is #{stream.peer_name}"
@@ -28,6 +29,7 @@ module Funl
28
29
  def message_server_stream_for io, type: stream_type
29
30
  ObjectStreamWrapper.new(io, type: type).tap do |stream|
30
31
  stream.consume do |h|
32
+ raise StreamError, "bad handshake: #{h.class}" unless h.kind_of? Hash
31
33
  client_id = h["client_id"]
32
34
  stream.peer_name = "client #{client_id}"
33
35
  log.info "peer is #{stream.peer_name}"
@@ -1,3 +1,3 @@
1
1
  module Funl
2
- VERSION = "0.6"
2
+ VERSION = "0.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: funl
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.6'
4
+ version: '0.7'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel VanderWerf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-16 00:00:00.000000000 Z
11
+ date: 2014-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: object-stream
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: nio4r
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  description: Sequences messages.
28
42
  email: vjoel@users.sourceforge.net
29
43
  executables: []
@@ -32,30 +46,30 @@ extra_rdoc_files:
32
46
  - README.md
33
47
  - COPYING
34
48
  files:
35
- - README.md
36
49
  - COPYING
50
+ - README.md
37
51
  - Rakefile
38
- - lib/funl/stream.rb
52
+ - bench/funl-bench.rb
53
+ - bench/msg-rate.rb
39
54
  - lib/funl/blobber.rb
40
- - lib/funl/subscription-tracker.rb
55
+ - lib/funl/client-sequencer.rb
56
+ - lib/funl/client.rb
41
57
  - lib/funl/history-client.rb
42
58
  - lib/funl/history-worker.rb
43
- - lib/funl/client.rb
44
- - lib/funl/message-sequencer.rb
45
59
  - lib/funl/message-sequencer-nio.rb
46
- - lib/funl/client-sequencer.rb
60
+ - lib/funl/message-sequencer-select.rb
61
+ - lib/funl/message-sequencer.rb
47
62
  - lib/funl/message.rb
63
+ - lib/funl/stream.rb
64
+ - lib/funl/subscription-tracker.rb
48
65
  - lib/funl/version.rb
49
- - lib/funl/message-sequencer-select.rb
50
- - bench/msg-rate.rb
51
- - bench/funl-bench.rb
52
- - test/test-message-sequencer.rb
53
66
  - test/test-client-sequencer.rb
54
- - test/test-reflect.rb
67
+ - test/test-client.rb
68
+ - test/test-message-sequencer.rb
55
69
  - test/test-message.rb
70
+ - test/test-reflect.rb
56
71
  - test/test-stream.rb
57
72
  - test/test-subscribe.rb
58
- - test/test-client.rb
59
73
  homepage: https://github.com/vjoel/funl
60
74
  licenses:
61
75
  - BSD
@@ -83,16 +97,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
97
  version: '0'
84
98
  requirements: []
85
99
  rubyforge_project:
86
- rubygems_version: 2.1.11
100
+ rubygems_version: 2.2.1
87
101
  signing_key:
88
102
  specification_version: 4
89
103
  summary: Sequences messages
90
104
  test_files:
91
- - test/test-message-sequencer.rb
92
- - test/test-client-sequencer.rb
93
- - test/test-reflect.rb
94
- - test/test-message.rb
95
105
  - test/test-stream.rb
96
- - test/test-subscribe.rb
106
+ - test/test-message.rb
97
107
  - test/test-client.rb
108
+ - test/test-client-sequencer.rb
109
+ - test/test-subscribe.rb
110
+ - test/test-reflect.rb
111
+ - test/test-message-sequencer.rb
98
112
  has_rdoc: