Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

rake tasks cleaned up

  • Loading branch information...
commit 3a1fb53f482751ce582c51be3f94e7b0a9ad28c8 1 parent 49cb941
authored October 09, 2009

Showing 1 changed file with 7 additions and 4 deletions. Show diff stats Hide diff stats

  1. 11  tasks/harsh_tasks.rake
11  tasks/harsh_tasks.rake
@@ -9,18 +9,21 @@ namespace :harsh do
9 9
       require 'uv'
10 10
       args.with_defaults(:theme => ENV['THEME'])
11 11
       
12  
-      unless Uv.themes.include?(args[:theme])
  12
+      unless Uv.themes.include? args[:theme]
13 13
         puts "Error: #{args[:theme]} is not a valid theme."
14 14
         next
15 15
       end
16 16
       
17  
-      tmpfolder = File.join(File.dirname(__FILE__),["..","tmp"])
  17
+      tmpfolder = File.join(File.dirname(__FILE__), "..", "tmp")
18 18
       FileUtils.mkdir_p tmpfolder
19  
-      FileUtils.mkdir File.join(RAILS_ROOT,"/public/stylesheets/harsh/") unless File.exists?(File.join(RAILS_ROOT,"/public/stylesheets/harsh/"))
  19
+      FileUtils.mkdir_p File.join(RAILS_ROOT,"/public/stylesheets/harsh/")
  20
+      
20 21
       puts "Generating themes..."
21 22
       `uv -s ruby --copy-files #{tmpfolder} #{File.dirname(__FILE__)+"/../README.markdown"}`
  23
+      
22 24
       puts "Copying #{args[:theme]}.css..."
23  
-      FileUtils.cp File.join(tmpfolder, ["css","#{args[:theme]}.css"]), File.join(RAILS_ROOT,["public","stylesheets","harsh"])
  25
+      FileUtils.cp File.join(tmpfolder, "css", "#{args[:theme]}.css"), File.join(RAILS_ROOT, "public", "stylesheets", "harsh")
  26
+      
24 27
       puts "Cleaning up..."
25 28
       FileUtils.rm_rf Dir.glob("#{tmpfolder}/*")
26 29
     end

0 notes on commit 3a1fb53

Please sign in to comment.
Something went wrong with that request. Please try again.