A proof of concept of having Sinatra like routes inside your controllers.
Since the router is gone, feel free to remove config/routes.rb
.
Then add the file below to lib/action_controller/inline_routes.rb
inside your app.
set :branch, "origin/#{ENV['BRANCH'] || "master"}" | |
namespace :assets do | |
desc "Precompile rails 3.1 assets" | |
task :precompile, :except => { :no_release => true } do | |
asset_paths = "app/assets lib/assets vendor/assets" | |
if !ENV['FORCE_PRECOMPILE'].nil? || capture("cd #{current_path}; git diff-tree --name-only -r #{deployed_revision} HEAD #{asset_paths} | wc -l").strip.to_i > 0 | |
deploy.precompile_assets | |
else | |
logger.info "Skipping asset pre-compilation because there were no asset changes" |
/*! | |
* jQuery UI 1.9m7 | |
* | |
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) | |
* Dual licensed under the MIT or GPL Version 2 licenses. | |
* http://jquery.org/license | |
* | |
* http://docs.jquery.com/UI | |
*/ | |
(function( $, undefined ) { |