dbrady-tourbus 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/tourbus +1 -6
- data/lib/tour.rb +5 -5
- metadata +2 -2
data/bin/tourbus
CHANGED
@@ -32,17 +32,12 @@ tours = if ARGV.empty?
|
|
32
32
|
|
33
33
|
srand opts[:rand] || Time.now.to_i
|
34
34
|
|
35
|
-
require 'pp'
|
36
|
-
pp config
|
37
|
-
puts '----'
|
38
|
-
pp opts
|
39
|
-
exit
|
40
35
|
if opts[:list]
|
41
36
|
Tour.tours(ARGV).each do |tour|
|
42
37
|
puts tour
|
43
38
|
puts Tour.tests(tour).map {|test| " #{test}"}
|
44
39
|
end
|
45
40
|
else
|
46
|
-
|
41
|
+
TourBus.new(opts[:host], opts[:concurrency], opts[:number], tours).run
|
47
42
|
end
|
48
43
|
|
data/lib/tour.rb
CHANGED
@@ -10,7 +10,7 @@ require 'common'
|
|
10
10
|
class Tour
|
11
11
|
include WebSickle
|
12
12
|
attr_reader :host, :tours, :number, :tour_type, :tour_id
|
13
|
-
|
13
|
+
|
14
14
|
def initialize(host, tours, number, tour_id)
|
15
15
|
@host, @tours, @number, @tour_id = host, tours, number, tour_id
|
16
16
|
@tour_type = self.send(:class).to_s
|
@@ -56,17 +56,17 @@ class Tour
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def run_test(test_name)
|
59
|
-
test = "test_#{test_name}"
|
60
|
-
raise TourBusException.new("run_test couldn't run test '#{test_name}' because this tour did not respond to :#{test}") unless respond_to? test
|
59
|
+
@test = "test_#{test_name}"
|
60
|
+
raise TourBusException.new("run_test couldn't run test '#{test_name}' because this tour did not respond to :#{@test}") unless respond_to? @test
|
61
61
|
setup
|
62
|
-
send test
|
62
|
+
send @test
|
63
63
|
teardown
|
64
64
|
end
|
65
65
|
|
66
66
|
protected
|
67
67
|
|
68
68
|
def log(message)
|
69
|
-
puts "#{Time.now.strftime('%F %H:%M:%S')} Tour ##{@tour_id}: #{message}"
|
69
|
+
puts "#{Time.now.strftime('%F %H:%M:%S')} Tour ##{@tour_id}: (#{@test}) #{message}"
|
70
70
|
end
|
71
71
|
|
72
72
|
# given "portal", opens "http://#{@host}/portal"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dbrady-tourbus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Brady
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-01-
|
12
|
+
date: 2009-01-10 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|