Class: Releasinator::DownstreamRepo

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, url, branch, options = {}) ⇒ DownstreamRepo

Returns a new instance of DownstreamRepo.



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/downstream_repo.rb', line 4

def initialize(name, url, branch, options={})
  @name = name
  @url = url
  @branch = branch
  @options = options
  # options are:
  #  :new_branch_name (if set, ignores :release_to_github)
  #  :release_to_github
  #  :files_to_copy
  #  :full_file_sync
  #  :post_copy_methods
  #  :build_methods
end

Instance Attribute Details

#branchObject (readonly)

Returns the value of attribute branch.



3
4
5
# File 'lib/downstream_repo.rb', line 3

def branch
  @branch
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/downstream_repo.rb', line 3

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/downstream_repo.rb', line 3

def options
  @options
end

#urlObject (readonly)

Returns the value of attribute url.



3
4
5
# File 'lib/downstream_repo.rb', line 3

def url
  @url
end

Instance Method Details

#full_file_syncObject



18
19
20
21
# File 'lib/downstream_repo.rb', line 18

def full_file_sync
  return @options[:full_file_sync] if @options.has_key? :full_file_sync
  false
end

#release_to_githubObject



23
24
25
26
# File 'lib/downstream_repo.rb', line 23

def release_to_github
  return @options[:release_to_github] if @options.has_key? :release_to_github
  false
end