Permalink
Browse files

Merge remote branch 'jsonperl/master' into development

  • Loading branch information...
2 parents 68f2366 + 8d24ba1 commit df512a54f569eb104043398dc43e7ab54bf4e890 @rondevera rondevera committed Jul 24, 2011
Showing with 9 additions and 9 deletions.
  1. +1 −1 lib/asset_hat/tasks.rb
  2. +5 −5 lib/asset_hat/tasks/css.rb
  3. +3 −3 lib/asset_hat/tasks/js.rb
View
2 lib/asset_hat/tasks.rb
@@ -4,7 +4,7 @@
namespace :asset_hat do
desc 'Minifies all CSS and JS bundles'
- task :minify, :needs => :environment do
+ task :minify => :environment do
format = ENV['FORMAT']
print 'Minifying CSS/JS...'
puts unless format == 'dot'
View
10 lib/asset_hat/tasks/css.rb
@@ -2,7 +2,7 @@
namespace :css do
desc 'Adds commit IDs to asset URLs in CSS for cache busting'
- task :add_asset_commit_ids, :filename, :needs => :environment do |t, args|
+ task :add_asset_commit_ids, [:filename] => :environment do |t, args|
if args.filename.blank?
raise 'Usage: rake asset_hat:css:' +
'add_asset_commit_ids[filename.css]' and return
@@ -18,7 +18,7 @@
end
desc 'Adds hosts to asset URLs in CSS'
- task :add_asset_hosts, :filename, :needs => :environment do |t, args|
+ task :add_asset_hosts, [:filename] => :environment do |t, args|
if args.filename.blank?
raise 'Usage: rake asset_hat:css:' +
'add_asset_hosts[filename.css]' and return
@@ -40,7 +40,7 @@
end
desc 'Minifies one CSS file'
- task :minify_file, :filepath, :needs => :environment do |t, args|
+ task :minify_file, [:filepath] => :environment do |t, args|
type = 'css'
if args.filepath.blank?
@@ -65,7 +65,7 @@
end
desc 'Minifies one CSS bundle'
- task :minify_bundle, :bundle, :needs => :environment do |t, args|
+ task :minify_bundle, [:bundle] => :environment do |t, args|
type = 'css'
if args.bundle.blank?
@@ -155,7 +155,7 @@
end
desc 'Concatenates and minifies all CSS bundles'
- task :minify, :opts, :needs => :environment do |t, args|
+ task :minify, [:opts] => :environment do |t, args|
args.with_defaults(:opts => {})
opts = args.opts.reverse_merge(:show_intro => true, :show_outro => true)
type = 'css'
View
6 lib/asset_hat/tasks/js.rb
@@ -2,7 +2,7 @@
namespace :js do
desc 'Minifies one JS file'
- task :minify_file, :filepath, :needs => :environment do |t, args|
+ task :minify_file, [:filepath] => :environment do |t, args|
type = 'js'
if args.filepath.blank?
@@ -31,7 +31,7 @@
end
desc 'Minifies one JS bundle'
- task :minify_bundle, :bundle, :needs => :environment do |t, args|
+ task :minify_bundle, [:bundle] => :environment do |t, args|
type = 'js'
if args.bundle.blank?
@@ -104,7 +104,7 @@
end
desc 'Concatenates and minifies all JS bundles'
- task :minify, :opts, :needs => :environment do |t, args|
+ task :minify, [:opts] => :environment do |t, args|
args.with_defaults(:opts => {})
opts = args.opts.reverse_merge(:show_intro => true, :show_outro => true)
type = 'js'

0 comments on commit df512a5

Please sign in to comment.