From 7f42c4523570cd48e67a889aea933a277d7d2a31 Mon Sep 17 00:00:00 2001 From: Matthias Hecker Date: Fri, 27 Mar 2020 22:31:25 +0100 Subject: gem: support for newest ruby versions --- lib/rbot/rbotconfig.rb | 6 +++--- rbot.gemspec | 8 +++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/rbot/rbotconfig.rb b/lib/rbot/rbotconfig.rb index eb55f965..d6f6bcde 100644 --- a/lib/rbot/rbotconfig.rb +++ b/lib/rbot/rbotconfig.rb @@ -33,9 +33,9 @@ class Bot 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 + gem = Gem::Specification.find{|spec| spec.name == 'rbot' && spec.version.version == version} + if gem + path = gem.full_gem_path debug "installed via rubygems to #{path}" @@datadir = "#{path}/data/rbot" @@coredir = "#{path}/lib/rbot/core" diff --git a/rbot.gemspec b/rbot.gemspec index d023609d..7792c3dd 100644 --- a/rbot.gemspec +++ b/rbot.gemspec @@ -10,6 +10,7 @@ Gem::Specification.new do |s| A modular ruby IRC bot specifically designed for ease of extension via plugins. EOF s.requirements << 'Ruby, version 1.9.3 (or newer)' + s.licenses = ['GPL-2.0'] s.files = FileList[ 'lib/**/*.rb', @@ -34,17 +35,14 @@ Gem::Specification.new do |s| s.bindir = 'bin' s.executables = ['rbot', 'rbotdb'] - s.default_executable = 'rbot' s.extensions = 'Rakefile' -# s.autorequire = 'rbot/ircbot' - s.has_rdoc = true s.rdoc_options = ['--exclude', 'post-install.rb', '--title', 'rbot API Documentation', '--main', 'README.rdoc', 'README.rdoc'] s.author = 'Tom Gilbert' s.email = 'tom@linuxbrit.co.uk' - s.homepage = 'http://ruby-rbot.org' - s.rubyforge_project = 'rbot' + s.homepage = 'https://ruby-rbot.org' + end -- cgit v1.2.3