rubocop: fix various style issues.

This commit is contained in:
evazion
2019-12-22 16:21:58 -06:00
parent 09f6a84660
commit 309821bf73
288 changed files with 912 additions and 962 deletions

View File

@@ -5,7 +5,7 @@ require_relative './mock_service_helper'
set :port, 3002
configure do
POST_IDS = MockServiceHelper.fetch_post_ids()
POST_IDS = MockServiceHelper.fetch_post_ids
end
get '/similar' do

View File

@@ -3,11 +3,11 @@ require 'timeout'
require 'httparty'
module MockServiceHelper
extend self
module_function
DANBOORU_PORT = 3000
def fetch_post_ids()
def fetch_post_ids
begin
s = TCPSocket.new("localhost", DANBOORU_PORT)
s.close

View File

@@ -5,7 +5,7 @@ require_relative './mock_service_helper'
set :port, 3001
configure do
POST_IDS = MockServiceHelper.fetch_post_ids()
POST_IDS = MockServiceHelper.fetch_post_ids
end
get '/recommend/:user_id' do
@@ -15,5 +15,5 @@ end
get '/similar/:post_id' do
content_type :json
POST_IDS[0..6].map {|x| [x, "1.000"]}.to_json
POST_IDS[0..6].map {|x| [x, "1.000"]}.to_json
end