lib/sinatra/assetpack/options.rb in sinatra-assetpack-0.0.10 vs lib/sinatra/assetpack/options.rb in sinatra-assetpack-0.0.11

- old
+ new

@@ -39,13 +39,22 @@ # class Options include Configurator def initialize(app, &blk) + unless app.root? + raise Error, "Please set :root in your Sinatra app." + end + @app = app @js_compression = :jsmin @css_compression = :simple - @output_path = app.public + + begin + @output_path = app.public + rescue NoMethodError + @output_path = app.public_folder + end @js_compression_options = Hash.new @css_compression_options = Hash.new @ignored = Array.new