Class: DeepThought::CIService::CIService

Inherits:
Object
  • Object
show all
Defined in:
lib/deep_thought/ci_service/ci_service.rb

Direct Known Subclasses

Janky

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCIService

Returns a new instance of CIService.



6
7
8
9
10
# File 'lib/deep_thought/ci_service/ci_service.rb', line 6

def initialize
  if self.class.name == 'DeepThought::CIService::CIService'
    raise "#{self.class.name} is abstract, you cannot instantiate it directly."
  end
end

Instance Attribute Details

#endpointObject

Returns the value of attribute endpoint.



4
5
6
# File 'lib/deep_thought/ci_service/ci_service.rb', line 4

def endpoint
  @endpoint
end

#passwordObject

Returns the value of attribute password.



4
5
6
# File 'lib/deep_thought/ci_service/ci_service.rb', line 4

def password
  @password
end

#usernameObject

Returns the value of attribute username.



4
5
6
# File 'lib/deep_thought/ci_service/ci_service.rb', line 4

def username
  @username
end

Instance Method Details

#is_branch_green?(app, branch, hash) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/deep_thought/ci_service/ci_service.rb', line 20

def is_branch_green?(app, branch, hash)
  true
end

#setup?(settings) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
15
16
17
18
# File 'lib/deep_thought/ci_service/ci_service.rb', line 12

def setup?(settings)
  @endpoint = settings['CI_SERVICE_ENDPOINT']
  @username = settings['CI_SERVICE_USERNAME']
  @password = settings['CI_SERVICE_PASSWORD']

  true
end