Class: WebsiteDeployVerifier

Inherits:
Object
  • Object
show all
Defined in:
lib/seabass/website_deploy_verifier.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(downloader = Downloader.new) ⇒ WebsiteDeployVerifier

Returns a new instance of WebsiteDeployVerifier.



8
9
10
11
# File 'lib/seabass/website_deploy_verifier.rb', line 8

def initialize(downloader = Downloader.new)
  @downloader = downloader
  debugger
end

Instance Attribute Details

#typeObject

Returns the value of attribute type.



6
7
8
# File 'lib/seabass/website_deploy_verifier.rb', line 6

def type
  @type
end

#urlObject

Returns the value of attribute url.



6
7
8
# File 'lib/seabass/website_deploy_verifier.rb', line 6

def url
  @url
end

Instance Method Details

#executeObject



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/seabass/website_deploy_verifier.rb', line 13

def execute()
  debugger
  raise "Url not specified" if @url.nil?
  raise "Application type not specified" if @type.nil?
  
  if (@downloader.download(@url) =~ /<title>Exception of type '.*' was thrown<\title>/) != nil

    raise WebsiteDeployFailed
  end
  true
end