sinatra-static 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  class SinatraStatic
2
2
 
3
- @@file_extensions = %w(css js xml json html)
3
+ @@file_extensions = %w(css js xml json html csv)
4
4
 
5
5
  attr_accessor :app
6
6
 
@@ -39,7 +39,7 @@ private
39
39
 
40
40
  def get_path(path)
41
41
  self.get(path).tap do |resp|
42
- handle_error_non_200(route) unless resp.status == 200
42
+ handle_error_non_200!(path) unless resp.status == 200
43
43
  end
44
44
  end
45
45
 
@@ -75,8 +75,8 @@ private
75
75
  handle_error!("can't find output directory: #{dir}")
76
76
  end
77
77
 
78
- def handle_error_non_200!(route)
79
- handle_error!("GET #{route.path} returned non-200 status code...")
78
+ def handle_error_non_200!(path)
79
+ handle_error!("GET #{path} returned non-200 status code...")
80
80
  end
81
81
 
82
82
  def handle_error!(desc)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "sinatra-static"
3
- s.version = "0.1.0"
3
+ s.version = "0.1.1"
4
4
 
5
5
  s.authors = ["Paul Asmuth"]
6
6
  s.date = "2011-10-16"
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: sinatra-static
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.0
5
+ version: 0.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Paul Asmuth