rubocop: fix various style issues.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user