Update for deprecated Gem.datadir call.
FossilOrigin-Name: 8d97b90ac882bcce5f26f2030684ec0a7b37f19d4e686dab8fef94c76df474e1
This commit is contained in:
parent
3c487706ff
commit
875623af07
1 changed files with 6 additions and 6 deletions
|
|
@ -9,10 +9,10 @@ module Symphony::Metronome
|
|||
Configurability
|
||||
|
||||
# Library version constant
|
||||
VERSION = '0.2.2'
|
||||
VERSION = '0.2.3'
|
||||
|
||||
# Version-control revision constant
|
||||
REVISION = %q$Revision$
|
||||
REVISION = %q$Revision: e3d11b2c9e48 $
|
||||
|
||||
# The name of the environment variable to check for config file overrides
|
||||
CONFIG_ENV = 'METRONOME_CONFIG'
|
||||
|
|
@ -23,11 +23,11 @@ module Symphony::Metronome
|
|||
# The data directory that contains migration files.
|
||||
#
|
||||
DATADIR = if ENV['METRONOME_DATADIR']
|
||||
Pathname.new( ENV['METRONOME_DATADIR'] )
|
||||
elsif Gem.datadir( 'symphony-metronome' )
|
||||
Pathname.new( Gem.datadir('symphony-metronome') )
|
||||
Pathname( ENV['METRONOME_DATADIR'] )
|
||||
elsif Gem.loaded_specs[ 'symphony-metronome' ] && File.exist?( Gem.loaded_specs['symphony-metronome'].datadir )
|
||||
Pathname( Gem.loaded_specs['symphony-metronome'].datadir )
|
||||
else
|
||||
Pathname.new( __FILE__ ).dirname.parent.parent + 'data/symphony-metronome'
|
||||
Pathname( __FILE__ ).dirname.parent.parent + 'data/symphony-metronome'
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue