pdftk-bin 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/bin/pdftk +21 -13
  3. data/bin/zip +9 -0
  4. data/lib/pdftk-bin/version.rb +1 -1
  5. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 07e7fb8783003afd2ec188a5e572b805d37d483c
4
- data.tar.gz: 2a9c8962182594f8037b8fd6f8cab463ca514efe
3
+ metadata.gz: d7cc25828380e48e7e80ad53a1b4ab5179041440
4
+ data.tar.gz: 1dbac6457eb7eda1d03fa816f1f9a033fe0bce8e
5
5
  SHA512:
6
- metadata.gz: a0c1405f85d206c11e0f44195ed31898722dfebff1369687ff3d9d9e81134e441df6890bbf7e018e57ef85740005834988e7ac8c5d37e740dd250903682d588d
7
- data.tar.gz: d03b10687e6c70aae2367c544ae04dec42b7ea5b848284b0ae4d5c9850f21fe14a6194bfe4173a1ea09c117994f84960cd9fe9f55373fac53a0d39d6e76a1e0a
6
+ metadata.gz: a3245a7976ff83c2b8fd0d53fd9a406051d537a7af99c5da6483fec9c754fedbfb76addcb52809e72cc7219e9d91870577af57a0d5ca390f246579334688ff79
7
+ data.tar.gz: a34f105c7b8e91c9c6e54857c7568389dcdf04b7a671b99c2606bd989945bb6357d0f56d59fcbd35e35bcad5132ce8516cb12c5c13e3176c36a03bd08e04963d
data/bin/pdftk CHANGED
@@ -1,17 +1,25 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- arch = case RUBY_PLATFORM
4
- when /64.*linux/
5
- 'linux-amd64'
6
- when /linux/
7
- 'linux-x86'
8
- when /darwin/
9
- 'darwin-x86'
10
- else
11
- raise "Invalid platform. Must be running linux or intel-based Mac OS."
12
- end
3
+ begin
4
+ exec "/usr/bin/pdftk #{args.join(' ')}"
5
+ rescue
6
+ arch = case RUBY_PLATFORM
7
+ when /64.*linux/
8
+ 'linux-amd64'
9
+ when /linux/
10
+ 'linux-x86'
11
+ when /darwin/
12
+ 'darwin-x86'
13
+ else
14
+ raise "Invalid platform. Must be running linux or intel-based Mac OS."
15
+ end
13
16
 
14
- args = $*.map { |x| x.include?(' ') ? "'" + x + "'" : x }
15
- cmd = File.expand_path "#{File.dirname(__FILE__)}/../lib/pdftk-bin/binaries/pdftk-#{arch}"
17
+ args = $*.map { |x| x.include?(' ') ? "'" + x + "'" : x }
18
+ cmd = File.expand_path "#{File.dirname(__FILE__)}/../lib/pdftk-bin/binaries/pdftk-#{arch}"
16
19
 
17
- exec "#{cmd} #{args.join(' ')}"
20
+ begin
21
+ exec "#{cmd} #{args.join(' ')}"
22
+ rescue
23
+ fail 'Please install pdftk: apt-get install pdftk'
24
+ end
25
+ end
data/bin/zip ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ args = $*.map { |x| x.include?(' ') ? "'" + x + "'" : x }
4
+
5
+ begin
6
+ exec "/usr/bin/zip #{args.join(' ')}"
7
+ rescue
8
+ fail 'Please install zip: apt-get install zip'
9
+ end
@@ -1,5 +1,5 @@
1
1
  module Pdftk
2
2
  module Bin
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdftk-bin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Silchenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-31 00:00:00.000000000 Z
11
+ date: 2015-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -57,6 +57,7 @@ email:
57
57
  - silchenko@uol.cz
58
58
  executables:
59
59
  - pdftk
60
+ - zip
60
61
  extensions: []
61
62
  extra_rdoc_files: []
62
63
  files:
@@ -68,6 +69,7 @@ files:
68
69
  - README.md
69
70
  - Rakefile
70
71
  - bin/pdftk
72
+ - bin/zip
71
73
  - lib/pdftk-bin.rb
72
74
  - lib/pdftk-bin/binaries/pdftk-linux-amd64
73
75
  - lib/pdftk-bin/binaries/pdftk-linux-x86