Class: Swiftly::CreateGit
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Swiftly::CreateGit
- Includes:
- Thor::Actions
- Defined in:
- lib/swiftly/create_git.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
16 17 18 19 20 |
# File 'lib/swiftly/create_git.rb', line 16 def self.source_root File.dirname(__FILE__) end |
Instance Method Details
#create_git ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/swiftly/create_git.rb', line 22 def create_git() git = Git.init( @project_path ) template( File.join( 'templates', 'gitignore.erb' ), File.join( @project_path, '.gitignore' ) ) unless File.exists? File.join( @project_path, '.gitignore' ) git.add git.commit_all('initial commit') end |