]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
gem: support for newest ruby versions
authorMatthias Hecker <mail@apoc.cc>
Fri, 27 Mar 2020 21:31:25 +0000 (22:31 +0100)
committerMatthias Hecker <mail@apoc.cc>
Fri, 27 Mar 2020 21:31:25 +0000 (22:31 +0100)
lib/rbot/rbotconfig.rb
rbot.gemspec

index eb55f96533e24eda007f39ce61e8c5c268b7e2f2..d6f6bcdeca67dfa74a38d2fac8f82f152991aba6 100644 (file)
@@ -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"
index d023609d2ed2c3881d7400a300000b096f28f570..7792c3dd8d893659b98ff3a9db6b8fb7ce0223d5 100644 (file)
@@ -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