lib/tasks/sandbox_assets.rake in rails-sandbox-assets-0.1.1 vs lib/tasks/sandbox_assets.rake in rails-sandbox-assets-0.1.2
- old
+ new
@@ -1,11 +1,12 @@
namespace :sandbox_assets do
desc "Run Sandboxed Assets server"
task :serve => :environment do
- app = SandboxAssets::Engine
- port = app.config.sandbox_assets.port
- app.routes.define_mounted_helper 'sandbox_assets_engine'
+ Rails.application.tap do |app|
+ app.routes.draw { mount SandboxAssets::Engine => '/' }
+ port = app.config.sandbox_assets.port
- puts "Your assets will be soon available at http://localhost:#{port}\n\n"
- Rack::Server.start app: app, Port: port
+ puts "Your assets will be soon available at http://localhost:#{port}\n\n"
+ Rack::Server.start app: app, Port: port
+ end
end
end