pdf_colored_pages 0.0.2 → 0.0.3

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: d970871feee27629868eeba259fbf35754d73d76
4
- data.tar.gz: 2412be1378cd4b1bf07dc6ef2a464aea234645c9
3
+ metadata.gz: 992231fe5d9dfcd240a975625de48fc7d8e729b6
4
+ data.tar.gz: a4a973c86294088083cade3f9f1d9bf2fe27f491
5
5
  SHA512:
6
- metadata.gz: 55ec9488034137b21368ea79391a56b8a537ee159c132da3bd18de88fc19b268688dafea2cdec53362b5967580f3529e391853be649092c504bfbc4ffc75b1eb
7
- data.tar.gz: 0e5e477471f9b0ab362e398bb30f901be9ab14db23ad6259e3b5e6311aae9cd6231f91dcdd4df4f4ea155fb2300e2a5aabc1cc6ef41e423e15bd6fe3c3c49c8e
6
+ metadata.gz: 434a5562ce84a3823dddcd67b2a4d47d4fc0cbf493d524f69e8e5bee9632664ea6020998ec3e78e44cc55db2228aa2fcea5a89e7ae9039dd076d330534445438
7
+ data.tar.gz: 9e10047fb399a206d835506b1696278b9421f4f72e78e5549021c503e3b692eaaefb2aa53fe5647f4f8532a4cb62226c9502f64d0baa1f5dc1556e87806da38d
data/README.md CHANGED
@@ -38,6 +38,10 @@ PdfColoredPages.colored_pages?(/path/to/pdf.pdf)
38
38
  # returns: true or false
39
39
  ```
40
40
 
41
+ Test:
42
+
43
+ $ rake test
44
+
41
45
  ## Contributing
42
46
 
43
47
  1. Fork it ( https://github.com/RedRoosterMobile/pdf-colored-pages/fork )
data/README.rdoc ADDED
@@ -0,0 +1,3 @@
1
+ = PdfColoredPages
2
+
3
+ This project rocks and uses MIT-LICENSE.
data/Rakefile CHANGED
@@ -1,2 +1,21 @@
1
1
  require "bundler/gem_tasks"
2
2
 
3
+ require 'rake/testtask'
4
+ require 'rdoc/task'
5
+
6
+ RDoc::Task.new(:rdoc) do |rdoc|
7
+ rdoc.rdoc_dir = 'rdoc'
8
+ rdoc.title = 'PdfGsColoredPages'
9
+ rdoc.options << '--line-numbers'
10
+ rdoc.rdoc_files.include('README.rdoc')
11
+ rdoc.rdoc_files.include('lib/**/*.rb')
12
+ end
13
+
14
+ Rake::TestTask.new(:test) do |t|
15
+ t.libs << 'test'
16
+ t.pattern = 'test/**/*_test.rb'
17
+ t.verbose = false
18
+ end
19
+
20
+ desc "Run tests"
21
+ task :default => :test
@@ -1,3 +1,3 @@
1
1
  module PdfColoredPages
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
data/test/combined.pdf ADDED
Binary file
@@ -0,0 +1,20 @@
1
+ require 'test/unit'
2
+ require 'pdf_colored_pages'
3
+
4
+ class PdfColoredPagesTest < Test::Unit::TestCase
5
+
6
+ TEST_PDF = "#{Dir.pwd}/test/combined.pdf"
7
+
8
+ def test_array
9
+ assert_equal [1,3,4], PdfColoredPages.as_array(TEST_PDF)
10
+ end
11
+
12
+ def test_string_range
13
+ assert_equal '1,3-4', PdfColoredPages.as_range_string(TEST_PDF)
14
+ end
15
+
16
+ def test_check
17
+ assert PdfColoredPages.as_range_string(TEST_PDF)
18
+ end
19
+
20
+ 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.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Ranker
@@ -49,10 +49,13 @@ files:
49
49
  - Gemfile
50
50
  - LICENSE.txt
51
51
  - README.md
52
+ - README.rdoc
52
53
  - Rakefile
53
54
  - lib/pdf_colored_pages.rb
54
55
  - lib/pdf_colored_pages/version.rb
55
56
  - pdf_colored_pages.gemspec
57
+ - test/combined.pdf
58
+ - test/pdf_colored_pages_test.rb
56
59
  homepage: http://redroostermobile.com
57
60
  licenses:
58
61
  - MIT
@@ -77,4 +80,6 @@ rubygems_version: 2.2.2
77
80
  signing_key:
78
81
  specification_version: 4
79
82
  summary: Get the colored pages of a pdf
80
- test_files: []
83
+ test_files:
84
+ - test/combined.pdf
85
+ - test/pdf_colored_pages_test.rb