Skip to content

Commit

Permalink
Update yard to 0.9.12, motivated by CVE.
Browse files Browse the repository at this point in the history
* Added @Private tag for nested class (no longer inherits).
* Included full method definition in generated should/should_not docs.
* Used const_set for constant redefinition, since using = confuses YARD.
* Added short descriptions to methods that are @api private. Could
  probably just @Private the lot but didn't want to make that decision
  here.
  • Loading branch information
xaviershay committed Jan 9, 2018
1 parent c8c1818 commit a85a42c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -13,7 +13,7 @@ branch = File.read(File.expand_path("../maintenance-branch", __FILE__)).chomp
end

gem 'coderay' # for syntax highlighting
gem 'yard', '0.8.7.4', :require => false
gem 'yard', '~> 0.9.12', :require => false

### deps for rdoc.info
group :documentation do
Expand Down
2 changes: 1 addition & 1 deletion lib/rspec/expectations/minitest_integration.rb
Expand Up @@ -53,6 +53,6 @@ module RSpec
module Expectations
remove_const :ExpectationNotMetError
# Exception raised when an expectation fails.
ExpectationNotMetError = ::Minitest::Assertion
const_set :ExpectationNotMetError, ::Minitest::Assertion
end
end
4 changes: 2 additions & 2 deletions lib/rspec/expectations/syntax.rb
Expand Up @@ -106,7 +106,7 @@ def expect_enabled?(syntax_host=::RSpec::Matchers)
# that this syntax does not always play nice with delegate/proxy objects.
# We recommend you use the non-monkeypatching `:expect` syntax instead.
class BasicObject
# @method should
# @method should(matcher, message)
# Passes if `matcher` returns true. Available on every `Object`.
# @example
# actual.should eq expected
Expand All @@ -118,7 +118,7 @@ class BasicObject
# @note This is only available when you have enabled the `:should` syntax.
# @see RSpec::Matchers

# @method should_not
# @method should_not(matcher, message)
# Passes if `matcher` returns false. Available on every `Object`.
# @example
# actual.should_not eq expected
Expand Down
1 change: 1 addition & 0 deletions lib/rspec/matchers/built_in/contain_exactly.rb
Expand Up @@ -176,6 +176,7 @@ def pairings_maximizer
#
# @private
class PairingsMaximizer
# @private
Solution = Struct.new(:unmatched_expected_indexes, :unmatched_actual_indexes,
:indeterminate_expected_indexes, :indeterminate_actual_indexes) do
def worse_than?(other)
Expand Down
2 changes: 2 additions & 0 deletions lib/rspec/matchers/composable.rb
Expand Up @@ -156,10 +156,12 @@ def unreadable_io?(object)
# Wraps an item in order to surface its `description` via `inspect`.
# @api private
DescribableItem = Struct.new(:item) do
# Inspectable version of the item description
def inspect
"(#{item.description})"
end

# A pretty printed version of the item description.
def pretty_print(pp)
pp.text "(#{item.description})"
end
Expand Down

0 comments on commit a85a42c

Please sign in to comment.