Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

2227-3 #283

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

Conversation

VladislavIlyuschits
Copy link
Contributor

Номер

2227

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

3

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

https://youtu.be/_G65r33RaVc

Комментарии

Веб-приложение работает, но это раняя версия, многое можно улучшить.

# Controller Sinatra

module ArticlesController
def self.registered(app)

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)

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.

@VladislavIlyuschits VladislavIlyuschits changed the title Early version project on Sinatra 2227-3 Jul 27, 2018
@@ -0,0 +1,29 @@
# Controller Sinatra
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
Copy link
Collaborator

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}"
Copy link
Collaborator

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])) }
Copy link
Collaborator

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants