Skip to content

Instantly share code, notes, and snippets.

@stephencelis
Created April 18, 2009 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephencelis/97629 to your computer and use it in GitHub Desktop.
Save stephencelis/97629 to your computer and use it in GitHub Desktop.
# 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