From 3001348c8a09da417623048541ce6d7c91d62686 Mon Sep 17 00:00:00 2001 From: Andy Brody Date: Sun, 28 May 2017 02:45:49 -0400 Subject: [PATCH] Replace rdoc with yard in dependencies. --- .yardopts | 4 ++++ Rakefile | 11 ++--------- lib/restclient/request.rb | 7 ++++++- lib/restclient/utils.rb | 2 +- rest-client.gemspec | 2 +- 5 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 .yardopts diff --git a/.yardopts b/.yardopts new file mode 100644 index 0000000..f0b9d91 --- /dev/null +++ b/.yardopts @@ -0,0 +1,4 @@ +- +history.md +LICENSE +README.md diff --git a/Rakefile b/Rakefile index f804fdb..58a8bfa 100644 --- a/Rakefile +++ b/Rakefile @@ -120,13 +120,6 @@ end ############################ -require 'rdoc/task' - -Rake::RDocTask.new do |t| - t.rdoc_dir = 'rdoc' - t.title = "rest-client, fetch RESTful resources effortlessly" - t.options << '--line-numbers' << '--inline-source' << '-A cattr_accessor=object' - t.options << '--charset' << 'utf-8' - t.rdoc_files.include('README.md') - t.rdoc_files.include('lib/*.rb') +require 'yard' +YARD::Rake::YardocTask.new do |t| end diff --git a/lib/restclient/request.rb b/lib/restclient/request.rb index 59ac742..be75628 100644 --- a/lib/restclient/request.rb +++ b/lib/restclient/request.rb @@ -13,10 +13,15 @@ end module RestClient # This class is used internally by RestClient to send the request, but you can also # call it directly if you'd like to use a method not supported by the - # main API. For example: + # main API. # + # @example using {.execute} class method: # RestClient::Request.execute(method: :head, url: 'http://example.com') # + # @example initializing {#initialize} and then calling {#execute}: + # req = RestClient::Request.new(method: :get, url: 'http://example.com', timeout: 5) + # req.execute + # # The `:method` and `:url` parameters are required. All others are optional. # # @deprecated *Note:* diff --git a/lib/restclient/utils.rb b/lib/restclient/utils.rb index d41eefa..c771f8f 100644 --- a/lib/restclient/utils.rb +++ b/lib/restclient/utils.rb @@ -108,7 +108,7 @@ module RestClient # # @return [String] A string appropriate for use as an HTTP query string # - # @see {flatten_params} + # @see .flatten_params # # @see URI.encode_www_form # diff --git a/rest-client.gemspec b/rest-client.gemspec index e780a12..180d607 100644 --- a/rest-client.gemspec +++ b/rest-client.gemspec @@ -20,8 +20,8 @@ Gem::Specification.new do |s| s.add_development_dependency('rspec', '~> 3.0') s.add_development_dependency('pry', '~> 0') s.add_development_dependency('pry-doc', '~> 0') - s.add_development_dependency('rdoc', '>= 2.4.2', '< 6.0') s.add_development_dependency('rubocop', '~> 0') + s.add_development_dependency('yard', '~> 0.9') s.add_dependency('http-cookie', '>= 1.0.2', '< 2.0') s.add_dependency('mime-types', '>= 1.16', '< 4.0')