Class: Maguro::Github

Inherits:
Object
  • Object
show all
Defined in:
lib/maguro/github.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject (readonly)

Returns the value of attribute app_name.



4
5
6
# File 'lib/maguro/github.rb', line 4

def app_name
  @app_name
end

#builderObject (readonly)

Returns the value of attribute builder.



4
5
6
# File 'lib/maguro/github.rb', line 4

def builder
  @builder
end

#organizationObject (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_repoObject

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_urlObject



13
14
15
# File 'lib/maguro/github.rb', line 13

def git_url
  "[email protected]:#{organization}/#{app_name}.git"
end