rack-cat 0.0.2 → 0.0.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.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/rack/cat.rb +3 -3
  3. data/rack-cat.gemspec +1 -1
  4. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -40,12 +40,12 @@ module Rack
40
40
  end
41
41
 
42
42
  def read_from_disk(path)
43
- full_path = @sources.detect do |source|
43
+ @sources.each do |source|
44
44
  full_path = ::File.join(source, Rack::Utils.unescape(path))
45
- ::File.file?(full_path) && ::File.readable?(full_path)
45
+ return ::File.read(full_path) if ::File.file?(full_path) && ::File.readable?(full_path)
46
46
  end
47
47
 
48
- ::File.read(full_path) if full_path
48
+ return # return nil (instead of @sources) when no file found
49
49
  end
50
50
 
51
51
  def read_from_app(path)
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rack-cat}
8
- s.version = "0.0.2"
8
+ s.version = "0.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jacek Becela"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jacek Becela