module Wta
Constants
- AP
- EU
- FINE
- INFO
- NA
- RED
- SA
- VERSION
- YELLA
Public Class Methods
bo_selecta(statusnum, region)
click to toggle source
# File lib/wta.rb, line 35 def self.bo_selecta(statusnum, region) pull_statuses(region) @all_status_images.select { |img| img.attributes['src'].value == "/images/status#{statusnum}.gif" }.map { |img| img.parent.parent.children[3].children[0] } end
infos(region=NA)
click to toggle source
# File lib/wta.rb, line 27 def self.infos(region=NA) bo_selecta(INFO, region) end
operating(region=NA)
click to toggle source
# File lib/wta.rb, line 31 def self.operating(region=NA) bo_selecta(FINE, region) end
pull_statuses(region)
click to toggle source
# File lib/wta.rb, line 44 def self.pull_statuses(region) @html = Nokogiri::HTML(open(URI.parse('http://status.aws.amazon.com/'))) @all_status_images = @html.css('#current_events_block #' + region.upcase + '_block td img') end
reds(region=NA)
click to toggle source
# File lib/wta.rb, line 19 def self.reds(region=NA) bo_selecta(RED, region) end
regions()
click to toggle source
# File lib/wta.rb, line 15 def self.regions [NA, SA, EU, AP] end
yellows(region=NA)
click to toggle source
# File lib/wta.rb, line 23 def self.yellows(region=NA) bo_selecta(YELLA, region) end