Class: RSpecTracer::RemoteCache::Repo

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec_tracer/remote_cache/repo.rb

Defined Under Namespace

Classes: RepoError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(aws) ⇒ Repo

Returns a new instance of Repo.

Raises:



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/rspec_tracer/remote_cache/repo.rb', line 10

def initialize(aws)
  @aws = aws
  @branch_name = ENV['GIT_BRANCH'].chomp

  raise RepoError, 'GIT_BRANCH environment variable is not set' if @branch_name.nil?

  fetch_head_ref
  fetch_branch_ref
  fetch_ancestry_refs
  fetch_branch_refs
  generate_cache_refs
end

Instance Attribute Details

#ancestry_refsObject (readonly)

Returns the value of attribute ancestry_refs.



8
9
10
# File 'lib/rspec_tracer/remote_cache/repo.rb', line 8

def ancestry_refs
  @ancestry_refs
end

#branch_nameObject (readonly)

Returns the value of attribute branch_name.



8
9
10
# File 'lib/rspec_tracer/remote_cache/repo.rb', line 8

def branch_name
  @branch_name
end

#branch_refObject (readonly)

Returns the value of attribute branch_ref.



8
9
10
# File 'lib/rspec_tracer/remote_cache/repo.rb', line 8

def branch_ref
  @branch_ref
end

#branch_refsObject (readonly)

Returns the value of attribute branch_refs.



8
9
10
# File 'lib/rspec_tracer/remote_cache/repo.rb', line 8

def branch_refs
  @branch_refs
end

#cache_refsObject (readonly)

Returns the value of attribute cache_refs.



8
9
10
# File 'lib/rspec_tracer/remote_cache/repo.rb', line 8

def cache_refs
  @cache_refs
end