Class: PgBundle::GithubSource

Inherits:
BaseSource show all
Defined in:
lib/pgbundle/github_source.rb

Overview

The GithubSource class defines a Github Source

Instance Attribute Summary

Attributes inherited from BaseSource

#path

Instance Method Summary collapse

Methods inherited from BaseSource

#initialize

Constructor Details

This class inherits a constructor from PgBundle::BaseSource

Instance Method Details

#branch_nameObject



14
15
16
# File 'lib/pgbundle/github_source.rb', line 14

def branch_name
  @branch || 'master'
end

#load(host, user, dest) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/pgbundle/github_source.rb', line 5

def load(host, user, dest)
  clone(dest)
  if host == 'localhost'
    copy_local(clone_dir, dest)
  else
    copy_to_remote(host, user, clone_dir, dest)
  end
end