-
Notifications
You must be signed in to change notification settings - Fork 21
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
Vladimir Kovalev 2 #54
base: master
Are you sure you want to change the base?
Vladimir Kovalev 2 #54
Conversation
4b3b2d0
to
67aef59
Compare
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.
Some files could not be reviewed due to errors:
Error: We found some problems with your configuration file: [/Attribute] key ...
Error: We found some problems with your configuration file: [/Attribute] key 'Attribute:' is undefined., [/DuplicateMethodCall] key 'DuplicateMethodCall:' is undefined., [/FeatureEnvy] key 'FeatureEnvy:' is undefined., [/IrresponsibleModule] key 'IrresponsibleModule:' is undefined., [/PrimaDonnaMethod] key 'PrimaDonnaMethod:' is undefined., [/TooManyStatements] key 'TooManyStatements:' is undefined., [/app/workers] key 'app/workers:' is undefined., [/db/migrate] key 'db/migrate:' is undefined.
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.
Some files could not be reviewed due to errors:
Error: We found some problems with your configuration file: [/Attribute] key ...
Error: We found some problems with your configuration file: [/Attribute] key 'Attribute:' is undefined., [/DuplicateMethodCall] key 'DuplicateMethodCall:' is undefined., [/FeatureEnvy] key 'FeatureEnvy:' is undefined., [/IrresponsibleModule] key 'IrresponsibleModule:' is undefined., [/PrimaDonnaMethod] key 'PrimaDonnaMethod:' is undefined., [/TooManyStatements] key 'TooManyStatements:' is undefined., [/app/workers] key 'app/workers:' is undefined., [/db/migrate] key 'db/migrate:' is undefined.
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.
Some files could not be reviewed due to errors:
Error: We found some problems with your configuration file: [/Attribute] key ...
Error: We found some problems with your configuration file: [/Attribute] key 'Attribute:' is undefined., [/DuplicateMethodCall] key 'DuplicateMethodCall:' is undefined., [/FeatureEnvy] key 'FeatureEnvy:' is undefined., [/IrresponsibleModule] key 'IrresponsibleModule:' is undefined., [/PrimaDonnaMethod] key 'PrimaDonnaMethod:' is undefined., [/TooManyStatements] key 'TooManyStatements:' is undefined., [/app/workers] key 'app/workers:' is undefined., [/db/migrate] key 'db/migrate:' is undefined.
opts.on("--parallel=N", "Using threads") do |v| | ||
Options.parallel = v | ||
end | ||
opts.on("--no-cache", "Without cache") do |v| |
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/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
opts.on("--exclude-solutions", "Exclude OpenSource projects") do |v| | ||
Options.solutions = v | ||
end | ||
opts.on("--parallel=N", "Using threads") do |v| |
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/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
opts.on("--filter=sales", "Body filter") do |v| | ||
Options.filter = v | ||
end | ||
opts.on("--exclude-solutions", "Exclude OpenSource projects") do |v| |
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/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
opts.on("--no-subdomains", "Exclude subdomains") do |v| | ||
Options.nosubdomains = v | ||
end | ||
opts.on("--filter=sales", "Body filter") do |v| |
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/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
opts.on("-v", "--[no-]verbose", "Run verbosely") do |v| | ||
Options.verbose = v | ||
end | ||
opts.on("--no-subdomains", "Exclude subdomains") do |v| |
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/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
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.
Some files could not be reviewed due to errors:
Error: We found some problems with your configuration file: [/Attribute] key ...
Error: We found some problems with your configuration file: [/Attribute] key 'Attribute:' is undefined., [/DuplicateMethodCall] key 'DuplicateMethodCall:' is undefined., [/FeatureEnvy] key 'FeatureEnvy:' is undefined., [/IrresponsibleModule] key 'IrresponsibleModule:' is undefined., [/PrimaDonnaMethod] key 'PrimaDonnaMethod:' is undefined., [/TooManyStatements] key 'TooManyStatements:' is undefined., [/app/workers] key 'app/workers:' is undefined., [/db/migrate] key 'db/migrate:' is undefined.
end | ||
|
||
info(Db.result[i]) | ||
puts "done" |
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/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Db.result[i].merge!({ code: res.code, | ||
time: time_string, | ||
body: Body.new(res.body) }) | ||
rescue => e |
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/RescueStandardError: Avoid rescuing without specifying an error class.
"#{time.real.truncate}s" | ||
else | ||
"#{time.real.to_s.split(".")[1][0..2]}ms" | ||
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/EndAlignment: end at 103, 6 is not aligned with if at 99, 18.
time_string = if time.real.truncate.positive? | ||
"#{time.real.truncate}s" | ||
else | ||
"#{time.real.to_s.split(".")[1][0..2]}ms" |
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/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations.
end | ||
time_string = if time.real.truncate.positive? | ||
"#{time.real.truncate}s" | ||
else |
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/ElseAlignment: Align else with if.
end | ||
|
||
parser = OptionParser.new do |opts| | ||
opts.banner = "Usage: checker.rb [options] file.csv" |
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/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
include Singleton | ||
attr_accessor :verbose, :nosubdomains, :filter, :solutions, :parallel, :cache | ||
|
||
def self.method_missing(*name) |
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/MissingRespondToMissing: When using method_missing, define respond_to_missing?.
require "fileutils" | ||
require "domainatrix" | ||
|
||
Dir["./lib/*.rb"].each { |file| require_relative file } |
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/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
require "optparse" | ||
require "singleton" | ||
require "fileutils" | ||
require "domainatrix" |
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/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
require "yaml" | ||
require "optparse" | ||
require "singleton" | ||
require "fileutils" |
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/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Фамилия Имя
Ковалев Владимир
Email
[email protected]
Номер домашнего задания
2
Ссылка на видео с демо работы
Комментарии
Еще не готово)