summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-08-24 12:18:25 -0700
committerGitHub <noreply@github.com>2018-08-24 12:18:25 -0700
commit85ac1dfc379d84b07f9ff06ce1299b2856eb39d8 (patch)
treea0a179a12292d76f5bf8eebc9da3bb4cdfa39c64
parentb58b8e834366e120e79fdaffaa6a95ac528bc952 (diff)
parent3043547212bc0ebd00376363f35ee65928bc2d13 (diff)
downloadchef-85ac1dfc379d84b07f9ff06ce1299b2856eb39d8.tar.gz
Merge pull request #7580 from chef/yard
Simplify / fix our yard doc Rake task
-rw-r--r--Rakefile16
-rw-r--r--lib/chef/http.rb2
-rw-r--r--spec/tiny_server.rb1
3 files changed, 7 insertions, 12 deletions
diff --git a/Rakefile b/Rakefile
index f37bf469f2..f02bbace95 100644
--- a/Rakefile
+++ b/Rakefile
@@ -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/lib/chef/http.rb b/lib/chef/http.rb
index 016e81d12c..3f815b9eff 100644
--- a/lib/chef/http.rb
+++ b/lib/chef/http.rb
@@ -215,7 +215,7 @@ class Chef
# you to unlink the tempfile when you're done with it.
#
# @yield [tempfile] block to process the tempfile
- # @yieldparams [tempfile<Tempfile>] tempfile
+ # @yieldparam [tempfile<Tempfile>] tempfile
def streaming_request(path, headers = {}, tempfile = nil)
http_attempts ||= 0
url = create_url(path)
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"