parallel588-wkhtmltopdf-binary 0.12.6

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 315f53869180a5573be03560befca1425c8db484dc06ab7d34a5c082677a0936
4
+ data.tar.gz: 353d21e744253a6380f5e4a3ca7605a8386843658e2c40fe96b830daac3f7955
5
+ SHA512:
6
+ metadata.gz: f9384979c387daa3cb7094b198783026ef308e67bdcd38235b89077fc1240abdab5754ff0134297e54bedc7c4e239c709331069631c43306ce40d5ea43aa1593
7
+ data.tar.gz: fec033eb7d9a433b0e4450f8715f9f4eab80996e48affe1bdf59d49de9d41019f8bbad8b3ac7cbda04569176ebd4cd55ac63db023765c96327386e34da03adcd
@@ -0,0 +1,53 @@
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
+ 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
+ RbConfig::CONFIG['host_cpu'] == 'x86_64' ? 'macos_cocoa' : 'macos_carbon'
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 14.04/16.04/18.04/20.04 ' \
49
+ 'CentOS 6/7/8, Debian 8/9/10, or intel-based macOS ' \
50
+ "(missing binary: #{binary})."
51
+ end
52
+
53
+ exec *$*.unshift(binary)
File without changes
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: parallel588-wkhtmltopdf-binary
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.12.6
5
+ platform: ruby
6
+ authors:
7
+ - Maxim Pechnikov
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-06-08 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:
28
+ email:
29
+ - parallel588@gmail.com
30
+ executables:
31
+ - wkhtmltopdf
32
+ extensions: []
33
+ extra_rdoc_files: []
34
+ files:
35
+ - bin/wkhtmltopdf
36
+ - bin/wkhtmltopdf-binary.rb
37
+ - bin/wkhtmltopdf_ubuntu_14.04_amd64.gz
38
+ - bin/wkhtmltopdf_ubuntu_14.04_i386.gz
39
+ - bin/wkhtmltopdf_ubuntu_16.04_amd64.gz
40
+ - bin/wkhtmltopdf_ubuntu_16.04_i386.gz
41
+ - bin/wkhtmltopdf_ubuntu_18.04_amd64.gz
42
+ - bin/wkhtmltopdf_ubuntu_18.04_i386.gz
43
+ - bin/wkhtmltopdf_ubuntu_20.04_amd64.gz
44
+ homepage:
45
+ licenses: []
46
+ metadata: {}
47
+ post_install_message:
48
+ rdoc_options: []
49
+ require_paths:
50
+ - "."
51
+ required_ruby_version: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ required_rubygems_version: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ requirements: []
62
+ rubygems_version: 3.0.8
63
+ signing_key:
64
+ specification_version: 4
65
+ summary: Provides binaries for WKHTMLTOPDF project in an easily accessible package.
66
+ test_files: []