Class: Environments

Inherits:
Object
  • Object
show all
Defined in:
lib/flakyci_rspec/environments.rb,
lib/flakyci_rspec/environments/local.rb

Defined Under Namespace

Classes: CircleCi, Codeship, Drone, Github, Gitlab, Local, TravisCi

Instance Method Summary collapse

Constructor Details

#initializeEnvironments

Returns a new instance of Environments.



10
11
12
# File 'lib/flakyci_rspec/environments.rb', line 10

def initialize 
  @env = init_env()
end

Instance Method Details

#get_envObject



13
14
15
# File 'lib/flakyci_rspec/environments.rb', line 13

def get_env
  @env.get_infos()    
end

#init_envObject



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/flakyci_rspec/environments.rb', line 17

def init_env
 if Github.is_github?()
  Environments::Github.new()
 elsif CircleCi.is_circle_ci?()
  Environments::CircleCi.new()
elsif TravisCi.is_travis_ci?()
  Environments::TravisCi.new()
elsif Codeship.is_codeship?()
  Environments::Codeship.new()
elsif Drone.is_drone?()
  Environments::Drone.new()
elsif Gitlab.is_gitlab?()
  Environments::Gitlab.new()
 else
  Environments::Local.new()
 end
end