hike 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/hike.rb +1 -1
  2. data/lib/hike/trail.rb +2 -7
  3. metadata +4 -4
data/lib/hike.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Hike
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
 
4
4
  autoload :DirectoryIndex, "hike/directory_index"
5
5
  autoload :Extensions, "hike/extensions"
data/lib/hike/trail.rb CHANGED
@@ -14,7 +14,7 @@ module Hike
14
14
 
15
15
  logical_paths.each do |logical_path|
16
16
  if result = find_path(logical_path)
17
- return result
17
+ return File.expand_path(result)
18
18
  end
19
19
  end
20
20
  nil
@@ -41,8 +41,7 @@ module Hike
41
41
 
42
42
  def filename_pattern_for(basename)
43
43
  extension_pattern = extensions.map { |e| Regexp.escape(e) }.join("|")
44
- extension_pattern += "|" if has_registered_extension?(basename)
45
- /^#{Regexp.escape(basename)}(?:#{extension_pattern})$/
44
+ /^#{Regexp.escape(basename)}(?:#{extension_pattern}|)$/
46
45
  end
47
46
 
48
47
  def match_from(matches, basename)
@@ -60,9 +59,5 @@ module Hike
60
59
  end
61
60
  basename
62
61
  end
63
-
64
- def has_registered_extension?(logical_path)
65
- extensions.include?(File.extname(logical_path))
66
- end
67
62
  end
68
63
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hike
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sam Stephenson
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-19 00:00:00 -05:00
18
+ date: 2010-10-30 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies: []
21
21