rack-cat 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rack/cat.rb +4 -2
- data/rack-cat.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
data/lib/rack/cat.rb
CHANGED
@@ -40,10 +40,12 @@ module Rack
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def read_from_disk(path)
|
43
|
-
@sources.
|
43
|
+
full_path = @sources.detect do |source|
|
44
44
|
full_path = ::File.join(source, Rack::Utils.unescape(path))
|
45
|
-
|
45
|
+
::File.file?(full_path) && ::File.readable?(full_path)
|
46
46
|
end
|
47
|
+
|
48
|
+
::File.read(full_path) if full_path
|
47
49
|
end
|
48
50
|
|
49
51
|
def read_from_app(path)
|
data/rack-cat.gemspec
CHANGED