diff options
author | Tim Smith <tsmith@chef.io> | 2018-07-24 11:08:43 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-07-24 11:08:43 -0700 |
commit | b070806ffef16a1dcba70c693848669503544e8a (patch) | |
tree | 934815c34c4945584872675d6969bf476d9f1896 | |
parent | 85ae3a7ad23a7d452cafbd36afbc581906cd8f83 (diff) | |
download | mixlib-cli-b070806ffef16a1dcba70c693848669503544e8a.tar.gz |
Add yard to rakefile and sync with others
Make the default task run style/specs
Remove require on rubygems
Remove rdoc task
Suggest bundle install for chefstyle
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | Rakefile | 25 | ||||
-rw-r--r-- | mixlib-cli.gemspec | 1 |
2 files changed, 11 insertions, 15 deletions
@@ -1,26 +1,16 @@ -require "bundler" -require "rubygems" -require "rubygems/package_task" -require "rdoc/task" +require "bundler/gem_tasks" require "rspec/core/rake_task" require "mixlib/cli/version" -Bundler::GemHelper.install_tasks +task default: [:style, :unit] -task default: :spec +Bundler::GemHelper.install_tasks desc "Run specs" RSpec::Core::RakeTask.new(:spec) do |spec| spec.pattern = "spec/**/*_spec.rb" end -RDoc::Task.new do |rdoc| - rdoc.rdoc_dir = "rdoc" - rdoc.title = "mixlib-cli #{Mixlib::CLI::VERSION}" - rdoc.rdoc_files.include("README*") - rdoc.rdoc_files.include("lib/**/*.rb") -end - begin require "chefstyle" require "rubocop/rake_task" @@ -28,5 +18,12 @@ begin task.options += ["--display-cop-names", "--no-color"] end rescue LoadError - puts "chefstyle/rubocop is not available. gem install chefstyle to do style checking." + puts "chefstyle/rubocop is not available. bundle install first to make sure all dependencies are installed." +end + +begin + require "yard" + YARD::Rake::YardocTask.new(:doc) +rescue LoadError + puts "yard is not available. bundle install first to make sure all dependencies are installed." end diff --git a/mixlib-cli.gemspec b/mixlib-cli.gemspec index 6155358..c91072f 100644 --- a/mixlib-cli.gemspec +++ b/mixlib-cli.gemspec @@ -16,7 +16,6 @@ Gem::Specification.new do |s| # Uncomment this to add a dependency #s.add_dependency "mixlib-log" - s.add_development_dependency "rdoc" s.add_development_dependency "chefstyle" s.add_development_dependency "rspec", "~> 3.0" s.add_development_dependency "rake", "~> 12.0" |