spider-gazelle 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f6a756ed558bdc46b8db46b9e1886ec597ba766a
4
- data.tar.gz: 4febcbc9a2684356b9f66c4d12d9c159073ac98b
3
+ metadata.gz: 3ffd0e265eacee179a3ecd3ef2b55546656aaa31
4
+ data.tar.gz: 65f4d1cc2bfb36040840492dc6013733bdd2bd99
5
5
  SHA512:
6
- metadata.gz: 84b562e57f77ef237c176c751c0ef8f792fde9e140abda85a31cce25d86960a724326b793a2b39599e0af6f466dfb074318e1618b988302e6d3765010243fde7
7
- data.tar.gz: bf84ab3586cbe74e0650c35d8ed5ab2c7bcb9ff9dc143d394ff9ea4622a256a68d5f38b4bd61a3e016dfe863eec02f335385ced6ef8534b0c2e7589214f12670
6
+ metadata.gz: 9579a2a0879d1ee81059f4ed7d19a0827630aa5d0737b37fac4c4485dc36b7ddf47f3cece95f065c3d454cb8b9ad712cd7f09b0a01b7762da8fdc2333609efa9
7
+ data.tar.gz: 8168496effeeaaef233c9e318251dab67b345ff8136012e1242b2e4bdf2ace18dfb2828cbc840f78dfb325119a53a1285abe5634f3d79fec8dd20af747cc2260
data/README.md CHANGED
@@ -7,6 +7,8 @@ Spidergazelle, spidergazelle amazingly agile, she leaps through the veldt,
7
7
  Spidergazelle, spidergazelle! She don’t care what you think, she says what the hell!
8
8
  Look out! Here comes the Spidergazelle!
9
9
 
10
+ ![logo](https://f.cloud.github.com/assets/376268/2020320/14a9eea0-8831-11e3-968e-8e74d90c3b06.jpg)
11
+
10
12
 
11
13
  ## Installation
12
14
 
@@ -17,6 +17,7 @@ module SpiderGazelle
17
17
  COLON_SPACE = ': '.freeze
18
18
  EOF = "0\r\n\r\n".freeze
19
19
  CRLF = "\r\n".freeze
20
+ NEWLINE = "\n".freeze
20
21
  ZERO = '0'.freeze
21
22
 
22
23
  HTTP_STATUS_CODES = ::Rack::Utils::HTTP_STATUS_CODES
@@ -193,6 +194,7 @@ module SpiderGazelle
193
194
  @deferred_responses = nil if @deferred_responses
194
195
 
195
196
  status, headers, body = result
197
+
196
198
  send_body = @request.env[REQUEST_METHOD] != HEAD
197
199
 
198
200
  # If a file, stream the body in a non-blocking fashion
@@ -284,10 +286,12 @@ module SpiderGazelle
284
286
  headers.each do |key, value|
285
287
  next if key.start_with? RACK
286
288
 
287
- header << key
288
- header << COLON_SPACE
289
- header << value
290
- header << CRLF
289
+ value.split(NEWLINE).each do |unique_value|
290
+ header << key
291
+ header << COLON_SPACE
292
+ header << unique_value
293
+ header << CRLF
294
+ end
291
295
  end
292
296
  header << CRLF
293
297
  @socket.write header
@@ -7,6 +7,7 @@ module SpiderGazelle
7
7
 
8
8
  HTTP_META = 'HTTP_'.freeze
9
9
  REQUEST_METHOD = 'REQUEST_METHOD'.freeze # GET, POST, etc
10
+ COMMA = ', '.freeze
10
11
 
11
12
 
12
13
  attr_reader :parser_cache, :connections, :logger
@@ -95,7 +96,12 @@ module SpiderGazelle
95
96
  header.gsub!('-', '_')
96
97
  header.prepend(HTTP_META)
97
98
  header.freeze
98
- req.env[header] = value
99
+ if req.env[header]
100
+ req.env[header] << COMMA
101
+ req.env[header] << value
102
+ else
103
+ req.env[header] = value
104
+ end
99
105
  end
100
106
  end
101
107
 
@@ -1,3 +1,3 @@
1
1
  module SpiderGazelle
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,141 +1,141 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spider-gazelle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen von Takach
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-06 00:00:00.000000000 Z
11
+ date: 2014-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
- version_requirements: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - '>='
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
15
  requirement: !ruby/object:Gem::Requirement
21
16
  requirements:
22
- - - '>='
17
+ - - ">="
23
18
  - !ruby/object:Gem::Version
24
19
  version: '0'
25
- prerelease: false
26
20
  type: :runtime
27
- - !ruby/object:Gem::Dependency
28
- name: http-parser
21
+ prerelease: false
29
22
  version_requirements: !ruby/object:Gem::Requirement
30
23
  requirements:
31
- - - '>='
24
+ - - ">="
32
25
  - !ruby/object:Gem::Version
33
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: http-parser
34
29
  requirement: !ruby/object:Gem::Requirement
35
30
  requirements:
36
- - - '>='
31
+ - - ">="
37
32
  - !ruby/object:Gem::Version
38
33
  version: '0'
39
- prerelease: false
40
34
  type: :runtime
41
- - !ruby/object:Gem::Dependency
42
- name: libuv
35
+ prerelease: false
43
36
  version_requirements: !ruby/object:Gem::Requirement
44
37
  requirements:
45
- - - '>='
38
+ - - ">="
46
39
  - !ruby/object:Gem::Version
47
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: libuv
48
43
  requirement: !ruby/object:Gem::Requirement
49
44
  requirements:
50
- - - '>='
45
+ - - ">="
51
46
  - !ruby/object:Gem::Version
52
47
  version: '0'
53
- prerelease: false
54
48
  type: :runtime
55
- - !ruby/object:Gem::Dependency
56
- name: rack
49
+ prerelease: false
57
50
  version_requirements: !ruby/object:Gem::Requirement
58
51
  requirements:
59
- - - '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
- version: 1.0.0
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rack
62
57
  requirement: !ruby/object:Gem::Requirement
63
58
  requirements:
64
- - - '>='
59
+ - - ">="
65
60
  - !ruby/object:Gem::Version
66
61
  version: 1.0.0
67
- prerelease: false
68
62
  type: :runtime
69
- - !ruby/object:Gem::Dependency
70
- name: websocket-driver
63
+ prerelease: false
71
64
  version_requirements: !ruby/object:Gem::Requirement
72
65
  requirements:
73
- - - '>='
66
+ - - ">="
74
67
  - !ruby/object:Gem::Version
75
- version: '0'
68
+ version: 1.0.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: websocket-driver
76
71
  requirement: !ruby/object:Gem::Requirement
77
72
  requirements:
78
- - - '>='
73
+ - - ">="
79
74
  - !ruby/object:Gem::Version
80
75
  version: '0'
81
- prerelease: false
82
76
  type: :runtime
83
- - !ruby/object:Gem::Dependency
84
- name: thread_safe
77
+ prerelease: false
85
78
  version_requirements: !ruby/object:Gem::Requirement
86
79
  requirements:
87
- - - '>='
80
+ - - ">="
88
81
  - !ruby/object:Gem::Version
89
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: thread_safe
90
85
  requirement: !ruby/object:Gem::Requirement
91
86
  requirements:
92
- - - '>='
87
+ - - ">="
93
88
  - !ruby/object:Gem::Version
94
89
  version: '0'
95
- prerelease: false
96
90
  type: :runtime
97
- - !ruby/object:Gem::Dependency
98
- name: radix
91
+ prerelease: false
99
92
  version_requirements: !ruby/object:Gem::Requirement
100
93
  requirements:
101
- - - '>='
94
+ - - ">="
102
95
  - !ruby/object:Gem::Version
103
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: radix
104
99
  requirement: !ruby/object:Gem::Requirement
105
100
  requirements:
106
- - - '>='
101
+ - - ">="
107
102
  - !ruby/object:Gem::Version
108
103
  version: '0'
109
- prerelease: false
110
104
  type: :runtime
111
- - !ruby/object:Gem::Dependency
112
- name: rspec
105
+ prerelease: false
113
106
  version_requirements: !ruby/object:Gem::Requirement
114
107
  requirements:
115
- - - '>='
108
+ - - ">="
116
109
  - !ruby/object:Gem::Version
117
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rspec
118
113
  requirement: !ruby/object:Gem::Requirement
119
114
  requirements:
120
- - - '>='
115
+ - - ">="
121
116
  - !ruby/object:Gem::Version
122
117
  version: '0'
123
- prerelease: false
124
118
  type: :development
125
- - !ruby/object:Gem::Dependency
126
- name: yard
119
+ prerelease: false
127
120
  version_requirements: !ruby/object:Gem::Requirement
128
121
  requirements:
129
- - - '>='
122
+ - - ">="
130
123
  - !ruby/object:Gem::Version
131
124
  version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: yard
132
127
  requirement: !ruby/object:Gem::Requirement
133
128
  requirements:
134
- - - '>='
129
+ - - ">="
135
130
  - !ruby/object:Gem::Version
136
131
  version: '0'
137
- prerelease: false
138
132
  type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
139
  description: |2
140
140
  Spidergazelle, spidergazelle, amazingly agile, she leaps through the veldt,
141
141
  Spidergazelle, spidergazelle! She don’t care what you think, she says what the hell!
@@ -148,7 +148,6 @@ extensions: []
148
148
  extra_rdoc_files:
149
149
  - README.md
150
150
  files:
151
- - lib/spider-gazelle.rb
152
151
  - lib/rack/handler/spider-gazelle.rb
153
152
  - lib/spider-gazelle/app_store.rb
154
153
  - lib/spider-gazelle/binding.rb
@@ -157,8 +156,9 @@ files:
157
156
  - lib/spider-gazelle/gazelle.rb
158
157
  - lib/spider-gazelle/request.rb
159
158
  - lib/spider-gazelle/spider.rb
160
- - lib/spider-gazelle/version.rb
161
159
  - lib/spider-gazelle/upgrades/websocket.rb
160
+ - lib/spider-gazelle/version.rb
161
+ - lib/spider-gazelle.rb
162
162
  - bin/sg
163
163
  - Rakefile
164
164
  - spider-gazelle.gemspec
@@ -168,25 +168,25 @@ homepage: https://github.com/cotag/spider-gazelle
168
168
  licenses:
169
169
  - MIT
170
170
  metadata: {}
171
- post_install_message:
171
+ post_install_message:
172
172
  rdoc_options: []
173
173
  require_paths:
174
174
  - lib
175
175
  required_ruby_version: !ruby/object:Gem::Requirement
176
176
  requirements:
177
- - - '>='
177
+ - - ">="
178
178
  - !ruby/object:Gem::Version
179
179
  version: '0'
180
180
  required_rubygems_version: !ruby/object:Gem::Requirement
181
181
  requirements:
182
- - - '>='
182
+ - - ">="
183
183
  - !ruby/object:Gem::Version
184
184
  version: '0'
185
185
  requirements: []
186
- rubyforge_project:
187
- rubygems_version: 2.1.11
188
- signing_key:
186
+ rubyforge_project:
187
+ rubygems_version: 2.0.3
188
+ signing_key:
189
189
  specification_version: 4
190
190
  summary: A fast, parallel and concurrent web server for ruby
191
191
  test_files: []
192
- has_rdoc:
192
+ has_rdoc: