-
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
Sikorsky Alexandr -2 #57
base: master
Are you sure you want to change the base?
Conversation
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: [/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.
require_relative '../config/environment' | ||
require 'rails/test_help' | ||
|
||
class ActiveSupport::TestCase |
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/ClassAndModuleChildren: Use nested module/class definitions instead of compact style.
end | ||
|
||
test 'should update dish' do | ||
patch dish_url(@dish), params: { dish: { calorie_value: @dish.calorie_value, carbohydrates: @dish.carbohydrates, fats: @dish.fats, name: @dish.name, proteins: @dish.proteins, weight: @dish.weight } } |
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.
Metrics/LineLength: Line is too long. [203/120]
|
||
test 'should create dish' do | ||
assert_difference('Dish.count') do | ||
post dishes_url, params: { dish: { calorie_value: @dish.calorie_value, carbohydrates: @dish.carbohydrates, fats: @dish.fats, name: @dish.name, proteins: @dish.proteins, weight: @dish.weight } } |
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.
Metrics/LineLength: Line is too long. [199/120]
{ name: 'potato', weight: 200, calorie_value: 400, proteins: 3, | ||
carbohydrates: 50, fats: 8 } | ||
]) | ||
AdminUser.create!(email: '[email protected]', password: 'password', password_confirmation: 'password') if Rails.env.development? |
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.
Metrics/LineLength: Line is too long. [128/120]
# frozen_string_literal: true | ||
|
||
class DeviseCreateUsers < ActiveRecord::Migration[5.2] | ||
def change |
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.
Metrics/MethodLength: Method has too many lines. [15/10]
font-size: 12px; | ||
margin: -7px -7px 0; | ||
background-color: #c00; | ||
color: #fff; |
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.
Color literals like #fff
should only be used in variable declarations; they should be referred to via variable everywhere else.
padding: 5px 5px 5px 15px; | ||
font-size: 12px; | ||
margin: -7px -7px 0; | ||
background-color: #c00; |
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.
Color literals like #c00
should only be used in variable declarations; they should be referred to via variable everywhere else.
h2 { | ||
text-align: left; | ||
font-weight: bold; | ||
padding: 5px 5px 5px 15px; |
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.
Shorthands of length 4
are not allowed. Value was 5px 5px 5px 15px
background-color: #f0f0f0; | ||
|
||
h2 { | ||
text-align: left; |
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.
Properties should be ordered background-color, color, font-size, font-weight, margin, padding, text-align
border: 2px solid red; | ||
padding: 7px 7px 0; | ||
margin-bottom: 20px; | ||
background-color: #f0f0f0; |
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.
Color literals like #f0f0f0
should only be used in variable declarations; they should be referred to via variable everywhere 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.
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 ingestions_count | ||
render json: ingestions_data.count | ||
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/DefEndAlignment: end at 6, 3 is not aligned with def at 4, 2.
# end | ||
# end | ||
# end | ||
end # content |
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/CommentedKeyword: Do not place comments on the same line as the end keyword.
|
||
#error_explanation { | ||
width: 450px; | ||
border: 2px solid red; |
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.
Color red
should be written in hexadecimal form as #ff0000
Color literals like red
should only be used in variable declarations; they should be referred to via variable everywhere else.
} | ||
|
||
#error_explanation { | ||
width: 450px; |
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.
Properties should be ordered background-color, border, margin-bottom, padding, width
display: table; | ||
} | ||
|
||
#error_explanation { |
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.
Avoid using id selectors
Selector error_explanation
should be written in lowercase with hyphens
|
||
&:hover { | ||
color: #fff; | ||
background-color: #000; |
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.
Color literals like #000
should only be used in variable declarations; they should be referred to via variable everywhere else.
} | ||
|
||
&:hover { | ||
color: #fff; |
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.
Color literals like #fff
should only be used in variable declarations; they should be referred to via variable everywhere else.
Properties should be ordered background-color, color
color: #000; | ||
|
||
&:visited { | ||
color: #666; |
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.
Color literals like #666
should only be used in variable declarations; they should be referred to via variable everywhere else.
} | ||
|
||
a { | ||
color: #000; |
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.
Color literals like #000
should only be used in variable declarations; they should be referred to via variable everywhere else.
|
||
pre { | ||
background-color: #eee; | ||
padding: 10px; |
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.
Properties should be ordered background-color, font-size, padding
Name
Alexandr Skorsky
Homework#
2
Link to video with demo
https://youtu.be/9nZ-_l3BUOk
Comment
Level 1 and 2.
Checklist