ferrum-har 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: 414fff66d2b47e26b96047c18388bde8a698c01809454be9b01f213dcf33de82
4
- data.tar.gz: be6b275d34536d3220859ad031a8abf952140a8699211fc48124dbbbafe673f3
3
+ metadata.gz: 46ed855d025e19faa838772982f3b4e4bf6be389750445d91ff45a240e17da2b
4
+ data.tar.gz: 5604f75db7e5fe01ea8d406377c5325ddf59761eef503ebd8e72f581b6cd0017
5
5
  SHA512:
6
- metadata.gz: a617c9a354448656f0ca8fe3b5a8c58b889b009f3db3535eb0b0f19ac844806141cd3f9d19e3ea84e16fa2d4580abcd86dc851da20d41258606d252cf8055224
7
- data.tar.gz: f8e60c45799a5b0654994df861e7890d65ce20871cfccdc343d5449092e1d2d13b37fdb05e1e9c54add2904c53602e1b5bea1ee6c7c9e82252bc52d4145ff552
6
+ metadata.gz: d16fa7164a200c6eecfd06f51f751f335c38222c95077a3a89ca6923557decab9d4a174846c160b36539be22c42651c024194699a7f861816f13badaec3d37bb
7
+ data.tar.gz: 0522dec550b943209ea34edf0991915cd90f23f382e64a8a593eede11f2dfa0fc806534831224e7ca63911654ab95d29acf7751495b238f1f740b81673d2f1c6
data/README.md CHANGED
@@ -4,9 +4,10 @@ ferrum-har
4
4
  [![Gem Version](https://img.shields.io/gem/v/ferrum-har?color=green)](https://img.shields.io/gem/v/ferrum-har?color=green)
5
5
 
6
6
  [ferrum-har](https://github.com/hlascelles/ferrum-har) is a gem that adds the ability to capture
7
- HAR files while running tests using [ferrum](https://github.com/rubycdp/ferrum)
7
+ [HAR](https://en.wikipedia.org/wiki/HAR_(file_format)) files while running tests
8
+ using [ferrum](https://github.com/rubycdp/ferrum).
8
9
 
9
- ### Installation
10
+ ## Installation
10
11
 
11
12
  Add ferrum-har to your Gemfile and `bundle install`:
12
13
 
@@ -14,13 +15,14 @@ Add ferrum-har to your Gemfile and `bundle install`:
14
15
  gem "ferrum-har"
15
16
  ```
16
17
 
17
- ### Usage
18
+ ## Usage
18
19
 
19
20
  Use [ferrum](https://github.com/rubycdp/ferrum) as normal and call the `har` method on
20
- the `page` (or `browser`) object. Note, you will have to use some of the required browser options
21
+ the `page` (or `browser`) object. You will have to use some of the required browser options
21
22
  by using the `Ferrum::Har::REQUIRED_BROWSER_OPTIONS` constant.
22
23
 
23
- Note, the devtools window in Chrome will be opened. This is mandatory to obtain the HAR from Chrome.
24
+ Note, the devtools window in Chrome will be opened for the duration of the ferrum test run.
25
+ This is mandatory to obtain the HAR from Chrome.
24
26
 
25
27
  ```ruby
26
28
  browser = Ferrum::Browser.new(
@@ -33,7 +35,7 @@ page.go_to("https://www.bbc.co.uk")
33
35
  puts page.har
34
36
  ```
35
37
 
36
- ### How it works
38
+ ## How it works
37
39
 
38
40
  Creating a HAR file from [ferrum](https://github.com/rubycdp/ferrum) network objects is complex and
39
41
  potentially incompatible with the HAR generated
@@ -56,7 +58,16 @@ by the `Ferrum::Har::REQUIRED_BROWSER_OPTIONS` constant.
56
58
  For further reading, a full list of Chrome switches can be found
57
59
  [here](https://peter.sh/experiments/chromium-command-line-switches/).
58
60
 
59
- ### Further work
61
+ ## Upgrading
62
+
63
+ `ferrum-har` uses [semantic versioning](https://semver.org/), so major version changes will usually
64
+ require additional actions to be taken upgrading from one major version to another.
65
+
66
+ ## Changelog
67
+
68
+ A full changelog can be found here: [CHANGELOG.md](https://github.com/hlascelles/ferrum-har/blob/master/CHANGELOG.md)
69
+
70
+ ## Further work
60
71
 
61
72
  Some ideas for improvements.
62
73
 
@@ -14,7 +14,8 @@ module Ferrum
14
14
  execute("document.ferrumHarRequested = true;")
15
15
  base64_encoded_har = Ferrum::Utils::Attempt.with_retry(
16
16
  errors: [HarNotReadyError],
17
- max: 200,
17
+ # 10 seconds
18
+ max: 20,
18
19
  wait: 0.5
19
20
  ) do
20
21
  found = evaluate("document.ferrumHar;")
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ferrum
4
4
  module Har
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ferrum-har
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harry Lascelles