my-wkhtmltopdf-binary 0.12.6.8

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0fc8b9a2e11e5ee38c0e7d9e7dc8d159f207d9b9
4
+ data.tar.gz: 61747941b829c73b49c3f7325d1bdf7b2f338d18
5
+ SHA512:
6
+ metadata.gz: 1aae1dc9d7fd24770d35442edadd295a3223d8f01b90f2cfbbb956fe81811b5089aec92f28ac0ccdd9201a8ede3197e9b3e64decc725e8a02c2d3a4cdf4ec858
7
+ data.tar.gz: c374452f716cc02b71999d7e04528da31eeb4561dc0e4c9e4e259c4c781069bff809fe025368c2043e49129d79d155f2b3762b46c54a7bf3fea29c5c3d15236e
data/bin/wkhtmltopdf ADDED
@@ -0,0 +1,100 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ ###
4
+ # wkhtmltopdf_binary_gem Copyright 2013 The University of Iowa
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License"); you may not
7
+ # use this file except in compliance with the License. You may obtain a copy
8
+ # of the License at http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ require 'rbconfig'
11
+ require 'zlib'
12
+
13
+ def architecture
14
+ case RbConfig::CONFIG['host_cpu']
15
+ when *%w[arm64 aarch64 arch64]
16
+ 'arm64'
17
+ when 'x86_64'
18
+ 'amd64'
19
+ else
20
+ 'i386'
21
+ end
22
+ end
23
+
24
+ suffix = case RbConfig::CONFIG['host_os']
25
+ when /linux/
26
+ os = `. /etc/os-release 2> /dev/null && echo ${ID}_${VERSION_ID}`.strip
27
+
28
+ os = 'ubuntu_16.04' if os.start_with?('ubuntu_16.') ||
29
+ os.start_with?('ubuntu_17.') ||
30
+ os.start_with?('linuxmint_18.')
31
+
32
+ os = 'ubuntu_18.04' if os.start_with?('ubuntu_18.') ||
33
+ os.start_with?('ubuntu_19.') ||
34
+ os.start_with?('elementary') ||
35
+ os.start_with?('linuxmint_19.') ||
36
+ os.start_with?('pop') ||
37
+ os.start_with?('zorin')
38
+
39
+ os = 'ubuntu_20.04' if os.start_with?('ubuntu_20.') ||
40
+ os.start_with?('linuxmint_20.')
41
+
42
+ os = 'ubuntu_21.10' if os.start_with?('ubuntu_21.') ||
43
+ os.start_with?('linuxmint_21.')
44
+
45
+ os = 'ubuntu_22.04' if os.start_with?('ubuntu_22.') ||
46
+ os.start_with?('ubuntu_24.') ||
47
+ os.start_with?('tuxedo_22.') ||
48
+ os.start_with?('linuxmint_22')
49
+
50
+ os = 'centos_6' if (os.start_with?('amzn_') && os != 'amzn_2' && os != 'amzn_2023') ||
51
+ (os.empty? && File.read('/etc/centos-release').start_with?('CentOS release 6'))
52
+
53
+ os = 'centos_7' if (os.start_with?('amzn_2') && !os.start_with?('amzn_20')) ||
54
+ os.start_with?('rhel_7.')
55
+
56
+ os = 'centos_8' if os.start_with?('rocky_8') ||
57
+ os.start_with?('rhel_8.') ||
58
+ os.start_with?('ol_8.') ||
59
+ os.start_with?('almalinux_8') ||
60
+ os.start_with?('almalinux_9') ||
61
+ os.start_with?('alinux_') ||
62
+ os == 'amzn_2023'
63
+
64
+ os_based_on_debian_9 = os.start_with?('debian_9') ||
65
+ os.start_with?('deepin')
66
+ os = 'debian_9' if os_based_on_debian_9
67
+
68
+ os = 'debian_10' if !os_based_on_debian_9 && os.start_with?('debian_10')
69
+
70
+ os = 'debian_11' if !os_based_on_debian_9 && os.start_with?('debian_11')
71
+
72
+ os = 'debian_12' if !os_based_on_debian_9 && os.start_with?('debian_12')
73
+
74
+ os = 'archlinux' if os.start_with?('arch_') ||
75
+ os.start_with?('manjaro_')
76
+
77
+ "#{os}_#{architecture}"
78
+ when /darwin/
79
+ 'macos_cocoa'
80
+ else
81
+ 'unknown'
82
+ end
83
+
84
+ suffix = ENV['WKHTMLTOPDF_HOST_SUFFIX'] unless ENV['WKHTMLTOPDF_HOST_SUFFIX'].to_s.empty?
85
+
86
+ binary = "#{__FILE__}_#{suffix}"
87
+
88
+ if File.exist?("#{binary}.gz") && !File.exist?(binary)
89
+ File.open binary, 'wb', 0o755 do |file|
90
+ Zlib::GzipReader.open("#{binary}.gz") { |gzip| file << gzip.read }
91
+ end
92
+ end
93
+
94
+ unless File.exist? binary
95
+ raise 'Invalid platform, must be running on Ubuntu 16.04/18.04/20.04/22.04, ' \
96
+ 'CentOS 6/7/8, Debian 9/10/11/12, Archlinux amd64, Debian 9/10/11/12 arm64, or Intel-based Cocoa macOS ' \
97
+ "(missing binary: #{binary})."
98
+ end
99
+
100
+ exec *$*.unshift(binary)
File without changes
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
metadata ADDED
@@ -0,0 +1,103 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: my-wkhtmltopdf-binary
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.12.6.8
5
+ platform: ruby
6
+ authors:
7
+ - xuzh
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-09-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: minitest
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description:
42
+ email: xuzh_work@outlook.com
43
+ executables:
44
+ - wkhtmltopdf
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - bin/wkhtmltopdf
49
+ - bin/wkhtmltopdf-binary.rb
50
+ - bin/wkhtmltopdf_archlinux_amd64.gz
51
+ - bin/wkhtmltopdf_centos_6_amd64.gz
52
+ - bin/wkhtmltopdf_centos_6_i386.gz
53
+ - bin/wkhtmltopdf_centos_7_amd64.gz
54
+ - bin/wkhtmltopdf_centos_7_i386.gz
55
+ - bin/wkhtmltopdf_centos_8_amd64.gz
56
+ - bin/wkhtmltopdf_debian_10_amd64.gz
57
+ - bin/wkhtmltopdf_debian_10_arm64.gz
58
+ - bin/wkhtmltopdf_debian_10_i386.gz
59
+ - bin/wkhtmltopdf_debian_11_amd64.gz
60
+ - bin/wkhtmltopdf_debian_11_arm64.gz
61
+ - bin/wkhtmltopdf_debian_11_i386.gz
62
+ - bin/wkhtmltopdf_debian_12_amd64.gz
63
+ - bin/wkhtmltopdf_debian_12_arm64.gz
64
+ - bin/wkhtmltopdf_debian_12_i386.gz
65
+ - bin/wkhtmltopdf_debian_9_amd64.gz
66
+ - bin/wkhtmltopdf_debian_9_arm64.gz
67
+ - bin/wkhtmltopdf_debian_9_i386.gz
68
+ - bin/wkhtmltopdf_macos_cocoa.gz
69
+ - bin/wkhtmltopdf_ubuntu_16.04_amd64.gz
70
+ - bin/wkhtmltopdf_ubuntu_16.04_i386.gz
71
+ - bin/wkhtmltopdf_ubuntu_18.04_amd64.gz
72
+ - bin/wkhtmltopdf_ubuntu_18.04_i386.gz
73
+ - bin/wkhtmltopdf_ubuntu_20.04_amd64.gz
74
+ - bin/wkhtmltopdf_ubuntu_20.04_arm64.gz
75
+ - bin/wkhtmltopdf_ubuntu_21.10_amd64.gz
76
+ - bin/wkhtmltopdf_ubuntu_22.04_amd64.gz
77
+ homepage: https://github.com/xuzhgo/my_wkhtmltopdf_binary_gem
78
+ licenses:
79
+ - Apache-2.0
80
+ metadata:
81
+ source_code_uri: https://github.com/xuzhgo/my_wkhtmltopdf_binary_gem
82
+ changelog_uri: https://github.com/xuzhgo/my_wkhtmltopdf_binary_gem/blob/master/CHANGELOG.md
83
+ post_install_message:
84
+ rdoc_options: []
85
+ require_paths:
86
+ - "."
87
+ required_ruby_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ requirements: []
98
+ rubyforge_project:
99
+ rubygems_version: 2.6.14
100
+ signing_key:
101
+ specification_version: 4
102
+ summary: Provides binaries for WKHTMLTOPDF project in an easily accessible package.
103
+ test_files: []