sinatra-static 0.1.0 → 0.1.1
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.
- data/lib/sinatra_static.rb +4 -4
- data/sinatra-static.gemspec +1 -1
- metadata +1 -1
data/lib/sinatra_static.rb
CHANGED
@@ -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(
|
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!(
|
79
|
-
handle_error!("GET #{
|
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)
|
data/sinatra-static.gemspec
CHANGED