pdf_colored_pages 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 689d5cd28793c9ea7d0a37a35fd260c4ef251f4b
4
- data.tar.gz: 1c96c277b67e1ea1c1fb406964d818bc0f43b318
3
+ metadata.gz: d970871feee27629868eeba259fbf35754d73d76
4
+ data.tar.gz: 2412be1378cd4b1bf07dc6ef2a464aea234645c9
5
5
  SHA512:
6
- metadata.gz: 6d5947e8215cc80811ce64decb1af7c7c812e0ac426cfff90f7064a981545f81889f451156e80adb67a09fb8503222656e96b3831ca876566017eb9a97ce74de
7
- data.tar.gz: ff797e17abfccc2a7d9176b901111622d9c23ce49eb2eac4b5f57bda5899dc257898799eeb6c6df0a63c06e3de7749551b408eb7c44e2b33346f40bf85593345
6
+ metadata.gz: 55ec9488034137b21368ea79391a56b8a537ee159c132da3bd18de88fc19b268688dafea2cdec53362b5967580f3529e391853be649092c504bfbc4ffc75b1eb
7
+ data.tar.gz: 0e5e477471f9b0ab362e398bb30f901be9ab14db23ad6259e3b5e6311aae9cd6231f91dcdd4df4f4ea155fb2300e2a5aabc1cc6ef41e423e15bd6fe3c3c49c8e
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # PdfColoredPages
2
2
 
3
- TODO: Write a gem description
3
+ Ruby Gem to check which pages of a pdf contain color and output those.
4
4
 
5
5
  ## Installation
6
6
 
@@ -20,11 +20,27 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- TODO: Write usage instructions here
23
+ As Array:
24
+ ```ruby
25
+ PdfColoredPages.as_array(/path/to/pdf.pdf)
26
+ # returns [1,3,4]
27
+ ```
28
+
29
+ As Range String:
30
+ ```ruby
31
+ PdfColoredPages.as_range_string(/path/to/pdf.pdf)
32
+ # returns: 1,3-4
33
+ ```
34
+
35
+ Just Check:
36
+ ```ruby
37
+ PdfColoredPages.colored_pages?(/path/to/pdf.pdf)
38
+ # returns: true or false
39
+ ```
24
40
 
25
41
  ## Contributing
26
42
 
27
- 1. Fork it ( https://github.com/[my-github-username]/pdf_colored_pages/fork )
43
+ 1. Fork it ( https://github.com/RedRoosterMobile/pdf-colored-pages/fork )
28
44
  2. Create your feature branch (`git checkout -b my-new-feature`)
29
45
  3. Commit your changes (`git commit -am 'Add some feature'`)
30
46
  4. Push to the branch (`git push origin my-new-feature`)
@@ -1,3 +1,3 @@
1
1
  module PdfColoredPages
2
- VERSION = "0.0.1"
2
+ VERSION = '0.0.2'
3
3
  end
@@ -1,4 +1,4 @@
1
- require "pdf_colored_pages/version"
1
+ require 'pdf_colored_pages/version'
2
2
 
3
3
  module PdfColoredPages
4
4
  def self.as_range_string (pdf_file)
@@ -18,7 +18,7 @@ module PdfColoredPages
18
18
 
19
19
  def self.get_ghostscript_output(pdf_file)
20
20
  unless File.exist? pdf_file
21
- # throw error
21
+ raise "File '#{pdf_file}' not found"
22
22
  end
23
23
  gs_output = `gs -o - -sDEVICE=inkcov #{pdf_file}`
24
24
  GhostScriptParser.new gs_output
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ['lib']
20
20
 
21
- spec.required_ruby_version = '>= 2.1.0'
21
+ spec.required_ruby_version = '>= 1.9.3'
22
22
  spec.add_development_dependency 'bundler', '~> 1.7'
23
23
  spec.add_development_dependency 'rake', '~> 10.0'
24
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdf_colored_pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Ranker
@@ -65,7 +65,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 2.1.0
68
+ version: 1.9.3
69
69
  required_rubygems_version: !ruby/object:Gem::Requirement
70
70
  requirements:
71
71
  - - ">="