wkhtmltopdf-binary 0.12.3 → 0.12.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: 07694dbdb61ef7ea64446b3eda78fb53d056c582
4
- data.tar.gz: 872bead5ad4c068d88d097057c726b5b531cfff3
2
+ SHA256:
3
+ metadata.gz: 9136890b342bdf929fef2ac2597db22f059356df1a69c21948b8350f8ee1be75
4
+ data.tar.gz: 447244dc7477c7654b8fc60282448dce2fc6d0e3b9487cc787ab329ff9238b2f
5
5
  SHA512:
6
- metadata.gz: 25cd47dfb0aa60b81bf17709f63da66834127a710baf403fe2881f7027fafe0ce113bce82e622d3b125df898d9ad9807a50abfc3eecde8054d4c13272ba6eaf8
7
- data.tar.gz: 33f941e87d15b0c377dea26fe4bcb1d5712ce56477909bd859821c5de7c53cb305d8059c685bde85316b309c694638c46c1d5f44c1b54ece0062128074e376c5
6
+ metadata.gz: 2e46d531ac16f2c1cf9eecfd630b935f8bfa55679cbf80e0f506394ee470f0bbfad85badbd89797db768ae9c004f6d5e7f860c6fd0f25c8cecb64c9d1fb96380
7
+ data.tar.gz: c3dec361e0f3bc67aedf5a190ac947abc730672a89320cc60045d061c7378c978f5152cc1a7af2d0317cc18a094eab94d7772d9e187fdbfd9fc5b4b962543825
@@ -8,16 +8,46 @@
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
- suffix = case RbConfig::CONFIG['host']
13
- when /x86_64.*linux/
14
- 'linux_amd64'
15
- when /linux/
16
- 'linux_x86'
17
- when /darwin/
18
- 'darwin_x86'
19
- else
20
- raise "Invalid platform. Must be running on 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
+ if os.start_with?('elementary') || os.start_with?('linuxmint') || os.start_with?('pop')
18
+ os = 'ubuntu_18.04'
19
+ end
20
+
21
+ # CentOS 6 doesn't have `/etc/os-release`.
22
+ if (os.empty? && File.read('/etc/centos-release').start_with?('CentOS release 6')) ||
23
+ os.start_with?('amzn_')
24
+ os = 'centos_6'
25
+ end
26
+
27
+ # Deepin fallback
28
+ os = 'debian_9' if /deepin/.match?(os)
29
+
30
+ architecture = RbConfig::CONFIG['host_cpu'] == 'x86_64' ? 'amd64' : 'i386'
31
+
32
+ "#{os}_#{architecture}"
33
+ when /darwin/
34
+ 'macos_cocoa'
35
+ else
36
+ 'unknown'
37
+ end
38
+
39
+ binary = "#{__FILE__}_#{suffix}"
40
+
41
+ if File.exist?("#{binary}.gz") && !File.exist?(binary)
42
+ File.open binary, 'wb', 0o755 do |file|
43
+ Zlib::GzipReader.open("#{binary}.gz") { |gzip| file << gzip.read }
44
+ end
45
+ end
46
+
47
+ unless File.exist? binary
48
+ raise 'Invalid platform, must be running on Ubuntu 16.04/18.04/20.04 ' \
49
+ 'CentOS 6/7/8, Debian 9/10, or intel-based Cocoa macOS ' \
50
+ "(missing binary: #{binary})."
21
51
  end
22
52
 
23
- system *$*.unshift("#{__FILE__}_#{suffix}")
53
+ exec *$*.unshift(binary)
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wkhtmltopdf-binary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.3
4
+ version: 0.12.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zakir Durumeric
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-14 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2020-06-15 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'
13
27
  description:
14
28
  email: zakird@gmail.com
15
29
  executables:
@@ -19,11 +33,23 @@ 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
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
25
50
  homepage:
26
- licenses: []
51
+ licenses:
52
+ - Apache-2.0
27
53
  metadata: {}
28
54
  post_install_message:
29
55
  rdoc_options: []
@@ -40,8 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
40
66
  - !ruby/object:Gem::Version
41
67
  version: '0'
42
68
  requirements: []
43
- rubyforge_project:
44
- rubygems_version: 2.5.1
69
+ rubygems_version: 3.0.3
45
70
  signing_key:
46
71
  specification_version: 4
47
72
  summary: Provides binaries for WKHTMLTOPDF project in an easily accessible package.
Binary file
Binary file
Binary file