wbench 0.3.1 → 0.3.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e5f8cd4848ed5f78b495fc3912c4812136cfbfc
4
- data.tar.gz: edafc49b32ca2ce5dbbf9f93ddc657eb175bda53
3
+ metadata.gz: 6ebb969e3c948f817852a124d87a4aa32d85a02a
4
+ data.tar.gz: f8f4ee3ea753abbfe2ff16c99edc760a4b0d4a44
5
5
  SHA512:
6
- metadata.gz: 6db6877b453bd221df17eb1dca899f565d40751628253aaf899b45cd73f63de7eca5cca162110137ece0aab5db78396b5094feb6050fbf866b4f1404360eb80c
7
- data.tar.gz: 4be58cb91c0674cdb471e20722c718fdfa71543493d6768a738b6f879d8e5d42d1d3d77a6851cc4a51b03bb2b440737c4f004cfeee5fa2ff1a70da1f9b81b808
6
+ metadata.gz: 723ccd9dc86c3bca6652c44acf460041bfac97f60ae3ad3870277738b7aafe1adf89daf7f1ffb15de82ac5598c78113c50299cfd1d2e8a3efd4596dbdbe94275
7
+ data.tar.gz: 2dbd2db3a512353be0b8b11c8c36d6becd49812516796d89612bcc60d2f918b22c15f87efdf4e838552bd09eda5fb57c9b252ed8f4c2f96cfcf1e229d3c532ea
@@ -3,8 +3,9 @@ module WBench
3
3
  class AppServer
4
4
  def initialize(browser)
5
5
  uri = Addressable::URI.parse(browser.url)
6
- @http = Net::HTTP.new(uri.host, uri.port)
6
+ @http = Net::HTTP.new(uri.host, uri.inferred_port)
7
7
  @http.use_ssl = uri.scheme == 'https'
8
+
8
9
  @request = Net::HTTP::Get.new(uri.request_uri)
9
10
  end
10
11
 
@@ -1,3 +1,3 @@
1
1
  module WBench
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
@@ -0,0 +1,14 @@
1
+ # encoding: utf-8
2
+ # Add a list of sites to test here:
3
+
4
+ def sites
5
+ [
6
+ 'https://www.google.com.au/',
7
+ 'https://www.desktoppr.co/',
8
+ 'http://www.giftoppr.co/',
9
+ 'http://au.yahoo.com/',
10
+ 'http://pegast.ru/',
11
+ 'http://www.aevy.com',
12
+ 'http://cdn01.pegast.su/get/ef/b7/bb/7034fc5327b450373c9f48b2a51377b39aac72b0b45c97e5a74b1129a4/Бухта Халонг — объект всемирного наследия ЮНЕСКО во Вьетнаме в провинции Куангнинь.jpg'
13
+ ]
14
+ end
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ require File.expand_path(File.dirname(__FILE__)) + '/../support/test_sites'
4
+
5
+ describe 'wbench' do
6
+ sites.each do |site|
7
+ it "should return information from #{site} in chrome" do
8
+ expect { WBench::Benchmark.run(site, :loops => 1) }.to_not raise_exception
9
+ end
10
+
11
+ it "should return information from #{site} in firefox" do
12
+ expect { WBench::Benchmark.run(site, :browser => :firefox, :loops => 1) }.to_not raise_exception
13
+ end
14
+ end
15
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wbench
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mario Visic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-02 00:00:00.000000000 Z
11
+ date: 2013-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -89,6 +89,8 @@ files:
89
89
  - lib/wbench/titleizer.rb
90
90
  - lib/wbench/version.rb
91
91
  - spec/spec_helper.rb
92
+ - spec/support/test_sites.rb
93
+ - spec/wbench/integration_spec.rb
92
94
  - spec/wbench/stats_spec.rb
93
95
  - spec/wbench/timing_hash_spec.rb
94
96
  - spec/wbench/titleizer_spec.rb
@@ -119,6 +121,8 @@ specification_version: 4
119
121
  summary: Benchmark website loading times
120
122
  test_files:
121
123
  - spec/spec_helper.rb
124
+ - spec/support/test_sites.rb
125
+ - spec/wbench/integration_spec.rb
122
126
  - spec/wbench/stats_spec.rb
123
127
  - spec/wbench/timing_hash_spec.rb
124
128
  - spec/wbench/titleizer_spec.rb