Fix deprecated warning.(Config to RbConfig) #29

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+6 −6
Split
View
@@ -2,9 +2,9 @@ def gem_opt
defined?(Gem) ? "-rubygems" : ""
end
-def ruby
+def ruby_bin
require 'rbconfig'
- File.join([Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name']]) << Config::CONFIG['EXEEXT']
+ File.join([RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name']]) << RbConfig::CONFIG['EXEEXT']
end
# --------------------------------------------------
@@ -17,7 +17,7 @@ namespace(:test) do
desc "Run all tests"
task(:all) do
tests = Dir['test/**/test_*.rb'] - ['test/test_helper.rb']
- exit system(%Q{#{ruby} #{gem_opt} -I.:lib -e"%w( #{tests.join(' ')} ).each {|file| require file }"})
+ exit system(%Q{#{ruby_bin} #{gem_opt} -I.:lib -e"%w( #{tests.join(' ')} ).each {|file| require file }"})
end
desc "Run all tests on multiple ruby versions (requires rvm)"
View
@@ -91,10 +91,10 @@ def debug(msg)
#
# @example
#
- # Config::CONFIG['host_os'] #=> 'linux-gnu'
+ # RbConfig::CONFIG['host_os'] #=> 'linux-gnu'
# Watchr.handler #=> Watchr::EventHandler::Unix
#
- # Config::CONFIG['host_os'] #=> 'cygwin'
+ # RbConfig::CONFIG['host_os'] #=> 'cygwin'
# Watchr.handler #=> Watchr::EventHandler::Portable
#
# ENV['HANDLER'] #=> 'unix'
@@ -108,7 +108,7 @@ def debug(msg)
#
def handler
@handler ||=
- case ENV['HANDLER'] || Config::CONFIG['host_os']
+ case ENV['HANDLER'] || RbConfig::CONFIG['host_os']
when /darwin|mach|osx|fsevents?/i
if Watchr::HAVE_FSE
Watchr::EventHandler::Darwin