Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3567-0 #54

Merged
merged 1 commit into from
Jul 15, 2019
Merged

3567-0 #54

merged 1 commit into from
Jul 15, 2019

Conversation

AnastasiyaKireyeva
Copy link
Contributor

@AnastasiyaKireyeva AnastasiyaKireyeva commented Jul 8, 2019

Номер

3567

Номер задания

0

Ссылка на видео с демо

https://www.youtube.com/watch?v=4R5jCBqWP9E

Комментарии

Все сделала!

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Error: We found some problems with your configuration file: [/IrresponsibleMo...
Error: We found some problems with your configuration file: [/IrresponsibleModule] key 'IrresponsibleModule:' is undefined., [/DuplicateMethodCall] key 'DuplicateMethodCall:' is undefined., [/UtilityFunction] key 'UtilityFunction:' is undefined.

3567/0/neo.rb Show resolved Hide resolved
3567/0/neo.rb Show resolved Hide resolved
3567/0/neo.rb Show resolved Hide resolved
3567/0/neo.rb Show resolved Hide resolved
3567/0/neo.rb Outdated Show resolved Hide resolved
3567/0/about_variable_scope.rb Outdated Show resolved Hide resolved
3567/0/about_variable_scope.rb Outdated Show resolved Hide resolved
3567/0/about_variable_scope.rb Outdated Show resolved Hide resolved
3567/0/about_variable_scope.rb Outdated Show resolved Hide resolved
3567/0/about_variable_scope.rb Show resolved Hide resolved
Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Error: We found some problems with your configuration file: [/IrresponsibleMo...
Error: We found some problems with your configuration file: [/IrresponsibleModule] key 'IrresponsibleModule:' is undefined., [/DuplicateMethodCall] key 'DuplicateMethodCall:' is undefined., [/UtilityFunction] key 'UtilityFunction:' is undefined.

3567/0/about_variable_scope.rb Outdated Show resolved Hide resolved
3567/0/about_variable_scope.rb Show resolved Hide resolved
3567/0/about_variable_scope.rb Show resolved Hide resolved
3567/0/about_variable_scope.rb Outdated Show resolved Hide resolved
3567/0/about_variable_scope.rb Outdated Show resolved Hide resolved
3567/0/about_scoring_project.rb Outdated Show resolved Hide resolved
3567/0/about_scoring_project.rb Outdated Show resolved Hide resolved
3567/0/about_scoring_project.rb Outdated Show resolved Hide resolved
3567/0/about_scoring_project.rb Outdated Show resolved Hide resolved
3567/0/about_scoring_project.rb Outdated Show resolved Hide resolved
3567/0/.path_progress Outdated Show resolved Hide resolved
3567/0/triangle.rb Outdated Show resolved Hide resolved
3567/0/triangle.rb Outdated Show resolved Hide resolved
3567/0/triangle.rb Outdated Show resolved Hide resolved
3567/0/about_dice_project.rb Outdated Show resolved Hide resolved
3567/0/about_scoring_project.rb Show resolved Hide resolved
3567/0/about_scoring_project.rb Outdated Show resolved Hide resolved
@DmitryAvramec
Copy link
Contributor

Rename PR

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Error: We found some problems with your configuration file: [/IrresponsibleMo...
Error: We found some problems with your configuration file: [/IrresponsibleModule] key 'IrresponsibleModule:' is undefined., [/DuplicateMethodCall] key 'DuplicateMethodCall:' is undefined., [/UtilityFunction] key 'UtilityFunction:' is undefined.

3567/0/neo.rb Outdated Show resolved Hide resolved
3567/0/about_asserts.rb Outdated Show resolved Hide resolved
3567/0/Rakefile Outdated Show resolved Hide resolved
@AnastasiyaKireyeva AnastasiyaKireyeva changed the title Resolve all ruby koans 3567-0 Jul 9, 2019
Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Error: We found some problems with your configuration file: [/IrresponsibleMo...
Error: We found some problems with your configuration file: [/IrresponsibleModule] key 'IrresponsibleModule:' is undefined., [/DuplicateMethodCall] key 'DuplicateMethodCall:' is undefined., [/UtilityFunction] key 'UtilityFunction:' is undefined.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Error: We found some problems with your configuration file: [/IrresponsibleMo...
Error: We found some problems with your configuration file: [/IrresponsibleModule] key 'IrresponsibleModule:' is undefined., [/DuplicateMethodCall] key 'DuplicateMethodCall:' is undefined., [/UtilityFunction] key 'UtilityFunction:' is undefined.

@DmitryAvramec
Copy link
Contributor

Rename commits messages according to: https://chris.beams.io/posts/git-commit/

3567/0/triangle.rb Outdated Show resolved Hide resolved
3567/0/triangle.rb Outdated Show resolved Hide resolved
3567/0/about_scoring_project.rb Outdated Show resolved Hide resolved
3567/0/about_dice_project.rb Outdated Show resolved Hide resolved
3567/0/about_dice_project.rb Outdated Show resolved Hide resolved
@DmitryAvramec
Copy link
Contributor

And rebase from latest master for resolving this error:
Error: We found some problems with your configuration file: [/IrresponsibleModule] key 'IrresponsibleModule:' is undefined., [/DuplicateMethodCall] key 'DuplicateMethodCall:' is undefined., [/UtilityFunction] key 'UtilityFunction:' is undefined.

@DmitryAvramec DmitryAvramec self-assigned this Jul 9, 2019
Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Error: We found some problems with your configuration file: [/IrresponsibleMo...
Error: We found some problems with your configuration file: [/IrresponsibleModule] key 'IrresponsibleModule:' is undefined., [/DuplicateMethodCall] key 'DuplicateMethodCall:' is undefined., [/UtilityFunction] key 'UtilityFunction:' is undefined.

# against the string value rather than against symbols?

in_ruby_version('mri') do
RUBY_CONSTANT = 'What is the sound of one hand clapping?'.freeze
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.

# rubocop:enable Security/Open
yield(file)
ensure
file.close if file
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/SafeNavigation: Use safe navigation (&.) instead of checking if an object exists before calling the method.

# rubocop:enable Performance/RedundantMatch
end
ensure
file.close if file
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/SafeNavigation: Use safe navigation (&.) instead of checking if an object exists before calling the method.

count += 1 while file.gets
count
ensure
file.close if file
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/SafeNavigation: Use safe navigation (&.) instead of checking if an object exists before calling the method.

assert_equal :false_stuff, truth_value(nil)
end

def test_everything_else_is_treated_as_true
Copy link

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.


def test_strings_are_unique_objects
a = 'a string'
b = 'a string'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UncommunicativeVariableName: AboutStrings#test_strings_are_unique_objects has the variable name 'b'. More info.

end

def test_strings_are_unique_objects
a = 'a string'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UncommunicativeVariableName: AboutStrings#test_strings_are_unique_objects has the variable name 'a'. More info.

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)
Copy link

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.


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)
Copy link

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.

end

def test_use_flexible_quoting_to_handle_really_hard_cases
a = %(flexible quotes can handle both ' and " characters)
Copy link

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 'a'. More info.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Error: We found some problems with your configuration file: [/IrresponsibleMo...
Error: We found some problems with your configuration file: [/IrresponsibleModule] key 'IrresponsibleModule:' is undefined., [/DuplicateMethodCall] key 'DuplicateMethodCall:' is undefined., [/UtilityFunction] key 'UtilityFunction:' is undefined.


def test_symbols_do_not_have_string_methods
symbol = :not_a_string
assert_equal false, symbol.respond_to?(:each_char)
Copy link

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.


def test_identical_symbols_are_a_single_internal_object
symbol1 = :a_symbol
symbol2 = :a_symbol
Copy link

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 'symbol2'. More info.

end

def test_identical_symbols_are_a_single_internal_object
symbol1 = :a_symbol
Copy link

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_can_be_compared
symbol1 = :a_symbol
symbol2 = :a_symbol
symbol3 = :something_else
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UncommunicativeVariableName: AboutSymbols#test_symbols_can_be_compared has the variable name 'symbol3'. More info.


def test_symbols_can_be_compared
symbol1 = :a_symbol
symbol2 = :a_symbol
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UncommunicativeVariableName: AboutSymbols#test_symbols_can_be_compared has the variable name 'symbol2'. More info.

assert_equal 0, score([2, 3, 4, 6])
end

def test_score_of_a_triple_1_is_1000
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UncommunicativeMethodName: AboutScoringProject#test_score_of_a_triple_1_is_1000 has the name 'test_score_of_a_triple_1_is_1000'. More info.

assert_equal 50, score([5])
end

def test_score_of_a_single_roll_of_1_is_100
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UncommunicativeMethodName: AboutScoringProject#test_score_of_a_single_roll_of_1_is_100 has the name 'test_score_of_a_single_roll_of_1_is_100'. More info.

assert_equal 0, score([])
end

def test_score_of_a_single_roll_of_5_is_50
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UncommunicativeMethodName: AboutScoringProject#test_score_of_a_single_roll_of_5_is_50 has the name 'test_score_of_a_single_roll_of_5_is_50'. More info.

array = []
result = 0
(1..6).each do |iteration|
array.append(dice.select { |item| item == iteration }.count)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NestedIterators: score contains iterators nested 2 deep. More info.

result
end

def score(dice)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TooManyStatements: score has approx 9 statements. More info.

C = 'top level'.freeze
#:nodoc:
class AboutConstants < Neo::Koan
C = 'nested'.freeze
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.


require File.expand_path(File.dirname(__FILE__) + '/neo')

C = 'top level'.freeze
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.

puts("введите слово:")
guess=gets.chomp()
end
puts "Вы выиграли"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Layout/TrailingBlankLines: Final newline missing.

guess = ""
while guess!=secret
puts("введите слово:")
guess=gets.chomp()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/SpaceAroundOperators: Surrounding space missing for operator =.
Style/MethodCallWithoutArgsParentheses: Do not use parentheses for method calls with no arguments.

secret = "Loh"
guess = ""
while guess!=secret
puts("введите слово:")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/IndentationWidth: Use 2 (not 4) spaces for indentation.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

@@ -0,0 +1,7 @@
secret = "Loh"
guess = ""
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

@@ -0,0 +1,7 @@
secret = "Loh"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

# frozen_string_literal: true
#:reek:all:

require File.expand_path(File.dirname(__FILE__) + '/neo')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/TrailingWhitespace: Trailing whitespace detected.

@@ -0,0 +1,164 @@
# frozen_string_literal: true
#:reek:all:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.

3567/0/versioning_spec.rb Outdated Show resolved Hide resolved
symbol = :ruby
assert_equal true, symbol.is_a?(Symbol)
end

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/TrailingWhitespace: Trailing whitespace detected.

assert_equal false, symbol1 == symbol3
end
# :reek:UncommunicativeVariableName:
def test_identical_symbols_are_a_single_internal_object
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/EmptyLineBetweenDefs: Use empty lines between method definitions.

assert_equal true, symbol.is_a?(Symbol)
end
# :reek:UncommunicativeVariableName:
def test_symbols_can_be_compared
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/EmptyLineBetweenDefs: Use empty lines between method definitions.

#:reek:ControlParameter:reek:UtilityFunction:
# :reek:ControlParameter:
# :reek:FeatureEnvy:
# rubocop:disable Style/SymbolProc, Metrics/AbcSize:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove disable

(args[0] + args[1] <= args[2]) || (args[1] + args[2] <= args[0]) ||
(args[2] + args[0] <= args[1]) || args.any? { |argument| argument.negative? }
end
#:reek:ControlParameter:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All disables

# Your goal is to write the score method.

def check_set_of_three_fives(array)
if array[4] >= 3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Digits are bad! Why its array[4]?

array = []
result = 0
(1..6).each do |iteration|
array.append(dice.select { |item| item == iteration }.count)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

O_o omg 🤦‍♂ dice.count(number) ?
Remove result = 0
Use reduce, inject, each_with_object instead of each


# Implement a DiceSet Class here:
#
# class DiceSet
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

@anatoliliotych anatoliliotych added this to the HomeWork#0 milestone Jul 11, 2019

def test_strings_are_unique_objects
a = "a string"
b = "a string"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

end

def test_strings_are_unique_objects
a = "a string"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.


def test_strings_can_be_joined
words = ["Now", "is", "the", "time"]
assert_equal "Now is the time", words.join(" ")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

end

def test_strings_can_be_joined
words = ["Now", "is", "the", "time"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/WordArray: Use %w or %W for an array of words.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

end

def test_strings_can_be_split_with_different_patterns
string = "the:rain:in:spain"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.


in_ruby_version('1.8') do
def test_in_older_ruby_single_characters_are_represented_by_integers
assert_equal '97', ?a
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/CharacterLiteral: Do not use the character literal - use string literal instead.

end

def test_you_can_get_a_single_character_from_a_string
string = "Bacon, lettuce and tomato"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

end

def test_you_can_get_a_substring_from_a_string
string = "Bacon, lettuce and tomato"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

def test_the_shovel_operator_modifies_the_original_string
original_string = 'Hello, '
hi = original_string
there = "World"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.


def test_the_shovel_operator_will_also_append_content_to_a_string
hi = "Hello, "
there = "World"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

assert_equal '[1, 2, 3]', array.inspect

assert_equal 'STRING', "STRING".to_s
assert_equal '"STRING"', "STRING".inspect
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

assert_equal '[1, 2, 3]', array.to_s
assert_equal '[1, 2, 3]', array.inspect

assert_equal 'STRING', "STRING".to_s
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

end

def test_inspect_provides_a_more_complete_string_version
fido = Dog7.new("Fido")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

end

def test_to_s_is_used_in_string_interpolation
fido = Dog7.new("Fido")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

end

def test_to_s_provides_a_string_version_of_the_object
fido = Dog7.new("Fido")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.


def test_you_can_create_accessor_methods_to_return_instance_variables
fido = Dog3.new
fido.setname("Fido")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

def setname(a_name)
@name = a_name
end
def name
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/EmptyLineBetweenDefs: Use empty lines between method definitions.
Style/TrivialAccessors: Use attr_reader to define trivial reader methods.

class Dog3
def setname(a_name)
@name = a_name
end
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/DefEndAlignment: end at 68, 3 is not aligned with def at 66, 4.

fido = Dog2.new
fido.setname("Fido")
# rubocop:disable Style/EvalWithLocation
assert_equal 'Fido', fido.instance_eval("@name") # string version
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.


def test_you_can_rip_the_value_out_using_instance_eval
fido = Dog2.new
fido.setname("Fido")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

# frozen_string_literal: true

# rubocop:disable Lint/MissingCopEnableDirective, Style/ClassAndModuleChildren
# rubocop:disable Style/StringLiterals, Style/MutableConstant
Copy link

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/MutableConstant.

@@ -0,0 +1,109 @@
# frozen_string_literal: true

# rubocop:disable Style/StringLiterals, Style/MutableConstant
Copy link

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/MutableConstant.

@@ -0,0 +1,4 @@
{
"javascript.preferences.quoteStyle": "single",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove


require File.expand_path(File.dirname(__FILE__) + '/neo')

# :reek:all:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

26 :reek:all: If you want to disable some reek offenses disable it one-by-one and enable after the method where it appear

3567/0/nly Outdated
@@ -0,0 +1,4 @@
Inspecting 0 files
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

???

@@ -0,0 +1,7 @@
secret = 'Loh'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WTF is it?

# about_triangle_project_2.rb
#

#:reek:ControlParameter:reek:UtilityFunction and :reek:FeatureEnvy and :reek:ControlParameter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we have only your code, so fix these offenses with styling your code not with disables


TRIPLE = [nil, 1000, 200, 300, 400, 500, 600].freeze
SINGLE = [nil, 100, 0, 0, 0, 50, 0].freeze
# :reek:UtilityFunction
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as for triangle.rb


require File.expand_path(File.dirname(__FILE__) + '/neo')

# :reek:Attribute
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

mikitsik pushed a commit to mikitsik/summer-2019 that referenced this pull request Jul 15, 2019
# Это 1-е сообщение коммита:

Add the very very first homework task

# Это сообщение коммита номер rubizza-camp#2:

new rubocop config

# Это сообщение коммита номер rubizza-camp#3:

Let's 2019 begin

# Это сообщение коммита номер rubizza-camp#4:

Resolve reek issue with wrong config format

# Это сообщение коммита номер rubizza-camp#5:

Uploading source code files

# Это сообщение коммита номер rubizza-camp#6:

Deleting unnecessary file

# Это сообщение коммита номер rubizza-camp#7:

Correcting ruby styles

# Это сообщение коммита номер rubizza-camp#8:

Initial commit

# Это сообщение коммита номер rubizza-camp#9:

Fix for rubocop

# Это сообщение коммита номер rubizza-camp#10:

Fix for hound

# Это сообщение коммита номер rubizza-camp#11:

Fixing for hound and refactoring DiceSet

# Это сообщение коммита номер rubizza-camp#12:

Add homework 3715 for task 0

# Это сообщение коммита номер rubizza-camp#13:

Fix issues indicated by the hound in homework 0

  To pass the Hound and match the human style code.

# Это сообщение коммита номер rubizza-camp#14:

Create file_to_delete.md
# Это сообщение коммита номер rubizza-camp#15:

3600 - 0

All files are checked via rubocop and reek
# Это сообщение коммита номер rubizza-camp#16:

Delete file_to_delete.md
# Это сообщение коммита номер rubizza-camp#17:

Create neo.rb
# Это сообщение коммита номер rubizza-camp#18:

Delete neo.rb
# Это сообщение коммита номер rubizza-camp#19:

Moved files to another folder

# Это сообщение коммита номер rubizza-camp#20:

Completed all ruby koans

# Это сообщение коммита номер rubizza-camp#21:

Fix most cod style for rubocop

# Это сообщение коммита номер rubizza-camp#22:

Fix some rubocop complaints

# Это сообщение коммита номер rubizza-camp#23:

Fix all koans indicated by the hound

# Это сообщение коммита номер rubizza-camp#24:

Renamed the latest commit

# Это сообщение коммита номер rubizza-camp#25:

Correct the error in triangle.rb

# Это сообщение коммита номер rubizza-camp#26:

Correct the alignments

# Это сообщение коммита номер rubizza-camp#27:

Solve half of Koans

# Это сообщение коммита номер rubizza-camp#28:

Solved all Koans

# Это сообщение коммита номер rubizza-camp#29:

Fix part of codestyle issues

# Это сообщение коммита номер rubizza-camp#30:

Fix half of codestyle issues

# Это сообщение коммита номер rubizza-camp#31:

Fix all codestyle issues

# Это сообщение коммита номер rubizza-camp#32:

Fix codestyle with new config

Update config files

Update config files

Update config files

Update config files

# Это сообщение коммита номер rubizza-camp#33:

Applied requested changes

# Это сообщение коммита номер rubizza-camp#34:

Fix about_control_statments

# Это сообщение коммита номер rubizza-camp#35:

Removed unnecessary rubocop:disables

# Это сообщение коммита номер rubizza-camp#36:

resloved koans and fixed rubocop

# Это сообщение коммита номер rubizza-camp#37:

fixed

# Это сообщение коммита номер rubizza-camp#38:

fix

# Это сообщение коммита номер rubizza-camp#39:

fix

# Это сообщение коммита номер rubizza-camp#40:

Fixed half reek's errors

# Это сообщение коммита номер rubizza-camp#41:

finished fix reek errors

# Это сообщение коммита номер rubizza-camp#42:

finished fix rubocop warnings

# Это сообщение коммита номер rubizza-camp#43:

fixed 'positive' warninig

# Это сообщение коммита номер rubizza-camp#44:

removed parentheses around a method call

# Это сообщение коммита номер rubizza-camp#45:

Come back koens's code and disable rubocop checker

# Это сообщение коммита номер rubizza-camp#46:

fixed variable name in test_methods_can_take_an_explicit_block_argument

# Это сообщение коммита номер rubizza-camp#47:

Edit method's arguments

# Это сообщение коммита номер rubizza-camp#48:

edit answer in test_methods_can_see_if_they_have_been_called_with_a_block
use array.uniq in triangle.rb

# Это сообщение коммита номер rubizza-camp#49:

fixed rubocop's error

# Это сообщение коммита номер rubizza-camp#50:

simplify code(use case then 3 methods) and fixed wrong call enumerable method in check_below_zero_triagle

# Это сообщение коммита номер rubizza-camp#51:

simplify calling errors check and removed triangle_analyzes

# Это сообщение коммита номер rubizza-camp#52:

merge conditions and rename triangle_valud? into triangle_validate?

# Это сообщение коммита номер rubizza-camp#53:

delete redundant result

# Это сообщение коммита номер rubizza-camp#54:

fixed rubocop warning

# Это сообщение коммита номер rubizza-camp#55:

use new instance of array

# Это сообщение коммита номер rubizza-camp#56:

fixed space's warning

# Это сообщение коммита номер rubizza-camp#57:

init

# Это сообщение коммита номер rubizza-camp#58:

fix Style/StringLiterals errors in scope and sandwich

# Это сообщение коммита номер rubizza-camp#59:

fix Style/StringLiterals errors in sandwich

# Это сообщение коммита номер rubizza-camp#60:

fix Style/StringLiterals and Style/SymbolArray errors in scope triangle path

# Это сообщение коммита номер rubizza-camp#61:

fix Style/StringLiterals errors in variable_scope

# Это сообщение коммита номер rubizza-camp#62:

fix Style/StringLiterals and Style/SafeNavigation errors in sandwich and to_str

# Это сообщение коммита номер rubizza-camp#63:

fix Style/SafeNavigation and Style/SymbolProc errors in proxy and symbols

# Это сообщение коммита номер rubizza-camp#64:

disable rubocop and rewrite code in ctrl_statements

# Это сообщение коммита номер rubizza-camp#65:

disable rubocop in neo

# Это сообщение коммита номер rubizza-camp#66:

fix Style/WordArray and Style/StringLiterals errors in neo versioning strings

# Это сообщение коммита номер rubizza-camp#67:

fix Style/StringLiterals errors in module objects sandwich

# Это сообщение коммита номер rubizza-camp#68:

fix Style/StringLiterals errors and add empty lines in strings symbols

# Это сообщение коммита номер rubizza-camp#69:

delete unnecessary empty lines and fix Style/StringLiterals symbols triangle var_scope

# Это сообщение коммита номер rubizza-camp#70:

rewrite all tests

# Это сообщение коммита номер rubizza-camp#71:

disable rubocop and delete empty lines

# Это сообщение коммита номер rubizza-camp#72:

change rubocop config for fix Layout/EndOfLine

# Это сообщение коммита номер rubizza-camp#73:

change rubocop config and disable

# Это сообщение коммита номер rubizza-camp#74:

try fix Layout/EndOfLine error and enable rubocop

# Это сообщение коммита номер rubizza-camp#75:

try fix Layout/EndOfLine error

# Это сообщение коммита номер rubizza-camp#76:

test Layout/EndOfFile

# Это сообщение коммита номер rubizza-camp#77:

disable rubocop and fix Layout/EndOfLine error

# Это сообщение коммита номер rubizza-camp#78:

disable and enable rubocop

# Это сообщение коммита номер rubizza-camp#79:

disable rubocop and delete empty lines

# Это сообщение коммита номер rubizza-camp#80:

disable rubocop anmd change config

# Это сообщение коммита номер rubizza-camp#81:

disable rubocop

# Это сообщение коммита номер rubizza-camp#82:

fix @values in dice_project

# Это сообщение коммита номер rubizza-camp#83:

try change commit

# Это сообщение коммита номер rubizza-camp#84:

fix error with changing

# Это сообщение коммита номер rubizza-camp#85:

disable rubocop in neo

# Это сообщение коммита номер rubizza-camp#86:

try fix errors with change commits

# Это сообщение коммита номер rubizza-camp#87:

delete superfluous string in strings

# Это сообщение коммита номер rubizza-camp#88:

For the second PR


# Это сообщение коммита номер rubizza-camp#89:

Add Reek-disable comments


# Это сообщение коммита номер rubizza-camp#90:

Fix locally Reek and Rubocop by adding comments


# Это сообщение коммита номер rubizza-camp#91:

Fix Regexp performance issue in extra_credit


# Это сообщение коммита номер rubizza-camp#92:

Add tests(neo.rb, rake, etc)


# Это сообщение коммита номер rubizza-camp#93:

Fix a problem with spelling and naming in commit messages


# Это сообщение коммита номер rubizza-camp#94:

Upload files from ruby_koans

# Это сообщение коммита номер rubizza-camp#95:

Solve about_exceptions

# Это сообщение коммита номер rubizza-camp#96:

Solve TriangleError

# Это сообщение коммита номер rubizza-camp#97:

Change negative? check to positive? in triangle

# Это сообщение коммита номер rubizza-camp#98:

Solve about iterations

# Это сообщение коммита номер rubizza-camp#99:

Solve about blocks

# Это сообщение коммита номер rubizza-camp#100:

Solve about sandwich code

# Это сообщение коммита номер rubizza-camp#101:

Solve scoring project

# Это сообщение коммита номер rubizza-camp#102:

Solve about classes

# Это сообщение коммита номер rubizza-camp#103:

Solve about open classes

# Это сообщение коммита номер rubizza-camp#104:

Solve dice project

# Это сообщение коммита номер rubizza-camp#105:

Solve about inheritance

# Это сообщение коммита номер rubizza-camp#106:

Solve about modules

# Это сообщение коммита номер rubizza-camp#107:

Solve about scope

# Это сообщение коммита номер rubizza-camp#108:

Solve about class methods

# Это сообщение коммита номер rubizza-camp#109:

Solve about message passing

# Это сообщение коммита номер rubizza-camp#110:

Solve about proxy object project

# Это сообщение коммита номер rubizza-camp#111:

Fix all koans

# Это сообщение коммита номер rubizza-camp#112:

Fix part rubocop complains

# Это сообщение коммита номер rubizza-camp#113:

resolve shown violation

# Это сообщение коммита номер rubizza-camp#114:

Fix second portion rubocop

# Это сообщение коммита номер rubizza-camp#115:

Fix all rubocop complains except triangle and scoring

# Это сообщение коммита номер rubizza-camp#116:

Fix sandwich code

# Это сообщение коммита номер rubizza-camp#117:

Rewrite scoring project

# Это сообщение коммита номер rubizza-camp#118:

Change triangle code

# Это сообщение коммита номер rubizza-camp#119:

Fix hound complains

# Это сообщение коммита номер rubizza-camp#120:

Fix configs

# Это сообщение коммита номер rubizza-camp#121:

Change configs back

# Это сообщение коммита номер rubizza-camp#122:

Change about_scoring for AbcSize

# Это сообщение коммита номер rubizza-camp#123:

Add and fix about_variable_scope

# Это сообщение коммита номер rubizza-camp#124:

Add newline in the end of path to enlightenment

# Это сообщение коммита номер rubizza-camp#125:

Change do-end

# Это сообщение коммита номер rubizza-camp#126:

Finish koans, fix hound

# Это сообщение коммита номер rubizza-camp#127:

Auto

# Это сообщение коммита номер rubizza-camp#128:

fix all koans

# Это сообщение коммита номер rubizza-camp#129:

3604 - 0 (rubizza-camp#120)

* Created folder with number

* Done all files, used rubocop and reek

* Update about_sandwich_code.rb,  error editing

* The second update about_sandwich_code, fixed error

* Fixed error Naming/ConstantName

* Fixed error Style/MutableConstant

* Fixed errors TooManyStatements and FeatureEnvy

* Fixed error Style/MutableConstant

* Updated file with new version code, used OOP

* Updated file

* Rewrote code, the code became clear

* Fixed syntax private methods and public

* Created normal name of method

# Это сообщение коммита номер rubizza-camp#130:

Initial commit

# Это сообщение коммита номер rubizza-camp#131:

fix rubocop

# Это сообщение коммита номер rubizza-camp#132:

update triangle.rb & change some rubocop

# Это сообщение коммита номер rubizza-camp#133:

Move to folder above 3548/0

# Это сообщение коммита номер rubizza-camp#134:

load tasks

fix about_asserts

fix about_nil

fix about_objects

fix about_arrays

fix about_array_assignment

fix about_hashes

fix about_strings

fix about_symbols

fix about_regular_expressions

fix about_methods

fix about_keyword_arguments

fix about_constants

fix about_control_statements

fix about_true_and_false

fix triangle

fix about_exceptions

fix about_iteration

fix about_blocks

fix about_sandwich_code

fix about_scoring_project

fix about_classes

fix about_open_classes

fix about_dice_project

fix about_inheritance

fix about_modules.rb

fix about_scope

fix about_class_methods

fix about_message_passing

fix about_proxy_object_project

fix about_to_str

fix about_variable_scope

fix code style according ruby code style

trying pass hound

fix rake result

pass hound

undo reek file

make new reek.yml

fix code style according reek

fix Layout/IndentationConsistency problem in about_scoring_project

rename param name in set_name method in about_classes; delete useless about_extra_credit; delete redundant comment in about_proxy_object_project; fix indentation in about_scoring_project; delete redundant line in method 'bark' in about_variable_scope

refactor method 'score' in about_scoring_project

another score refactoring

refactor method 'score': change conditions

# Это сообщение коммита номер rubizza-camp#135:

Done all, except extra task

# Это сообщение коммита номер rubizza-camp#136:

changed .hound.yml

# Это сообщение коммита номер rubizza-camp#137:

fix spacing

# Это сообщение коммита номер rubizza-camp#138:

solve reek problem

# Это сообщение коммита номер rubizza-camp#139:

argue with robocop

# Это сообщение коммита номер rubizza-camp#140:

make files in style
        - successfully completed ruby koans
        - finally solved all rubocop offenses
        - examined and repaired all reek warnings
        - corrected all violations found by hound
        - reseted neo.rb
        - complemented scoring_project.rb
        - rebased from upstream master bf9cfa5
        - perfectly resolved all mentor’s comments and suggestions
        - solved of all rubocop -a offenses and modified  reek warnings
@DmitryAvramec DmitryAvramec merged commit 2b062c9 into rubizza-camp:master Jul 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants