eat 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/lib/eat.rb CHANGED
@@ -18,7 +18,7 @@ module Eat
18
18
  def eat(filesystem_path_or_uri)
19
19
  uri = ::URI.parse filesystem_path_or_uri
20
20
  case uri.scheme
21
- when nil
21
+ when 'file', nil
22
22
  if ::File.readable? uri.path
23
23
  ::File.read uri.path
24
24
  else
@@ -1,3 +1,3 @@
1
1
  module Eat
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -17,6 +17,10 @@ class TestEat < Test::Unit::TestCase
17
17
  assert eat(__FILE__).include?('class TestEat < Test::Unit::TestCase')
18
18
  end
19
19
 
20
+ def test_filesystem_uri
21
+ assert eat("file://#{File.expand_path(__FILE__)}").include?('class TestEat < Test::Unit::TestCase')
22
+ end
23
+
20
24
  def test_http
21
25
  assert eat('http://brighterplanet.com/robots.txt').include?('User-agent')
22
26
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eat
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
5
- prerelease: false
4
+ hash: 19
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Seamus Abshere
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-24 00:00:00 -06:00
18
+ date: 2011-03-29 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  requirements: []
82
82
 
83
83
  rubyforge_project: eat
84
- rubygems_version: 1.3.7
84
+ rubygems_version: 1.6.2
85
85
  signing_key:
86
86
  specification_version: 3
87
87
  summary: A more trustworthy open-uri for use with RSS feeds, config scripts, etc.