Class: Maguro::Github
- Inherits:
-
Object
- Object
- Maguro::Github
- Defined in:
- lib/maguro/github.rb
Instance Attribute Summary collapse
-
#app_name ⇒ Object
readonly
Returns the value of attribute app_name.
-
#builder ⇒ Object
readonly
Returns the value of attribute builder.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
Instance Method Summary collapse
-
#create_repo ⇒ Object
Will create a new repository on github and create a remote named origin.
- #git_url ⇒ Object
-
#initialize(builder, app_name, organization) ⇒ Github
constructor
A new instance of Github.
Constructor Details
#initialize(builder, app_name, organization) ⇒ Github
Returns a new instance of Github.
6 7 8 9 10 |
# File 'lib/maguro/github.rb', line 6 def initialize(builder, app_name, organization) @builder = builder @app_name = app_name @organization = organization end |
Instance Attribute Details
#app_name ⇒ Object (readonly)
Returns the value of attribute app_name.
4 5 6 |
# File 'lib/maguro/github.rb', line 4 def app_name @app_name end |
#builder ⇒ Object (readonly)
Returns the value of attribute builder.
4 5 6 |
# File 'lib/maguro/github.rb', line 4 def builder @builder end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
4 5 6 |
# File 'lib/maguro/github.rb', line 4 def organization @organization end |
Instance Method Details
#create_repo ⇒ Object
Will create a new repository on github and create a remote named origin.
19 20 21 |
# File 'lib/maguro/github.rb', line 19 def create_repo builder.run "hub create #{organization}/#{app_name}" end |
#git_url ⇒ Object
13 14 15 |
# File 'lib/maguro/github.rb', line 13 def git_url "[email protected]:#{organization}/#{app_name}.git" end |