Skip to content

Instantly share code, notes, and snippets.

@wisq
Created March 7, 2012 05:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wisq/1991275 to your computer and use it in GitHub Desktop.
Save wisq/1991275 to your computer and use it in GitHub Desktop.
knife 0.9.18 wrapper with suppressed warnings
#!/usr/bin/env ruby
# Optional: Force a particular Ruby version & gemset.
if ENV['BUNDLE_GEMFILE'].nil?
ENV['RBENV_VERSION'] = '1.9.3'
ENV['BUNDLE_GEMFILE'] = "#{ENV['HOME']}/ops/kitchen/Gemfile"
exec('bundle', 'exec', $0, *ARGV)
end
# Suppress iconv deprecation warning.
begin
verbosity = $VERBOSE
$VERBOSE = nil
require 'iconv'
ensure
$VERBOSE = verbosity
end
# Suppress Config -> RbConfig deprecation warning.
require 'rbconfig'
class Object
Config = RbConfig
end
# Load real knife.
load "#{Gem.bindir}/knife"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment