pludoni_pdfutils 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pludoni/pdfutils/joiner.rb +4 -0
- data/pludoni_pdfutils.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 224d05da786b0dee71b68318d3c4a863d59a61007c06245fb6ea730043e14a39
|
4
|
+
data.tar.gz: 0c3416f5075b6b1194084b2d6244c6a3201c36ea6c218c4e963cabe596a3fe98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ed75f6cb67e2eff04ff9b82f0531f660bf411a0379bb0c3dcabfd05d4696707422581a9d377a2c8faa0464da671d9a897a8b1fbd195f8c2afa779d0b225c0a8
|
7
|
+
data.tar.gz: f79d71f87981ec2abace94d8034d96c2ee05982c7718f63fe375c343e1c1424a5495f98108aad4359e6a567e764781d33928ee81a87c07c3eb5c1aac667884f8
|
@@ -2,12 +2,16 @@ require 'open3'
|
|
2
2
|
|
3
3
|
module Pludoni::Pdfutils
|
4
4
|
class Joiner
|
5
|
+
MAX_LENGTH = 200
|
5
6
|
def initialize(blobs)
|
6
7
|
@blobs = blobs.map { |i| FileWrapper.make(i) }
|
7
8
|
end
|
8
9
|
|
9
10
|
def run
|
10
11
|
fname = @blobs.map(&:filename).map { |i| i.split('.').first[0..20] }.join('-')
|
12
|
+
if fname.length > MAX_LENGTH
|
13
|
+
fname = fname[0..MAX_LENGTH]
|
14
|
+
end
|
11
15
|
|
12
16
|
tf = Tempfile.new([fname, '.pdf'])
|
13
17
|
tf.binmode
|
data/pludoni_pdfutils.gemspec
CHANGED
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.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Wienert
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activestorage
|