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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 134f35256652da3e5e6c8e383e97c98779a1e2665798dbfa5d133bc85130b8cc
4
- data.tar.gz: dd106af3e757d26ba3d935bbe54d0249402280a84f1b1a8e27855d19b4cd155c
3
+ metadata.gz: f566dbc37d780cfb8596d673639ab1ed944cf9306107a7ff65d0712d74fd9276
4
+ data.tar.gz: 58273f6e806ea14372ae37f942c05582b80effe6a16cf172b965ea4f45e18108
5
5
  SHA512:
6
- metadata.gz: 15d9df827cefb697a44f78945f5fc20866319c7fc6a403f5ad58817f239deca9857fc0923e0a7faf582dac6d7f0770236310cca8bd58aab138ab6499749c6d37
7
- data.tar.gz: '09b043e8da1b79a4cc95c708c32afa78b00fa3f6edbedd2e0dacfdd562aff1a385be50f36cc78951a771b1b63c775eac11980dec07d1998476b9b247d6114377'
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.10..HEAD
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
- ## Changelog
272
+ ### 🔄 Released
258
273
 
259
- - [unreleased](https://github.com/dieter-medium/bidi2pdf/compare/v0.1.10..HEAD)
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
- cmd << "--user-data-dir "
190
- cmd << user_data_dir
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bidi2pdf
4
- VERSION = "0.1.10"
4
+ VERSION = "0.1.11"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bidi2pdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dieter S.