lib/catscope/app.rb in catscope-0.0.3 vs lib/catscope/app.rb in catscope-0.1.0
- old
+ new
@@ -30,18 +30,25 @@
]
js :libs, [
'/assets/bower_components/jquery/dist/jquery.js',
'/assets/bower_components/foundation/js/foundation.js',
- '/assets/bower_components/jquery-ui/jquery-ui.min.js'
+ '/assets/bower_components/jquery-ui/jquery-ui.min.js',
+ '/assets/bower_components/zeroclipboard/dist/ZeroClipboard.js',
+ '/assets/bower_components/alertify.js/lib/alertify.js'
]
js :application, [
'/assets/js/app.js'
]
js_compression :jsmin
+
+ css :libs, [
+ '/assets/bower_components/alertify.js/themes/alertify.core.css',
+ '/assets/bower_components/alertify.js/themes/alertify.default.css'
+ ]
end
helpers do
def type_by_path(path)
name = File.basename(path)
@@ -162,9 +169,16 @@
out
end
get('/save/*') do
path = File.expand_path(params[:splat][0].gsub(/^\//, ""), TOP_DIR.to_s)
+
+ send_file(path)
+ end
+
+ get('/static/*') do
+ url_path = params[:splat][0].gsub(/^\//, "")
+ path = File.expand_path(url_path, File.expand_path("../../../static", __FILE__))
send_file(path)
end
# API for filelist