diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-08-21 11:06:10 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-08-21 11:06:10 -0700 |
commit | 4234e82751efb1822782e6e9f43d9b0438d8ecc4 (patch) | |
tree | c67531240c38d4d6a5ba231807b2e73e0a3c026a /Rakefile | |
parent | d81f780663bd43f7c565f357094aea87f86262cc (diff) | |
download | mixlib-cli-4234e82751efb1822782e6e9f43d9b0438d8ecc4.tar.gz |
Optimize our requires
Avoid requiring things that are already defined. Rubygems is very slow at traversing the filesystem.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -24,7 +24,7 @@ rescue LoadError end begin - require "yard" + require "yard" unless defined?(YARD) YARD::Rake::YardocTask.new(:docs) rescue LoadError puts "yard is not available. bundle install first to make sure all dependencies are installed." @@ -33,7 +33,7 @@ end task :console do require "irb" require "irb/completion" - require "mixlib/cli" + require "mixlib/cli" unless defined?(Mixlib::CLI) ARGV.clear IRB.start end |