diff options
author | Tim Smith <tsmith@chef.io> | 2018-08-23 20:05:11 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-08-23 20:05:11 -0700 |
commit | 09881f5cec2d6d5951df2e42f8520c088dbcb09d (patch) | |
tree | 182e1c1edaa5919a0b152e85845ce7f1fa2ef4a0 | |
parent | 8d393010ccdd1589b4d7255c6910501c7501d031 (diff) | |
download | chef-09881f5cec2d6d5951df2e42f8520c088dbcb09d.tar.gz |
Simplify / fix our yard doc Rake task
We were trying to parse out a readme file that doesn't exist and the license file which produced errors
We namespaced the task in a way we don't do anywhere else. This matches our other gems now
Tell people to use bundler in the errors instead of gem installing things
We required rubygems which is not necessary
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | Rakefile | 16 | ||||
-rw-r--r-- | spec/tiny_server.rb | 1 |
2 files changed, 6 insertions, 11 deletions
@@ -57,21 +57,17 @@ 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" - DOC_FILES = [ "README.rdoc", "LICENSE", "spec/tiny_server.rb", "lib/**/*.rb" ].freeze - namespace :yard do - desc "Create YARD documentation" + DOC_FILES = [ "spec/tiny_server.rb", "lib/**/*.rb" ].freeze - YARD::Rake::YardocTask.new(:html) do |t| - t.files = DOC_FILES - t.options = ["--format", "html"] - end + YARD::Rake::YardocTask.new(:docs) do |t| + t.files = DOC_FILES + t.options = ["--format", "html"] end - rescue LoadError - puts "yard is not available. (sudo) gem install yard to generate yard documentation." + puts "yard is not available. bundle install first to make sure all dependencies are installed." end diff --git a/spec/tiny_server.rb b/spec/tiny_server.rb index 4a6bdfb599..948bde04f2 100644 --- a/spec/tiny_server.rb +++ b/spec/tiny_server.rb @@ -16,7 +16,6 @@ # limitations under the License. # -require "rubygems" require "webrick" require "webrick/https" require "rack" |