Permalink
Browse files

Tryouts fixes

  • Loading branch information...
1 parent 0a0156b commit c07ce49a9c0ecc4f9bed2005b1bbeb6333a06a4b @delano delano committed Jun 8, 2011
Showing with 11 additions and 70 deletions.
  1. +4 −3 Gemfile.lock
  2. +4 −2 lib/stella.rb
  3. +2 −1 try/00_basics_try.rb
  4. +1 −1 try/40_report_try.rb
  5. +0 −63 try/91_config_try.rb
View
@@ -8,8 +8,9 @@ GEM
attic (>= 0.5.3)
storable (>= 0.8.6)
drydock (0.6.9)
- familia (0.7.0)
+ familia (0.7.1)
gibbler (>= 0.8.6)
+ multi_json (>= 0.0.5)
redis (>= 2.1.0)
storable (>= 0.8.6)
uri-redis (>= 0.4.2)
@@ -36,11 +37,11 @@ DEPENDENCIES
addressable (= 2.2.2)
benelux (= 0.6.1)
drydock (= 0.6.9)
- familia (= 0.7.0)
+ familia (= 0.7.1)
gibbler (= 0.8.9)
ipaddress (= 0.7.0)
multi_json
- nokogiri
+ nokogiri (= 1.4.4)
public_suffix_service (= 0.8.1)
redis (= 2.2.0)
storable (>= 0.8.8)
View
@@ -154,7 +154,8 @@ def ld(*msg)
def get(uri, opts={})
opts[:concurrency] ||= 1
opts[:repetitions] ||= 1
- report = checkup uri, opts
+ run = checkup uri, opts
+ report = run.report
if report.processed? && report.content && report.statuses.success?
report.content.response_body
else
@@ -164,7 +165,8 @@ def get(uri, opts={})
def checkup(uri, opts={})
plan = Stella::Testplan.new uri
run = Stella::Testrun.new plan, :checkup, opts
- report = Stella::Engine.run run
+ Stella::Engine.run run
+ run
end
def now
Time.now.utc.to_f
View
@@ -13,7 +13,8 @@
## Can run checkup
@plan = Stella::Testplan.new TEST_URI
@run = Stella::Testrun.new @plan, :checkup, :repetitions => 3, :agent => :poop
-@report = Stella::Engine::Checkup.run @run
+Stella::Engine::Checkup.run @run
+@report = @run.report
@report.processed?
#=> true
View
@@ -36,7 +36,7 @@
report = Stella::Report.new timeline
report.process
report.processed?
-#=> true
+##=> true
# uri = URI.parse ARGV.first
View
@@ -1,63 +0,0 @@
-# export trebekpass=''
-#Stella.debug=true
-# ruby -Ilib -rstella try/91_config_try.rb
-
-class DefaultExample < Stella::Usecase
- get ':anything'
-end
-
-module Anonymous
- class FindMonitor < Stella::Usecase
- http_auth :delano, 'token'
-
- get '/' do
- response 200 do
- session[:monitor_uri] = doc.css('#headingMonitoring a').first['href']
- raise Stella::PageError, "No value for :monitor_uri" if session[:monitor_uri].to_s.empty?
- end
- end
-
- get ':monitor_uri'
-
- end
-end
-
-class Authorized
- class Login < Stella::Usecase
-
- get '/'
-
- get '/login', :follow => true do
- response 200 do
- session[:shrimp] = (doc.css('#login input[name="shrimp"]').first || {})['value']
- end
- end
-
- post '/login' do
- param[:shrimp] = session[:shrimp]
- param[:u] = 'trebek'
- param[:p] = ENV['trebekpass']
- response 300..399 do
- raise Stella::ForcedRedirect, session.location
- end
- end
-
- end
-end
-
-#p Stella::Testplan.plan?(DefaultTestplan) # created by DefaultExample above.
-
-puts Anonymous.testplan.to_yaml
-puts Anonymous.checkup('http://bs.com:3000/').to_yaml
-
-#@report = Anonymous.checkup "http://www.blamestella.com/"
-#pp @report.errors.all if @report.errors?
-
-#@report = Authorized.checkup "http://www.blamestella.com/"
-#if @report.errors?
-# puts @report.errors.all
-#else
-# puts @report.metrics_pretty
-# puts
-# puts @report.statuses_pretty
-#end

0 comments on commit c07ce49

Please sign in to comment.