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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d344444821e96147867cfe55109abb3fe969b735
4
- data.tar.gz: e9efdef028dc48d5516293bb7ac5668f6a13ce31
3
+ metadata.gz: d0c363514df63357d9055562c0f425b5fc632eb9
4
+ data.tar.gz: 29a777d72f71f7559f7a3a75adfe4fd4f14370fb
5
5
  SHA512:
6
- metadata.gz: 0d0dc864c04f77651e56e2328166ea5823afda718a9e4803c67448a25b7513f4919b57614cc8229b5f803c47c3055a2f183b9623be5c1d5dfe866c78bb0d64ad
7
- data.tar.gz: 0ff831ae9bfb8b914ae6ae02151c33dbdc7975595271ab834b64b55579aef09ad889cbe45f2019ac535b36c11c95417ae754afd96f60b4717f8f2eb5d6e7a60f
6
+ metadata.gz: d4f743cdb1e40849cd56dfb80cf76c8cf91e0e6cce003769dc55b9a20a4cb2816558960ab420a6aa931238404cb9870b1e22758b1d4ed1b9c44dafb5f9a1fa3b
7
+ data.tar.gz: 359a95e518016f6e2471b1591084336c5b3cb9c73a9b14a55d114613a43c3a3f5e5d26d031a6a8fc9f345645a8ed128f5bf8436e8b6a4ca57f32f56532196b57
@@ -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, data|
104
- reqs = data.length
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(data)
106
+ ms = calc_response(@bucket[time])
108
107
 
109
- @csvexport.add_row([date, reqs, ms]) unless @csv.nil?
108
+ @csvexport.add_row([date, @bucket[time].length, ms]) unless @csv.nil?
110
109
 
111
110
  puts sprintf('%-30s %-10s %-20s',
112
- date, reqs, ms) unless @detailed.nil?
111
+ date, @bucket[time].length, ms) unless @detailed.nil?
113
112
  end
114
113
  end
115
114
 
@@ -1,3 +1,3 @@
1
1
  module Ralphttp
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -95,9 +95,9 @@ module Ralphttp
95
95
  # Returns String User Agent
96
96
  def return_user_agent
97
97
  if @ua.nil?
98
- user_agent = { 'User-Agent' => 'Ralphttp-Wreck' }
98
+ { 'User-Agent' => 'Ralphttp-Wreck' }
99
99
  else
100
- user_agent = { 'User-Agent' => @ua }
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
- unless @bucket[Time.now.to_i].kind_of?(Array)
112
- @bucket[Time.now.to_i] = []
113
- end
114
- @bucket[Time.now.to_i] << droplet
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.2
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-14 00:00:00.000000000 Z
11
+ date: 2013-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler