dripdrop 0.10.0.beta2 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +31 -0
- data/Gemfile +5 -0
- data/README.md +5 -5
- data/Rakefile +5 -29
- data/dripdrop.gemspec +24 -91
- data/lib/dripdrop/handlers/websocket_server.rb +7 -4
- data/lib/dripdrop/node.rb +1 -1
- data/lib/dripdrop/version.rb +3 -0
- data/spec/node/http_spec.rb +2 -0
- data/spec/node_spec.rb +1 -0
- metadata +41 -26
- data/VERSION +0 -1
data/.gitignore
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
## MAC OS
|
2
|
+
.DS_Store
|
3
|
+
|
4
|
+
## TEXTMATE
|
5
|
+
*.tmproj
|
6
|
+
tmtags
|
7
|
+
|
8
|
+
## EMACS
|
9
|
+
*~
|
10
|
+
\#*
|
11
|
+
.\#*
|
12
|
+
|
13
|
+
## VIM
|
14
|
+
*.swp
|
15
|
+
*.swo
|
16
|
+
*.swn
|
17
|
+
|
18
|
+
## PROJECT::GENERAL
|
19
|
+
coverage
|
20
|
+
rdoc
|
21
|
+
doc
|
22
|
+
pkg
|
23
|
+
|
24
|
+
#RBX
|
25
|
+
*.rbc
|
26
|
+
|
27
|
+
## PROJECT::SPECIFIC
|
28
|
+
.rvmrc
|
29
|
+
Gemfile.lock
|
30
|
+
.bundle
|
31
|
+
*.gem
|
data/Gemfile
ADDED
data/README.md
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
## INSTALLATION NOTES:
|
4
4
|
|
5
|
-
1.
|
6
|
-
2. Build
|
7
|
-
3.
|
8
|
-
4.
|
9
|
-
5. If
|
5
|
+
1. This does NOT work with 1.8.7. 1.9.2/RBX/jRuby only.
|
6
|
+
2. Build zeromq2 from [git master](https://github.com/zeromq/zeromq2) if you haven't already.
|
7
|
+
3. Install with 'gem install dripdrop'.
|
8
|
+
4. If on jRuby, http servers will be unavailable unless you have a jruby with cext support, and manually `gem install eventmachine_httpserver`
|
9
|
+
5. If on 1.9.x `gem install ffi`
|
10
10
|
|
11
11
|
## About
|
12
12
|
|
data/Rakefile
CHANGED
@@ -1,35 +1,11 @@
|
|
1
|
-
require '
|
2
|
-
|
3
|
-
|
4
|
-
begin
|
5
|
-
require 'jeweler'
|
6
|
-
Jeweler::Tasks.new do |gem|
|
7
|
-
gem.name = "dripdrop"
|
8
|
-
gem.summary = %Q{Evented framework for ZeroMQ and EventMachine Apps.}
|
9
|
-
gem.description = %Q{Evented framework for ZeroMQ and EventMachine Apps. }
|
10
|
-
gem.email = "andrew@andrewvc.com"
|
11
|
-
gem.homepage = "http://github.com/andrewvc/dripdrop"
|
12
|
-
gem.authors = ["Andrew Cholakian"]
|
13
|
-
gem.add_dependency('eventmachine', '>= 0.12.10')
|
14
|
-
gem.add_dependency('em-websocket')
|
15
|
-
gem.add_dependency('em-zeromq', '>= 0.2.0')
|
16
|
-
gem.add_development_dependency('rspec', '>= 2.4.0')
|
17
|
-
end
|
18
|
-
Jeweler::GemcutterTasks.new
|
19
|
-
rescue LoadError
|
20
|
-
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
21
|
-
end
|
22
|
-
|
23
|
-
task :test => :check_dependencies
|
24
|
-
|
25
|
-
task :default => :test
|
1
|
+
require 'bundler'
|
2
|
+
Bundler::GemHelper.install_tasks
|
26
3
|
|
27
4
|
require 'rake/rdoctask'
|
5
|
+
require 'dripdrop/version'
|
28
6
|
Rake::RDocTask.new do |rdoc|
|
29
|
-
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
30
|
-
|
31
7
|
rdoc.rdoc_dir = 'rdoc'
|
32
|
-
rdoc.title = "dripdrop #{
|
8
|
+
rdoc.title = "dripdrop #{DripDrop::VERSION}"
|
33
9
|
rdoc.rdoc_files.include('README*')
|
34
10
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
35
11
|
end
|
@@ -37,4 +13,4 @@ end
|
|
37
13
|
require 'rspec/core/rake_task'
|
38
14
|
RSpec::Core::RakeTask.new(:spec) do |t|
|
39
15
|
end
|
40
|
-
|
16
|
+
task :default => :spec
|
data/dripdrop.gemspec
CHANGED
@@ -1,104 +1,37 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "dripdrop/version"
|
5
4
|
|
6
5
|
Gem::Specification.new do |s|
|
7
|
-
s.name
|
8
|
-
s.version
|
9
|
-
|
10
|
-
s.
|
11
|
-
s.
|
12
|
-
s.
|
13
|
-
s.
|
14
|
-
s.
|
6
|
+
s.name = "dripdrop"
|
7
|
+
s.version = DripDrop::VERSION
|
8
|
+
s.platform = RUBY_PLATFORM[/java/] || Gem::Platform::RUBY
|
9
|
+
s.authors = ["Andrew Cholakian"]
|
10
|
+
s.email = ["andrew@andrewvc.com"]
|
11
|
+
s.homepage = "https://github.com/andrewvc/dripdrop"
|
12
|
+
s.summary = %q{Evented framework for ZeroMQ and EventMachine Apps.}
|
13
|
+
s.description = %q{Evented framework for ZeroMQ and EventMachine Apps.}
|
15
14
|
s.extra_rdoc_files = [
|
16
15
|
"LICENSE",
|
17
16
|
"README.md"
|
18
17
|
]
|
19
|
-
s.files = [
|
20
|
-
".document",
|
21
|
-
"LICENSE",
|
22
|
-
"README.md",
|
23
|
-
"Rakefile",
|
24
|
-
"VERSION",
|
25
|
-
"dripdrop.gemspec",
|
26
|
-
"example/agent_test.rb",
|
27
|
-
"example/combined.rb",
|
28
|
-
"example/complex/README",
|
29
|
-
"example/complex/client.rb",
|
30
|
-
"example/complex/server.rb",
|
31
|
-
"example/complex/service.rb",
|
32
|
-
"example/complex/websocket.rb",
|
33
|
-
"example/http.rb",
|
34
|
-
"example/pubsub.rb",
|
35
|
-
"example/pushpull.rb",
|
36
|
-
"example/subclass.rb",
|
37
|
-
"example/xreq_xrep.rb",
|
38
|
-
"js/dripdrop.html",
|
39
|
-
"js/dripdrop.js",
|
40
|
-
"js/qunit.css",
|
41
|
-
"js/qunit.js",
|
42
|
-
"lib/dripdrop.rb",
|
43
|
-
"lib/dripdrop/agent.rb",
|
44
|
-
"lib/dripdrop/handlers/base.rb",
|
45
|
-
"lib/dripdrop/handlers/http_client.rb",
|
46
|
-
"lib/dripdrop/handlers/http_server.rb",
|
47
|
-
"lib/dripdrop/handlers/mongrel2.rb",
|
48
|
-
"lib/dripdrop/handlers/websocket_server.rb",
|
49
|
-
"lib/dripdrop/handlers/zeromq.rb",
|
50
|
-
"lib/dripdrop/message.rb",
|
51
|
-
"lib/dripdrop/node.rb",
|
52
|
-
"lib/dripdrop/node/nodelet.rb",
|
53
|
-
"spec/gimite-websocket.rb",
|
54
|
-
"spec/message_spec.rb",
|
55
|
-
"spec/node/http_spec.rb",
|
56
|
-
"spec/node/nodelet_spec.rb",
|
57
|
-
"spec/node/routing_spec.rb",
|
58
|
-
"spec/node/websocket_spec.rb",
|
59
|
-
"spec/node/zmq_m2_spec.rb",
|
60
|
-
"spec/node/zmq_pushpull_spec.rb",
|
61
|
-
"spec/node/zmq_xrepxreq_spec.rb",
|
62
|
-
"spec/node_spec.rb",
|
63
|
-
"spec/spec_helper.rb"
|
64
|
-
]
|
65
|
-
s.homepage = %q{http://github.com/andrewvc/dripdrop}
|
66
|
-
s.require_paths = ["lib"]
|
67
|
-
s.rubygems_version = %q{1.5.3}
|
68
|
-
s.summary = %q{Evented framework for ZeroMQ and EventMachine Apps.}
|
69
|
-
s.test_files = [
|
70
|
-
"spec/gimite-websocket.rb",
|
71
|
-
"spec/message_spec.rb",
|
72
|
-
"spec/node/http_spec.rb",
|
73
|
-
"spec/node/nodelet_spec.rb",
|
74
|
-
"spec/node/routing_spec.rb",
|
75
|
-
"spec/node/websocket_spec.rb",
|
76
|
-
"spec/node/zmq_m2_spec.rb",
|
77
|
-
"spec/node/zmq_pushpull_spec.rb",
|
78
|
-
"spec/node/zmq_xrepxreq_spec.rb",
|
79
|
-
"spec/node_spec.rb",
|
80
|
-
"spec/spec_helper.rb"
|
81
|
-
]
|
82
18
|
|
83
|
-
|
84
|
-
s.specification_version = 3
|
19
|
+
s.rubyforge_project = "dripdrop"
|
85
20
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
else
|
92
|
-
s.add_dependency(%q<eventmachine>, [">= 0.12.10"])
|
93
|
-
s.add_dependency(%q<em-websocket>, [">= 0"])
|
94
|
-
s.add_dependency(%q<em-zeromq>, [">= 0.2.0"])
|
95
|
-
s.add_dependency(%q<rspec>, [">= 2.4.0"])
|
96
|
-
end
|
21
|
+
s.add_dependency "eventmachine", ">= 0.12.10"
|
22
|
+
s.add_dependency "em-websocket", ">= 0"
|
23
|
+
s.add_dependency "em-zeromq", ">= 0.2.1"
|
24
|
+
if s.platform.to_s == "java"
|
25
|
+
s.add_dependency "json", ">= 1.5.1"
|
97
26
|
else
|
98
|
-
s.add_dependency
|
99
|
-
s.add_dependency
|
100
|
-
s.add_dependency(%q<em-zeromq>, [">= 0.2.0"])
|
101
|
-
s.add_dependency(%q<rspec>, [">= 2.4.0"])
|
27
|
+
s.add_dependency "yajl-ruby", ">= 0.8.1"
|
28
|
+
s.add_dependency "eventmachine_httpserver", ">= 0.2.1"
|
102
29
|
end
|
30
|
+
s.add_development_dependency "rspec", ">= 2.4.0"
|
31
|
+
|
32
|
+
s.files = `git ls-files`.split("\n")
|
33
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
34
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
35
|
+
s.require_paths = ["lib"]
|
103
36
|
end
|
104
37
|
|
@@ -21,10 +21,13 @@ class DripDrop
|
|
21
21
|
ws.onopen { @onopen_handler.call(dd_conn) if @onopen_handler }
|
22
22
|
ws.onclose { @onclose_handler.call(dd_conn) if @onclose_handler }
|
23
23
|
ws.onerror {|reason|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
24
|
+
begin
|
25
|
+
raise SocketError, reason
|
26
|
+
rescue SocketError => e
|
27
|
+
e.reason = reason
|
28
|
+
e.connection = dd_conn
|
29
|
+
handle_error(e,dd_conn)
|
30
|
+
end
|
28
31
|
}
|
29
32
|
|
30
33
|
ws.onmessage { |message|
|
data/lib/dripdrop/node.rb
CHANGED
data/spec/node/http_spec.rb
CHANGED
data/spec/node_spec.rb
CHANGED
@@ -72,6 +72,7 @@ describe DripDrop::Node do
|
|
72
72
|
class TestException < StandardError; end
|
73
73
|
|
74
74
|
it "should rescue exceptions in the EM reactor" do
|
75
|
+
pending "Not sure why em-java doesn't support this" if RUBY_PLATFORM == 'java'
|
75
76
|
expectations = an_instance_of(TestException)
|
76
77
|
reactor = run_reactor do
|
77
78
|
self.class.should_receive(:error_handler).with(expectations)
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dripdrop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
version: 0.10.0
|
4
|
+
prerelease:
|
5
|
+
version: 0.10.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Andrew Cholakian
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-03-
|
13
|
+
date: 2011-03-12 23:00:00 -08:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -43,22 +43,45 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0.2.
|
46
|
+
version: 0.2.1
|
47
47
|
type: :runtime
|
48
48
|
version_requirements: *id003
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
|
-
name:
|
50
|
+
name: yajl-ruby
|
51
51
|
prerelease: false
|
52
52
|
requirement: &id004 !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: 0.8.1
|
58
|
+
type: :runtime
|
59
|
+
version_requirements: *id004
|
60
|
+
- !ruby/object:Gem::Dependency
|
61
|
+
name: eventmachine_httpserver
|
62
|
+
prerelease: false
|
63
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.2.1
|
69
|
+
type: :runtime
|
70
|
+
version_requirements: *id005
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: rspec
|
73
|
+
prerelease: false
|
74
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
53
75
|
none: false
|
54
76
|
requirements:
|
55
77
|
- - ">="
|
56
78
|
- !ruby/object:Gem::Version
|
57
79
|
version: 2.4.0
|
58
80
|
type: :development
|
59
|
-
version_requirements: *
|
60
|
-
description:
|
61
|
-
email:
|
81
|
+
version_requirements: *id006
|
82
|
+
description: Evented framework for ZeroMQ and EventMachine Apps.
|
83
|
+
email:
|
84
|
+
- andrew@andrewvc.com
|
62
85
|
executables: []
|
63
86
|
|
64
87
|
extensions: []
|
@@ -68,10 +91,11 @@ extra_rdoc_files:
|
|
68
91
|
- README.md
|
69
92
|
files:
|
70
93
|
- .document
|
94
|
+
- .gitignore
|
95
|
+
- Gemfile
|
71
96
|
- LICENSE
|
72
97
|
- README.md
|
73
98
|
- Rakefile
|
74
|
-
- VERSION
|
75
99
|
- dripdrop.gemspec
|
76
100
|
- example/agent_test.rb
|
77
101
|
- example/combined.rb
|
@@ -100,6 +124,7 @@ files:
|
|
100
124
|
- lib/dripdrop/message.rb
|
101
125
|
- lib/dripdrop/node.rb
|
102
126
|
- lib/dripdrop/node/nodelet.rb
|
127
|
+
- lib/dripdrop/version.rb
|
103
128
|
- spec/gimite-websocket.rb
|
104
129
|
- spec/message_spec.rb
|
105
130
|
- spec/node/http_spec.rb
|
@@ -112,7 +137,7 @@ files:
|
|
112
137
|
- spec/node_spec.rb
|
113
138
|
- spec/spec_helper.rb
|
114
139
|
has_rdoc: true
|
115
|
-
homepage:
|
140
|
+
homepage: https://github.com/andrewvc/dripdrop
|
116
141
|
licenses: []
|
117
142
|
|
118
143
|
post_install_message:
|
@@ -129,25 +154,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
129
154
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
130
155
|
none: false
|
131
156
|
requirements:
|
132
|
-
- - "
|
157
|
+
- - ">="
|
133
158
|
- !ruby/object:Gem::Version
|
134
|
-
version:
|
159
|
+
version: "0"
|
135
160
|
requirements: []
|
136
161
|
|
137
|
-
rubyforge_project:
|
138
|
-
rubygems_version: 1.
|
162
|
+
rubyforge_project: dripdrop
|
163
|
+
rubygems_version: 1.6.0
|
139
164
|
signing_key:
|
140
165
|
specification_version: 3
|
141
166
|
summary: Evented framework for ZeroMQ and EventMachine Apps.
|
142
|
-
test_files:
|
143
|
-
|
144
|
-
- spec/message_spec.rb
|
145
|
-
- spec/node/http_spec.rb
|
146
|
-
- spec/node/nodelet_spec.rb
|
147
|
-
- spec/node/routing_spec.rb
|
148
|
-
- spec/node/websocket_spec.rb
|
149
|
-
- spec/node/zmq_m2_spec.rb
|
150
|
-
- spec/node/zmq_pushpull_spec.rb
|
151
|
-
- spec/node/zmq_xrepxreq_spec.rb
|
152
|
-
- spec/node_spec.rb
|
153
|
-
- spec/spec_helper.rb
|
167
|
+
test_files: []
|
168
|
+
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.10.0.beta2
|