serve-this 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/serve-this.rb +13 -3
- data/lib/serve-this/version.rb +3 -0
- metadata +5 -4
data/lib/serve-this.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require 'rack'
|
2
2
|
|
3
|
+
require 'serve-this/version'
|
4
|
+
|
3
5
|
module ServeThis
|
4
|
-
|
5
|
-
VERSION = "0.0.6"
|
6
6
|
|
7
7
|
def self.from(root)
|
8
8
|
Rack::Builder.new do
|
@@ -66,7 +66,17 @@ module ServeThis
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def forbid!
|
69
|
-
|
69
|
+
body = "Forbidden\n"
|
70
|
+
status = 403
|
71
|
+
[
|
72
|
+
status,
|
73
|
+
{
|
74
|
+
"Content-Type" => "text/plain",
|
75
|
+
"Content-Length" => body.size.to_s,
|
76
|
+
"X-Cascade" => "pass"
|
77
|
+
},
|
78
|
+
[body]
|
79
|
+
]
|
70
80
|
end
|
71
81
|
end
|
72
82
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serve-this
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 7
|
10
|
+
version: 0.0.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Matthew Rudy Jacobs
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-08-03 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -44,6 +44,7 @@ extra_rdoc_files:
|
|
44
44
|
- README
|
45
45
|
files:
|
46
46
|
- README
|
47
|
+
- lib/serve-this/version.rb
|
47
48
|
- lib/serve-this.rb
|
48
49
|
- bin/serve-this
|
49
50
|
has_rdoc: true
|