mojombo-proxymachine 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ *.sw?
2
+ .DS_Store
3
+ coverage
4
+ rdoc
5
+ pkg
data/README.md CHANGED
@@ -74,6 +74,15 @@ Example routing config file
74
74
  end
75
75
 
76
76
 
77
+ Valid return values
78
+ -------------------
79
+
80
+ `String` - The host:port of the backend server that will be proxied.
81
+ `:noop` - Do nothing.
82
+ `:close` - Close the connection.
83
+ `{:close => String}` - Close the connection after sending the String.
84
+
85
+
77
86
  Contribute
78
87
  ----------
79
88
 
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 1
4
- :patch: 2
4
+ :patch: 3
@@ -1,4 +1,4 @@
1
1
  proxy do |data|
2
- p data
2
+ # p data
3
3
  "localhost:80"
4
4
  end
@@ -34,6 +34,9 @@ module EventMachine
34
34
  if try_server_connect(host, port.to_i)
35
35
  send_and_clear_buffer
36
36
  end
37
+ elsif op.instance_of?(Hash) && op[:close]
38
+ send_data(op[:close])
39
+ close_connection_after_writing
37
40
  elsif op == :noop
38
41
  # do nothing
39
42
  else
@@ -0,0 +1,59 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{proxymachine}
5
+ s.version = "0.1.3"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Tom Preston-Werner"]
9
+ s.date = %q{2009-05-27}
10
+ s.default_executable = %q{proxymachine}
11
+ s.email = %q{tom@mojombo.com}
12
+ s.executables = ["proxymachine"]
13
+ s.extra_rdoc_files = [
14
+ "LICENSE",
15
+ "README.md"
16
+ ]
17
+ s.files = [
18
+ ".document",
19
+ ".gitignore",
20
+ "LICENSE",
21
+ "README.md",
22
+ "Rakefile",
23
+ "VERSION.yml",
24
+ "bin/proxymachine",
25
+ "examples/git.rb",
26
+ "examples/transparent.rb",
27
+ "lib/proxymachine.rb",
28
+ "lib/proxymachine/client_connection.rb",
29
+ "lib/proxymachine/server_connection.rb",
30
+ "proxymachine.gemspec",
31
+ "test/proxymachine_test.rb",
32
+ "test/test_helper.rb"
33
+ ]
34
+ s.has_rdoc = true
35
+ s.homepage = %q{http://github.com/mojombo/proxymachine}
36
+ s.rdoc_options = ["--charset=UTF-8"]
37
+ s.require_paths = ["lib"]
38
+ s.rubygems_version = %q{1.3.0}
39
+ s.summary = %q{TODO}
40
+ s.test_files = [
41
+ "test/proxymachine_test.rb",
42
+ "test/test_helper.rb",
43
+ "examples/git.rb",
44
+ "examples/transparent.rb"
45
+ ]
46
+
47
+ if s.respond_to? :specification_version then
48
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
49
+ s.specification_version = 2
50
+
51
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
52
+ s.add_runtime_dependency(%q<eventmachine>, [">= 0.12.6"])
53
+ else
54
+ s.add_dependency(%q<eventmachine>, [">= 0.12.6"])
55
+ end
56
+ else
57
+ s.add_dependency(%q<eventmachine>, [">= 0.12.6"])
58
+ end
59
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mojombo-proxymachine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Preston-Werner
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-28 00:00:00 -07:00
12
+ date: 2009-05-27 00:00:00 -07:00
13
13
  default_executable: proxymachine
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -32,6 +32,8 @@ extra_rdoc_files:
32
32
  - LICENSE
33
33
  - README.md
34
34
  files:
35
+ - .document
36
+ - .gitignore
35
37
  - LICENSE
36
38
  - README.md
37
39
  - Rakefile
@@ -42,6 +44,7 @@ files:
42
44
  - lib/proxymachine.rb
43
45
  - lib/proxymachine/client_connection.rb
44
46
  - lib/proxymachine/server_connection.rb
47
+ - proxymachine.gemspec
45
48
  - test/proxymachine_test.rb
46
49
  - test/test_helper.rb
47
50
  has_rdoc: true