wkhtmltopdf-binary 0.12.4 → 0.12.6.2

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
- SHA1:
3
- metadata.gz: ea9cf8675037b3077a829304ac8b90de603e8f84
4
- data.tar.gz: 9dc4311b764a1f5c81cc27ff921e417c42e40b84
2
+ SHA256:
3
+ metadata.gz: ac12b7190586aa6bf9aee87cc26c9458c8093f6ea85b625f7ada71131b9ed89f
4
+ data.tar.gz: d1b718cd22fbd2394d2b8477577007175b7bb8c75f9bedfc355c9222b576e1bf
5
5
  SHA512:
6
- metadata.gz: 056b8ec2ed138bf6cc5278522b0b617f60bb3d3b093bb207bee7d7a9c1947e164f5f3578da5a66d1c2a0ffb9eb6bcfcbdc7fc28444bf80a88e2f0818959b40c8
7
- data.tar.gz: bcc845f6d1785d92080e10a174e276b9310414c59dd5641c03fd3f133f68c7c81b86e1385f727b1227ea5af5ed81b36ca7dd8d40d2c606b79a8473967d140c9e
6
+ metadata.gz: 89fb6b3b0123539565ba5a1e1bc53582d2a04d5a5258eb4f110826bb490d0137a2f0a7d93bac2f2e279e31a5573d554ba0f5af8117b827c021e06c5020d96fb3
7
+ data.tar.gz: 2538ab4e943b9386417619f0fd4c42c7d17ebfc0458a1d5561f817f1f9e9a332a743c97e97c5c7b19ec9b25393bf60e623f3a5e9663182801278b1157081630f
@@ -8,14 +8,51 @@
8
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
13
  suffix = case RbConfig::CONFIG['host_os']
13
- when /linux/
14
- (RbConfig::CONFIG['host_cpu'] == 'x86_64') ? 'linux_amd64' : 'linux_x86'
15
- when /darwin/
16
- 'darwin_x86'
17
- else
18
- raise "Invalid platform. Must be running on linux or intel-based Mac OS."
14
+ when /linux/
15
+ os = `. /etc/os-release 2> /dev/null && echo ${ID}_${VERSION_ID}`.strip
16
+
17
+ os_based_on_ubuntu_16_04 = os.start_with?('ubuntu_16.') || os.start_with?('ubuntu_17.')
18
+ os = 'ubuntu_16.04' if os_based_on_ubuntu_16_04
19
+
20
+ os_based_on_ubuntu_18_04 = os.start_with?('ubuntu_18.') || os.start_with?('ubuntu_19.') || os.start_with?('elementary') || os.start_with?('linuxmint') || os.start_with?('pop')
21
+ os = 'ubuntu_18.04' if os_based_on_ubuntu_18_04
22
+
23
+ os_based_on_ubuntu_20_04 = os.start_with?('ubuntu_20.')
24
+ os = 'ubuntu_20.04' if os_based_on_ubuntu_20_04
25
+
26
+ os_based_on_centos_6 = (os.empty? && File.read('/etc/centos-release').start_with?('CentOS release 6')) || (os.start_with?('amzn_') && !os.start_with?('amzn_2'))
27
+ os = 'centos_6' if os_based_on_centos_6
28
+
29
+ os_based_on_centos_7 = os.start_with?('amzn_2')
30
+ os = 'centos_7' if os_based_on_centos_7
31
+
32
+ os_based_on_debian_9 = /deepin/.match?(os)
33
+ os = 'debian_9' if os_based_on_debian_9
34
+
35
+ architecture = RbConfig::CONFIG['host_cpu'] == 'x86_64' ? 'amd64' : 'i386'
36
+
37
+ "#{os}_#{architecture}"
38
+ when /darwin/
39
+ 'macos_cocoa'
40
+ else
41
+ 'unknown'
42
+ end
43
+
44
+ binary = "#{__FILE__}_#{suffix}"
45
+
46
+ if File.exist?("#{binary}.gz") && !File.exist?(binary)
47
+ File.open binary, 'wb', 0o755 do |file|
48
+ Zlib::GzipReader.open("#{binary}.gz") { |gzip| file << gzip.read }
49
+ end
50
+ end
51
+
52
+ unless File.exist? binary
53
+ raise 'Invalid platform, must be running on Ubuntu 16.04/18.04/20.04 ' \
54
+ 'CentOS 6/7/8, Debian 9/10, or intel-based Cocoa macOS ' \
55
+ "(missing binary: #{binary})."
19
56
  end
20
57
 
21
- system *$*.unshift("#{__FILE__}_#{suffix}")
58
+ exec *$*.unshift(binary)
metadata CHANGED
@@ -1,16 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wkhtmltopdf-binary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.4
4
+ version: 0.12.6.2
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: 2018-06-11 00:00:00.000000000 Z
12
- dependencies: []
13
- description:
11
+ date: 2020-06-29 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
+ description:
14
28
  email: zakird@gmail.com
15
29
  executables:
16
30
  - wkhtmltopdf
@@ -19,14 +33,26 @@ extra_rdoc_files: []
19
33
  files:
20
34
  - bin/wkhtmltopdf
21
35
  - bin/wkhtmltopdf-binary.rb
22
- - bin/wkhtmltopdf_darwin_x86
23
- - bin/wkhtmltopdf_linux_amd64
24
- - bin/wkhtmltopdf_linux_x86
25
- homepage:
36
+ - bin/wkhtmltopdf_centos_6_amd64.gz
37
+ - bin/wkhtmltopdf_centos_6_i386.gz
38
+ - bin/wkhtmltopdf_centos_7_amd64.gz
39
+ - bin/wkhtmltopdf_centos_7_i386.gz
40
+ - bin/wkhtmltopdf_centos_8_amd64.gz
41
+ - bin/wkhtmltopdf_debian_10_amd64.gz
42
+ - bin/wkhtmltopdf_debian_10_i386.gz
43
+ - bin/wkhtmltopdf_debian_9_amd64.gz
44
+ - bin/wkhtmltopdf_debian_9_i386.gz
45
+ - bin/wkhtmltopdf_macos_cocoa.gz
46
+ - bin/wkhtmltopdf_ubuntu_16.04_amd64.gz
47
+ - bin/wkhtmltopdf_ubuntu_16.04_i386.gz
48
+ - bin/wkhtmltopdf_ubuntu_18.04_amd64.gz
49
+ - bin/wkhtmltopdf_ubuntu_18.04_i386.gz
50
+ - bin/wkhtmltopdf_ubuntu_20.04_amd64.gz
51
+ homepage:
26
52
  licenses:
27
53
  - Apache-2.0
28
54
  metadata: {}
29
- post_install_message:
55
+ post_install_message:
30
56
  rdoc_options: []
31
57
  require_paths:
32
58
  - "."
@@ -41,9 +67,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
41
67
  - !ruby/object:Gem::Version
42
68
  version: '0'
43
69
  requirements: []
44
- rubyforge_project:
45
- rubygems_version: 2.6.10
46
- signing_key:
70
+ rubygems_version: 3.0.3
71
+ signing_key:
47
72
  specification_version: 4
48
73
  summary: Provides binaries for WKHTMLTOPDF project in an easily accessible package.
49
74
  test_files: []
Binary file
Binary file
Binary file