Skip to content

Commit

Permalink
Get back to 100% doco coverage.
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//src/hoe/dev/": change = 13935]
  • Loading branch information
zenspider committed Oct 2, 2023
1 parent 954407b commit a6499d1
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 12 deletions.
6 changes: 3 additions & 3 deletions lib/hoe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ def validate_fields
end
end

def skip_intuit_values?
def skip_intuit_values? # :nodoc:
%w[summary description homepage].all? { |field| send field }
end

Expand All @@ -933,7 +933,7 @@ def with_config
yield config, rc
end

def maybe_load_yaml path
def maybe_load_yaml path # :nodoc:
if File.exist? path then
if YAML.respond_to? :safe_load_file then
YAML.safe_load_file path, permitted_classes: [Regexp, Symbol]
Expand All @@ -946,7 +946,7 @@ def maybe_load_yaml path
end
end

class File
class File # :nodoc:
# Like File::read, but strips out a BOM marker if it exists.
def self.read_utf path
r19 = "<3".respond_to? :encoding
Expand Down
4 changes: 4 additions & 0 deletions lib/hoe/compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ def activate_compiler_deps
warn "Couldn't load rake-compiler. Skipping. Run `rake newb` to fix."
end

##
# Declare a compiler extension, expecting ext/NAME/extconf.rb to
# exist.

def extension name
@extensions ||= []
@extensions << name
Expand Down
6 changes: 3 additions & 3 deletions lib/hoe/debug.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ def check_manifest
end
end

class Gem::Specification < Gem::BasicSpecification
alias old_ruby_code ruby_code
class Gem::Specification < Gem::BasicSpecification # :nodoc:
alias old_ruby_code ruby_code # :nodoc:

def ruby_code(obj)
def ruby_code(obj) # :nodoc:
old_ruby_code obj
rescue Gem::Exception => e
case e.message
Expand Down
3 changes: 3 additions & 0 deletions lib/hoe/gemcutter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ module Hoe::Gemcutter

Hoe::DEFAULT_CONFIG["otp_command"] = false

##
# Push gems to server.

def gem_push gems
with_config do |config, _|
otp_command = config["otp_command"]
Expand Down
2 changes: 1 addition & 1 deletion lib/hoe/package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# rake/gempackagetask will go away some day
warn "It has happened... rubygems/package_task is gone!"
require "rake/gempackagetask"
Gem::PackageTask = Rake::GemPackageTask
Gem::PackageTask = Rake::GemPackageTask # :nodoc:
end

##
Expand Down
2 changes: 1 addition & 1 deletion lib/hoe/publish.rb
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ class ::Rake::SshDirPublisher # :nodoc:
attr_reader :host, :remote_dir, :local_dir
end

class String
class String # :nodoc:
##
# Very basic munge from rdoc to markdown format.

Expand Down
4 changes: 2 additions & 2 deletions lib/hoe/rake.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Rake
class Task
class Task # :nodoc:
# Used to name the source of a given task
attr_accessor :plugin
# :stopdoc:
Expand Down Expand Up @@ -29,7 +29,7 @@ def clear_comments # :nodoc:
end
end

module TaskManager
module TaskManager # :nodoc:
##
# This gives us access to the tasks already defined in rake.
def all_tasks
Expand Down
4 changes: 2 additions & 2 deletions lib/hoe/rdoc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
# RDoc plugin for hoe. Switches default text files to rdoc.

module Hoe::Rdoc
def initialize_rdoc
def initialize_rdoc # :nodoc:
self.readme_file = self.readme_file.sub(/\.txt$/, ".rdoc")
self.history_file = self.history_file.sub(/\.txt$/, ".rdoc")
end

def define_rdoc_tasks
def define_rdoc_tasks # :nodoc:
# do nothing
end
end

0 comments on commit a6499d1

Please sign in to comment.