Class: CarthageCacheRes::ArchiveBuilder

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(terminal, repository, archiver, project) ⇒ ArchiveBuilder

Returns a new instance of ArchiveBuilder.



10
11
12
13
14
15
# File 'lib/carthage_cache_res/archive_builder.rb', line 10

def initialize(terminal, repository, archiver, project)
  @terminal = terminal
  @repository = repository
  @archiver = archiver
  @project = project
end

Instance Attribute Details

#archiverObject (readonly)

Returns the value of attribute archiver.



7
8
9
# File 'lib/carthage_cache_res/archive_builder.rb', line 7

def archiver
  @archiver
end

#projectObject (readonly)

Returns the value of attribute project.



8
9
10
# File 'lib/carthage_cache_res/archive_builder.rb', line 8

def project
  @project
end

#repositoryObject (readonly)

Returns the value of attribute repository.



6
7
8
# File 'lib/carthage_cache_res/archive_builder.rb', line 6

def repository
  @repository
end

#terminalObject (readonly)

Returns the value of attribute terminal.



5
6
7
# File 'lib/carthage_cache_res/archive_builder.rb', line 5

def terminal
  @terminal
end

Instance Method Details

#build(platforms = nil) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/carthage_cache_res/archive_builder.rb', line 17

def build(platforms = nil)
  archive_path = archive(platforms)
  upload_archive(archive_path)
  # TODO check if some old archives can be deleted
  # I would store the last N archives and then delete
  # the rest
end