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

Sikorsky Alexandr -2 #57

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open

Sikorsky Alexandr -2 #57

wants to merge 30 commits into from

Conversation

SuperSus
Copy link
Contributor

@SuperSus SuperSus commented Mar 4, 2019

Name

Alexandr Skorsky

Homework#

2

Link to video with demo

https://youtu.be/9nZ-_l3BUOk

Comment

Level 1 and 2.

Checklist

  • I have read homework assignment fully
  • I have implemented homework assignment fully
  • My pull request is named "#{name} #{surname} - #{homework_number}"
  • My code is located under "#{name} #{surname}/#{homework_number}"
  • It executes correctly
  • It doesn't crash, freeze, kill everyone on unexpected input
  • Credentials are NOT hardcoded
  • Large files and credentials added to .gitignore INSIDE homework dir
  • It can be tested in under 10 minutes (download part + parse + execute)
  • Gemfile added, it runs under bundle exec without error

Copy link

@houndci-bot houndci-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.

require_relative '../config/environment'
require 'rails/test_help'

class ActiveSupport::TestCase

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 } }

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 } }

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?

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

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;

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;

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;

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;

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;

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.

Copy link

@houndci-bot houndci-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 ingestions_count
render json: ingestions_data.count
end

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

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;

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;

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 {

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;

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;

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;

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;

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;

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

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