class Environments::Local

Public Instance Methods

build_id() click to toggle source
# File lib/flakyci_rspec/environments/local.rb, line 23
def build_id
  Time.now.to_i.to_s
end
build_name() click to toggle source
# File lib/flakyci_rspec/environments/local.rb, line 27
def build_name
  'local'
end
get_infos() click to toggle source
# File lib/flakyci_rspec/environments/local.rb, line 5
def get_infos
  {
    sha: sha,
    build_id: build_id,
    ref: get_ref,
    build_name: build_name,
    env_name: 'local'
  }
end
get_ref() click to toggle source
# File lib/flakyci_rspec/environments/local.rb, line 19
def get_ref
  `git rev-parse --abbrev-ref HEAD`.strip!
end
sha() click to toggle source
# File lib/flakyci_rspec/environments/local.rb, line 15
def sha
  `git rev-parse --short HEAD`.strip!
end