speedos 0.0.3 → 0.0.4

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: fa410e7f5168f5adda6cadef06e88757986d76f9
4
- data.tar.gz: c3c1200adf04cf725b04831d48042e3950dfb423
3
+ metadata.gz: ca798eaeaee4af7b8f82b879b3d3530a7fb0dc33
4
+ data.tar.gz: 91e5a0bcd43e114eb3cb096e72e2cf80c052e64e
5
5
  SHA512:
6
- metadata.gz: c9e3d030f2427bf73821527616ddf38271481d25eab91304c47c0dd53d7cf52c685aec134fa5338b7d90b91ee015d4ba158c76b8e2796f9c99c9dc1fcf2f971d
7
- data.tar.gz: adbeb20fca82ea54b0ea835c9bbb1e2d07a7de76f58e73666040253231cdfa9ba4a369eace46eda48d7a5d1b4d2bd2fc5db00efdeb53f4d4da4ca73436d82059
6
+ metadata.gz: 929a13b32a3372683d36c099551b80dc11fc938e229ba783694e04aacece9feb02a1e498c8afc0cb8115b6ba3ede7afa199de14e785699f4a757a58dfdb7e95f
7
+ data.tar.gz: 0204d4c94e3e87e6b6e560b011866ee2177a78673fd4a8398632e1da6c3004d4d09355b2282f776d266f38c1a4c4e8f141ea414ba9fa60e12062df827e5bef90
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- speedos (0.0.2)
4
+ speedos (0.0.4)
5
5
  browsermob-proxy (= 0.1.1)
6
6
  capybara (= 2.1.0)
7
7
  faker (= 1.1.2)
@@ -20,6 +20,10 @@ module Speedos
20
20
  Entries.new(entries.select{ |p| p["pageref"] == name })
21
21
  end
22
22
 
23
+ def export_har filename
24
+ File.open(filename, 'w') { |f| f.write({log: self.log}.to_json)}
25
+ end
26
+
23
27
  def self.report
24
28
  Record.successful.all.each do |record|
25
29
  puts record.id
@@ -12,7 +12,7 @@ describe Speedos::Record do
12
12
  its(:successful) { should_not include @not_success }
13
13
  end
14
14
 
15
- context '#page' do
15
+ describe '#page' do
16
16
  subject { Speedos::Record.create() }
17
17
  before do
18
18
  subject.log = {'entries' => []}
@@ -21,4 +21,27 @@ describe Speedos::Record do
21
21
  it { subject.page('').should be_instance_of Speedos::Entries }
22
22
  end
23
23
 
24
+ describe '#pages' do
25
+ subject { Speedos::Record.create() }
26
+ let(:page) { {'id' => 'page 1'} }
27
+ before { subject.stub(:log).and_return({'pages' => [page]}) }
28
+
29
+ context 'when there isn\'t any page with empty id' do
30
+ it 'returns page 1' do
31
+ subject.should_receive(:page).with('page 1')
32
+ subject.pages
33
+ end
34
+ end
35
+
36
+ context 'when the page with empty id' do
37
+ let(:page) { {'id' => ''} }
38
+
39
+ it 'returns nothing' do
40
+ subject.should_not_receive(:page).with('page 1')
41
+ subject.pages
42
+ end
43
+ end
44
+
45
+ end
46
+
24
47
  end
data/speedos.gemspec CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |gem|
8
8
  gem.files = `git ls-files`.split($\)
9
9
  gem.name = 'speedos'
10
10
  gem.require_paths = ['lib']
11
- gem.version = "0.0.3"
11
+ gem.version = "0.0.4"
12
12
  gem.executables = 'speedos'
13
13
  gem.license = 'MIT'
14
14
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: speedos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - SimplyBusiness
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-08 00:00:00.000000000 Z
11
+ date: 2013-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid