-
Notifications
You must be signed in to change notification settings - Fork 43
2227-3 #283
base: master
Are you sure you want to change the base?
2227-3 #283
Conversation
# Controller Sinatra | ||
|
||
module ArticlesController | ||
def self.registered(app) |
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/AbcSize: Assignment Branch Condition size for registered is too high. [18.44/15]
Metrics/MethodLength: Method has too many lines. [17/10]
# Controller Sinatra | ||
|
||
module ArticlesController | ||
def self.registered(app) |
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: ArticlesController#self.registered has approx 13 statements. More info.
@@ -0,0 +1,29 @@ | |||
# Controller Sinatra | |||
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength |
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.
rly?
end | ||
|
||
def import_json_from_api | ||
"https://comments.api.onliner.by/news/tech.post/#{search_post_id}/comments?limit=#{COMMENTS_LIMIT}" |
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.
I wanna see 50 top rated comments. Not just first 50
end | ||
|
||
def create_article_stat | ||
texts.each_with_index { |text, index| article.comments.add(Comment.create(text: text, rating: ratings[index])) } |
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.
ok, in ur ideal world azure returns scores in the same order. In the real world tomorrow they will shuffle these scores. I want to be sure that comments will be saved with correct rating.
Номер
2227
Номер задания
3
Ссылка на видео с демо
https://youtu.be/_G65r33RaVc
Комментарии
Веб-приложение работает, но это раняя версия, многое можно улучшить.