# HG changeset patch # User Mahlon E. Smith # Date 1543515618 28800 # Node ID 38ea95105574250fed7e38157407120c55673af5 # Parent df6b0c7491b8d8b8d53b04312319b0edf041a1bd Stop using Gem.datadir. diff -r df6b0c7491b8 -r 38ea95105574 lib/thingfish/metastore/pggraph.rb --- a/lib/thingfish/metastore/pggraph.rb Wed Jan 17 13:33:33 2018 -0800 +++ b/lib/thingfish/metastore/pggraph.rb Thu Nov 29 10:20:18 2018 -0800 @@ -24,21 +24,20 @@ # Package version - VERSION = '0.3.0' + VERSION = '0.3.1' # Version control revision - REVISION = %q$Revision$ + REVISION = %q$Revision: 686fbfe638bd $ # The data directory that contains migration files. # DATADIR = if ENV['THINGFISH_METASTORE_PGGRAPH_DATADIR'] - Pathname.new( ENV['THINGFISH_METASTORE_PGGRAPH_DATADIR'] ) - elsif Gem.datadir( 'thingfish-metastore-pggraph' ) - Pathname.new( Gem.datadir('thingfish-metastore-pggraph') ) - else - Pathname.new( __FILE__ ).dirname.parent.parent.parent + - 'data' + 'thingfish-metastore-pggraph' - end + Pathname( ENV['PEDIA_DATADIR'] ) + elsif Gem.loaded_specs[ 'thingfish-metastore-pggraph' ] && File.exist?( Gem.loaded_specs['thingfish-metastore-pggraph'].datadir ) + Pathname( Gem.loaded_specs['thingfish-metastore-pggraph'].datadir ) + else + Pathname( __FILE__ ).dirname.parent.parent.parent + 'data/thingfish-metastore-pggraph' + end log_as :thingfish_metastore_pggraph