Skip to content

Commit

Permalink
Initialize a git repo, in preparation for --heroku flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Harold Giménez committed Oct 31, 2011
1 parent b91ea65 commit cd83855
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
6 changes: 6 additions & 0 deletions lib/suspenders/app_builder.rb
Expand Up @@ -127,6 +127,12 @@ def gitignore_files
end
end

def init_git
run "git init"
run "git add -A ."
run "git commit -m 'Initial commit - suspended project'"
end

def copy_miscellaneous_files
copy_file "errors.rb", "config/initializers/errors.rb"
copy_file "time_formats.rb", "config/initializers/time_formats.rb"
Expand Down
13 changes: 11 additions & 2 deletions lib/suspenders/generators/app_generator.rb
Expand Up @@ -26,11 +26,11 @@ def suspenders_customization
invoke :customize_gemfile
invoke :configure_app
invoke :setup_stylesheets
invoke :setup_gitignore
invoke :copy_miscellaneous_files
invoke :setup_root_route
invoke :set_active_record_whitelist_attributes
invoke :set_attr_accessibles_on_user
invoke :setup_git
invoke :outro
end

Expand Down Expand Up @@ -97,11 +97,20 @@ def setup_stylesheets
build(:setup_stylesheets)
end

def setup_git
say "Initializing git and initial commit"
invoke :setup_gitignore
invoke :init_git
end

def setup_gitignore
say "Ignore the right files"
build(:gitignore_files)
end

def init_git
build(:init_git)
end

def copy_miscellaneous_files
say "Copying miscellaneous support files"
build(:copy_miscellaneous_files)
Expand Down

0 comments on commit cd83855

Please sign in to comment.