Created
April 18, 2009 14:35
-
-
Save stephencelis/97629 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# App (http://github.com/stephencelis/app), a template for Rails: | |
# | |
# In existing projects: | |
# % rake rails:template LOCATION=http://gist.github.com/97629.txt | |
# | |
# For new projects: | |
# % rails newapp -m http://gist.github.com/97629.txt | |
unless File.read("config/environment.rb").include? "stephencelis-app" | |
gem "stephencelis-app", :lib => "app", | |
:source => "http://gems.github.com", | |
:version => ">= 0.2.2" | |
end | |
unless File.exist? "config/app.yml" | |
generate "app_config" | |
end | |
begin | |
Gem.activate "stephencelis-app" | |
rescue Gem::LoadError | |
rake "gems:install", :sudo => true | |
end | |
unless Dir["vendor/gems/stephencelis-app*"].any? | |
if File.directory?("vendor/gems") && yes?("Unpack gem?") | |
rake "gems:unpack", :sudo => true | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment