summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanielsdeleo <dan@opscode.com>2013-07-12 07:25:33 -0700
committerdanielsdeleo <dan@opscode.com>2013-07-15 11:59:23 -0700
commit4f06cc5db44b2603bf4e6dc7a6b962074f847fdd (patch)
tree8e14544c6e46b170fc06b65f723a564390b1b137
parent8461a90b96c74d0ae35616d3b1ad0c327838bb3f (diff)
downloadohai-4f06cc5db44b2603bf4e6dc7a6b962074f847fdd.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.
-rw-r--r--spec/unit/plugins/ruby_spec.rb22
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|