diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-06-19 18:38:07 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-06-19 18:38:07 +0200 |
commit | c6c8cb17afbaee0ccf1373d5b866d2d46efe4fcc (patch) | |
tree | d0d9a1fbb6efccc5ca4e5fb6016255698f342df7 | |
parent | 69cf3d1d494ee31fc9a2bd9300422ddb026f87bb (diff) |
rbotconfig: be aware that -git versions also have revision information
-rw-r--r-- | lib/rbot/rbotconfig.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rbot/rbotconfig.rb b/lib/rbot/rbotconfig.rb index 97f8173e..692113a9 100644 --- a/lib/rbot/rbotconfig.rb +++ b/lib/rbot/rbotconfig.rb @@ -27,12 +27,12 @@ class Bot begin debug "trying to load rubygems" require 'rubygems' - debug "loaded rubygems, looking for rbot-#$version" - if $version =~ /(.*)-(svn|git)\Z/ + if $version =~ /^(.*)-git( .*)?$/ version = $1 else version = $version end + debug "loaded rubygems, looking for rbot version #{$version} (rbot-#{version})" gemname, gem = Gem.source_index.find{|name, spec| spec.name == 'rbot' && spec.version.version == version} debug "got gem #{gem}" if gem && path = gem.full_gem_path |