gosquared 3.0.6 → 3.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cf6aeda0866e2e3072ac4c3821b12c32b350e358
4
- data.tar.gz: 2c536fa3596205200f292decfe44da65ee13a069
3
+ metadata.gz: 591265182e4e5898f3bb73eec0b53bff8473210b
4
+ data.tar.gz: e42f68999d291a84f02f01cf44eabda722463ce5
5
5
  SHA512:
6
- metadata.gz: 90c64d33881ee8132c84c7272a3f1843b54be80317222769e8cb9623dec9984e7dc5e16db992ab8a77cfb90b50bc09fc2b6b4f570f4eb25e5ba4ac0461a1cdea
7
- data.tar.gz: 6c71ea20b7604857953c34d8070c47a8a5e03834cb999cceaac2a9bc9293a65d0ba94d7f4d7acbe6619c204730a192197af027fdb856af8d10281dfbd9002e30
6
+ metadata.gz: 902168134149ddcfc2bf8c525b548f10e879a88c6ab4c2b01481860460862d0fdbe9031114409a48afb0d046d3ce25de0a33b8e8da06e91b33a6deee47aeb0fb
7
+ data.tar.gz: 26ec10fb9b56191e0afd977b71ce7d4033b1332097ccdce7fcdfdfbf46c46feafb603a570cf8dda4c8c2ecfd63e51e4b820d62a08e4fe2f3152fe6838dc1b875
@@ -28,7 +28,7 @@ module Gosquared
28
28
  https = Net::HTTP.new(uri.host, uri.port)
29
29
  https.use_ssl = true
30
30
  request = Net::HTTP::Post.new(uri.request_uri, initheader = {'Content-Type' =>'application/json', 'User-Agent' => 'ruby-client/'+ VERSION})
31
- request.body = "[ #{data.to_json} ]"
31
+ request.body = "[#{data.to_json}]"
32
32
  response = https.request(request)
33
33
  rescue Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError,
34
34
  Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError => e
@@ -40,7 +40,7 @@ module Gosquared
40
40
  response = false
41
41
  end
42
42
  end
43
- puts "Response Message: #{response.message}" if response
43
+
44
44
  response
45
45
  end
46
46
 
@@ -50,7 +50,7 @@ module Gosquared
50
50
  https = Net::HTTP.new(uri.host, uri.port)
51
51
  https.use_ssl = true
52
52
  request = Net::HTTP::Delete.new(uri.request_uri, initheader = {'Content-Type' =>'application/json'})
53
- request.body = "[ #{data.to_json} ]"
53
+ request.body = "[#{data.to_json}]"
54
54
  response = https.request(request)
55
55
  rescue Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError,
56
56
  Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError => e
@@ -62,7 +62,7 @@ module Gosquared
62
62
  response = false
63
63
  end
64
64
  end
65
- puts "Response Message: #{response.message}" if response
65
+
66
66
  response
67
67
  end
68
68
 
@@ -33,11 +33,11 @@ describe Gosquared::Account do
33
33
 
34
34
  before do
35
35
  stub_request(:post, "https://api.gosquared.com/account/v1/blocked/ips?api_key=demo&ip=20.15.33.99&site_token=GSN-2194840-F").
36
- with(:body => "[ \"\" ]",
36
+ with(:body => "[\"\"]",
37
37
  :headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json'}).
38
38
  to_return(:status => 200, :body => "", :headers => {})
39
39
  stub_request(:delete, "https://api.gosquared.com/account/v1/blocked/ips?api_key=demo&ip=20.15.33.99&site_token=GSN-2194840-F").
40
- with(:body => "[ \"\" ]",
40
+ with(:body => "[\"\"]",
41
41
  :headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json'}).
42
42
  to_return(:status => 200, :body => "", :headers => {})
43
43
  end
@@ -6,7 +6,7 @@ describe Gosquared::Tracking do
6
6
  Gosquared::Tracking::DIMENSIONS.each do |dimension|
7
7
  before do
8
8
  stub_request(:post, "https://api.gosquared.com/tracking/v1/#{dimension}?api_key=demo&site_token=GSN-2194840-F").
9
- with(:body => "[ {\"person_id\":\"email:test@example.com\",\"properties\":{\"email\":\"test@example.com\"}} ]",
9
+ with(:body => "[{\"person_id\":\"email:test@example.com\",\"properties\":{\"email\":\"test@example.com\"}}]",
10
10
  :headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json', 'User-Agent'=>'ruby-client/'+VERSION }).
11
11
  to_return(:status => 200, :body => "", :headers => {response: "success"})
12
12
  end
@@ -23,7 +23,7 @@ describe Gosquared::Tracking do
23
23
  describe "#event" do
24
24
  before do
25
25
  stub_request(:post, "https://api.gosquared.com/tracking/v1/event?api_key=demo&site_token=GSN-2194840-F").
26
- with(:body => "[ {\"event\":{\"name\":\"event\"}} ]",
26
+ with(:body => "[{\"event\":{\"name\":\"event\"}}]",
27
27
  :headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json', 'User-Agent'=>'ruby-client/'+VERSION}).
28
28
  to_return(:status => 200, :body => "", :headers => {})
29
29
  @data = {person_id: nil, event: { name: 'event' } }
@@ -36,7 +36,7 @@ describe Gosquared::Tracking do
36
36
 
37
37
  before do
38
38
  stub_request(:post, "https://api.gosquared.com/tracking/v1/event?api_key=demo&site_token=GSN-2194840-F").
39
- with(:body => "[ {\"person_id\":\"12345\",\"event\":{\"name\":\"event\"}} ]",
39
+ with(:body => "[{\"person_id\":\"12345\",\"event\":{\"name\":\"event\"}}]",
40
40
  :headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json', 'User-Agent'=>'ruby-client/'+VERSION}).
41
41
  to_return(:status => 200, :body => "", :headers => {})
42
42
  @data = {person_id: '12345', event: { name: 'event' } }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gosquared
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.6
4
+ version: 3.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Russell Vaughan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-08 00:00:00.000000000 Z
11
+ date: 2018-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -89,10 +89,10 @@ signing_key:
89
89
  specification_version: 4
90
90
  summary: GoSquared Ruby Library
91
91
  test_files:
92
- - spec/account_spec.rb
93
- - spec/client_spec.rb
94
- - spec/now_spec.rb
95
- - spec/people_spec.rb
96
92
  - spec/spec_helper.rb
97
93
  - spec/tracking_spec.rb
94
+ - spec/account_spec.rb
95
+ - spec/client_spec.rb
98
96
  - spec/trends_spec.rb
97
+ - spec/people_spec.rb
98
+ - spec/now_spec.rb