Rubocop autocorrections

This commit is contained in:
Bertocq
2017-07-25 12:48:23 +02:00
parent 58331e6425
commit 7d406cae76
12 changed files with 36 additions and 31 deletions

View File

@@ -1,16 +1,16 @@
require 'http'
API_ENDPOINT = 'https://decide.madrid.es/graphql'
API_ENDPOINT = 'https://decide.madrid.es/graphql'.freeze
def make_request(query_string)
HTTP.headers('User-Agent' => 'Mozilla/5.0', accept: 'application/json')
.get(
API_ENDPOINT,
params: { query: query_string.gsub("\n", '').gsub(" ", '') }
params: { query: query_string.delete("\n").delete(" ") }
)
end
query = """
query = <<-GRAPHQL
{
proposal(id: 1) {
id,
@@ -18,9 +18,9 @@ query = """
public_created_at
}
}
"""
GRAPHQL
response = make_request(query)
puts "Response code: #{response.code}"
puts "Response body: #{response.body}"
puts "Response body: #{response.body}"