proxylocal 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Manifest +0 -1
- data/Rakefile +2 -2
- data/lib/client.rb +14 -5
- data/proxylocal.gemspec +5 -2
- metadata +20 -4
data/Manifest
CHANGED
data/Rakefile
CHANGED
@@ -2,11 +2,11 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('proxylocal', '0.0.
|
5
|
+
Echoe.new('proxylocal', '0.0.3') do |p|
|
6
6
|
p.description = 'http://proxylocal.com/'
|
7
7
|
p.url = 'http://proxylocal.com/'
|
8
8
|
p.author = 'Just Lest'
|
9
9
|
p.email = 'just.lest@gmail.com'
|
10
|
-
p.runtime_dependencies = ['eventmachine >=0.12.10']
|
10
|
+
p.runtime_dependencies = ['eventmachine >=0.12.10', 'bert >=1.1.2']
|
11
11
|
p.development_dependencies = []
|
12
12
|
end
|
data/lib/client.rb
CHANGED
@@ -1,12 +1,25 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'eventmachine'
|
3
|
+
require 'bert'
|
3
4
|
|
4
5
|
module ProxyLocal
|
6
|
+
module Serializer
|
7
|
+
def self.dump(object)
|
8
|
+
BERT.encode(object)
|
9
|
+
end
|
5
10
|
|
6
|
-
|
11
|
+
def self.load(data)
|
12
|
+
BERT.decode(data)
|
13
|
+
end
|
14
|
+
end
|
7
15
|
|
16
|
+
class Client < EventMachine::Connection
|
8
17
|
include EventMachine::Protocols::ObjectProtocol
|
9
18
|
|
19
|
+
def serializer
|
20
|
+
Serializer
|
21
|
+
end
|
22
|
+
|
10
23
|
def self.run(options = {})
|
11
24
|
trap "SIGCLD", "IGNORE"
|
12
25
|
trap "INT" do
|
@@ -46,11 +59,9 @@ module ProxyLocal
|
|
46
59
|
EventMachine.stop_event_loop
|
47
60
|
puts "A connection has been terminated"
|
48
61
|
end
|
49
|
-
|
50
62
|
end
|
51
63
|
|
52
64
|
class ClientProxy < EventMachine::Connection
|
53
|
-
|
54
65
|
def post_init
|
55
66
|
@data = ''
|
56
67
|
end
|
@@ -66,7 +77,5 @@ module ProxyLocal
|
|
66
77
|
def callback(&block)
|
67
78
|
@callback = block
|
68
79
|
end
|
69
|
-
|
70
80
|
end
|
71
|
-
|
72
81
|
end
|
data/proxylocal.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{proxylocal}
|
5
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.3"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Just Lest"]
|
9
|
-
s.date = %q{2010-
|
9
|
+
s.date = %q{2010-11-09}
|
10
10
|
s.default_executable = %q{proxylocal}
|
11
11
|
s.description = %q{http://proxylocal.com/}
|
12
12
|
s.email = %q{just.lest@gmail.com}
|
@@ -26,10 +26,13 @@ Gem::Specification.new do |s|
|
|
26
26
|
|
27
27
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
28
28
|
s.add_runtime_dependency(%q<eventmachine>, [">= 0.12.10"])
|
29
|
+
s.add_runtime_dependency(%q<bert>, [">= 1.1.2"])
|
29
30
|
else
|
30
31
|
s.add_dependency(%q<eventmachine>, [">= 0.12.10"])
|
32
|
+
s.add_dependency(%q<bert>, [">= 1.1.2"])
|
31
33
|
end
|
32
34
|
else
|
33
35
|
s.add_dependency(%q<eventmachine>, [">= 0.12.10"])
|
36
|
+
s.add_dependency(%q<bert>, [">= 1.1.2"])
|
34
37
|
end
|
35
38
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: proxylocal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Just Lest
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-11-09 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -34,6 +34,22 @@ dependencies:
|
|
34
34
|
version: 0.12.10
|
35
35
|
type: :runtime
|
36
36
|
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: bert
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 23
|
46
|
+
segments:
|
47
|
+
- 1
|
48
|
+
- 1
|
49
|
+
- 2
|
50
|
+
version: 1.1.2
|
51
|
+
type: :runtime
|
52
|
+
version_requirements: *id002
|
37
53
|
description: http://proxylocal.com/
|
38
54
|
email: just.lest@gmail.com
|
39
55
|
executables:
|