lib/thingfish/metastore/pggraph.rb
changeset 15 38ea95105574
parent 13 686fbfe638bd
child 16 87b0a389b804
equal deleted inserted replaced
14:df6b0c7491b8 15:38ea95105574
    22 	# Load Sequel extensions/plugins
    22 	# Load Sequel extensions/plugins
    23 	Sequel.extension :migration
    23 	Sequel.extension :migration
    24 
    24 
    25 
    25 
    26 	# Package version
    26 	# Package version
    27 	VERSION = '0.3.0'
    27 	VERSION = '0.3.1'
    28 
    28 
    29 	# Version control revision
    29 	# Version control revision
    30 	REVISION = %q$Revision$
    30 	REVISION = %q$Revision: 686fbfe638bd $
    31 
    31 
    32 	# The data directory that contains migration files.
    32 	# The data directory that contains migration files.
    33 	#
    33 	#
    34 	DATADIR = if ENV['THINGFISH_METASTORE_PGGRAPH_DATADIR']
    34 	DATADIR = if ENV['THINGFISH_METASTORE_PGGRAPH_DATADIR']
    35 			Pathname.new( ENV['THINGFISH_METASTORE_PGGRAPH_DATADIR'] )
    35 				   Pathname( ENV['PEDIA_DATADIR'] )
    36 		elsif Gem.datadir( 'thingfish-metastore-pggraph' )
    36 			   elsif Gem.loaded_specs[ 'thingfish-metastore-pggraph' ] && File.exist?( Gem.loaded_specs['thingfish-metastore-pggraph'].datadir )
    37 			Pathname.new( Gem.datadir('thingfish-metastore-pggraph') )
    37 				   Pathname( Gem.loaded_specs['thingfish-metastore-pggraph'].datadir )
    38 		else
    38 			   else
    39 			Pathname.new( __FILE__ ).dirname.parent.parent.parent +
    39 				   Pathname( __FILE__ ).dirname.parent.parent.parent + 'data/thingfish-metastore-pggraph'
    40 				'data' + 'thingfish-metastore-pggraph'
    40 			   end
    41 		end
       
    42 
    41 
    43 	log_as :thingfish_metastore_pggraph
    42 	log_as :thingfish_metastore_pggraph
    44 
    43 
    45 	# Configurability API -- load the `pg_metastore`
    44 	# Configurability API -- load the `pg_metastore`
    46 	configurability 'thingfish.pggraph_metastore' do
    45 	configurability 'thingfish.pggraph_metastore' do