bidi2pdf 0.1.10 → 0.1.11
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 +19 -3
- data/lib/bidi2pdf/chromedriver_manager.rb +20 -3
- data/lib/bidi2pdf/dsl.rb +1 -1
- data/lib/bidi2pdf/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: f566dbc37d780cfb8596d673639ab1ed944cf9306107a7ff65d0712d74fd9276
|
4
|
+
data.tar.gz: 58273f6e806ea14372ae37f942c05582b80effe6a16cf172b965ea4f45e18108
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ec28d088c92fb1d48b42a68f51613045c13ad3d115c8fcd208ea37268ccc1520bf33af1070df513eaa50001259438222af0413f378195539b3eb3e2c95ef292
|
7
|
+
data.tar.gz: e52a3b58e025f726d46c1a512a54e932e744181a021e3e2b3c02b6f12f5d13b8a3d3d285568ce09e98f61476c37eb2ba13cb2b1920f75f443a076931f6dd067c
|
data/CHANGELOG.md
CHANGED
@@ -6,10 +6,25 @@ All notable changes to this project will be documented in this file.
|
|
6
6
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
7
7
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
8
8
|
|
9
|
-
[unreleased]: https://github.com///compare/v0.1.
|
9
|
+
[unreleased]: https://github.com///compare/v0.1.11..HEAD
|
10
10
|
|
11
11
|
<!-- generated by git-cliff end -->
|
12
12
|
|
13
|
+
## [0.1.11] - 2025-07-09
|
14
|
+
|
15
|
+
### 🐛 Fixed
|
16
|
+
|
17
|
+
- Add chrome_args to ChromedriverManager initialization
|
18
|
+
|
19
|
+
### 🔧 Build
|
20
|
+
|
21
|
+
- Bump rubocop from 1.76.2 to 1.77.0
|
22
|
+
- Bump ruby-vips from 2.2.3 to 2.2.4
|
23
|
+
|
24
|
+
### 🚀 Added
|
25
|
+
|
26
|
+
- Enhance ChromeDriver command arguments
|
27
|
+
|
13
28
|
## [0.1.10] - 2025-06-18
|
14
29
|
|
15
30
|
### 💄 Style
|
@@ -254,9 +269,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
254
269
|
|
255
270
|
- Initial release
|
256
271
|
|
257
|
-
|
272
|
+
### 🔄 Released
|
258
273
|
|
259
|
-
- [unreleased](https://github.com/dieter-medium/bidi2pdf/compare/v0.1.
|
274
|
+
- [unreleased](https://github.com/dieter-medium/bidi2pdf/compare/v0.1.11..HEAD)
|
275
|
+
- [0.1.11](https://github.com/dieter-medium/bidi2pdf/compare/v0.1.10..V0.1.11)
|
260
276
|
- [0.1.10](https://github.com/dieter-medium/bidi2pdf/compare/v0.1.9..V0.1.10)
|
261
277
|
- [0.1.9](https://github.com/dieter-medium/bidi2pdf/compare/v0.1.8..v0.1.9)
|
262
278
|
- [0.1.8](https://github.com/dieter-medium/bidi2pdf/compare/v0.1.7..v0.1.8)
|
@@ -181,16 +181,33 @@ module Bidi2pdf
|
|
181
181
|
|
182
182
|
def build_cmd
|
183
183
|
bin = Chromedriver::Binary::ChromedriverDownloader.driver_path
|
184
|
-
user_data_dir = File.join(Dir.tmpdir, "bidi2pdf", "user_data", SecureRandom.hex(8))
|
185
184
|
|
186
185
|
cmd = [bin]
|
187
186
|
cmd << "--port=#{@port}" unless @port.zero?
|
188
187
|
cmd << "--headless" if @headless
|
189
|
-
|
190
|
-
cmd <<
|
188
|
+
|
189
|
+
cmd << user_data_dir_arg
|
190
|
+
cmd.concat(process_chrome_args)
|
191
|
+
|
191
192
|
cmd.join(" ")
|
192
193
|
end
|
193
194
|
|
195
|
+
def user_data_dir_arg
|
196
|
+
provided = @chrome_args&.find { |arg| arg.include?("--user-data-dir") }
|
197
|
+
return provided if provided
|
198
|
+
|
199
|
+
user_data_dir = File.join(Dir.tmpdir, "bidi2pdf", "user_data", SecureRandom.hex(8))
|
200
|
+
"--user-data-dir #{user_data_dir}"
|
201
|
+
end
|
202
|
+
|
203
|
+
def process_chrome_args
|
204
|
+
return [] unless @chrome_args
|
205
|
+
|
206
|
+
%w[--lang --accept-lang].map do |arg_name|
|
207
|
+
@chrome_args.find { |chrome_arg| chrome_arg.include?(arg_name) }
|
208
|
+
end.compact
|
209
|
+
end
|
210
|
+
|
194
211
|
def update_chromedriver
|
195
212
|
Chromedriver::Binary::ChromedriverDownloader.update
|
196
213
|
end
|
data/lib/bidi2pdf/dsl.rb
CHANGED
@@ -50,7 +50,7 @@ module Bidi2pdf
|
|
50
50
|
chrome_args: chrome_args
|
51
51
|
)
|
52
52
|
else
|
53
|
-
manager = Bidi2pdf::ChromedriverManager.new(port: port, headless: headless)
|
53
|
+
manager = Bidi2pdf::ChromedriverManager.new(port: port, headless: headless, chrome_args: chrome_args)
|
54
54
|
manager.start
|
55
55
|
manager.session
|
56
56
|
end
|
data/lib/bidi2pdf/version.rb
CHANGED