ferrum-har 0.1.4 → 1.0.0
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 +4 -4
- data/README.md +14 -1
- data/lib/ferrum/har/command_extension.rb +8 -0
- data/lib/ferrum/har/options_extension.rb +2 -0
- data/lib/ferrum/har/version.rb +1 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 652f3679a70306ac244d2a0627a3609da85ae96c8360365c3b21c1cb315b994c
|
4
|
+
data.tar.gz: 77443a4e93f2e05dfbc63b3370176778c2857a4bdf8663c4c953a88f6eca635d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0358163ac7ff98f450c9027f2909713d8d5fcfafb0e0668de62d3de288b62912b2109a091340236bb3719b12a92e159be0ab3f379fb3137120f4e900110ec536'
|
7
|
+
data.tar.gz: 6b5aab790b3d341338734b73527bdc3532613fc2248b3b291d1cf856b96b0444bb3073ca4f8fbe053ae5db806807a0f00834304ed22cb950602a15f324e0d32a
|
data/README.md
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
ferrum-har
|
2
2
|
================
|
3
3
|
|
4
|
-
[](https://
|
4
|
+
[](https://rubygems.org/gems/ferrum-har)
|
5
|
+
[](https://github.com/hlascelles/ferrum-har/actions)
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
5
7
|
|
6
8
|
[ferrum-har](https://github.com/hlascelles/ferrum-har) is a gem that adds the ability to capture
|
7
9
|
[HAR](https://en.wikipedia.org/wiki/HAR_(file_format)) files while running tests
|
@@ -15,6 +17,17 @@ Add ferrum-har to your Gemfile and `bundle install`:
|
|
15
17
|
gem "ferrum-har"
|
16
18
|
```
|
17
19
|
|
20
|
+
Since version 1.0, we have had to support [a change](https://developer.chrome.com/blog/extension-news-june-2025#deprecations)
|
21
|
+
to the way Chrome handles extensions. You must
|
22
|
+
use Chrome Testing to use ferrum-har. A rake task is provided to help you download a chrome binary.
|
23
|
+
It will put it in a folder called
|
24
|
+
|
25
|
+
```bash
|
26
|
+
bundle exec rake chrome:install
|
27
|
+
```
|
28
|
+
|
29
|
+
Alternatively you can use the ENV `BROWSER_PATH` to point to the binary location.
|
30
|
+
|
18
31
|
## Usage
|
19
32
|
|
20
33
|
Use [ferrum](https://github.com/rubycdp/ferrum) as normal and call the `har` method on
|
@@ -11,6 +11,14 @@ module Ferrum
|
|
11
11
|
super.tap do |options|
|
12
12
|
check_har_related_browser_options(options)
|
13
13
|
end
|
14
|
+
|
15
|
+
@path = ENV["BROWSER_PATH"] ||
|
16
|
+
begin
|
17
|
+
# Find the one in the temp download dir.
|
18
|
+
Dir.glob(".chrome-for-testing/*/chrome-linux64/chrome").max_by { |p|
|
19
|
+
Gem::Version.new(p.split("/")[1])
|
20
|
+
}
|
21
|
+
end
|
14
22
|
end
|
15
23
|
|
16
24
|
private def check_har_related_browser_options(options)
|
@@ -10,6 +10,8 @@ module Ferrum
|
|
10
10
|
# We have to remove the "disable-extensions" option from the default browser extension
|
11
11
|
# list because the ferrum-har gem requires an (internal) extension to work.
|
12
12
|
.except("disable-extensions")
|
13
|
+
# At some point past v134 this stopped extensions loading properly in the first tab.
|
14
|
+
.except("no-startup-window")
|
13
15
|
.merge(
|
14
16
|
"auto-open-devtools-for-tabs" => nil, # Chrome devtools must be open to invoke getHAR
|
15
17
|
"load-extension" => "#{Ferrum::Har::GEM_DIR}/extension", # Extension that gets the HAR
|
data/lib/ferrum/har/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ferrum-har
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Harry Lascelles
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: base64
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: selenium_chrome_helper
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
description: Rubygem to convert ferrum traffic to HAR files
|
42
56
|
email:
|
43
57
|
- harry@harrylascelles.com
|
@@ -74,14 +88,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
74
88
|
requirements:
|
75
89
|
- - ">="
|
76
90
|
- !ruby/object:Gem::Version
|
77
|
-
version: '
|
91
|
+
version: '0'
|
78
92
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
94
|
- - ">="
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '0'
|
83
97
|
requirements: []
|
84
|
-
rubygems_version: 3.5.
|
98
|
+
rubygems_version: 3.5.22
|
85
99
|
signing_key:
|
86
100
|
specification_version: 4
|
87
101
|
summary: Rubygem to convert ferrum traffic to HAR files
|