htttee 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -0
- data/Gemfile +2 -0
- data/README.md +105 -0
- data/Rakefile +14 -0
- data/bin/htttee +39 -0
- data/bin/htttee-exec +18 -0
- data/config.ru +6 -0
- data/deploy/after_restart.rb +1 -0
- data/deploy/before_restart.rb +4 -0
- data/deploy/before_symlink.rb +2 -0
- data/deploy/cookbooks/cloudkick-plugins/recipes/default.rb +8 -0
- data/deploy/cookbooks/cloudkick-plugins/recipes/resque.rb +18 -0
- data/deploy/cookbooks/cloudkick-plugins/templates/default/resque.sh.erb +4 -0
- data/deploy/cookbooks/god/recipes/default.rb +50 -0
- data/deploy/cookbooks/god/templates/default/config.erb +3 -0
- data/deploy/cookbooks/god/templates/default/god-inittab.erb +3 -0
- data/deploy/cookbooks/main/attributes/owner_name.rb +3 -0
- data/deploy/cookbooks/main/attributes/recipes.rb +1 -0
- data/deploy/cookbooks/main/libraries/dnapi.rb +7 -0
- data/deploy/cookbooks/main/recipes/default.rb +2 -0
- data/deploy/cookbooks/nginx/files/default/chunkin-nginx-module-v0.22rc1.zip +0 -0
- data/deploy/cookbooks/nginx/files/default/nginx-1.0.0.tar.gz +0 -0
- data/deploy/cookbooks/nginx/recipes/default.rb +2 -0
- data/deploy/cookbooks/nginx/recipes/install.rb +0 -0
- data/deploy/cookbooks/nginx/templates/default/nginx.conf.erb +41 -0
- data/deploy/cookbooks/resque/recipes/default.rb +47 -0
- data/deploy/cookbooks/resque/templates/default/resque.rb.erb +73 -0
- data/deploy/cookbooks/resque/templates/default/resque.yml.erb +3 -0
- data/deploy/cookbooks/resque/templates/default/resque_scheduler.rb.erb +73 -0
- data/deploy/solo.rb +7 -0
- data/htttee.gemspec +30 -0
- data/lib/htttee.rb +0 -0
- data/lib/htttee/client.rb +16 -0
- data/lib/htttee/client/consumer.rb +49 -0
- data/lib/htttee/client/ext/net/http.rb +27 -0
- data/lib/htttee/server.rb +74 -0
- data/lib/htttee/server/api.rb +201 -0
- data/lib/htttee/server/chunked_body.rb +22 -0
- data/lib/htttee/server/ext/em-redis.rb +49 -0
- data/lib/htttee/server/ext/thin.rb +4 -0
- data/lib/htttee/server/ext/thin/connection.rb +8 -0
- data/lib/htttee/server/ext/thin/deferrable_body.rb +24 -0
- data/lib/htttee/server/ext/thin/deferred_request.rb +31 -0
- data/lib/htttee/server/ext/thin/deferred_response.rb +4 -0
- data/lib/htttee/server/middleware/async_fixer.rb +22 -0
- data/lib/htttee/server/middleware/dechunker.rb +63 -0
- data/lib/htttee/server/mock.rb +69 -0
- data/lib/htttee/server/pubsub_redis.rb +78 -0
- data/lib/htttee/version.rb +5 -0
- data/spec/client_spec.rb +126 -0
- data/spec/helpers/rackup.rb +15 -0
- data/spec/spec_helper.rb +21 -0
- metadata +201 -0
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__), 'lib')
|
2
|
+
require 'bundler/setup'
|
3
|
+
|
4
|
+
require 'htttee/server'
|
5
|
+
require 'htttee/client'
|
6
|
+
|
7
|
+
require 'digest/sha2'
|
8
|
+
|
9
|
+
EY::Tea::Server.mock!
|
10
|
+
Thin::Logging.debug = Thin::Logging.trace = true
|
11
|
+
|
12
|
+
RSpec.configure do |config|
|
13
|
+
config.color_enabled = config.tty = true #Force ANSI colors
|
14
|
+
|
15
|
+
config.around :each do |callback|
|
16
|
+
EY::Tea::Server.reset!
|
17
|
+
|
18
|
+
@client = EY::Tea::Client.new(:endpoint => EY::Tea::Server.mock_uri.to_s)
|
19
|
+
callback.run
|
20
|
+
end
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: htttee
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Ben Burkert
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-12-12 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rack-client
|
16
|
+
requirement: &70348419674800 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.3.1.pre.i
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70348419674800
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: trollop
|
27
|
+
requirement: &70348419673880 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70348419673880
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: sinatra
|
38
|
+
requirement: &70348420159880 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :development
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70348420159880
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: thin
|
49
|
+
requirement: &70348420156740 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *70348420156740
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: em-redis
|
60
|
+
requirement: &70348420155620 !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
type: :development
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: *70348420155620
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: yajl-ruby
|
71
|
+
requirement: &70348420154460 !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: *70348420154460
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: rack-mux
|
82
|
+
requirement: &70348420168760 !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
88
|
+
type: :development
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: *70348420168760
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: rspec
|
93
|
+
requirement: &70348420167380 !ruby/object:Gem::Requirement
|
94
|
+
none: false
|
95
|
+
requirements:
|
96
|
+
- - ! '>='
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
99
|
+
type: :development
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: *70348420167380
|
102
|
+
- !ruby/object:Gem::Dependency
|
103
|
+
name: rake
|
104
|
+
requirement: &70348420165540 !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: *70348420165540
|
113
|
+
description: Stream any CLI output as an HTTP chunked response.
|
114
|
+
email:
|
115
|
+
- ben@benburkert.com
|
116
|
+
executables:
|
117
|
+
- htttee
|
118
|
+
- htttee-exec
|
119
|
+
extensions: []
|
120
|
+
extra_rdoc_files: []
|
121
|
+
files:
|
122
|
+
- .gitignore
|
123
|
+
- Gemfile
|
124
|
+
- README.md
|
125
|
+
- Rakefile
|
126
|
+
- bin/htttee
|
127
|
+
- bin/htttee-exec
|
128
|
+
- config.ru
|
129
|
+
- deploy/after_restart.rb
|
130
|
+
- deploy/before_restart.rb
|
131
|
+
- deploy/before_symlink.rb
|
132
|
+
- deploy/cookbooks/cloudkick-plugins/recipes/default.rb
|
133
|
+
- deploy/cookbooks/cloudkick-plugins/recipes/resque.rb
|
134
|
+
- deploy/cookbooks/cloudkick-plugins/templates/default/resque.sh.erb
|
135
|
+
- deploy/cookbooks/god/recipes/default.rb
|
136
|
+
- deploy/cookbooks/god/templates/default/config.erb
|
137
|
+
- deploy/cookbooks/god/templates/default/god-inittab.erb
|
138
|
+
- deploy/cookbooks/main/attributes/owner_name.rb
|
139
|
+
- deploy/cookbooks/main/attributes/recipes.rb
|
140
|
+
- deploy/cookbooks/main/libraries/dnapi.rb
|
141
|
+
- deploy/cookbooks/main/recipes/default.rb
|
142
|
+
- deploy/cookbooks/nginx/files/default/chunkin-nginx-module-v0.22rc1.zip
|
143
|
+
- deploy/cookbooks/nginx/files/default/nginx-1.0.0.tar.gz
|
144
|
+
- deploy/cookbooks/nginx/recipes/default.rb
|
145
|
+
- deploy/cookbooks/nginx/recipes/install.rb
|
146
|
+
- deploy/cookbooks/nginx/templates/default/nginx.conf.erb
|
147
|
+
- deploy/cookbooks/resque/recipes/default.rb
|
148
|
+
- deploy/cookbooks/resque/templates/default/resque.rb.erb
|
149
|
+
- deploy/cookbooks/resque/templates/default/resque.yml.erb
|
150
|
+
- deploy/cookbooks/resque/templates/default/resque_scheduler.rb.erb
|
151
|
+
- deploy/solo.rb
|
152
|
+
- htttee.gemspec
|
153
|
+
- lib/htttee.rb
|
154
|
+
- lib/htttee/client.rb
|
155
|
+
- lib/htttee/client/consumer.rb
|
156
|
+
- lib/htttee/client/ext/net/http.rb
|
157
|
+
- lib/htttee/server.rb
|
158
|
+
- lib/htttee/server/api.rb
|
159
|
+
- lib/htttee/server/chunked_body.rb
|
160
|
+
- lib/htttee/server/ext/em-redis.rb
|
161
|
+
- lib/htttee/server/ext/thin.rb
|
162
|
+
- lib/htttee/server/ext/thin/connection.rb
|
163
|
+
- lib/htttee/server/ext/thin/deferrable_body.rb
|
164
|
+
- lib/htttee/server/ext/thin/deferred_request.rb
|
165
|
+
- lib/htttee/server/ext/thin/deferred_response.rb
|
166
|
+
- lib/htttee/server/middleware/async_fixer.rb
|
167
|
+
- lib/htttee/server/middleware/dechunker.rb
|
168
|
+
- lib/htttee/server/mock.rb
|
169
|
+
- lib/htttee/server/pubsub_redis.rb
|
170
|
+
- lib/htttee/version.rb
|
171
|
+
- spec/client_spec.rb
|
172
|
+
- spec/helpers/rackup.rb
|
173
|
+
- spec/spec_helper.rb
|
174
|
+
homepage: http://github.com/benburkert/htttee
|
175
|
+
licenses: []
|
176
|
+
post_install_message:
|
177
|
+
rdoc_options: []
|
178
|
+
require_paths:
|
179
|
+
- lib
|
180
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
181
|
+
none: false
|
182
|
+
requirements:
|
183
|
+
- - ! '>='
|
184
|
+
- !ruby/object:Gem::Version
|
185
|
+
version: '0'
|
186
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
187
|
+
none: false
|
188
|
+
requirements:
|
189
|
+
- - ! '>='
|
190
|
+
- !ruby/object:Gem::Version
|
191
|
+
version: '0'
|
192
|
+
requirements: []
|
193
|
+
rubyforge_project: htttee
|
194
|
+
rubygems_version: 1.8.10
|
195
|
+
signing_key:
|
196
|
+
specification_version: 3
|
197
|
+
summary: Unix's tee as a service
|
198
|
+
test_files:
|
199
|
+
- spec/client_spec.rb
|
200
|
+
- spec/helpers/rackup.rb
|
201
|
+
- spec/spec_helper.rb
|