From 53cbab5aac5a77910a84cb5964eb091a6d59979e Mon Sep 17 00:00:00 2001 From: "Tobias L. Maier" Date: Wed, 19 Feb 2014 15:01:31 +0100 Subject: [PATCH 1/8] Use https://github.com --- README | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index 34ce202..0836224 100755 --- a/README +++ b/README @@ -18,5 +18,5 @@ http://documentcloud.github.com/docsplit/ To suggest a feature or report a bug: - http://github.com/documentcloud/docsplit/issues/ + https://github.com/documentcloud/docsplit/issues/ diff --git a/index.html b/index.html index 981c34d..c6ff78f 100755 --- a/index.html +++ b/index.html @@ -90,7 +90,7 @@

Docsplit

- Docsplit + Docsplit is a command-line utility and Ruby library for splitting apart documents into their component parts: searchable UTF-8 plain text via OCR if necessary, page images or thumbnails in any format, From c874c2b9fd7e09f2814e4b7d435d2b87409e99e4 Mon Sep 17 00:00:00 2001 From: "Tobias L. Maier" Date: Wed, 19 Feb 2014 15:05:01 +0100 Subject: [PATCH 2/8] Store version number on one place --- docsplit.gemspec | 6 ++++-- lib/docsplit.rb | 2 -- lib/docsplit/version.rb | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 lib/docsplit/version.rb diff --git a/docsplit.gemspec b/docsplit.gemspec index 97b06de..2b931dc 100755 --- a/docsplit.gemspec +++ b/docsplit.gemspec @@ -1,6 +1,8 @@ +require 'docsplit/version' + Gem::Specification.new do |s| s.name = 'docsplit' - s.version = '0.7.4' # Keep version in sync with docsplit.rb + s.version = Docsplit::VERSION s.date = '2014-02-16' s.homepage = "http://documentcloud.github.com/docsplit/" @@ -22,4 +24,4 @@ Gem::Specification.new do |s| s.files = Dir['build/**/*', 'lib/**/*', 'bin/*', 'vendor/**/*', 'docsplit.gemspec', 'LICENSE', 'README'] -end \ No newline at end of file +end diff --git a/lib/docsplit.rb b/lib/docsplit.rb index 8d0d41b..4f9cab5 100755 --- a/lib/docsplit.rb +++ b/lib/docsplit.rb @@ -5,8 +5,6 @@ # The Docsplit module delegates to the Java PDF extractors. module Docsplit - VERSION = '0.7.4' # Keep in sync with gemspec. - ESCAPE = lambda {|x| Shellwords.shellescape(x) } ROOT = File.expand_path(File.dirname(__FILE__) + '/..') diff --git a/lib/docsplit/version.rb b/lib/docsplit/version.rb new file mode 100644 index 0000000..c731581 --- /dev/null +++ b/lib/docsplit/version.rb @@ -0,0 +1,3 @@ +module Docsplit + VERSION = '0.7.4' +end From 5fe287a044b3a82b14a8e8c623e0e76fa3ecc782 Mon Sep 17 00:00:00 2001 From: "Tobias L. Maier" Date: Wed, 19 Feb 2014 15:27:18 +0100 Subject: [PATCH 3/8] Add rake as development dependency --- docsplit.gemspec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docsplit.gemspec b/docsplit.gemspec index 2b931dc..c6cb57b 100755 --- a/docsplit.gemspec +++ b/docsplit.gemspec @@ -24,4 +24,6 @@ Gem::Specification.new do |s| s.files = Dir['build/**/*', 'lib/**/*', 'bin/*', 'vendor/**/*', 'docsplit.gemspec', 'LICENSE', 'README'] + + s.add_development_dependency 'rake' end From 71e3c709bd160528189452b4174f2cb44692f027 Mon Sep 17 00:00:00 2001 From: "Tobias L. Maier" Date: Wed, 19 Feb 2014 15:10:27 +0100 Subject: [PATCH 4/8] Add bundler gem tasks to Rakefile --- Rakefile | 1 + docsplit.gemspec | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Rakefile b/Rakefile index e6c5153..31949ee 100755 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,6 @@ require 'fileutils' require 'rake/testtask' +require 'bundler/gem_tasks' desc 'Run all tests' task :test do diff --git a/docsplit.gemspec b/docsplit.gemspec index c6cb57b..cbe280e 100755 --- a/docsplit.gemspec +++ b/docsplit.gemspec @@ -1,3 +1,5 @@ +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'docsplit/version' Gem::Specification.new do |s| @@ -25,5 +27,6 @@ Gem::Specification.new do |s| s.files = Dir['build/**/*', 'lib/**/*', 'bin/*', 'vendor/**/*', 'docsplit.gemspec', 'LICENSE', 'README'] + s.add_development_dependency 'bundler', '~> 1.5' s.add_development_dependency 'rake' end From 867694440a826375decb5c85b825e683f215d557 Mon Sep 17 00:00:00 2001 From: "Tobias L. Maier" Date: Wed, 19 Feb 2014 15:13:06 +0100 Subject: [PATCH 5/8] Remove gem:install and gem:uninstall from Rakefile Obsolete since we're using bundler gem tasks now --- Rakefile | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/Rakefile b/Rakefile index 31949ee..469c90f 100755 --- a/Rakefile +++ b/Rakefile @@ -8,19 +8,4 @@ task :test do Dir['./test/*/**/test_*.rb'].each {|test| require test } end -namespace :gem do - - desc 'Build and install the docsplit gem' - task :install do - sh "gem build docsplit.gemspec" - sh "sudo gem install #{Dir['*.gem'].join(' ')} --local --no-ri --no-rdoc" - end - - desc 'Uninstall the docsplit gem' - task :uninstall do - sh "sudo gem uninstall -x docsplit" - end - -end - task :default => :test From 792728037c00dcee07d100c64dbbb2208b30b773 Mon Sep 17 00:00:00 2001 From: "Tobias L. Maier" Date: Wed, 19 Feb 2014 15:14:39 +0100 Subject: [PATCH 6/8] Remove date from gemspec Date shall not be set manually. Will be set automatically when the gem is packaged. --- docsplit.gemspec | 1 - 1 file changed, 1 deletion(-) diff --git a/docsplit.gemspec b/docsplit.gemspec index cbe280e..33c225e 100755 --- a/docsplit.gemspec +++ b/docsplit.gemspec @@ -5,7 +5,6 @@ require 'docsplit/version' Gem::Specification.new do |s| s.name = 'docsplit' s.version = Docsplit::VERSION - s.date = '2014-02-16' s.homepage = "http://documentcloud.github.com/docsplit/" s.summary = "Break Apart Documents into Images, Text, Pages and PDFs" From 8b0cb8b6b9a5316bf00aeba2dffc85153eb2b560 Mon Sep 17 00:00:00 2001 From: "Tobias L. Maier" Date: Wed, 19 Feb 2014 15:19:38 +0100 Subject: [PATCH 7/8] Add requirements to gemspec file See http://guides.rubygems.org/specification-reference/#requirements --- docsplit.gemspec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docsplit.gemspec b/docsplit.gemspec index 33c225e..3fd02a2 100755 --- a/docsplit.gemspec +++ b/docsplit.gemspec @@ -28,4 +28,11 @@ Gem::Specification.new do |s| s.add_development_dependency 'bundler', '~> 1.5' s.add_development_dependency 'rake' + + s.requirements << 'GraphicsMagick' + s.requirements << 'Poppler' + s.requirements << 'Ghostscript (optional)' + s.requirements << 'Tesseract (optional)' + s.requirements << 'pdftk (optional)' + s.requirements << 'LibreOffice (optional)' end From e7e4244ae085820accce5824bfb3223f2e598129 Mon Sep 17 00:00:00 2001 From: "Tobias L. Maier" Date: Wed, 19 Feb 2014 15:25:34 +0100 Subject: [PATCH 8/8] Use documentcloud.github.io Domain has changed. See https://github.com/blog/1452-new-github-pages-domain-github-io --- README | 2 +- docsplit.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index 0836224..286d0c8 100755 --- a/README +++ b/README @@ -15,7 +15,7 @@ gem install docsplit For documentation, usage, and examples, see: - http://documentcloud.github.com/docsplit/ + http://documentcloud.github.io/docsplit/ To suggest a feature or report a bug: https://github.com/documentcloud/docsplit/issues/ diff --git a/docsplit.gemspec b/docsplit.gemspec index 3fd02a2..2cf81d6 100755 --- a/docsplit.gemspec +++ b/docsplit.gemspec @@ -6,7 +6,7 @@ Gem::Specification.new do |s| s.name = 'docsplit' s.version = Docsplit::VERSION - s.homepage = "http://documentcloud.github.com/docsplit/" + s.homepage = 'http://documentcloud.github.io/docsplit/' s.summary = "Break Apart Documents into Images, Text, Pages and PDFs" s.description = <<-EOS Docsplit is a command-line utility and Ruby library for splitting apart