wkhtmltopdf-binary 0.9.9.3 → 0.12.6.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: fde3fe62f6abbc94b17ff197dc9be317c42bca83
4
- data.tar.gz: f894b9c92bc52833b6313ad0a1b3986a6d69c74d
2
+ SHA256:
3
+ metadata.gz: 7a2441a7b6acbf09751256dd420d54ab1e0c028d84e4bf0305cc15d353d1190a
4
+ data.tar.gz: d60450996f827521112c8845b98cbbb98deee424817395fd790e6ffd6ac8e40c
5
5
  SHA512:
6
- metadata.gz: 6334da8a847d1afbef6a0bd75b462ee4efaa4a9991dfd937f5c84076e65be6e8cb5629988417bf96f38dd6cfa1589ed54211756e63795ace78895fd98ec94bb2
7
- data.tar.gz: 24932dc63a47e77a40d95f4955254a9f7024821da6c734bd36183932d8c511224082487e6dc7b2ca80e2728d6a47f2398e6ee3716e09b528f6db39921c7c7861
6
+ metadata.gz: 67800dff22babd8b0056433b13967f01eefec6fa2839b55031d2e6acb1c20e2f7239c7b01e9c5d2a1493218b93258439d60130c53b3c69fc6f0871721803d747
7
+ data.tar.gz: 6951ea953619f63163cfa83df61f8dc0ef16eeb76789f4d288192294bf747f601b9d30c46d67a92948c5178367bd2ca02426a98f13f361c85e7f9aa157c50fba
data/bin/wkhtmltopdf CHANGED
@@ -1,21 +1,74 @@
1
1
  #!/usr/bin/env ruby
2
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
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
9
 
10
10
  require 'rbconfig'
11
+ require 'zlib'
11
12
 
12
- if RbConfig::CONFIG['host_os'] =~ /linux/
13
- executable = RbConfig::CONFIG['host_cpu'] == 'x86_64' ? 'wkhtmltopdf_linux_x64' : 'wkhtmltopdf_linux_386'
14
- elsif RbConfig::CONFIG['host_os'] =~ /darwin/
15
- executable = 'wkhtmltopdf_darwin_386'
16
- else
17
- raise "Invalid platform. Must be running linux or intel-based Mac OS."
13
+ suffix = case RbConfig::CONFIG['host_os']
14
+ when /linux/
15
+ os = `. /etc/os-release 2> /dev/null && echo ${ID}_${VERSION_ID}`.strip
16
+
17
+ os = 'ubuntu_16.04' if os.start_with?('ubuntu_16.') ||
18
+ os.start_with?('ubuntu_17.')
19
+
20
+ os = 'ubuntu_18.04' if os.start_with?('ubuntu_18.') ||
21
+ os.start_with?('ubuntu_19.') ||
22
+ os.start_with?('elementary') ||
23
+ os.start_with?('linuxmint') ||
24
+ os.start_with?('pop') ||
25
+ os.start_with?('zorin')
26
+
27
+ os = 'ubuntu_20.04' if os.start_with?('ubuntu_20.') ||
28
+ os.start_with?('ubuntu_21.')
29
+
30
+ os = 'ubuntu_22.04' if os.start_with?('ubuntu_22.')
31
+
32
+ os = 'centos_6' if (os.start_with?('amzn_') && os != 'amzn_2') ||
33
+ (os.empty? && File.read('/etc/centos-release').start_with?('CentOS release 6'))
34
+
35
+ os = 'centos_7' if (os.start_with?('amzn_2') && !os.start_with?('amzn_20')) ||
36
+ os.start_with?('rhel_7.')
37
+
38
+ os = 'centos_8' if os.start_with?('rocky_8') || os.start_with?('rhel_8.')
39
+
40
+ os_based_on_debian_9 = os.start_with?('debian_9') ||
41
+ os.start_with?('deepin')
42
+ os = 'debian_9' if os_based_on_debian_9
43
+
44
+ os = 'debian_10' if !os_based_on_debian_9 && os.start_with?('debian')
45
+
46
+ os = 'archlinux' if os.start_with?('arch_') ||
47
+ os.start_with?('manjaro_')
48
+
49
+ architecture = RbConfig::CONFIG['host_cpu'] == 'x86_64' ? 'amd64' : 'i386'
50
+
51
+ "#{os}_#{architecture}"
52
+ when /darwin/
53
+ 'macos_cocoa'
54
+ else
55
+ 'unknown'
56
+ end
57
+
58
+ suffix = ENV['WKHTMLTOPDF_HOST_SUFFIX'] unless ENV['WKHTMLTOPDF_HOST_SUFFIX'].to_s.empty?
59
+
60
+ binary = "#{__FILE__}_#{suffix}"
61
+
62
+ if File.exist?("#{binary}.gz") && !File.exist?(binary)
63
+ File.open binary, 'wb', 0o755 do |file|
64
+ Zlib::GzipReader.open("#{binary}.gz") { |gzip| file << gzip.read }
65
+ end
66
+ end
67
+
68
+ unless File.exist? binary
69
+ raise 'Invalid platform, must be running on Ubuntu 16.04/18.04/20.04/22.04, ' \
70
+ 'CentOS 6/7/8, Debian 9/10, Archlinux amd64, or Intel-based Cocoa macOS ' \
71
+ "(missing binary: #{binary})."
18
72
  end
19
73
 
20
- executable = File.join(File.dirname(__FILE__), executable)
21
- system *$*.unshift(executable)
74
+ exec *$*.unshift(binary)
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,16 +1,44 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wkhtmltopdf-binary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.9.3
4
+ version: 0.12.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zakir Durumeric
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-09 00:00:00.000000000 Z
12
- dependencies: []
13
- description:
11
+ date: 2022-11-30 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:
14
42
  email: zakird@gmail.com
15
43
  executables:
16
44
  - wkhtmltopdf
@@ -19,30 +47,44 @@ extra_rdoc_files: []
19
47
  files:
20
48
  - bin/wkhtmltopdf
21
49
  - bin/wkhtmltopdf-binary.rb
22
- - bin/wkhtmltopdf_darwin_386
23
- - bin/wkhtmltopdf_linux_386
24
- - bin/wkhtmltopdf_linux_x64
25
- homepage:
26
- licenses: []
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_i386.gz
58
+ - bin/wkhtmltopdf_debian_9_amd64.gz
59
+ - bin/wkhtmltopdf_debian_9_i386.gz
60
+ - bin/wkhtmltopdf_macos_cocoa.gz
61
+ - bin/wkhtmltopdf_ubuntu_16.04_amd64.gz
62
+ - bin/wkhtmltopdf_ubuntu_16.04_i386.gz
63
+ - bin/wkhtmltopdf_ubuntu_18.04_amd64.gz
64
+ - bin/wkhtmltopdf_ubuntu_18.04_i386.gz
65
+ - bin/wkhtmltopdf_ubuntu_20.04_amd64.gz
66
+ - bin/wkhtmltopdf_ubuntu_22.04_amd64.gz
67
+ homepage:
68
+ licenses:
69
+ - Apache-2.0
27
70
  metadata: {}
28
- post_install_message:
71
+ post_install_message:
29
72
  rdoc_options: []
30
73
  require_paths:
31
- - .
74
+ - "."
32
75
  required_ruby_version: !ruby/object:Gem::Requirement
33
76
  requirements:
34
- - - '>='
77
+ - - ">="
35
78
  - !ruby/object:Gem::Version
36
79
  version: '0'
37
80
  required_rubygems_version: !ruby/object:Gem::Requirement
38
81
  requirements:
39
- - - '>='
82
+ - - ">="
40
83
  - !ruby/object:Gem::Version
41
84
  version: '0'
42
85
  requirements: []
43
- rubyforge_project:
44
- rubygems_version: 2.0.3
45
- signing_key:
86
+ rubygems_version: 3.2.3
87
+ signing_key:
46
88
  specification_version: 4
47
89
  summary: Provides binaries for WKHTMLTOPDF project in an easily accessible package.
48
90
  test_files: []
Binary file
Binary file
Binary file