rack-rscript 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rack-rscript.rb +21 -10
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1aecdceddae7e8344cdbf8798790c72ec9dc20d
|
4
|
+
data.tar.gz: 7f0c196b9ceeab8c7ef2f2cbbfcb35fb7b666455
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b7067382b26de914c7005f283a7574bc79e1a7e9e0b227271facfa304d9de42d311883850708711c96dd36cdeb5ec38c9453aa695ebcc9150982ff66ee3470a
|
7
|
+
data.tar.gz: bc4e243eb52d0d27bf53a7b8b93416e1a97e32f02600b8193f8c4dc5e73edadaeb495bfad43be6b0b6088609b04fe17154ae2f081f04e6d24df650bf0a592e72
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rack-rscript.rb
CHANGED
@@ -97,6 +97,7 @@ class RackRscript
|
|
97
97
|
'text/xml' => passthru_proc,
|
98
98
|
'text/css' => passthru_proc,
|
99
99
|
'application/xml' => passthru_proc,
|
100
|
+
'application/json' => passthru_proc,
|
100
101
|
'image/png' => passthru_proc,
|
101
102
|
'image/jpeg' => passthru_proc
|
102
103
|
}
|
@@ -196,22 +197,32 @@ class RackRscript
|
|
196
197
|
[@rrscript.read([url, '//job:' + job]).first, 'text/plain']
|
197
198
|
end
|
198
199
|
|
199
|
-
|
200
|
+
get '/source/:package' do |package,job|
|
200
201
|
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
202
|
+
url = "%s%s.rsf" % [@url_base, package]
|
203
|
+
|
204
|
+
begin
|
205
|
+
|
205
206
|
[RXFHelper.read(url).first,'text/plain']
|
207
|
+
|
208
|
+
rescue
|
206
209
|
|
207
|
-
rescue
|
208
|
-
|
209
210
|
['url: ' + url + '; ' + ($!).inspect + \
|
210
|
-
|
211
|
-
|
211
|
+
'couldn\'t find that package', 'text/plain']
|
212
|
+
end
|
212
213
|
|
213
214
|
end
|
214
|
-
|
215
|
+
|
216
|
+
get '/ls' do
|
217
|
+
|
218
|
+
File.exists? @url_base
|
219
|
+
filepath = @url_base
|
220
|
+
|
221
|
+
[Dir.glob(filepath + '/*.rsf').map{|x| x[/([^\/]+)\.rsf$/,1]}.to_json,\
|
222
|
+
'application/json']
|
223
|
+
|
224
|
+
end
|
225
|
+
|
215
226
|
|
216
227
|
end
|
217
228
|
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|