pdfs2pdf 0.1.2 → 0.1.3

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: 1ceb2f9f7a6a8fc41d1d6f3b246adf6764506e74
4
- data.tar.gz: 28a4f610e387bc2b698a002d45742635b1d7a751
3
+ metadata.gz: 0a927a5b60c849d0a3b2b8bc8886ef8a55d0ab5a
4
+ data.tar.gz: 4af890711112a8eb6c95a2c3cc478f4951a099e4
5
5
  SHA512:
6
- metadata.gz: ab425500b6d2f1f2310b790a659ff39eb21e20ef8f5c4fce6629dac16d35c428a343e72d076de612f717e04071ea2345e13f887d8ef4d9092fa81e640ded0259
7
- data.tar.gz: 2111ce959961cf4e0f947171bef478bdebac15432c40c0e0644503c093acdf5fcf967aea898f6e5e4b4964d70c84fb3c831667f00a88dae415502d07fd3bfde5
6
+ metadata.gz: 5530f757fcd6e75667f5a8c8f8085fb6fb3d1e73df0db43a79f7b5ae692bb2c3148b5f9bfa2ef55ad0cd7ef1b2e2dc62076d88c1a67ef2083864db24cc459472
7
+ data.tar.gz: c11bf0171f9d0c064e5507af97063d70ad7abeeb4bc03a9fdebe29427675d04809dbf700011e4c224bb39d522b0c2c309dcf64cac82b2eb19e81ceb6ab4864ce
data/.rubocop.yml CHANGED
@@ -50,7 +50,7 @@ HashSyntax:
50
50
 
51
51
  # No spaces inside hash literals
52
52
  SpaceInsideHashLiteralBraces:
53
- EnforcedStyle: no_space
53
+ EnforcedStyle: space
54
54
 
55
55
  # Allow dots at the end of lines
56
56
  DotPosition:
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ### Changelogs
2
2
 
3
+ #### 0.1.3
4
+
5
+ - Use `pdfs2pdf_<base_name>.pdf` as output file
6
+ - Update `rubocop` to 0.23.x version
7
+ - Update rubocop style rule in .rubocop.yml
8
+
3
9
  #### 0.1.2
4
10
 
5
11
  - Re-instate the `--base-dir` option and make relative path work correctly
data/README.md CHANGED
@@ -45,7 +45,7 @@ pdfs2pdf --recursive
45
45
 
46
46
  Will produce the result like the following
47
47
 
48
- - File: `pdfs2pdf_output.pdf` (excepted screenshot)
48
+ - File: `pdfs2pdf_samples.pdf` (excepted screenshot)
49
49
 
50
50
  ![](https://github.com/agilecreativity/pdfs2pdf/raw/master/final_output.png)
51
51
 
@@ -91,7 +91,7 @@ pdfs2pdf -r
91
91
  ```
92
92
 
93
93
  This will merge all the pdf files from `test/fixtures/samples` and generate the
94
- `pdfs2pdf_output.pdf`.
94
+ `pdfs2pdf_samples.pdf`.
95
95
 
96
96
  ### Known Issues
97
97
 
data/Rakefile CHANGED
@@ -17,7 +17,7 @@ task :pry do
17
17
  end
18
18
  require "rubocop/rake_task"
19
19
  desc "Run RuboCop on the lib directory"
20
- Rubocop::RakeTask.new(:rubocop) do |task|
20
+ RuboCop::RakeTask.new(:rubocop) do |task|
21
21
  task.patterns = ["lib/**/*.rb"]
22
22
  # only show the files with failures
23
23
  task.formatters = ["files"]
@@ -4,7 +4,7 @@ module Pdfs2Pdf
4
4
  # Customize the configuration for specific system (Ubuntu/OSX/etc)
5
5
  # See: ./lib/pdfs2pdf/configuration.rb for available options
6
6
  def update_config
7
- Pdfs2Pdf.configure do |config|
7
+ Pdfs2Pdf.configure do |_config|
8
8
  # Note: add your custom config here
9
9
  # config.gs_binary = '/usr/bin/gs'
10
10
  #
data/lib/pdfs2pdf/cli.rb CHANGED
@@ -8,6 +8,7 @@ module Pdfs2Pdf
8
8
  include AgileUtils::Options
9
9
  include CodeLister
10
10
  class CLI < Thor
11
+ # rubocop:disable AmbiguousOperator
11
12
  desc "merge", "Combine multiple pdfs into one file with combined table of content"
12
13
  method_option *AgileUtils::Options::BASE_DIR
13
14
  method_option *AgileUtils::Options::RECURSIVE
@@ -23,8 +24,10 @@ module Pdfs2Pdf
23
24
  exts: %w[pdf],
24
25
  recursive: opts[:recursive]
25
26
  create_pdfmarks(pdf_files, base_dir)
26
- merge_pdfs(pdf_files)
27
+ output_file = "pdfs2pdf_#{File.basename(File.expand_path(base_dir))}.pdf"
28
+ merge_pdfs(pdf_files, output_file)
27
29
  end
30
+ # rubocop:enable All
28
31
 
29
32
  desc "usage", "Display usage information"
30
33
  def usage
@@ -56,13 +59,12 @@ Combine multiple pdfs into one file with combined table of content
56
59
  puts "Create pdfmarks took #{elapsed} ms"
57
60
  end
58
61
 
59
- def merge_pdfs(pdf_files)
60
- output_filename = "pdfs2pdf_output.pdf"
62
+ def merge_pdfs(pdf_files, output_file)
61
63
  elapsed = AgileUtils::FileUtil.time do
62
- Pdfs2Pdf.merge_pdfs(pdf_files, "pdfmarks", output_filename)
64
+ Pdfs2Pdf.merge_pdfs(pdf_files, "pdfmarks", output_file)
63
65
  end
64
66
  puts "Combine pdf files took #{elapsed} ms"
65
- puts "Your combined pdf is available at #{File.absolute_path(output_filename)}"
67
+ puts "Your combined pdf is available at #{File.absolute_path(output_file)}"
66
68
  end
67
69
  end
68
70
  end
@@ -1,3 +1,3 @@
1
1
  module Pdfs2Pdf
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
data/pdfs2pdf.gemspec CHANGED
@@ -35,6 +35,6 @@ Gem::Specification.new do |spec|
35
35
  spec.add_development_dependency "minitest-spec-context", "~> 0.0.3"
36
36
  spec.add_development_dependency "pry", "~> 0.9"
37
37
  spec.add_development_dependency "rake", "~> 10.1"
38
- spec.add_development_dependency "rubocop", "~> 0.20"
38
+ spec.add_development_dependency "rubocop", "~> 0.23"
39
39
  spec.add_development_dependency "yard", "~> 0.8"
40
40
  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.2
4
+ version: 0.1.3
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-05-22 00:00:00.000000000 Z
11
+ date: 2014-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -184,14 +184,14 @@ dependencies:
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: '0.20'
187
+ version: '0.23'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: '0.20'
194
+ version: '0.23'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: yard
197
197
  requirement: !ruby/object:Gem::Requirement