Skip to content
This repository has been archived by the owner on Aug 15, 2018. It is now read-only.

Commit

Permalink
added code to update theme cache post-update
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Adams committed Nov 23, 2008
1 parent b3f3d52 commit 64a836f
Showing 1 changed file with 8 additions and 3 deletions.
Expand Up @@ -35,15 +35,20 @@ def self.install repository_url, name
end

def self.update name
`cd #{RAILS_ROOT}/themes/#{name}; git pull`
`cd #{theme_folder_for(name)}; git pull`
`cd #{RAILS_ROOT}; rake theme_update_cache`
end

def self.delete name
`rm -fr #{RAILS_ROOT}/themes/#{name}`
`rm -fr #{theme_folder_for(name)}`
end

def self.installed?(name)
File.exist?("#{RAILS_ROOT}/themes/#{name}")
File.exist?(theme_folder_for(name))
end

def self.theme_folder_for name
"#{RAILS_ROOT}/themes/#{name}"
end
end
end
Expand Down

0 comments on commit 64a836f

Please sign in to comment.