Class: CiCache::Set

Inherits:
Object
  • Object
show all
Defined in:
lib/ci-cache/set.rb

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ Set

Returns a new instance of Set.



5
6
7
8
# File 'lib/ci-cache/set.rb', line 5

def initialize(context)
  @context = context
  @storage = Storage.new(context)
end

Instance Method Details

#runObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/ci-cache/set.rb', line 10

def run
  if content_has_changed?
    context.log("Updating cache.")
    archive_files
    upload_archive
    upload_hash_file
  else
    context.log("Nothing changed.")
  end
end