ralphttp 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ralphttp/fixit.rb +5 -6
- data/lib/ralphttp/version.rb +1 -1
- data/lib/ralphttp/wreckit.rb +6 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0c363514df63357d9055562c0f425b5fc632eb9
|
4
|
+
data.tar.gz: 29a777d72f71f7559f7a3a75adfe4fd4f14370fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4f743cdb1e40849cd56dfb80cf76c8cf91e0e6cce003769dc55b9a20a4cb2816558960ab420a6aa931238404cb9870b1e22758b1d4ed1b9c44dafb5f9a1fa3b
|
7
|
+
data.tar.gz: 359a95e518016f6e2471b1591084336c5b3cb9c73a9b14a55d114613a43c3a3f5e5d26d031a6a8fc9f345645a8ed128f5bf8436e8b6a4ca57f32f56532196b57
|
data/lib/ralphttp/fixit.rb
CHANGED
@@ -100,16 +100,15 @@ module Ralphttp
|
|
100
100
|
# Returns Array containing summarized data
|
101
101
|
def print_detailed_report
|
102
102
|
@req = []
|
103
|
-
@bucket.map do |time
|
104
|
-
|
105
|
-
@req << reqs
|
103
|
+
@bucket.keys.sort.map do |time|
|
104
|
+
@req << @bucket[time].length
|
106
105
|
date = Time.at(time)
|
107
|
-
ms = calc_response(
|
106
|
+
ms = calc_response(@bucket[time])
|
108
107
|
|
109
|
-
@csvexport.add_row([date,
|
108
|
+
@csvexport.add_row([date, @bucket[time].length, ms]) unless @csv.nil?
|
110
109
|
|
111
110
|
puts sprintf('%-30s %-10s %-20s',
|
112
|
-
date,
|
111
|
+
date, @bucket[time].length, ms) unless @detailed.nil?
|
113
112
|
end
|
114
113
|
end
|
115
114
|
|
data/lib/ralphttp/version.rb
CHANGED
data/lib/ralphttp/wreckit.rb
CHANGED
@@ -95,9 +95,9 @@ module Ralphttp
|
|
95
95
|
# Returns String User Agent
|
96
96
|
def return_user_agent
|
97
97
|
if @ua.nil?
|
98
|
-
|
98
|
+
{ 'User-Agent' => 'Ralphttp-Wreck' }
|
99
99
|
else
|
100
|
-
|
100
|
+
{ 'User-Agent' => @ua }
|
101
101
|
end
|
102
102
|
end
|
103
103
|
|
@@ -108,10 +108,10 @@ module Ralphttp
|
|
108
108
|
#
|
109
109
|
# Returns nil
|
110
110
|
def apply_processed_data(droplet)
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
111
|
+
unless @bucket[Time.now.to_i].kind_of?(Array)
|
112
|
+
@bucket[Time.now.to_i] = []
|
113
|
+
end
|
114
|
+
@bucket[Time.now.to_i] << droplet
|
115
115
|
end
|
116
116
|
|
117
117
|
# Private: Get number of HTTP status codes and their count
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ralphttp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antun Krasic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|