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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/speedos/models/record.rb +4 -0
- data/spec/models/record_spec.rb +24 -1
- data/speedos.gemspec +1 -1
- 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: ca798eaeaee4af7b8f82b879b3d3530a7fb0dc33
|
4
|
+
data.tar.gz: 91e5a0bcd43e114eb3cb096e72e2cf80c052e64e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 929a13b32a3372683d36c099551b80dc11fc938e229ba783694e04aacece9feb02a1e498c8afc0cb8115b6ba3ede7afa199de14e785699f4a757a58dfdb7e95f
|
7
|
+
data.tar.gz: 0204d4c94e3e87e6b6e560b011866ee2177a78673fd4a8398632e1da6c3004d4d09355b2282f776d266f38c1a4c4e8f141ea414ba9fa60e12062df827e5bef90
|
data/Gemfile.lock
CHANGED
@@ -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
|
data/spec/models/record_spec.rb
CHANGED
@@ -12,7 +12,7 @@ describe Speedos::Record do
|
|
12
12
|
its(:successful) { should_not include @not_success }
|
13
13
|
end
|
14
14
|
|
15
|
-
|
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
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.
|
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-
|
11
|
+
date: 2013-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongoid
|