aw_wkhtmltopdf 0.12.3.0.0
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 +7 -0
- data/LICENSE.txt +8 -0
- data/README.md +47 -0
- data/Rakefile +4 -0
- data/exe/aw_wkhtmltopdf +5 -0
- data/lib/aw_wkhtmltopdf/version.rb +6 -0
- data/lib/aw_wkhtmltopdf.rb +46 -0
- data/libexec/wkhtmltopdf-x64_mingw32.exe +0 -0
- data/libexec/wkhtmltopdf-x86_64_darwin +0 -0
- data/libexec/wkhtmltopdf-x86_64_linux +0 -0
- data/sig/aw_wkhtmltopdf.rbs +4 -0
- metadata +53 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b25e3bb39f8f0d247c08667042c7d0e35040ebb6e11e5de891cb925512ba7b1c
|
4
|
+
data.tar.gz: 3e419db6f7e1c781dcfdcb1e3fb385fcd971e41308fc8f44669134e9b0d56de6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1847bd586c68b9ec7b9b1d1e707030feb9e5127ed5668197caa7ff66d014a02d68ce6f5645cb46243b89675fc12b9fc9e4cf7b3fc5c89d14d9ea93cfc17715ad
|
7
|
+
data.tar.gz: 00715ee670537da1b5a52f02ce5a315f4a7860bf43eb9df9fc8be6627a2d60179dd67eef7eb2860a3edb3fea88a062f04f3984ebf3eb4d5887d2e59b0a611ccb
|
data/LICENSE.txt
ADDED
data/README.md
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
# AwWkhtmltopdf
|
2
|
+
|
3
|
+
## Installation
|
4
|
+
|
5
|
+
```console
|
6
|
+
$ gem install aw_wkhtmltopdf
|
7
|
+
```
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
|
11
|
+
### command
|
12
|
+
|
13
|
+
We can use `aw_wkhtmltopdf` instead of `wkhtmltopdf` .
|
14
|
+
|
15
|
+
```console
|
16
|
+
$ aw_wkhtmltopdf --version
|
17
|
+
wkhtmltopdf 0.12.3 (with patched qt)
|
18
|
+
```
|
19
|
+
|
20
|
+
### binary path
|
21
|
+
|
22
|
+
We can get raw binary path from `AwWkhtmltopdf.path` .
|
23
|
+
|
24
|
+
```console
|
25
|
+
$ ruby -raw_wkhtmltopdf -e 'puts(AwWkhtmltopdf.path)'
|
26
|
+
/home/yuya/.anyenv/envs/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/aw_wkhtmltopdf-0.12.3.0.0/libexec/wkhtmltopdf-x86_64_linux
|
27
|
+
```
|
28
|
+
|
29
|
+
### for PDFKit
|
30
|
+
|
31
|
+
PDFKit configuration sample is here:
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
PDFKit.configure do |config|
|
35
|
+
config.wkhtmltopdf = AwWkhtmltopdf.path.to_s
|
36
|
+
end
|
37
|
+
```
|
38
|
+
|
39
|
+
## Development
|
40
|
+
|
41
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
42
|
+
|
43
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
44
|
+
|
45
|
+
## Contributing
|
46
|
+
|
47
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/agileware-jp/aw_wkhtmltopdf .
|
data/Rakefile
ADDED
data/exe/aw_wkhtmltopdf
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'pathname'
|
4
|
+
require 'rbconfig'
|
5
|
+
|
6
|
+
require_relative 'aw_wkhtmltopdf/version'
|
7
|
+
|
8
|
+
module AwWkhtmltopdf
|
9
|
+
LIBEXEC_PATH = Pathname(__dir__).parent.join('libexec').expand_path
|
10
|
+
|
11
|
+
class << self
|
12
|
+
def path
|
13
|
+
cpu, os, suffix = determine_cpu_os_suffix
|
14
|
+
exe_path = LIBEXEC_PATH.join("wkhtmltopdf-#{cpu}_#{os}#{suffix}")
|
15
|
+
exe_path
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
# returns similar to [host_cpu, host_os, executable suffix]
|
21
|
+
def determine_cpu_os_suffix
|
22
|
+
host_os = RbConfig::CONFIG['host_os']
|
23
|
+
case host_os
|
24
|
+
# ruby-2.6.10: "linux-gnu"
|
25
|
+
# later: "linux"
|
26
|
+
when /linux/
|
27
|
+
return ['x86_64', 'linux', nil]
|
28
|
+
# "darwin22", "darwin20", ...
|
29
|
+
when /darwin/
|
30
|
+
# If "host_cpu" is "arm64", it probably uses Rosetta.
|
31
|
+
return ['x86_64', 'darwin', nil]
|
32
|
+
# https://magazine.rubyist.net/articles/0017/0017-CodeReview.html#%E3%83%97%E3%83%A9%E3%83%83%E3%83%88%E3%83%95%E3%82%A9%E3%83%BC%E3%83%A0%E3%81%AE%E5%88%A4%E5%88%A5
|
33
|
+
when /mswin(?!ce)|mingw|cygwin|bccwin/
|
34
|
+
return ['x64', 'mingw32', '.exe']
|
35
|
+
end
|
36
|
+
|
37
|
+
raise NotSupportedPlatformError, "not supported platform: host_os=#{host_os.inspect}"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
class Error < StandardError
|
42
|
+
end
|
43
|
+
|
44
|
+
class NotSupportedPlatformError < Error
|
45
|
+
end
|
46
|
+
end
|
Binary file
|
Binary file
|
Binary file
|
metadata
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: aw_wkhtmltopdf
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.12.3.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Agileware Inc.
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-11-29 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description:
|
14
|
+
email:
|
15
|
+
executables:
|
16
|
+
- aw_wkhtmltopdf
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- LICENSE.txt
|
21
|
+
- README.md
|
22
|
+
- Rakefile
|
23
|
+
- exe/aw_wkhtmltopdf
|
24
|
+
- lib/aw_wkhtmltopdf.rb
|
25
|
+
- lib/aw_wkhtmltopdf/version.rb
|
26
|
+
- libexec/wkhtmltopdf-x64_mingw32.exe
|
27
|
+
- libexec/wkhtmltopdf-x86_64_darwin
|
28
|
+
- libexec/wkhtmltopdf-x86_64_linux
|
29
|
+
- sig/aw_wkhtmltopdf.rbs
|
30
|
+
homepage: https://github.com/agileware-jp/aw_wkhtmltopdf
|
31
|
+
licenses: []
|
32
|
+
metadata:
|
33
|
+
homepage_uri: https://github.com/agileware-jp/aw_wkhtmltopdf
|
34
|
+
post_install_message:
|
35
|
+
rdoc_options: []
|
36
|
+
require_paths:
|
37
|
+
- lib
|
38
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 2.6.0
|
43
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
requirements: []
|
49
|
+
rubygems_version: 3.4.10
|
50
|
+
signing_key:
|
51
|
+
specification_version: 4
|
52
|
+
summary: WKHTMLTOPDF binaries for GNU/Linux, Windows and macOS
|
53
|
+
test_files: []
|