diff options
author | danielsdeleo <dan@opscode.com> | 2013-07-12 07:25:33 -0700 |
---|---|---|
committer | adamedx <adamed@opscode.com> | 2013-08-19 11:46:24 -0700 |
commit | e14a26ca47c0ddb1e75401d1a5bb65abc9f277f8 (patch) | |
tree | 888b9a222d6e384b6ecfe304fb70b44872b8900b /spec | |
parent | 3e8ba6ddd8e529278a8cd496c97dd0b06284affb (diff) | |
download | ohai-e14a26ca47c0ddb1e75401d1a5bb65abc9f277f8.tar.gz |
Fix ruby warnings Config => RbConfig
Fixes warnings like:
spec/unit/plugins/ruby_spec.rb:44:in `block in <top (required)>': Use
RbConfig instead of obsolete and deprecated Config.
RbConfig is available at least as far back as 1.8.7.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/plugins/ruby_spec.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/unit/plugins/ruby_spec.rb b/spec/unit/plugins/ruby_spec.rb index c9cff112..3db81dd3 100644 --- a/spec/unit/plugins/ruby_spec.rb +++ b/spec/unit/plugins/ruby_spec.rb @@ -19,7 +19,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') -ruby_bin = File.join(::Config::CONFIG['bindir'], ::Config::CONFIG['ruby_install_name']) +ruby_bin = File.join(::RbConfig::CONFIG['bindir'], ::RbConfig::CONFIG['ruby_install_name']) describe Ohai::System, "plugin ruby" do @@ -41,16 +41,16 @@ describe Ohai::System, "plugin ruby" do :platform => RUBY_PLATFORM, :version => RUBY_VERSION, :release_date => RUBY_RELEASE_DATE, - :target => ::Config::CONFIG['target'], - :target_cpu => ::Config::CONFIG['target_cpu'], - :target_vendor => ::Config::CONFIG['target_vendor'], - :target_os => ::Config::CONFIG['target_os'], - :host => ::Config::CONFIG['host'], - :host_cpu => ::Config::CONFIG['host_cpu'], - :host_os => ::Config::CONFIG['host_os'], - :host_vendor => ::Config::CONFIG['host_vendor'], - :gems_dir => %x{#{ruby_bin} #{::Config::CONFIG['bindir']}/gem env gemdir}.chomp!, - :gem_bin => [ ::Gem.default_exec_format % 'gem', 'gem' ].map{|bin| "#{::Config::CONFIG['bindir']}/#{bin}" + :target => ::RbConfig::CONFIG['target'], + :target_cpu => ::RbConfig::CONFIG['target_cpu'], + :target_vendor => ::RbConfig::CONFIG['target_vendor'], + :target_os => ::RbConfig::CONFIG['target_os'], + :host => ::RbConfig::CONFIG['host'], + :host_cpu => ::RbConfig::CONFIG['host_cpu'], + :host_os => ::RbConfig::CONFIG['host_os'], + :host_vendor => ::RbConfig::CONFIG['host_vendor'], + :gems_dir => %x{#{ruby_bin} #{::RbConfig::CONFIG['bindir']}/gem env gemdir}.chomp!, + :gem_bin => [ ::Gem.default_exec_format % 'gem', 'gem' ].map{|bin| "#{::RbConfig::CONFIG['bindir']}/#{bin}" }.find{|bin| ::File.exists? bin}, :ruby_bin => ruby_bin }.each do |attribute, value| |