pdfs2pdf 0.1.3 → 0.1.4

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
2
  SHA1:
3
- metadata.gz: 0a927a5b60c849d0a3b2b8bc8886ef8a55d0ab5a
4
- data.tar.gz: 4af890711112a8eb6c95a2c3cc478f4951a099e4
3
+ metadata.gz: f827991ceeb4539bc2e5966e6873a22188deefa3
4
+ data.tar.gz: 599445f38ae0a828b16e84d8c2b18fde8a57dd04
5
5
  SHA512:
6
- metadata.gz: 5530f757fcd6e75667f5a8c8f8085fb6fb3d1e73df0db43a79f7b5ae692bb2c3148b5f9bfa2ef55ad0cd7ef1b2e2dc62076d88c1a67ef2083864db24cc459472
7
- data.tar.gz: c11bf0171f9d0c064e5507af97063d70ad7abeeb4bc03a9fdebe29427675d04809dbf700011e4c224bb39d522b0c2c309dcf64cac82b2eb19e81ceb6ab4864ce
6
+ metadata.gz: 3271d1022929cdafe38d2b7d9fb168280709ab68abf5bc796ed68a06f3ddd2271e1d03cfacdf1bca16c3da12c5ffa3d23ec92b58fbff3a25bc00bde436eb5f38
7
+ data.tar.gz: 5873976ffc2bcb67399daea5217a0631f5a0157576f9b3b391b737d3ad3e7b3417ba3f4d99fa2fd50d47f940a49809e055af7138761cf10cdf844b5f18f41e8e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ### Changelogs
2
2
 
3
+ #### 0.1.4
4
+
5
+ - Exclude the output file from the input list if any
6
+
3
7
  #### 0.1.3
4
8
 
5
9
  - Use `pdfs2pdf_<base_name>.pdf` as output file
data/lib/pdfs2pdf/cli.rb CHANGED
@@ -23,8 +23,10 @@ module Pdfs2Pdf
23
23
  pdf_files = CodeLister.files base_dir: base_dir,
24
24
  exts: %w[pdf],
25
25
  recursive: opts[:recursive]
26
- create_pdfmarks(pdf_files, base_dir)
26
+ # Note: we remove the output file from the list of file here first if any
27
27
  output_file = "pdfs2pdf_#{File.basename(File.expand_path(base_dir))}.pdf"
28
+ pdf_files.delete_if { |file| file == "./#{output_file}" }
29
+ create_pdfmarks(pdf_files, base_dir)
28
30
  merge_pdfs(pdf_files, output_file)
29
31
  end
30
32
  # rubocop:enable All
@@ -1,3 +1,3 @@
1
1
  module Pdfs2Pdf
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdfs2pdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Burin Choomnuan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-03 00:00:00.000000000 Z
11
+ date: 2014-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -262,10 +262,10 @@ specification_version: 4
262
262
  summary: Combine multiple pdf files into a single pdf with combined table of content
263
263
  for quick navigation
264
264
  test_files:
265
- - test/lib/pdfs2pdf/test_pdfs2pdf.rb
266
- - test/test_helper.rb
265
+ - test/fixtures/samples/demo1_xxx.rb.xhtml.pdf
267
266
  - test/fixtures/samples/demo2_xxx.rb.xhtml.pdf
268
- - test/fixtures/samples/sub_dir/demo4_xxx.rb.xhtml.pdf
269
267
  - test/fixtures/samples/sub_dir/demo3_xxx.rb.xhtml.pdf
270
- - test/fixtures/samples/demo1_xxx.rb.xhtml.pdf
268
+ - test/fixtures/samples/sub_dir/demo4_xxx.rb.xhtml.pdf
269
+ - test/lib/pdfs2pdf/test_pdfs2pdf.rb
270
+ - test/test_helper.rb
271
271
  has_rdoc: