Storable
# File lib/stella/testplan.rb, line 143 def from_hash(*args) me = super(*args) me.usecases.collect! { |uc| Stella::Usecase.from_hash(uc) } me end
# File lib/stella/testplan.rb, line 166 def global @global ||= {} @global end
# File lib/stella/testplan.rb, line 163 def global?(name) global.has_key?(name) end
# File lib/stella/testplan.rb, line 139 def inherited obj super obj.extend ClassMethods end
# File lib/stella/testplan.rb, line 152 def plan(klass,v=nil) # Store the class as a string. Ruby calls Object#hash before setting # the hash key which conflicts with Familia::Object.hash. plans[klass.to_s] = v unless v.nil? plans[klass.to_s] rescue NameError => ex nil end
# File lib/stella/testplan.rb, line 101 def checkup base_uri, opts={} opts[:base_uri] = base_uri run Stella::Engine::Checkup, opts end
# File lib/stella/testplan.rb, line 73 def cust @cust ||= Customer.from_redis @custid @cust || Customer.anonymous end
# File lib/stella/testplan.rb, line 92 def destroy! raise BS::Problem, "Monitor exists #{index}" if MonitorInfo.exists?(index) host.testplans.rem self unless host.nil? cust.testplans.rem self unless cust.nil? super end
# File lib/stella/testplan.rb, line 52 def favicon?() !@favicon.nil? && !@favicon.empty? end
# File lib/stella/testplan.rb, line 57 def first_request return if @usecases.empty? @usecases.first.requests.first end
# File lib/stella/testplan.rb, line 61 def freeze return if frozen? @usecases.each { |uc| uc.freeze } @id &&= Gibbler::Digest.new(@id || self.digest) super self end
# File lib/stella/testplan.rb, line 84 def host h = @host.nil? || frozen? ? HostInfo.load_or_create(hostid) : @host frozen? ? h : (@host=h) end
# File lib/stella/testplan.rb, line 88 def hostid h = (@hostid.nil? || frozen?) && first_request ? Stella.canonical_host(first_request.uri) : @hostid frozen? ? h : (@hostid=h) end
# File lib/stella/testplan.rb, line 47 def id @id ||= gibbler @id end
# File lib/stella/testplan.rb, line 40 def init(uri=nil) preprocess if uri req = Stella::RequestTemplate.new :get, Stella.canonical_uri(uri) @usecases << Stella::Usecase.new(req) end end
# File lib/stella/testplan.rb, line 77 def monitor MonitorInfo.from_redis @id end
# File lib/stella/testplan.rb, line 80 def monitored? mon = monitor mon && mon.enabled end
# File lib/stella/testplan.rb, line 98 def owner?(guess) custid != nil && cust.custid?(guess) end
# File lib/stella/testplan.rb, line 68 def postprocess @id &&= Gibbler::Digest.new(@id) @notify ||= false @notify &&= false if @notify == 'false' end
Generated with the Darkfish Rdoc Generator 2.