fourkites-sqspoller 0.1.12.16 → 0.1.12.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MzA1Y2NlN2E3MTU1OTlkM2QwZTk4ZDJiMGRiOTY0ZDVlNWFmOGVhYw==
4
+ YjMxNzAxZGU2NGI4NjNlYWNkYzdjMjkyNTY3YWYxMWY3YjlmMDA1Zg==
5
5
  data.tar.gz: !binary |-
6
- YTQ2NzE4MTFkZWFkYjA5MWE5MjQ4ZjRiYjY1YTAwYjZhMjUwNTVmMQ==
6
+ YWVhN2YzYzA0YmIxNDYwYjU3ZDFjMWNjYjc3MDBlZjI0YzQ4MzdlMQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YmQxZTNhZjkxN2JhNmUwODJlODlkMzE5YjNjYmQ2OGM2YjQ5MGYyNmNmOGE5
10
- ZWNiMDk2YWFiNTc4MTBjYjk1MTUyYzExZWExNjM3NzFmZWM2NjdhZDg1YmE1
11
- YzRjMmYwNTAyNTkwYTE5MjNkZDU1YWEzNGU0OGY0ODI5MTUyNGQ=
9
+ NWIxOWEzMTA4YTAyYjM1MmM1M2E1YzQ3MTdlNzY1OGQzMTI0MzU4YTIwNDQz
10
+ MDcyMTE3YjA3NTI5Y2Y1YTYxNTY1Y2ZjNGJjNzg3YjNlMmU0OTdjYTVhNDNi
11
+ MjE0MjNmNzRlZjI0YjIyYTBmNTM3MDlkNGU1Zjg4YjNmZmVhZTc=
12
12
  data.tar.gz: !binary |-
13
- ZWVlYWFmNjgyOTdlYzMyZmZiMjQ2MWY0ZTU2MGNhY2EzYzY1YjEwOGMyN2I1
14
- MGM4MDg1NDQ1ZTlmZDkwMGMxYmMwZTdiZDFiMTZkYmZiYzQ5ZDJlZTkwNzBl
15
- ODVmYTM5YTMwN2IwNzNjMmMyZTFhZThiYjZmNWMzOWY4ZjY2ZjU=
13
+ YzFhYzExY2FhNWIxODhlMWMxNmE0ZjgzNDdkNDIwNzUwOTI5Nzk3ODM4NGU4
14
+ NzcwODRhYWJiNTEwYTQwNTg5YjQzNTFjMWZlMTdjMTY2ZWQ0NWU5MWNjODBl
15
+ MTA5MWU5Y2Y4NTczYmJmMWZmNWE2Y2Q1YjcxNDE3YWFhOWIyMzA=
@@ -9,6 +9,11 @@ module Sqspoller
9
9
 
10
10
  class WorkerTask
11
11
 
12
+ HEADERS = {
13
+ 'Content-Type' => 'application/json',
14
+ 'Accept' => 'application/json'
15
+ }
16
+
12
17
  def initialize(worker_configuration, logger_file)
13
18
  @logger = Logger.new(logger_file)
14
19
  @http_method = worker_configuration[:http_method]
@@ -29,11 +34,11 @@ module Sqspoller
29
34
  @logger.info "rest-client, json params as: #{params.to_json}"
30
35
 
31
36
  if @http_method.downcase == "post"
32
- RestClient::Request.execute(:method => :post, :url => @http_url, :payload => params.to_json, :timeout => 10, :open_timeout => 5) do |response, request, result|
37
+ RestClient::Request.execute(:method => :post, :url => @http_url, :payload => parsed_message.to_json, :headers => HEADERS, :timeout => 10, :open_timeout => 5) do |response, request, result|
33
38
  process_http_response response
34
39
  end
35
40
  elsif @http_method.downcase == "get"
36
- RestClient::Request.execute(:method => :get, :url => @http_url, :payload => params.to_json, :timeout => 10, :open_timeout => 5) do |response, request, result|
41
+ RestClient::Request.execute(:method => :get, :url => @http_url, :payload => parsed_message.to_json, :headers => HEADERS, :timeout => 10, :open_timeout => 5) do |response, request, result|
37
42
  process_http_response response
38
43
  end
39
44
  else
data/sqspoller.gemspec CHANGED
@@ -5,7 +5,7 @@ require 'sqspoller/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "fourkites-sqspoller"
8
- spec.version = '0.1.12.16'
8
+ spec.version = '0.1.12.17'
9
9
  spec.authors = ["anshul-fk"]
10
10
  spec.email = ["anshul@fourkites.com"]
11
11
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fourkites-sqspoller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12.16
4
+ version: 0.1.12.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - anshul-fk