Skip to content

Commit 6cf6fab

Browse files
committed
Version bump
1 parent b7027d5 commit 6cf6fab

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
### Unreleased
22

3+
### 0.5.0
4+
5+
* Thread safe browser management #63
6+
* [Breaking] Remove `add_browser` feature to simplify the gem.
7+
8+
You can pass `browser` to render methods to use your own `Ferrum::Browser` instance
9+
10+
```ruby
11+
FerrumPdf.render_pdf(url: "https://example.org", browser: Ferrum::Browser.new)
12+
```
13+
314
### 0.4.2
415

516
* Quit browser if a new one is added with the same name

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
ferrum_pdf (0.4.2)
4+
ferrum_pdf (0.5.0)
55
ferrum (~> 0.15)
66
rails (>= 6.0.0)
77

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,15 @@ FerrumPdf.browser = nil
242242
FerrumPdf.render_pdf(url: "https://example.org")
243243
```
244244
245-
**Thread Safety**: FerrumPdf is thread-safe within a single Ruby process. Multiple threads can safely use FerrumPdf concurrently, and they will share the same Chrome browser instance. However, each Ruby worker process will have its own separate Chrome instance.
245+
> [!TIP]
246+
> **Thread Safety**: FerrumPdf is thread-safe within a single Ruby process. Multiple threads can safely use FerrumPdf concurrently, and they will share the same Chrome browser instance. However, each Ruby worker process will have its own separate Chrome instance.
247+
248+
If you need multiple browsers, you can pass the browser option when rendering:
249+
250+
```ruby
251+
other_browser = Ferrum::Browser.new
252+
FerrumPdf.render_pdf(url: "https://example.org", browser: other_browser)
253+
```
246254
247255
## Debugging
248256

lib/ferrum_pdf/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module FerrumPdf
2-
VERSION = "0.4.2"
2+
VERSION = "0.5.0"
33
end

0 commit comments

Comments
 (0)