auger 1.3.5 → 1.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/aug +11 -3
- data/lib/auger/plugin/socket.rb +1 -1
- data/lib/auger/request.rb +3 -1
- data/lib/auger/result.rb +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.6
|
data/bin/aug
CHANGED
@@ -39,6 +39,10 @@ optparse = OptionParser.new do |opts|
|
|
39
39
|
options[:server] = s
|
40
40
|
end
|
41
41
|
|
42
|
+
opts.on('-t', '--time', 'Show request times.') do |t|
|
43
|
+
options[:time] = true
|
44
|
+
end
|
45
|
+
|
42
46
|
opts.on('-v', '--version', 'Display version and exit.') do
|
43
47
|
puts Auger::VERSION.color(:green)
|
44
48
|
exit
|
@@ -102,9 +106,11 @@ Auger::Config.load(cfg).projects.each do |project|
|
|
102
106
|
threads[server.name] << Thread.new do
|
103
107
|
conn = connection.do_open(server)
|
104
108
|
connection.requests.map do |request|
|
105
|
-
response = request.do_run(conn)
|
109
|
+
response, time = request.do_run(conn)
|
106
110
|
request.tests.map do |test|
|
107
|
-
test.run(response)
|
111
|
+
result = test.run(response)
|
112
|
+
result.time = time
|
113
|
+
result
|
108
114
|
end
|
109
115
|
end
|
110
116
|
end
|
@@ -121,7 +127,9 @@ Auger::Config.load(cfg).projects.each do |project|
|
|
121
127
|
threads[server].each do |thread|
|
122
128
|
results = thread.value # this waits on thread
|
123
129
|
results.flatten.each do |result|
|
124
|
-
|
130
|
+
output = " %+#{max_test_length}s %-30s" % [result.test.name, result.format]
|
131
|
+
output << "[#{result.time}]".color(:blue) if options[:time]
|
132
|
+
puts output
|
125
133
|
end
|
126
134
|
end
|
127
135
|
end
|
data/lib/auger/plugin/socket.rb
CHANGED
data/lib/auger/request.rb
CHANGED
@@ -44,9 +44,11 @@ module Auger
|
|
44
44
|
arg = @arg
|
45
45
|
arg = self.before_request_proc.call(conn) if self.before_request_proc
|
46
46
|
|
47
|
+
start = Time.now
|
47
48
|
response = self.run(conn, arg)
|
49
|
+
time = Time.now - start
|
48
50
|
response = self.before_tests_proc.call(response) if self.before_tests_proc
|
49
|
-
response
|
51
|
+
return response, time
|
50
52
|
rescue => e
|
51
53
|
e
|
52
54
|
end
|
data/lib/auger/result.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-07-
|
13
|
+
date: 2012-07-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: json
|