# HG changeset patch # User Mahlon E. Smith # Date 1479165466 28800 # Node ID 8388c2d1d7afc1a8c56a026495aa30b5ac2bbec7 # Parent 47425483883e1bc31f4d32bb5820b0954d153706 Additional cleanups for release. diff -r 47425483883e -r 8388c2d1d7af .hgignore --- a/.hgignore Mon Nov 14 14:43:41 2016 -0800 +++ b/.hgignore Mon Nov 14 15:17:46 2016 -0800 @@ -2,3 +2,4 @@ ChangeLog pkg/ config.yml +docs/ diff -r 47425483883e -r 8388c2d1d7af History.md --- a/History.md Mon Nov 14 14:43:41 2016 -0800 +++ b/History.md Mon Nov 14 15:17:46 2016 -0800 @@ -1,3 +1,8 @@ +## v0.1.3 [2016-11-14] Mahlon E. Smith + +Various bugfixes, first public release. + + ## v0.1.0 [2015-11-05] Mahlon E. Smith Initial release. diff -r 47425483883e -r 8388c2d1d7af LICENSE.rdoc --- a/LICENSE.rdoc Mon Nov 14 14:43:41 2016 -0800 +++ b/LICENSE.rdoc Mon Nov 14 15:17:46 2016 -0800 @@ -1,4 +1,4 @@ -Copyright (c) 2007-2014, Michael Granger and Mahlon E. Smith. +Copyright (c) 2007-2016, Michael Granger and Mahlon E. Smith. All rights reserved. diff -r 47425483883e -r 8388c2d1d7af Manifest.txt --- a/Manifest.txt Mon Nov 14 14:43:41 2016 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -.document -.gems -.simplecov -ChangeLog -History.md -LICENSE.rdoc -Manifest.txt -README.md -Rakefile -data/thingfish-metastore-pggraph/migrations/20151102_initial.rb -lib/thingfish/metastore/pggraph.rb -lib/thingfish/metastore/pggraph/edge.rb -lib/thingfish/metastore/pggraph/node.rb -spec/spec_helper.rb -spec/thingfish/metastore/pggraph_spec.rb -thingfish-metastore-pggraph.gemspec diff -r 47425483883e -r 8388c2d1d7af README.md --- a/README.md Mon Nov 14 14:43:41 2016 -0800 +++ b/README.md Mon Nov 14 15:17:46 2016 -0800 @@ -5,8 +5,8 @@ ## Description This is a metadata storage plugin for the Thingfish digital asset -manager. It provides persistent storage for uploaded data to a -PostgreSQL table. +manager. It provides persistent storage for uploaded data to +PostgreSQL tables. It is heavily based on the regular PG metastore, however it differs by storing objects as nodes, and their relations as edges. diff -r 47425483883e -r 8388c2d1d7af Rakefile --- a/Rakefile Mon Nov 14 14:43:41 2016 -0800 +++ b/Rakefile Mon Nov 14 15:17:46 2016 -0800 @@ -1,79 +1,128 @@ #!/usr/bin/env rake +# vim: set nosta noet ts=4 sw=4: + +require 'pathname' -begin - require 'hoe' -rescue LoadError - abort "This Rakefile requires hoe (gem install hoe)" +PROJECT = 'thingfish-metastore-pggraph' +BASEDIR = Pathname.new( __FILE__ ).expand_path.dirname.relative_path_from( Pathname.getwd ) +LIBDIR = BASEDIR + 'lib' +LIBFILE = LIBDIR + ( PROJECT.gsub( '-', '/' ) + '.rb' ) + +if Rake.application.options.trace + $trace = true + $stderr.puts '$trace is enabled' end -GEMSPEC = 'thingfish-metastore-pggraph.gemspec' +# parse the current library version +$version = LIBFILE.read.split(/\n/). + select{|line| line =~ /VERSION =/}.first.match(/([\d|.]+)/)[1] + +task :default => [ :spec, :docs, :package ] -Hoe.plugin :mercurial -Hoe.plugin :signing -Hoe.plugin :deveiate -Hoe.plugin :bundler - -Hoe.plugins.delete :rubyforge - -hoespec = Hoe.spec 'thingfish-metastore-pggraph' do |spec| - spec.readme_file = 'README.md' - spec.history_file = 'History.md' - spec.extra_rdoc_files = FileList[ '*.rdoc' ] - spec.license 'BSD-3-Clause' - spec.urls = { - home: 'https://bitbucket.org/mahlon/thingfish-metastore-pggraph', - code: 'https://bitbucket.org/mahlon/thingfish-metastore-pggraph' - } +######################################################################## +### P A C K A G I N G +######################################################################## - if File.directory?( '.hg' ) - spec.spec_extras[:rdoc_options] = ['-f', 'fivefish', '-t', 'Thingfish-Metastore-PgGraph'] - end - - spec.developer 'Michael Granger', 'ged@FaerieMUD.org' - spec.developer 'Mahlon E. Smith', 'mahlon@martini.nu' +require 'rubygems' +require 'rubygems/package_task' +spec = Gem::Specification.new do |s| + s.email = 'mahlon@martini.nu' + s.homepage = 'https://bitbucket.org/mahlon/thingfish-metastore-pggraph' + s.authors = [ 'Mahlon E. Smith ', 'Michael Granger ' ] + s.platform = Gem::Platform::RUBY + s.summary = "Graph DDL storage for Thingfish metadata." + s.name = PROJECT + s.version = $version + 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 +This is a metadata storage plugin for the Thingfish digital asset +manager. It provides persistent storage for uploaded data to PostgreSQL +tables. - spec.dependency 'thingfish', '~> 0.5' - spec.dependency 'loggability', '~> 0.11' - spec.dependency 'configurability', '~> 2.2' - spec.dependency 'sequel', '~> 4.35' - spec.dependency 'pg', '~> 0.19' +It is heavily based on the regular PG metastore, however it differs by +storing objects as nodes, and their relations as edges. + EOF + s.required_ruby_version = '>= 2.3' - spec.dependency 'hoe-deveiate', '~> 0.8', :development - spec.dependency 'rspec', '~> 3.0', :development + s.add_dependency 'thingfish', '~> 0.5' + s.add_dependency 'loggability', '~> 0.11' + s.add_dependency 'configurability', '~> 2.2' + s.add_dependency 'sequel', '~> 4.35' + s.add_dependency 'pg', '~> 0.19' +end - spec.require_ruby_version( '>=2.3.0' ) - spec.hg_sign_tags = true if spec.respond_to?( :hg_sign_tags= ) +Gem::PackageTask.new( spec ) do |pkg| + pkg.need_zip = true + pkg.need_tar = true end -ENV['VERSION'] ||= hoespec.spec.version.to_s +######################################################################## +### D O C U M E N T A T I O N +######################################################################## -# Run the tests before checking in -task 'hg:precheckin' => [ :check_history, :check_manifest, :spec ] +begin + require 'rdoc/task' -# Rebuild the ChangeLog immediately before release -task :prerelease => 'ChangeLog' -CLOBBER.include( 'ChangeLog' ) + desc 'Generate rdoc documentation' + RDoc::Task.new do |rdoc| + rdoc.name = :docs + rdoc.rdoc_dir = 'docs' + rdoc.main = "README.md" + rdoc.rdoc_files = [ 'lib', *FileList['*.md'] ] -desc "Build a coverage report" -task :coverage do - ENV["COVERAGE"] = 'yes' - Rake::Task[:spec].invoke + if File.directory?( '.hg' ) + rdoc.options = [ '-f', 'fivefish' ] + end + 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__ do |task| - spec = $hoespec.spec - spec.files.delete( '.gemtest' ) - spec.signing_key = nil - spec.version = "#{spec.version.bump}.0.pre#{Time.now.strftime("%Y%m%d%H%M%S")}" - File.open( task.name, 'w' ) do |fh| - fh.write( spec.to_ruby ) - end +######################################################################## +### 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 + + desc "Build a coverage report" + task :coverage do + ENV[ 'COVERAGE' ] = "yep" + Rake::Task[ :spec ].invoke + end + +rescue LoadError + $stderr.puts "Omitting testing tasks, rspec doesn't seem to be installed." end -task :default => :gemspec -CLOBBER.include( GEMSPEC.to_s ) + +######################################################################## +### M A N I F E S T +######################################################################## +__END__ +data/thingfish-metastore-pggraph/migrations/20151102_initial.rb +lib/thingfish/metastore/pggraph/edge.rb +lib/thingfish/metastore/pggraph/node.rb +lib/thingfish/metastore/pggraph.rb + diff -r 47425483883e -r 8388c2d1d7af thingfish-metastore-pggraph.gemspec --- a/thingfish-metastore-pggraph.gemspec Mon Nov 14 14:43:41 2016 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -# -*- encoding: utf-8 -*- -# stub: thingfish-metastore-pggraph 0.2.0.pre20161114143916 ruby lib - -Gem::Specification.new do |s| - s.name = "thingfish-metastore-pggraph" - s.version = "0.2.0.pre20161114143916" - - s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version= - s.require_paths = ["lib"] - s.authors = ["Michael Granger", "Mahlon E. Smith"] - s.date = "2016-11-14" - s.description = "This is a metadata storage plugin for the Thingfish digital asset\nmanager. It provides persistent storage for uploaded data to a\nPostgreSQL table.\n\nIt is heavily based on the regular PG metastore, however it differs by\nstoring objects as nodes, and their relations as edges." - s.email = ["ged@FaerieMUD.org", "mahlon@martini.nu"] - s.extra_rdoc_files = ["History.md", "LICENSE.rdoc", "Manifest.txt", "README.md", "LICENSE.rdoc"] - s.files = [".document", ".gems", ".simplecov", "ChangeLog", "History.md", "LICENSE.rdoc", "Manifest.txt", "README.md", "Rakefile", "data/thingfish-metastore-pggraph/migrations/20151102_initial.rb", "lib/thingfish/metastore/pggraph.rb", "lib/thingfish/metastore/pggraph/edge.rb", "lib/thingfish/metastore/pggraph/node.rb", "spec/spec_helper.rb", "spec/thingfish/metastore/pggraph_spec.rb", "thingfish-metastore-pggraph.gemspec"] - s.homepage = "https://bitbucket.org/mahlon/thingfish-metastore-pggraph" - s.licenses = ["BSD-3-Clause"] - s.rdoc_options = ["-f", "fivefish", "-t", "Thingfish-Metastore-PgGraph"] - s.required_ruby_version = Gem::Requirement.new(">= 2.3.0") - s.rubygems_version = "2.5.1" - s.summary = "This is a metadata storage plugin for the Thingfish digital asset manager" - - if s.respond_to? :specification_version then - s.specification_version = 4 - - if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then - s.add_runtime_dependency(%q, ["~> 0.5"]) - s.add_runtime_dependency(%q, ["~> 0.11"]) - s.add_runtime_dependency(%q, ["~> 2.2"]) - s.add_runtime_dependency(%q, ["~> 4.35"]) - s.add_runtime_dependency(%q, ["~> 0.19"]) - s.add_development_dependency(%q, ["~> 1.4"]) - s.add_development_dependency(%q, ["~> 0.2"]) - s.add_development_dependency(%q, ["~> 0.8"]) - s.add_development_dependency(%q, ["~> 3.0"]) - s.add_development_dependency(%q, ["~> 4.0"]) - s.add_development_dependency(%q, ["~> 3.15"]) - else - s.add_dependency(%q, ["~> 0.5"]) - s.add_dependency(%q, ["~> 0.11"]) - s.add_dependency(%q, ["~> 2.2"]) - s.add_dependency(%q, ["~> 4.35"]) - s.add_dependency(%q, ["~> 0.19"]) - s.add_dependency(%q, ["~> 1.4"]) - s.add_dependency(%q, ["~> 0.2"]) - s.add_dependency(%q, ["~> 0.8"]) - s.add_dependency(%q, ["~> 3.0"]) - s.add_dependency(%q, ["~> 4.0"]) - s.add_dependency(%q, ["~> 3.15"]) - end - else - s.add_dependency(%q, ["~> 0.5"]) - s.add_dependency(%q, ["~> 0.11"]) - s.add_dependency(%q, ["~> 2.2"]) - s.add_dependency(%q, ["~> 4.35"]) - s.add_dependency(%q, ["~> 0.19"]) - s.add_dependency(%q, ["~> 1.4"]) - s.add_dependency(%q, ["~> 0.2"]) - s.add_dependency(%q, ["~> 0.8"]) - s.add_dependency(%q, ["~> 3.0"]) - s.add_dependency(%q, ["~> 4.0"]) - s.add_dependency(%q, ["~> 3.15"]) - end -end