Class: Environments
- Inherits:
-
Object
- Object
- Environments
- 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
- #get_env ⇒ Object
- #init_env ⇒ Object
-
#initialize ⇒ Environments
constructor
A new instance of Environments.
Constructor Details
#initialize ⇒ Environments
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_env ⇒ Object
13 14 15 |
# File 'lib/flakyci_rspec/environments.rb', line 13 def get_env @env.get_infos() end |
#init_env ⇒ Object
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 |