a062019c2926 — Mahlon E. Smith 1 year, 9 months ago
Retire hoe Rakefile.
5 files changed, 104 insertions(+), 112 deletions(-)

R History.md => 
R LICENSE.txt => 
R Manifest.txt => 
M README.md
M Rakefile
R History.md =>  +0 -4
@@ 1,4 0,0 @@ 
-## v0.1.0 [2016-11-16] Mahlon E. Smith <mahlon@martini.nu>
-
-Initial release.
-

          
R LICENSE.txt =>  +0 -20
@@ 1,20 0,0 @@ 
-Copyright (c) 2016 Mahlon E. Smith
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

          
R Manifest.txt =>  +0 -14
@@ 1,14 0,0 @@ 
-.document
-.editorconfig
-.rdoc_options
-.simplecov
-ChangeLog
-History.md
-LICENSE.txt
-Manifest.txt
-README.md
-Rakefile
-lib/thingfish/processor/pdf.rb
-spec/data/hi.pdf
-spec/spec_helper.rb
-spec/thingfish/processor/pdf_spec.rb

          
M README.md +11 -2
@@ 3,6 3,12 @@ 
 home
 : https:/bitbucket.org/mahlon/Thingfish-Processor-PDF
 
+ * home:
+   * http://code.martini.nu/thingfish-processor-pdf
+ * mirrors:
+   * https://github.com/mahlonsmith/Thingfish-Processor-PDF
+   * https://hg.sr.ht/~mahlon/Thingfish-Processor-PDF
+
 
 ## Description
 

          
@@ 32,8 38,11 @@ Simply enable this processor in the *Thi
 
 ## Contributing
 
-You can check out the current development source with Mercurial via its
-{project page}[http://bitbucket.org/mahlon/thingfish-processor-pdf].
+You can check out the current development source with Mercurial
+[here](http://code.martini.nu/thingfish-processor-pdf]), or via a mirror:
+
+ * github: https://github.com/mahlonsmith/Thingfish-Processor-PDF
+ * SourceHut: https://hg.sr.ht/~mahlon/Thingfish-Processor-PDF
 
 After checking out the source, run:
 

          
M Rakefile +93 -72
@@ 1,94 1,115 @@ 
 #!/usr/bin/env rake
+# vim: set nosta noet ts=4 sw=4:
+
+require 'rake/clean'
+require 'pathname'
 
-begin
-	require 'hoe'
-rescue LoadError
-	abort "This Rakefile requires hoe (gem install hoe)"
+BASEDIR = Pathname( __FILE__ ).dirname.relative_path_from( Pathname.pwd )
+LIBDIR  = BASEDIR + 'lib' + 'thingfish'
+CLOBBER.include( 'coverage' )
+
+$LOAD_PATH.unshift( LIBDIR.to_s )
+
+if Rake.application.options.trace
+    $trace = true
+    $stderr.puts '$trace is enabled'
 end
 
-GEMSPEC = 'thingfish-processor-pdf.gemspec'
+task :default => [ :spec, :docs, :package ]
 
 
-Hoe.plugin :mercurial
-Hoe.plugin :signing
-Hoe.plugin :deveiate
-
-Hoe.plugins.delete :rubyforge
-
-hoespec = Hoe.spec 'thingfish-processor-pdf' do |spec|
-	spec.readme_file = 'README.md'
-	spec.history_file = 'History.md'
-	spec.extra_rdoc_files = FileList[ '*.rdoc', '*.md' ]
-	spec.urls = {
-		home: 'https://bitbucket.org/mahlon/thingfish-processor-pdf'
-	}
+########################################################################
+### P A C K A G I N G
+########################################################################
 
-	spec.extra_rdoc_files = FileList[ '*.rdoc', '*.md' ]
-	spec.license 'BSD-3-Clause'
-
-	spec.developer 'Mahlon E. Smith', 'mahlon@martini.nu'
+require 'rubygems'
+require 'rubygems/package_task'
+spec = Gem::Specification.new do |s|
+	s.homepage     = 'http://projects.martini.nu/ruby-modules'
+	s.authors      = [ 'Mahlon E. Smith', 'Michael Granger' ]
+	s.email        = [ 'mahlon@martini.nu', 'ged@faeriemud.org' ]
+	s.platform     = Gem::Platform::RUBY
+	s.summary      = "Extract PDF metadata for the Thingfish digital asset manager."
+	s.name         = 'thingfish-processor-pdf'
+	s.version      = '0.1.0'
+	s.license      = 'BSD-3-Clause'
+	s.has_rdoc     = true
+	s.require_path = 'lib'
+	s.bindir       = 'bin'
+	s.files        = File.read( __FILE__ ).split( /^__END__/, 2 ).last.split
+	#s.executables  = %w[]
+	s.description  = <<-EOF
+		A basic pdf processor plugin for the Thingfish digital asset manager.
+		It extracts PDF metadata from uploaded files.
+	EOF
+	s.required_rubygems_version = '>= 2.0.3'
+	s.required_ruby_version = '>= 2.0.0'
 
-	spec.dependency 'thingfish',   '~> 0.5'
-	spec.dependency 'pdf-reader',  '~> 1.4'
-	spec.dependency 'loggability', '~> 0.11'
+	s.add_dependency 'thingfish', '~> 0.5'
+	s.add_dependency 'pdf-reader', '~> 1.4'
 
-	spec.dependency 'hoe-deveiate',            '~> 0.8', :developer
-	spec.dependency 'simplecov',               '~> 0.12', :developer
-	spec.dependency 'rdoc-generator-fivefish', '~> 0.1', :developer
+	s.add_development_dependency 'rspec',     '~> 3.7'
+	s.add_development_dependency 'simplecov', '~> 0.16'
+end
 
-	spec.require_ruby_version( '>=2.3.1' )
-	spec.hg_sign_tags = true if spec.respond_to?( :hg_sign_tags= )
-	spec.check_history_on_release = true if spec.respond_to?( :check_history_on_release= )
+Gem::PackageTask.new( spec ) do |pkg|
+	pkg.need_zip = true
+	pkg.need_tar = true
 end
 
 
-ENV['VERSION'] ||= hoespec.spec.version.to_s
-
-# Run the tests before checking in
-task 'hg:precheckin' => [ :check_history, :check_manifest, :gemspec, :spec ]
-
-task :test => :spec
-
-# Rebuild the ChangeLog immediately before release
-task :prerelease => 'ChangeLog'
-CLOBBER.include( 'ChangeLog' )
+########################################################################
+### D O C U M E N T A T I O N
+########################################################################
 
-desc "Build a coverage report"
-task :coverage do
-	ENV["COVERAGE"] = 'yes'
-	Rake::Task[:spec].invoke
-end
-CLOBBER.include( 'coverage' )
-
-
-# Use the fivefish formatter for docs generated from development checkout
-if File.directory?( '.hg' )
+begin
 	require 'rdoc/task'
 
-	Rake::Task[ 'docs' ].clear
-	RDoc::Task.new( 'docs' ) do |rdoc|
-	    rdoc.main = "README.rdoc"
-		rdoc.markup = 'markdown'
-	    rdoc.rdoc_files.include( "*.rdoc", "ChangeLog", "lib/**/*.rb" )
-	    rdoc.generator = :fivefish
-		rdoc.title = 'Thingfish-Processor-PDF'
-	    rdoc.rdoc_dir = 'doc'
+	desc 'Generate rdoc documentation'
+	RDoc::Task.new do |rdoc|
+		rdoc.name       = :docs
+		rdoc.rdoc_dir   = 'docs'
+		rdoc.main       = "README.rdoc"
+		rdoc.options    = [ '-f', 'fivefish' ]
+		rdoc.rdoc_files = [ 'lib', *FileList['*.rdoc'] ]
 	end
+
+	RDoc::Task.new do |rdoc|
+		rdoc.name       = :doc_coverage
+		rdoc.options    = [ '-C1' ]
+	end
+
+rescue LoadError
+	$stderr.puts "Omitting 'docs' tasks, rdoc doesn't seem to be installed."
 end
 
-task :gemspec => GEMSPEC
-file GEMSPEC => __FILE__
-task GEMSPEC do |task|
-	spec = $hoespec.spec
-	spec.files.delete( '.gemtest' )
-	spec.signing_key = nil
-	spec.cert_chain = Rake::FileList[ 'certs/*.pem' ].to_a
-	spec.version = "#{spec.version.bump}.pre#{Time.now.strftime("%Y%m%d%H%M%S")}"
-	File.open( task.name, 'w' ) do |fh|
-		fh.write( spec.to_ruby )
+
+########################################################################
+### T E S T I N G
+########################################################################
+
+begin
+	require 'rspec/core/rake_task'
+	task :test => :spec
+
+	desc "Run specs"
+	RSpec::Core::RakeTask.new do |t|
+		t.pattern = "spec/**/*_spec.rb"
 	end
-end
-CLOBBER.include( GEMSPEC.to_s )
+
+	desc "Build a coverage report"
+	task :coverage do
+		ENV[ 'COVERAGE' ] = "yep"
+		Rake::Task[ :spec ].invoke
+	end
 
-task :default => :gemspec
+rescue LoadError
+	$stderr.puts "Omitting testing tasks, rspec doesn't seem to be installed."
+end
+
 
+########################################################################
+### M A N I F E S T
+########################################################################
+__END__
+lib/thingfish/processor/pdf.rb