-
Notifications
You must be signed in to change notification settings - Fork 43
2406/3 #275
base: master
Are you sure you want to change the base?
2406/3 #275
Conversation
raise ArgumentError unless link.include?(DOMAIN_NAME) | ||
end | ||
end | ||
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/TrailingBlankLines: Final newline missing.
get '/' do | ||
slim :'/error_page' | ||
end | ||
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/TrailingBlankLines: Final newline missing.
article_dao = DAO::ArticleDAO.new(Redis.new) | ||
tmp_buffer = article_dao.select_all | ||
begin | ||
checker = ErrorProcessor::InputError.new |
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/IndentationWidth: Use 2 (not 0) spaces for indentation.
Разбил все на мелкие коммиты, малаца! Только все-таки папка |
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.
давай когда ты придешь, мы еще поговорим
@@ -0,0 +1,31 @@ | |||
require_relative '../models/article.rb' |
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.
Слушай, а если ты реквайришь эти файлы в config.ru, разве надо еще и тут их реквайрить?
2406/3/analyzer/azure_analyzer.rb
Outdated
require 'uri' | ||
require 'net/https' | ||
URI = 'https://westcentralus.api.cognitive.microsoft.com/text/analytics/v2.0/sentiment'.freeze | ||
ACCESS_KEY = 'de8a560ccae541e08ec1a30dcdd191a4'.freeze |
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.
@allomov же строго-настрого запретил ключи апишек под гит класть
2406/3/analyzer/azure_analyzer.rb
Outdated
class AzureAnalyzer | ||
require 'uri' | ||
require 'net/https' | ||
URI = 'https://westcentralus.api.cognitive.microsoft.com/text/analytics/v2.0/sentiment'.freeze |
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.
так делать нельзя)))000
это разве работает? ты руби класс переопределяешь своей константой, URI(URI)
в инишиалайзере не будет работать :)
|
||
def take_response(request) | ||
JSON.parse(request.body)['documents'].map do |data| | ||
(data['score'] * 200).to_i - 100 |
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.
магические числа?
2406/3/models/article.rb
Outdated
@comment_list.sum(&:rate) / @comment_list.size.to_f | ||
end | ||
|
||
def add_comment(comment) |
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.
поиск по проекту не находит этот метод. зачем он?
Номер
2406
Номер задания
3
Ссылка на видео с демо
https://youtu.be/lhKFlgB5ig8
Комментарии
Не всё получилось написать красиво из-за внезапности дедлайна (прекращаю оправдываться)
В оставшееся до дедлайна время постараюсь немного порефакторить