coelacanth 0.7.0 → 0.7.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 +4 -4
- data/CHANGELOG.md +17 -3
- data/README.md +4 -1
- data/lib/coelacanth/client/ferrum.rb +15 -5
- data/lib/coelacanth/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 722f2b0311a9e2c1e97f18d284c457a2fc3ad73d405bf8c74d01ef451e2cc41f
|
|
4
|
+
data.tar.gz: ed797d95ce3002f7b89584e1a3544f79391d6d9c44bff0dfe1a72acc2a2c0a4e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 493f2a6e8b71002eaad561468084dc152ac926de8a16499fdcf47b476bfe797eb09020129c5cf21802cf19e47a6c52505207f3ce5a7387361dad9fb4ffa74895
|
|
7
|
+
data.tar.gz: a23fe6b419fd1f5b5b0c794cefd03f82ca27e7331de391ca65ad8b0ee93b7d15088cc2dcff904a808218fa2d7523517c10121f160d0c0cf90ae222538eaa3f4c
|
data/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,22 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
-
## [v0.7.
|
|
7
|
+
## [v0.7.2] - 2026-10-15
|
|
8
|
+
### :sparkles: New Features
|
|
9
|
+
- [`35dca30`](https://github.com/slidict/coelacanth/commit/35dca3075c7f563b601c51a3cee4502707015d60) - **ci**: タグ名とVERSIONを照合し、v* タグを自動で打つ *(commit by [@abechan1](https://github.com/abechan1))*
|
|
10
|
+
|
|
11
|
+
### :bug: Bug Fixes
|
|
12
|
+
- [`1fc897b`](https://github.com/slidict/coelacanth/commit/1fc897b1014b2f5704c7b284306d8fbbf1126135) - pass protocol_timeout to Ferrum, falling back to timeout
|
|
13
|
+
- [`18b2b4c`](https://github.com/slidict/coelacanth/commit/18b2b4c7d2d40cb71f2d3cf1f2722478c52b7b0b) - **ci**: bump-version を再実行できるようにする *(commit by [@abechan1](https://github.com/abechan1))*
|
|
14
|
+
- [`038bd63`](https://github.com/slidict/coelacanth/commit/038bd639794153d39121cabe910aba62e5b75b7d) - **ci**: main.yml の push トリガーを main にする *(commit by [@abechan1](https://github.com/abechan1))*
|
|
15
|
+
- [`06171f5`](https://github.com/slidict/coelacanth/commit/06171f5719c925f35af7ecde8c19f21315f1a627) - **ci**: bump-version を GitHub App トークンで動かす *(commit by [@abechan1](https://github.com/abechan1))*
|
|
16
|
+
- [`c04a54f`](https://github.com/slidict/coelacanth/commit/c04a54f059e9d7acb0a2424531dedfeac5902925) - **ci**: GITHUB_TOKEN の既定権限を contents: read へ下げる *(commit by [@abechan1](https://github.com/abechan1))*
|
|
17
|
+
|
|
18
|
+
### :recycle: Refactors
|
|
19
|
+
- [`5cd1451`](https://github.com/slidict/coelacanth/commit/5cd14510ffc01e9ce5c4050ef263611eaa1b5267) - **ci**: App トークンをやめ、wip と同じ構造でタグを打つ *(commit by [@abechan1](https://github.com/abechan1))*
|
|
20
|
+
|
|
8
21
|
### :wrench: Chores
|
|
9
|
-
- [`
|
|
22
|
+
- [`fb91c58`](https://github.com/slidict/coelacanth/commit/fb91c58734dff9cfc85e2230c44f2001915f4632) - **ci**: workflow_dispatch でバージョンを上げられるようにする *(commit by [@abechan1](https://github.com/abechan1))*
|
|
23
|
+
- [`ca6472b`](https://github.com/slidict/coelacanth/commit/ca6472b56c6a9026bfca7dd14cab5e1239c4d669) - bump version to v0.7.2 *(commit by [@github-actions[bot]](https://github.com/apps/github-actions))*
|
|
10
24
|
|
|
11
|
-
[v0.7.
|
|
25
|
+
[v0.7.2]: https://github.com/slidict/coelacanth/compare/v0.7.1...v0.7.2
|
data/README.md
CHANGED
|
@@ -151,6 +151,7 @@ development:
|
|
|
151
151
|
remote_client:
|
|
152
152
|
ws_url: "ws://chrome:3000/chrome"
|
|
153
153
|
timeout: 10
|
|
154
|
+
# protocol_timeout: 10
|
|
154
155
|
wait_for_idle_timeout: 5
|
|
155
156
|
headers:
|
|
156
157
|
<% if (auth = ENV["COELACANTH_REMOTE_CLIENT_AUTHORIZATION"]).to_s.strip != "" %>
|
|
@@ -180,7 +181,9 @@ development:
|
|
|
180
181
|
```
|
|
181
182
|
|
|
182
183
|
- **Ferrum client** – Requires a running Chrome instance that exposes the DevTools protocol via WebSocket. Configure the URL,
|
|
183
|
-
timeout, the network idle timeout, and any headers to inject.
|
|
184
|
+
timeout, the network idle timeout, and any headers to inject. `remote_client.timeout` is the overall command timeout;
|
|
185
|
+
`remote_client.protocol_timeout` bounds CDP responses and the target attach wait (ferrum >= 0.18) and defaults to
|
|
186
|
+
`remote_client.timeout` when omitted.
|
|
184
187
|
- **ScreenshotOne client** – Supply an API key to offload screenshot capture to [ScreenshotOne](https://screenshotone.com/).
|
|
185
188
|
- **Gotenberg client** – Set `client: "gotenberg"` to capture screenshots through Gotenberg's Chromium URL screenshot
|
|
186
189
|
endpoint. Configure `gotenberg.url`, request timeouts, an optional `wait_delay`, an optional screenshot `user_agent`,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "ferrum"
|
|
4
|
+
require "tempfile"
|
|
4
5
|
|
|
5
6
|
module Coelacanth::Client
|
|
6
7
|
# Coelacanth::Client
|
|
@@ -31,7 +32,7 @@ module Coelacanth::Client
|
|
|
31
32
|
|
|
32
33
|
def get_pdf
|
|
33
34
|
wait_for_network_idle
|
|
34
|
-
remote_client.pdf
|
|
35
|
+
remote_client.pdf(encoding: :binary)
|
|
35
36
|
rescue => e
|
|
36
37
|
raise sanitized_remote_client_error(e)
|
|
37
38
|
end
|
|
@@ -74,14 +75,23 @@ module Coelacanth::Client
|
|
|
74
75
|
|
|
75
76
|
headers = @config.read("remote_client.headers")
|
|
76
77
|
|
|
77
|
-
@remote_client = ::Ferrum::Browser.new(
|
|
78
|
-
ws_url: @config.read("remote_client.ws_url"),
|
|
79
|
-
timeout: @config.read("remote_client.timeout")
|
|
80
|
-
)
|
|
78
|
+
@remote_client = ::Ferrum::Browser.new(**remote_client_options)
|
|
81
79
|
|
|
82
80
|
@remote_client.page.headers.set(headers) if headers && headers.any?
|
|
83
81
|
|
|
84
82
|
@remote_client
|
|
85
83
|
end
|
|
84
|
+
|
|
85
|
+
# timeout: overall command timeout (page load, navigation).
|
|
86
|
+
# protocol_timeout: CDP response / target attach wait (ferrum >= 0.18, default 5s); falls back to timeout.
|
|
87
|
+
def remote_client_options
|
|
88
|
+
options = { ws_url: @config.read("remote_client.ws_url") }
|
|
89
|
+
timeout = @config.read("remote_client.timeout")
|
|
90
|
+
protocol_timeout = @config.read("remote_client.protocol_timeout") || timeout
|
|
91
|
+
|
|
92
|
+
options[:timeout] = timeout if timeout
|
|
93
|
+
options[:protocol_timeout] = protocol_timeout if protocol_timeout
|
|
94
|
+
options
|
|
95
|
+
end
|
|
86
96
|
end
|
|
87
97
|
end
|
data/lib/coelacanth/version.rb
CHANGED