celluloid-io 0.12.1 → 0.13.0.pre

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,27 @@
1
+ -----BEGIN RSA PRIVATE KEY-----
2
+ MIIEogIBAAKCAQEAqS7N14NNEbaBuPkimmjX8Og73vXdCpINAjX1PALMToEyFNUL
3
+ vLPm8ypKnuujXwmuk/FT6ZPVWyJRdjjXYGOKPJrldavpkuo9hwwLVj4g4z/vWDsB
4
+ n/w09y4Um4PJPmpS9nKnuwdVzVLDRRL0PskC5Y/TFim+522AzPGqnb+OihqA4/b/
5
+ a35uEIisCAervyqEBttmBe7E+DuOI1P7ttMXJt61dRJYNIAv1D/2Kp7jDwmWHCv2
6
+ fb2BrQyehvDmA3D2UmQXZKpX34WAbLEo90e7EwqqIeJrNPLpHBsnG71DvnFqzyp5
7
+ skrBmgmLRpKe0LB9XnO0BgNNYWS9si/AriTFGwIDAQABAoIBAGKRoV4p4rIqOiQy
8
+ CuYZpY53T8KUToeFFk0ucMXY/33RqgMXKTJ1Ql50SmuS8GlDs9IALZqOBiWFth6B
9
+ +YHwHK84s+2+DmUJUnWnH8fMhM7CBknKfyTeBWHqGBmPS6WwvstVe8HtASGSUbCh
10
+ 3WnjJWvoQtzLz6z4UK2XM4ea/ooY+hlcw6DM+jZuTstzLFE/9BPoHueaW8UemjaH
11
+ ZUXMKm3+I3iIjHszUUWM59bS9pOBn/YvIJbVE5wMIVCP2YXDCgfpV2Z4nDiAHppn
12
+ fnha2TzHzlPMgwhBpz06r6G8X+A6gJl98TDSK41nIMyXqiZ2aoALL3UOssAMfUHr
13
+ 2y9CGdECgYEA27F1IyUW3JgqCeqZ7eCeT4emhAvyohzM5pzWI7C8ZosF14zFRpek
14
+ TgmjdTGMQ1EZVVkyj85RyvMm3MkcKOHetc5g2jJg3EkxvAV+PMs7yjpqg3itEjC6
15
+ vIhXLoXdq+FuruA2h4O0hi6yuf1FCQYtpNLTe49qetjsaWzwwowHwlMCgYEAxSRo
16
+ k+AdpoNXblnIhd0EaKjGAsHFrC039o7JqQe/mKAiXaGiidIDk5Vt/ChT6Qa6fiLq
17
+ cdysCn+tSCt/DdRrELZohc0ipuy5/agQmJgWoW7oay8ldzxHP9VevWo4UuqVudW9
18
+ evhKe0a9uXCrSimvZ5PJk91lmBx92FBeP6Y+qRkCgYAXQsvPQ88O3kGdOSzBJgY9
19
+ D3TPCGDRT1FWnYaC0uSvysp8jxgYKFgqNxUKhIuAWSbghYg397VrUqFrwRNtNLUa
20
+ 9NYGZE0jJdDRQpeiIjaba+H5N57DjUtISPtKHrxgxYatl2nOoWBM0Mb1sF5N3UyZ
21
+ 5gSkUYQJq8wkQXegcakkpwKBgEdvvgV3vMbN6SyvlB4NzL8wCTCOjtapPBI4A5Mg
22
+ n6jqvgk3vPI8C9e62jP5WQ6jxYhXlqTT1fOn+F6ihFO6mWFg99ckUl4ygeMMt5bT
23
+ 5b9xtP7CAs2GJjtXUhFJIEfLgZ3pedPJjRPGupEr5qXlHQ5nWzAdlebczC1KUhy2
24
+ XRZhAoGAGA3SAAF79PK3c3+bOOviXxDFuH5TCBmbtEpJ+/jCbwR6Z8fMRswZJ3Gc
25
+ l8eNMsB+Kfif+806xAgLxsyhYuyvF6rE/V34GKjW22T1gwk6gY/rOgFn42jo8lwl
26
+ HFbSB+IG0+Go0m+0QmyRh7SyPvDNtyYzBFFdl9U8JYYGM0Nfgd0=
27
+ -----END RSA PRIVATE KEY-----
data/spec/spec_helper.rb CHANGED
@@ -3,6 +3,9 @@ require 'bundler/setup'
3
3
  require 'celluloid/io'
4
4
  require 'celluloid/rspec'
5
5
 
6
+ logfile = File.open(File.expand_path("../../log/test.log", __FILE__), 'a')
7
+ Celluloid.logger = Logger.new(logfile)
8
+
6
9
  class ExampleActor
7
10
  include Celluloid::IO
8
11
 
@@ -11,16 +14,20 @@ class ExampleActor
11
14
  end
12
15
  end
13
16
 
14
- EXAMPLE_PORT = 10000 + rand(10000)
17
+ EXAMPLE_PORT = 12345
15
18
 
16
19
  def example_addr; '127.0.0.1'; end
17
20
  def example_port; EXAMPLE_PORT; end
21
+ def example_unix_sock; '/tmp/cell_sock'; end
22
+ def example_ssl_port; EXAMPLE_PORT + 1; end
23
+
24
+ def fixture_dir; Pathname.new File.expand_path("../fixtures", __FILE__); end
18
25
 
19
26
  def within_io_actor(&block)
20
27
  actor = ExampleActor.new
21
28
  actor.wrap(&block)
22
29
  ensure
23
- actor.terminate
30
+ actor.terminate if actor.alive?
24
31
  end
25
32
 
26
33
  def with_tcp_server
@@ -32,6 +39,16 @@ def with_tcp_server
32
39
  end
33
40
  end
34
41
 
42
+ def with_unix_server
43
+ server = Celluloid::IO::UNIXServer.open(example_unix_sock)
44
+ begin
45
+ yield server
46
+ ensure
47
+ server.close
48
+ File.delete(example_unix_sock)
49
+ end
50
+ end
51
+
35
52
  def with_connected_sockets
36
53
  with_tcp_server do |server|
37
54
  # FIXME: client isn't actually a Celluloid::IO::TCPSocket yet
@@ -41,8 +58,28 @@ def with_connected_sockets
41
58
  begin
42
59
  yield peer, client
43
60
  ensure
44
- client.close
45
- peer.close
61
+ begin
62
+ client.close
63
+ peer.close
64
+ rescue
65
+ end
66
+ end
67
+ end
68
+ end
69
+
70
+ def with_connected_unix_sockets
71
+ with_unix_server do |server|
72
+ client = Celluloid::IO::UNIXSocket.new(example_unix_sock)
73
+ peer = server.accept
74
+
75
+ begin
76
+ yield peer, client
77
+ ensure
78
+ begin
79
+ client.close
80
+ peer.close
81
+ rescue
82
+ end
46
83
  end
47
84
  end
48
85
  end
metadata CHANGED
@@ -1,102 +1,128 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: celluloid-io
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.12.1
4
+ version: 0.13.0.pre
5
+ prerelease: 7
6
6
  platform: ruby
7
7
  authors:
8
8
  - Tony Arcieri
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-13 00:00:00.000000000 Z
12
+ date: 2013-02-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: celluloid
16
- version_requirements: !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
17
18
  requirements:
18
- - - ~>
19
+ - - ! '>='
19
20
  - !ruby/object:Gem::Version
20
- version: 0.12.0
21
+ version: 0.13.0.pre
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
21
25
  none: false
22
- requirement: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - ~>
27
+ - - ! '>='
25
28
  - !ruby/object:Gem::Version
26
- version: 0.12.0
27
- none: false
28
- prerelease: false
29
- type: :runtime
29
+ version: 0.13.0.pre
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: nio4r
32
- version_requirements: !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
33
34
  requirements:
34
35
  - - ! '>='
35
36
  - !ruby/object:Gem::Version
36
37
  version: 0.4.0
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
37
41
  none: false
38
- requirement: !ruby/object:Gem::Requirement
39
42
  requirements:
40
43
  - - ! '>='
41
44
  - !ruby/object:Gem::Version
42
45
  version: 0.4.0
43
- none: false
44
- prerelease: false
45
- type: :runtime
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: rake
48
- version_requirements: !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
49
50
  requirements:
50
51
  - - ! '>='
51
52
  - !ruby/object:Gem::Version
52
- version: !binary |-
53
- MA==
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
54
57
  none: false
55
- requirement: !ruby/object:Gem::Requirement
56
58
  requirements:
57
59
  - - ! '>='
58
60
  - !ruby/object:Gem::Version
59
- version: !binary |-
60
- MA==
61
- none: false
62
- prerelease: false
63
- type: :development
61
+ version: '0'
64
62
  - !ruby/object:Gem::Dependency
65
63
  name: rspec
66
- version_requirements: !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
67
66
  requirements:
68
67
  - - ! '>='
69
68
  - !ruby/object:Gem::Version
70
- version: !binary |-
71
- MA==
69
+ version: '0'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
72
73
  none: false
73
- requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - ! '>='
76
76
  - !ruby/object:Gem::Version
77
- version: !binary |-
78
- MA==
79
- none: false
80
- prerelease: false
81
- type: :development
77
+ version: '0'
82
78
  - !ruby/object:Gem::Dependency
83
79
  name: benchmark_suite
84
- version_requirements: !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
85
82
  requirements:
86
83
  - - ! '>='
87
84
  - !ruby/object:Gem::Version
88
- version: !binary |-
89
- MA==
85
+ version: '0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
90
89
  none: false
91
- requirement: !ruby/object:Gem::Requirement
92
90
  requirements:
93
91
  - - ! '>='
94
92
  - !ruby/object:Gem::Version
95
- version: !binary |-
96
- MA==
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: guard-rspec
96
+ requirement: !ruby/object:Gem::Requirement
97
97
  none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :development
98
103
  prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: rb-fsevent
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: 0.9.1
99
118
  type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: 0.9.1
100
126
  description: Evented IO for Celluloid actors
101
127
  email:
102
128
  - tony.arcieri@gmail.com
@@ -109,6 +135,7 @@ files:
109
135
  - .travis.yml
110
136
  - CHANGES.md
111
137
  - Gemfile
138
+ - Guardfile
112
139
  - LICENSE.txt
113
140
  - README.md
114
141
  - Rakefile
@@ -116,56 +143,81 @@ files:
116
143
  - celluloid-io.gemspec
117
144
  - examples/echo_client.rb
118
145
  - examples/echo_server.rb
146
+ - examples/echo_unix_client.rb
147
+ - examples/echo_unix_server.rb
119
148
  - lib/celluloid/io.rb
120
149
  - lib/celluloid/io/common_methods.rb
121
150
  - lib/celluloid/io/dns_resolver.rb
122
151
  - lib/celluloid/io/mailbox.rb
123
152
  - lib/celluloid/io/reactor.rb
153
+ - lib/celluloid/io/ssl_server.rb
154
+ - lib/celluloid/io/ssl_socket.rb
124
155
  - lib/celluloid/io/tcp_server.rb
125
156
  - lib/celluloid/io/tcp_socket.rb
126
157
  - lib/celluloid/io/udp_socket.rb
158
+ - lib/celluloid/io/unix_server.rb
159
+ - lib/celluloid/io/unix_socket.rb
127
160
  - lib/celluloid/io/version.rb
161
+ - log/.gitignore
128
162
  - logo.png
129
163
  - spec/celluloid/io/actor_spec.rb
130
164
  - spec/celluloid/io/dns_resolver_spec.rb
131
165
  - spec/celluloid/io/mailbox_spec.rb
166
+ - spec/celluloid/io/ssl_server_spec.rb
167
+ - spec/celluloid/io/ssl_socket_spec.rb
132
168
  - spec/celluloid/io/tcp_server_spec.rb
133
169
  - spec/celluloid/io/tcp_socket_spec.rb
134
170
  - spec/celluloid/io/udp_socket_spec.rb
171
+ - spec/celluloid/io/unix_server_spec.rb
172
+ - spec/celluloid/io/unix_socket_spec.rb
173
+ - spec/fixtures/client.crt
174
+ - spec/fixtures/client.key
175
+ - spec/fixtures/server.crt
176
+ - spec/fixtures/server.key
135
177
  - spec/spec_helper.rb
136
178
  - tasks/benchmarks.task
137
179
  - tasks/rspec.task
138
180
  homepage: http://github.com/celluloid/celluloid-io
139
181
  licenses: []
140
- post_install_message:
182
+ post_install_message:
141
183
  rdoc_options: []
142
184
  require_paths:
143
185
  - lib
144
186
  required_ruby_version: !ruby/object:Gem::Requirement
187
+ none: false
145
188
  requirements:
146
189
  - - ! '>='
147
190
  - !ruby/object:Gem::Version
148
- version: !binary |-
149
- MA==
150
- none: false
191
+ version: '0'
192
+ segments:
193
+ - 0
194
+ hash: -662471971010224791
151
195
  required_rubygems_version: !ruby/object:Gem::Requirement
196
+ none: false
152
197
  requirements:
153
- - - ! '>='
198
+ - - ! '>'
154
199
  - !ruby/object:Gem::Version
155
- version: !binary |-
156
- MA==
157
- none: false
200
+ version: 1.3.1
158
201
  requirements: []
159
- rubyforge_project:
160
- rubygems_version: 1.8.24
161
- signing_key:
202
+ rubyforge_project:
203
+ rubygems_version: 1.8.23
204
+ signing_key:
162
205
  specification_version: 3
163
- summary: Celluloid::IO allows you to monitor multiple IO objects within a Celluloid actor
206
+ summary: Celluloid::IO allows you to monitor multiple IO objects within a Celluloid
207
+ actor
164
208
  test_files:
165
209
  - spec/celluloid/io/actor_spec.rb
166
210
  - spec/celluloid/io/dns_resolver_spec.rb
167
211
  - spec/celluloid/io/mailbox_spec.rb
212
+ - spec/celluloid/io/ssl_server_spec.rb
213
+ - spec/celluloid/io/ssl_socket_spec.rb
168
214
  - spec/celluloid/io/tcp_server_spec.rb
169
215
  - spec/celluloid/io/tcp_socket_spec.rb
170
216
  - spec/celluloid/io/udp_socket_spec.rb
217
+ - spec/celluloid/io/unix_server_spec.rb
218
+ - spec/celluloid/io/unix_socket_spec.rb
219
+ - spec/fixtures/client.crt
220
+ - spec/fixtures/client.key
221
+ - spec/fixtures/server.crt
222
+ - spec/fixtures/server.key
171
223
  - spec/spec_helper.rb