Class: Preseason::Recipe::Git
- Inherits:
-
Preseason::Recipe
- Object
- Preseason::Recipe
- Preseason::Recipe::Git
- Defined in:
- lib/preseason/recipe/git.rb
Instance Attribute Summary collapse
-
#github_username ⇒ Object
readonly
Returns the value of attribute github_username.
-
#public_repo ⇒ Object
readonly
Returns the value of attribute public_repo.
-
#repo_name ⇒ Object
readonly
Returns the value of attribute repo_name.
Attributes inherited from Preseason::Recipe
Instance Method Summary collapse
Methods inherited from Preseason::Recipe
#initialize, #post_install_hook, #recipe_root
Methods included from Colorize
Methods included from GeneratorContext
Constructor Details
This class inherits a constructor from Preseason::Recipe
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Preseason::GeneratorContext
Instance Attribute Details
#github_username ⇒ Object (readonly)
Returns the value of attribute github_username.
2 3 4 |
# File 'lib/preseason/recipe/git.rb', line 2 def github_username @github_username end |
#public_repo ⇒ Object (readonly)
Returns the value of attribute public_repo.
2 3 4 |
# File 'lib/preseason/recipe/git.rb', line 2 def public_repo @public_repo end |
#repo_name ⇒ Object (readonly)
Returns the value of attribute repo_name.
2 3 4 |
# File 'lib/preseason/recipe/git.rb', line 2 def repo_name @repo_name end |
Instance Method Details
#prepare ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/preseason/recipe/git.rb', line 4 def prepare remove_file 'README.rdoc' create_file 'README.md', parse_template('readme/README.md.erb') run 'rake db:migrate' run 'git init' run 'git add .' run 'git commit -m "Initial commit"' publish_to_github if github? end |