Permalink
Browse files

added a gitsub method (taken from ptb)

  • Loading branch information...
1 parent 2428d48 commit 26989fdbc0c2c5f92a97a2a4355a4bdbc4f4941d Chris Finch committed May 8, 2008
Showing with 21 additions and 28 deletions.
  1. +21 −28 railify
View
@@ -29,12 +29,12 @@ module Helpers
{ :gitignore => %w[config/database.yml tmp/* log/*.log db/*.sqlite3 public/stylesheets/application.css] * "\n",
:routes => ["ActionController::Routing::Routes.draw do |map|", "end"] * "\n" }
end
-
- def git(message)
- silent "git add ."
- silent "git commit -m '#{message}'"
+
+ def gitci(message)
+ silent 'git add .'
+ silent "git commit -m '#{message}'"
end
-
+
def braid(repo, dir, type="git")
silent "braid add #{repo} --type #{type} #{dir}"
silent "git merge braid/track"
@@ -44,6 +44,11 @@ module Helpers
args = args.map {|name,value| "#{name.to_s.upcase}=#{value}"}.join(" ")
silent "rake #{task} #{args}"
end
+
+ def gitsub(repo, dir)
+ silent "git submodule add #{repo} #{dir}"
+ end
+
end
if __FILE__ == $0
@@ -79,89 +84,77 @@ if __FILE__ == $0
silent "git init"
File.open(".gitignore", "w") {|f| f << templates[:gitignore] }
silent "touch {tmp,log}/.gitignore"
- git "Basic rails app structure"
+ gitci "Basic rails app structure"
end
announcing "Freezing rails" do
- # braid "git://github.com/rails/rails.git", "vendor/rails"
- #rake "rails:freeze:edge"
silent "git submodule add git://github.com/rails/rails.git vendor/rails"
silent "git submodule init"
end
announcing "Installing GemsOnrails" do
silent "gemsonrails"
- git "Froze GemsOnRails plugin"
+ gitci "Froze GemsOnRails plugin"
end
announcing "Installing haml" do
silent "haml --rails ."
rake "gems:freeze", :gem => "haml"
- git "Froze haml gem and plugin"
+ gitci "Froze haml gem and plugin"
end
announcing "Installing RSpec" do
- # braid "git://github.com/dchelimsky/rspec.git", "vendor/plugins/rspec"
- # braid "git://github.com/dchelimsky/rspec-rails.git", "vendor/plugins/rspec_on_rails"
-
- # silent "script/plugin install git://github.com/dchelimsky/rspec.git"
- # silent "script/plugin install git://github.com/dchelimsky/rspec-rails.git"
-
- # braid "http://rspec.rubyforge.org/svn/trunk/rspec", "vendor/plugins/rspec"
- # braid "http://rspec.rubyforge.org/svn/trunk/rspec_on_rails", "vendor/plugins/rspec_on_rails"
-
silent "git submodule add git://github.com/dchelimsky/rspec.git vendor/plugins/rspec"
silent "git submodule add git://github.com/dchelimsky/rspec-rails.git vendor/plugins/rspec-rails"
silent "git submodule init"
end
announcing "Generating RSpec base files" do
silent "script/generate rspec"
- git "Added RSpec base files"
+ gitci "Added RSpec base files"
end
announcing "Installing make_resourceful" do
silent "git submodule add git://github.com/jcfischer/make_resourceful.git vendor/plugins/make_resourceful"
silent "git submodule init"
- git "Installed make_resourceful plugin"
+ gitci "Installed make_resourceful plugin"
end
announcing "Installing sexy_scaffold" do
silent "git submodule add git://github.com/dfischer/sexy_scaffold.git vendor/plugins/sexy_scaffold"
silent "git submodule init"
- git "Installed sexy_scaffold plugin"
+ gitci "Installed sexy_scaffold plugin"
end
announcing "Installing rspec_on_crack" do
- # silent "script/plugin install git://github.com/technoweenie/rspec_on_rails_on_crack.git"
silent "git submodule add git://github.com/technoweenie/rspec_on_rails_on_crack.git vendor/plugins/rspec_on_rails_on_crack"
silent "git submodule init"
- git "Installed rspec_on_crack plugin"
+ gitci "Installed rspec_on_crack plugin"
end
announcing "Installing acts_as_list" do
# silent "script/plugin install git://github.com/veilleperso/acts_as_list.git"
silent "git submodule add git://github.com/veilleperso/acts_as_list.git vendor/plugins/acts_as_list"
silent "git submodule init"
- git "Installed acts_as_list plugin"
+ gitci "Installed acts_as_list plugin"
end
announcing "Installing acts_as_state_machine" do
silent "git submodule add git://github.com/omghax/acts_as_state_machine.git vendor/plugins/acts_as_state_machine"
silent "git submodule init"
- git "Installed acts_as_state_machine plugin"
+ gitci "Installed acts_as_state_machine plugin"
end
announcing "Installing restful-authentication" do
silent "git submodule add git://github.com/technoweenie/restful-authentication.git vendor/plugins/restful-authentication"
silent "git submodule init"
- git "Installed restful-authentication plugin"
+ gitci "Installed restful-authentication plugin"
end
announcing "Installing auto_migrations" do
silent "git submodule add git://github.com/pjhyett/auto_migrations.git vendor/plugins/auto_migrations"
silent "git submodule init"
- git "Installed auto_migrations plugin"
+ gitci "Installed auto_migrations plugin"
end
end
end

0 comments on commit 26989fd

Please sign in to comment.