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

2406/3 #275

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

2406/3 #275

wants to merge 14 commits into from

Conversation

Equinox-01
Copy link
Contributor

Номер

2406

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

3

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

https://youtu.be/lhKFlgB5ig8

Комментарии

Не всё получилось написать красиво из-за внезапности дедлайна (прекращаю оправдываться)
В оставшееся до дедлайна время постараюсь немного порефакторить

raise ArgumentError unless link.include?(DOMAIN_NAME)
end
end
end

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

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

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.

@nplusp
Copy link
Member

nplusp commented Jul 30, 2018

Разбил все на мелкие коммиты, малаца!

Только все-таки папка models, а не Models :)
Та же фигня что и во втором задании.

Copy link
Member

@nplusp nplusp left a 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'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Слушай, а если ты реквайришь эти файлы в config.ru, разве надо еще и тут их реквайрить?

require 'uri'
require 'net/https'
URI = 'https://westcentralus.api.cognitive.microsoft.com/text/analytics/v2.0/sentiment'.freeze
ACCESS_KEY = 'de8a560ccae541e08ec1a30dcdd191a4'.freeze
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@allomov же строго-настрого запретил ключи апишек под гит класть

class AzureAnalyzer
require 'uri'
require 'net/https'
URI = 'https://westcentralus.api.cognitive.microsoft.com/text/analytics/v2.0/sentiment'.freeze
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

магические числа?

@comment_list.sum(&:rate) / @comment_list.size.to_f
end

def add_comment(comment)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

поиск по проекту не находит этот метод. зачем он?

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