coelacanth 0.7.1 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b2161790601ddc346f2fff20d4d754531d8378dd508b2907a251cf763446c59
4
- data.tar.gz: eef73f21f61ee02dd71e390a3e2759f5f43a11bca13e5d4ea3464065fe28be76
3
+ metadata.gz: 722f2b0311a9e2c1e97f18d284c457a2fc3ad73d405bf8c74d01ef451e2cc41f
4
+ data.tar.gz: ed797d95ce3002f7b89584e1a3544f79391d6d9c44bff0dfe1a72acc2a2c0a4e
5
5
  SHA512:
6
- metadata.gz: 53d51ae5f4e8249df309d30ac23c8f02c81687bab882b73e34ecdf817d2a71a1fb7cdbcedef61c5768a6109b9f7d295a42aaabcb1eeed686900c3147a4588214
7
- data.tar.gz: 691ad1d80a6f2f72837098ee632522dd346680b759f5b4c5aabe09e91eb9f1822ef4f94c8b491c46fb8bdd39785cef96d9a243845ac1d88b696eeee6e6ff9934
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.1] - 2026-07-17
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
+
8
11
  ### :bug: Bug Fixes
9
- - [`9e17021`](https://github.com/slidict/coelacanth/commit/9e17021df0614269a3209daca7795d1bcd919838) - return raw PDF bytes instead of base64 text in Ferrum client *(commit by [@abechan1](https://github.com/abechan1))*
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
+
21
+ ### :wrench: Chores
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.1]: https://github.com/slidict/coelacanth/compare/v0.7.0...v0.7.1
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
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Coelacanth
4
- VERSION = "0.7.1"
4
+ VERSION = "0.7.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coelacanth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yusuke