pludoni_pdfutils 0.3.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/pludoni/pdfutils/compressor.rb +1 -1
- data/lib/pludoni/pdfutils/local_file_wrapper.rb +2 -1
- data/lib/pludoni/pdfutils.rb +0 -2
- data/pludoni_pdfutils.gemspec +2 -2
- metadata +4 -5
- data/Gemfile.lock +0 -88
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b857a9cb25a06c3d24293167dfeb438b611b59e6ff338a3e9698b7562be27dd
|
4
|
+
data.tar.gz: a110445e799dd1a5ddd84bd396acf2a9a9b204122b4b6fde7d7ed632fb31768a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08a001be4cad274d66c813481787935a849de9c7230ad48f8fd1bb74eab78912001af132091afedc62038857d5dc472e41507e22e793d92ef8940c48b1a6cc3d'
|
7
|
+
data.tar.gz: b404ce469d07da35007b8a05713c0c37ba7561b74265246f54077ab24506d1287cc5c8f60d34b4c94852b4a993edcfa9d8638fb3442bba8c6310b183b1521159
|
data/.gitignore
CHANGED
@@ -11,7 +11,7 @@ module Pludoni::Pdfutils
|
|
11
11
|
tf = Tempfile.new([fname, '.pdf'])
|
12
12
|
tf.binmode
|
13
13
|
input = @blob.to_tf
|
14
|
-
cli = "gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/
|
14
|
+
cli = "gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -r150 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=#{Shellwords.escape tf.path} #{Shellwords.escape input.path}"
|
15
15
|
|
16
16
|
stdout, stderr, status = Open3.capture3(cli)
|
17
17
|
unless status.success?
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'marcel'
|
1
2
|
module Pludoni
|
2
3
|
module Pdfutils
|
3
4
|
class LocalFileWrapper < FileWrapper
|
@@ -21,7 +22,7 @@ module Pludoni
|
|
21
22
|
end
|
22
23
|
|
23
24
|
def content_type
|
24
|
-
|
25
|
+
Marcel::MimeType.for(@file)
|
25
26
|
ensure
|
26
27
|
@file.rewind
|
27
28
|
end
|
data/lib/pludoni/pdfutils.rb
CHANGED
data/pludoni_pdfutils.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
Gem::Specification.new do |spec|
|
3
3
|
spec.name = "pludoni_pdfutils"
|
4
|
-
spec.version = "0.
|
4
|
+
spec.version = "0.5.0"
|
5
5
|
spec.authors = ["Stefan Wienert"]
|
6
6
|
spec.email = ["info@stefanwienert.de"]
|
7
7
|
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
|
20
20
|
spec.add_dependency "activestorage", ">= 5.2.0"
|
21
21
|
spec.add_dependency "zeitwerk"
|
22
|
-
spec.add_dependency "
|
22
|
+
spec.add_dependency "marcel"
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler"
|
25
25
|
spec.add_development_dependency "rake"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pludoni_pdfutils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Wienert
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activestorage
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: marcel
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
@@ -89,7 +89,6 @@ extra_rdoc_files: []
|
|
89
89
|
files:
|
90
90
|
- ".gitignore"
|
91
91
|
- Gemfile
|
92
|
-
- Gemfile.lock
|
93
92
|
- LICENSE.txt
|
94
93
|
- README.md
|
95
94
|
- Rakefile
|
@@ -125,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
124
|
- !ruby/object:Gem::Version
|
126
125
|
version: '0'
|
127
126
|
requirements: []
|
128
|
-
rubygems_version: 3.
|
127
|
+
rubygems_version: 3.5.3
|
129
128
|
signing_key:
|
130
129
|
specification_version: 4
|
131
130
|
summary: Convert to pdf, compress pdf, join pdf using Ghostscript
|
data/Gemfile.lock
DELETED
@@ -1,88 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
pludoni-pdfutils (0.1.0)
|
5
|
-
activestorage (>= 5.2.0)
|
6
|
-
mimemagic
|
7
|
-
zeitwerk
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: https://rubygems.org/
|
11
|
-
specs:
|
12
|
-
actionpack (6.1.7)
|
13
|
-
actionview (= 6.1.7)
|
14
|
-
activesupport (= 6.1.7)
|
15
|
-
rack (~> 2.0, >= 2.0.9)
|
16
|
-
rack-test (>= 0.6.3)
|
17
|
-
rails-dom-testing (~> 2.0)
|
18
|
-
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
19
|
-
actionview (6.1.7)
|
20
|
-
activesupport (= 6.1.7)
|
21
|
-
builder (~> 3.1)
|
22
|
-
erubi (~> 1.4)
|
23
|
-
rails-dom-testing (~> 2.0)
|
24
|
-
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
25
|
-
activejob (6.1.7)
|
26
|
-
activesupport (= 6.1.7)
|
27
|
-
globalid (>= 0.3.6)
|
28
|
-
activemodel (6.1.7)
|
29
|
-
activesupport (= 6.1.7)
|
30
|
-
activerecord (6.1.7)
|
31
|
-
activemodel (= 6.1.7)
|
32
|
-
activesupport (= 6.1.7)
|
33
|
-
activestorage (6.1.7)
|
34
|
-
actionpack (= 6.1.7)
|
35
|
-
activejob (= 6.1.7)
|
36
|
-
activerecord (= 6.1.7)
|
37
|
-
activesupport (= 6.1.7)
|
38
|
-
marcel (~> 1.0)
|
39
|
-
mini_mime (>= 1.1.0)
|
40
|
-
activesupport (6.1.7)
|
41
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
42
|
-
i18n (>= 1.6, < 2)
|
43
|
-
minitest (>= 5.1)
|
44
|
-
tzinfo (~> 2.0)
|
45
|
-
zeitwerk (~> 2.3)
|
46
|
-
builder (3.2.4)
|
47
|
-
concurrent-ruby (1.1.10)
|
48
|
-
crass (1.0.6)
|
49
|
-
erubi (1.11.0)
|
50
|
-
globalid (1.0.0)
|
51
|
-
activesupport (>= 5.0)
|
52
|
-
i18n (1.12.0)
|
53
|
-
concurrent-ruby (~> 1.0)
|
54
|
-
loofah (2.19.0)
|
55
|
-
crass (~> 1.0.2)
|
56
|
-
nokogiri (>= 1.5.9)
|
57
|
-
marcel (1.0.2)
|
58
|
-
mimemagic (0.4.3)
|
59
|
-
nokogiri (~> 1)
|
60
|
-
rake
|
61
|
-
mini_mime (1.1.2)
|
62
|
-
minitest (5.16.3)
|
63
|
-
nokogiri (1.13.8-x86_64-linux)
|
64
|
-
racc (~> 1.4)
|
65
|
-
racc (1.6.0)
|
66
|
-
rack (2.2.4)
|
67
|
-
rack-test (2.0.2)
|
68
|
-
rack (>= 1.3)
|
69
|
-
rails-dom-testing (2.0.3)
|
70
|
-
activesupport (>= 4.2.0)
|
71
|
-
nokogiri (>= 1.6)
|
72
|
-
rails-html-sanitizer (1.4.3)
|
73
|
-
loofah (~> 2.3)
|
74
|
-
rake (13.0.6)
|
75
|
-
tzinfo (2.0.5)
|
76
|
-
concurrent-ruby (~> 1.0)
|
77
|
-
zeitwerk (2.6.0)
|
78
|
-
|
79
|
-
PLATFORMS
|
80
|
-
x86_64-linux
|
81
|
-
|
82
|
-
DEPENDENCIES
|
83
|
-
bundler
|
84
|
-
pludoni-pdfutils!
|
85
|
-
rake
|
86
|
-
|
87
|
-
BUNDLED WITH
|
88
|
-
2.3.15
|