sproutcore 1.4.0.rc.2 → 1.4.0.rc.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/VERSION.yml +2 -2
- data/{doc_templates → lib/doc_templates}/jsdoc/allclasses.tmpl +0 -0
- data/{doc_templates → lib/doc_templates}/jsdoc/allfiles.tmpl +0 -0
- data/{doc_templates → lib/doc_templates}/jsdoc/class.tmpl +0 -0
- data/{doc_templates → lib/doc_templates}/jsdoc/index.tmpl +0 -0
- data/{doc_templates → lib/doc_templates}/jsdoc/publish.js +0 -0
- data/{doc_templates → lib/doc_templates}/jsdoc/static/default.css +0 -0
- data/{doc_templates → lib/doc_templates}/jsdoc/static/header.html +0 -0
- data/{doc_templates → lib/doc_templates}/jsdoc/static/index.html +0 -0
- data/{doc_templates → lib/doc_templates}/jsdoc/symbol.tmpl +0 -0
- data/{doc_templates → lib/doc_templates}/sproutcore/allclasses.tmpl +0 -0
- data/{doc_templates → lib/doc_templates}/sproutcore/allfiles.tmpl +0 -0
- data/{doc_templates → lib/doc_templates}/sproutcore/class.tmpl +0 -0
- data/{doc_templates → lib/doc_templates}/sproutcore/classes-json.tmpl +0 -0
- data/{doc_templates → lib/doc_templates}/sproutcore/index.tmpl +0 -0
- data/{doc_templates → lib/doc_templates}/sproutcore/publish.js +0 -0
- data/{doc_templates → lib/doc_templates}/sproutcore/static/default.css +0 -0
- data/{doc_templates → lib/doc_templates}/sproutcore/static/header.html +0 -0
- data/{doc_templates → lib/doc_templates}/sproutcore/static/index.html +0 -0
- data/{doc_templates → lib/doc_templates}/sproutcore/symbol.tmpl +0 -0
- data/lib/sproutcore/models/target.rb +1 -1
- data/lib/sproutcore/rack/proxy.rb +48 -36
- metadata +22 -22
data/VERSION.yml
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -704,7 +704,7 @@ module SC
|
|
704
704
|
FileUtils.mkdir_p(build_root)
|
705
705
|
|
706
706
|
# Prepare jsdoc opts
|
707
|
-
jsdoc_root = SC::
|
707
|
+
jsdoc_root = SC::LIBPATH / 'vendor' / 'jsdoc'
|
708
708
|
jar_path = jsdoc_root / 'jsrun.jar'
|
709
709
|
runjs_path = jsdoc_root / 'app' / 'run.js'
|
710
710
|
|
@@ -70,46 +70,55 @@ module SC
|
|
70
70
|
done = false
|
71
71
|
tries = 0
|
72
72
|
until done
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
if no_body_method.include?(http_method)
|
80
|
-
response = http.send(http_method, http_path, headers)
|
81
|
-
else
|
82
|
-
http_body = env['rack.input']
|
83
|
-
some_request = Net::HTTPGenericRequest.new http_method.upcase,
|
84
|
-
true, true, http_path, headers
|
85
|
-
|
86
|
-
some_request.body_stream = http_body
|
87
|
-
response = http.request(some_request)
|
88
|
-
end
|
89
|
-
end
|
73
|
+
::Net::HTTP.start(http_host, http_port) do |http|
|
74
|
+
if proxy[:secure]
|
75
|
+
http.use_ssl = true
|
76
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
77
|
+
end
|
90
78
|
|
91
|
-
|
79
|
+
if no_body_method.include?(http_method)
|
80
|
+
response = http.send(http_method, http_path, headers)
|
81
|
+
else
|
82
|
+
http_body = env['rack.input']
|
83
|
+
http_body.rewind
|
92
84
|
|
93
|
-
|
85
|
+
some_request = Net::HTTPGenericRequest.new http_method.upcase,
|
86
|
+
true, true, http_path, headers
|
94
87
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
next if ignore_headers.include?(key.downcase)
|
100
|
-
# If this is a cookie, strip out the domain. This technically may
|
101
|
-
# break certain scenarios where services try to set cross-domain
|
102
|
-
# cookies, but those services should not be doing that anyway...
|
103
|
-
value.gsub!(/domain=[^\;]+\;? ?/,'') if key.downcase == 'set-cookie'
|
104
|
-
# Location headers should rewrite the hostname if it is included.
|
105
|
-
value.gsub!(/^http:\/\/#{http_host}(:[0-9]+)?\//, "http://#{http_host}/") if key.downcase == 'location'
|
106
|
-
# content-length is returning char count not bytesize
|
107
|
-
value = response.body.bytesize.to_s if key.downcase == 'content-length'
|
88
|
+
some_request.body_stream = http_body
|
89
|
+
response = http.request(some_request)
|
90
|
+
end
|
91
|
+
end
|
108
92
|
|
93
|
+
status = response.code # http status code
|
94
|
+
|
95
|
+
SC.logger << "~ PROXY: #{http_method.upcase} #{status} #{url} -> http://#{http_host}:#{http_port}#{http_path}\n"
|
96
|
+
|
97
|
+
# display and construct specific response headers
|
98
|
+
response_headers = {}
|
99
|
+
ignore_headers = ['transfer-encoding', 'keep-alive', 'connection']
|
100
|
+
response.each do |key, value|
|
101
|
+
next if ignore_headers.include?(key.downcase)
|
102
|
+
# If this is a cookie, strip out the domain. This technically may
|
103
|
+
# break certain scenarios where services try to set cross-domain
|
104
|
+
# cookies, but those services should not be doing that anyway...
|
105
|
+
value.gsub!(/domain=[^\;]+\;? ?/,'') if key.downcase == 'set-cookie'
|
106
|
+
# Location headers should rewrite the hostname if it is included.
|
107
|
+
value.gsub!(/^http:\/\/#{http_host}(:[0-9]+)?\//, "http://#{http_host}/") if key.downcase == 'location'
|
108
|
+
# content-length is returning char count not bytesize
|
109
|
+
if key.downcase == 'content-length'
|
110
|
+
if response.body.respond_to?(:bytesize)
|
111
|
+
value = response.body.bytesize.to_s
|
112
|
+
elsif response.body.respond_to?(:size)
|
113
|
+
value = response.body.size.to_s
|
114
|
+
else
|
115
|
+
value = '0'
|
116
|
+
end
|
117
|
+
end
|
109
118
|
|
110
|
-
|
111
|
-
|
112
|
-
|
119
|
+
SC.logger << " #{key}: #{value}\n"
|
120
|
+
response_headers[key] = value
|
121
|
+
end
|
113
122
|
|
114
123
|
if [301, 307].include?(status.to_i)
|
115
124
|
SC.logger << '~ REDIRECTING: '+response_headers['location']
|
@@ -130,7 +139,10 @@ module SC
|
|
130
139
|
end
|
131
140
|
end
|
132
141
|
|
133
|
-
|
142
|
+
# Thin doesn't like null bodies
|
143
|
+
response_body = response.body || ''
|
144
|
+
|
145
|
+
return [status, ::Rack::Utils::HeaderHash.new(response_headers), [response_body]]
|
134
146
|
end
|
135
147
|
end
|
136
148
|
end
|
metadata
CHANGED
@@ -7,8 +7,8 @@ version: !ruby/object:Gem::Version
|
|
7
7
|
- 4
|
8
8
|
- 0
|
9
9
|
- rc
|
10
|
-
-
|
11
|
-
version: 1.4.0.rc.
|
10
|
+
- 3
|
11
|
+
version: 1.4.0.rc.3
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Sprout Systems, Inc. Apple Inc. and contributors
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-09-
|
19
|
+
date: 2010-09-14 00:00:00 -07:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -292,31 +292,31 @@ files:
|
|
292
292
|
- design/Technical Notes.graffle/QuickLook/Thumbnail.tiff
|
293
293
|
- design/Technical Notes.graffle/data.plist
|
294
294
|
- design/Technical Notes.graffle/image8.png
|
295
|
-
- doc_templates/jsdoc/allclasses.tmpl
|
296
|
-
- doc_templates/jsdoc/allfiles.tmpl
|
297
|
-
- doc_templates/jsdoc/class.tmpl
|
298
|
-
- doc_templates/jsdoc/index.tmpl
|
299
|
-
- doc_templates/jsdoc/publish.js
|
300
|
-
- doc_templates/jsdoc/static/default.css
|
301
|
-
- doc_templates/jsdoc/static/header.html
|
302
|
-
- doc_templates/jsdoc/static/index.html
|
303
|
-
- doc_templates/jsdoc/symbol.tmpl
|
304
|
-
- doc_templates/sproutcore/allclasses.tmpl
|
305
|
-
- doc_templates/sproutcore/allfiles.tmpl
|
306
|
-
- doc_templates/sproutcore/class.tmpl
|
307
|
-
- doc_templates/sproutcore/classes-json.tmpl
|
308
|
-
- doc_templates/sproutcore/index.tmpl
|
309
|
-
- doc_templates/sproutcore/publish.js
|
310
|
-
- doc_templates/sproutcore/static/default.css
|
311
|
-
- doc_templates/sproutcore/static/header.html
|
312
|
-
- doc_templates/sproutcore/static/index.html
|
313
|
-
- doc_templates/sproutcore/symbol.tmpl
|
314
295
|
- lib/Buildfile
|
315
296
|
- lib/buildtasks/build.rake
|
316
297
|
- lib/buildtasks/entry.rake
|
317
298
|
- lib/buildtasks/manifest.rake
|
318
299
|
- lib/buildtasks/render.rake
|
319
300
|
- lib/buildtasks/target.rake
|
301
|
+
- lib/doc_templates/jsdoc/allclasses.tmpl
|
302
|
+
- lib/doc_templates/jsdoc/allfiles.tmpl
|
303
|
+
- lib/doc_templates/jsdoc/class.tmpl
|
304
|
+
- lib/doc_templates/jsdoc/index.tmpl
|
305
|
+
- lib/doc_templates/jsdoc/publish.js
|
306
|
+
- lib/doc_templates/jsdoc/static/default.css
|
307
|
+
- lib/doc_templates/jsdoc/static/header.html
|
308
|
+
- lib/doc_templates/jsdoc/static/index.html
|
309
|
+
- lib/doc_templates/jsdoc/symbol.tmpl
|
310
|
+
- lib/doc_templates/sproutcore/allclasses.tmpl
|
311
|
+
- lib/doc_templates/sproutcore/allfiles.tmpl
|
312
|
+
- lib/doc_templates/sproutcore/class.tmpl
|
313
|
+
- lib/doc_templates/sproutcore/classes-json.tmpl
|
314
|
+
- lib/doc_templates/sproutcore/index.tmpl
|
315
|
+
- lib/doc_templates/sproutcore/publish.js
|
316
|
+
- lib/doc_templates/sproutcore/static/default.css
|
317
|
+
- lib/doc_templates/sproutcore/static/header.html
|
318
|
+
- lib/doc_templates/sproutcore/static/index.html
|
319
|
+
- lib/doc_templates/sproutcore/symbol.tmpl
|
320
320
|
- lib/gen/Buildfile
|
321
321
|
- lib/gen/app/Buildfile
|
322
322
|
- lib/gen/app/README
|