module Onotole::Git
Public Instance Methods
create_github_repo(repo_name)
click to toggle source
# File lib/onotole/git.rb, line 11 def create_github_repo(repo_name) system "hub create #{repo_name}" end
git_init_commit()
click to toggle source
# File lib/onotole/git.rb, line 19 def git_init_commit return unless user_choose?(:gitcommit) say 'Init commit' run 'git add .' run 'git commit -m "Init commit"' end
gitignore_files()
click to toggle source
# File lib/onotole/git.rb, line 26 def gitignore_files remove_file '.gitignore' copy_file 'gitignore_file', '.gitignore' end
init_git()
click to toggle source
# File lib/onotole/git.rb, line 15 def init_git run 'git init' end
install_user_gems_from_github()
click to toggle source
# File lib/onotole/git.rb, line 4 def install_user_gems_from_github File.readlines('Gemfile').each do |l| possible_gem_name = l.match(%r{(?:github:\s+)(?:'|")\w+/(.*)(?:'|")}i) install_from_github possible_gem_name[1] if possible_gem_name end end