-
Notifications
You must be signed in to change notification settings - Fork 43
2253-1 #179
base: master
Are you sure you want to change the base?
2253-1 #179
Conversation
2253/1/about_proxy_object_project.rb
Outdated
@message_array = [] | ||
end | ||
|
||
def method_missing(method_name, *args, &block) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/MethodMissing: When using method_missing, define respond_to_missing? and fall back on super.
2253/1/about_proxy_object_project.rb
Outdated
# of the Proxy class is given in the AboutProxyObjectProject koan. | ||
|
||
# rubocop:disable Style/MethodMissingSuper | ||
# rubocop:disable Style/MissingRespondToMissing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Style/MissingRespondToMissing (unknown cop).
2253/1/about_proxy_object_project.rb
Outdated
# missing handler and any other supporting methods. The specification | ||
# of the Proxy class is given in the AboutProxyObjectProject koan. | ||
|
||
# rubocop:disable Style/MethodMissingSuper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Style/MethodMissingSuper (did you mean Style/SingleLineMethods?).
2253/1/triangle.rb
Outdated
end | ||
|
||
# Error class used in part 2. No need to change this code. | ||
class TriangleError < StandardError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/Syntax: class definition in method body
2253/1/about_symbols.rb
Outdated
assert_equal true, symbol1.object_id == symbol2.object_id | ||
end | ||
|
||
# rubocop:disable Metrics/LineLength |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Metrics/LineLength.
2253/1/about_message_passing.rb
Outdated
# ------------------------------------------------------------------ | ||
|
||
# rubocop:disable MethodMissingSuper | ||
# rubocop:disable Style/MissingRespondToMissing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Style/MissingRespondToMissing (unknown cop).
2253/1/about_message_passing.rb
Outdated
|
||
# ------------------------------------------------------------------ | ||
|
||
# rubocop:disable MethodMissingSuper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of MethodMissingSuper (unknown cop).
2253/1/about_message_passing.rb
Outdated
assert mc.send(:caught?) | ||
end | ||
|
||
# rubocop:disable Metrics/LineLength |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Metrics/LineLength.
2253/1/about_keyword_arguments.rb
Outdated
@@ -0,0 +1,32 @@ | |||
require File.expand_path(File.dirname(__FILE__) + '/neo') | |||
|
|||
# rubocop:disable Metrics/LineLength |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Metrics/LineLength.
2253/1/about_exceptions.rb
Outdated
assert_equal Object, MySpecialError.ancestors[4] | ||
end | ||
|
||
# rubocop:disable Metrics/LineLength |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Metrics/LineLength.
2253/1/about_message_passing.rb
Outdated
# ------------------------------------------------------------------ | ||
|
||
# rubocop:disable MethodMissingSuper | ||
# rubocop:disable Style/MissingRespondToMissing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Style/MissingRespondToMissing (unknown cop).
2253/1/about_message_passing.rb
Outdated
|
||
# ------------------------------------------------------------------ | ||
|
||
# rubocop:disable MethodMissingSuper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of MethodMissingSuper (unknown cop).
2253/1/about_class_methods.rb
Outdated
:class_level_wag | ||
end | ||
|
||
# rubocop:disable Metrics/LineLength |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Metrics/LineLength.
2253/1/about_message_passing.rb
Outdated
class WellBehavedFooCatcher | ||
def method_missing(method_name, *args, &block) | ||
if method_name.to_s[0, 3] == 'foo' | ||
'Foo to you too' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/MethodMissing: When using method_missing, define respond_to_missing? and fall back on super.
2253/1/about_message_passing.rb
Outdated
# rubocop:disable MethodMissingSuper | ||
# rubocop:disable Style/MissingRespondToMissing | ||
# :nodoc: | ||
class WellBehavedFooCatcher |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Style/MissingRespondToMissing (unknown cop).
2253/1/about_message_passing.rb
Outdated
|
||
# rubocop:disable MethodMissingSuper | ||
# rubocop:disable Style/MissingRespondToMissing | ||
# :nodoc: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of MethodMissingSuper (unknown cop).
2253/1/about_message_passing.rb
Outdated
|
||
# rubocop:disable Metrics/LineLength | ||
def test_all_messages_are_caught | ||
catcher = AllMessageCatcher.new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Metrics/LineLength.
2253/1/about_message_passing.rb
Outdated
class AllMessageCatcher | ||
def method_missing(method_name, *args) | ||
"Someone called #{method_name} with <#{args.join(', ')}>" | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/MethodMissing: When using method_missing, define respond_to_missing? and fall back on super.
2253/1/about_message_passing.rb
Outdated
# rubocop:disable MethodMissingSuper | ||
# rubocop:disable Style/MissingRespondToMissing | ||
# :nodoc: | ||
class AllMessageCatcher |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Style/MissingRespondToMissing (unknown cop).
2253/1/about_message_passing.rb
Outdated
|
||
# rubocop:disable MethodMissingSuper | ||
# rubocop:disable Style/MissingRespondToMissing | ||
# :nodoc: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of MethodMissingSuper (unknown cop).
2253/1/about_keyword_arguments.rb
Outdated
|
||
# rubocop:disable Metrics/LineLength | ||
def method_with_keyword_arguments_with_mandatory_argument(one, two: 2, three: 3) | ||
# rubocop:enable Metrics/LineLength |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/CommentIndentation: Incorrect indentation detected (column 2 instead of 4).
2253/1/about_keyword_arguments.rb
Outdated
assert_equal [1, 2], method_with_keyword_arguments(two: 2) | ||
end | ||
|
||
# rubocop:disable Metrics/LineLength |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Metrics/LineLength.
2253/1/about_message_passing.rb
Outdated
# :nodoc: | ||
class WellBehavedFooCatcher | ||
# rubocop:disable MethodMissing | ||
# rubocop:disable Style/MissingRespondToMissing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/MethodMissing: When using method_missing, define respond_to_missing? and fall back on super.
|
||
# ------------------------------------------------------------------ | ||
|
||
# :nodoc: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Style/MissingRespondToMissing (unknown cop).
end | ||
|
||
# ------------------------------------------------------------------ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of MethodMissingSuper (unknown cop).
2253/1/about_message_passing.rb
Outdated
# rubocop:enable MethodMissing | ||
end | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Metrics/LineLength.
2253/1/about_message_passing.rb
Outdated
class AllMessageCatcher | ||
# rubocop:disable MethodMissing | ||
# rubocop:disable Style/MissingRespondToMissing | ||
def method_missing(method_name, *args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/MethodMissing: When using method_missing, define respond_to_missing? and fall back on super.
2253/1/about_message_passing.rb
Outdated
# ------------------------------------------------------------------ | ||
|
||
# :nodoc: | ||
class AllMessageCatcher |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Style/MissingRespondToMissing (unknown cop).
|
||
# ------------------------------------------------------------------ | ||
|
||
# :nodoc: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of MethodMissingSuper (unknown cop).
2253/1/about_exceptions.rb
Outdated
assert_equal true, ex.is_a?(StandardError), 'Should be a Standard Error' | ||
assert_equal true, ex.is_a?(RuntimeError), 'Should be a Runtime Error' | ||
|
||
# rubocop:disable Metrics/LineLength |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Metrics/LineLength.
2253/1/about_message_passing.rb
Outdated
# :nodoc: | ||
class WellBehavedFooCatcher | ||
# rubocop:disable MethodMissing | ||
# rubocop:disable Style/MissingRespondToMissing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Style/MissingRespondToMissing (unknown cop).
2253/1/about_message_passing.rb
Outdated
|
||
assert_equal 'Someone called foobar with <>', catcher.foobar | ||
assert_equal 'Someone called foobaz with <1>', catcher.foobaz(1) | ||
# rubocop:disable Metrics/LineLength |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Metrics/LineLength.
2253/1/about_message_passing.rb
Outdated
# rubocop:enable MethodMissing | ||
end | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/EmptyLines: Extra blank line detected.
2253/1/about_regular_expressions.rb
Outdated
end | ||
|
||
def test_gsub_is_like_find_and_replace_all | ||
# rubocop:disable Metrics/LineLength |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Metrics/LineLength.
2253/1/about_regular_expressions.rb
Outdated
end | ||
|
||
def test_sub_is_like_find_and_replace | ||
# rubocop:disable Metrics/LineLength |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Metrics/LineLength.
2253/1/about_regular_expressions.rb
Outdated
end | ||
|
||
def test_gsub_is_like_find_and_replace_all | ||
# rubocop:disable Metrics/LineLength |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Metrics/LineLength.
2253/1/about_regular_expressions.rb
Outdated
end | ||
|
||
def test_sub_is_like_find_and_replace | ||
# rubocop:disable Metrics/LineLength |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Metrics/LineLength.
2253/1/about_symbols.rb
Outdated
|
||
def test_method_names_become_symbols | ||
symbols_as_strings = Symbol.all_symbols.map(&:to_s) | ||
# rubocop:disable Metrics/LineLength |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Metrics/LineLength.
2253/1/triangle.rb
Outdated
|
||
# Error class used in part 2. No need to change this code. | ||
# rubocop:disable Lint/Syntax | ||
class TriangleError < StandardError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/Syntax: class definition in method body
2253/1/about_proxy_object_project.rb
Outdated
end | ||
|
||
# rubocop:disable Style/MethodMissing | ||
# rubocop:disable Style/MissingRespondToMissing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Style/MissingRespondToMissing (unknown cop).
@message_array = [] | ||
end | ||
|
||
# rubocop:disable Style/MethodMissing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Style/MethodMissing.
if method_name.to_s[0, 3] == 'foo' | ||
'Foo to you too' | ||
else | ||
super(method_name, *args, &block) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Style/MissingRespondToMissing (unknown cop).
2253/1/about_message_passing.rb
Outdated
|
||
# :nodoc: | ||
class WellBehavedFooCatcher | ||
def method_missing(method_name, *args, &block) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/MethodMissing: When using method_missing, define respond_to_missing? and fall back on super.
2253/1/about_message_passing.rb
Outdated
"Someone called #{method_name} with <#{args.join(', ')}>" | ||
end | ||
end | ||
# rubocop:enable Style/MethodMissing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/CommentIndentation: Incorrect indentation detected (column 0 instead of 2).
@Ctalk3r тебе необходимо сделать rebase c последним мастером этого репозитория Чини собаку Коммиты с одинаковым названием не должны быть один за одним |
# :scalene if no sides are equal | ||
# | ||
def triangle(fir, sec, thi) | ||
raise TriangleError if [fir, sec, thi].min <= 0 || fir + sec <= thi || fir + thi <= sec || sec + thi <= fir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FeatureEnvy: triangle refers to 'fir' more than self (maybe move it to another class?). More info.
assert_equal :false_stuff, truth_value(nil) | ||
end | ||
|
||
def test_everything_else_is_treated_as_true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TooManyStatements: AboutTrueAndFalse#test_everything_else_is_treated_as_true has approx 6 statements. More info.
# :nodoc: | ||
class AboutTrueAndFalse < Neo::Koan | ||
def truth_value(condition) | ||
if condition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ControlParameter: AboutTrueAndFalse#truth_value is controlled by argument 'condition'. More info.
require './triangle.rb' | ||
|
||
# :nodoc: | ||
class AboutTriangleProject2 < Neo::Koan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UncommunicativeModuleName: AboutTriangleProject2 has the name 'AboutTriangleProject2'. More info.
class AboutTriangleProject2 < Neo::Koan | ||
# The first assignment did not talk about how to handle errors. | ||
# Let's handle that part now. | ||
def test_illegal_triangles_throw_exceptions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TooManyStatements: AboutTriangleProject2#test_illegal_triangles_throw_exceptions has approx 8 statements. More info.
end | ||
|
||
def test_identical_symbols_are_a_single_internal_object | ||
symbol1 = :a_symbol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UncommunicativeVariableName: AboutSymbols#test_identical_symbols_are_a_single_internal_object has the variable name 'symbol1'. More info.
|
||
def test_symbols_do_not_have_string_methods | ||
symbol = :not_a_string | ||
assert_equal false, symbol.respond_to?(:each_char) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ManualDispatch: AboutSymbols#test_symbols_do_not_have_string_methods manually dispatches method call. More info.
assert_equal true, a == b | ||
end | ||
|
||
# rubocop:disable Style/PercentLiteralDelimiters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Style/PercentLiteralDelimiters.
def test_use_flexible_quoting_to_handle_really_hard_cases | ||
a = %(flexible quotes can handle both ' and " characters) | ||
b = %!flexible quotes can handle both ' and " characters! | ||
c = %{flexible quotes can handle both ' and " characters} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UncommunicativeVariableName: AboutStrings#test_use_flexible_quoting_to_handle_really_hard_cases has the variable name 'c'. More info.
# rubocop:disable Style/PercentLiteralDelimiters | ||
def test_use_flexible_quoting_to_handle_really_hard_cases | ||
a = %(flexible quotes can handle both ' and " characters) | ||
b = %!flexible quotes can handle both ' and " characters! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UncommunicativeVariableName: AboutStrings#test_use_flexible_quoting_to_handle_really_hard_cases has the variable name 'b'. More info.
Номер
2253
Номер задания
1
Ссылка на видео с демо
https://youtu.be/FsAk0R4Ow7E
Комментарии
Локально стиль в норме