veezo-location-api 0.1.5 → 0.1.10

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
  SHA256:
3
- metadata.gz: 929c8b6f8a61f83081b829269d43e551a08d7592558cb9c4e1e1237f83af600c
4
- data.tar.gz: eed6dd3232f3e192a10e03102e915fd240389d4ff168a09a2d2c7c0d610f94a4
3
+ metadata.gz: 2a8b1750ea34c1d56c2e24fb3bfde3a99d0086a462219f6d6be04fb26d9874dc
4
+ data.tar.gz: ea17e7cbacc8c3fc34752223175103327b1b82a111efc68c27c6acc69de0306f
5
5
  SHA512:
6
- metadata.gz: f5de50282141e96f31425694a7038f720ed32c072e0099da072425a7c70837adbadb4047a18445acb495810678fd78bb62d63a7663c1378fba6a948b5384ea35
7
- data.tar.gz: 9937b7c11f5e64381403b0919396b3bd28b4d376879f5597349a0654c2045c07eea8f093e0bf4ac563ae4cde2fdd0aa88e373f519939434f8078c434dceddab3
6
+ metadata.gz: 11d2cbacfa3f2855a7266b498712acdd33bf0fdb5443a9411a62c05b4e263ff88f427430d1a7b15f506b31972ac8a229fa332f8a5b08704aff0a0ae31a399c00
7
+ data.tar.gz: ca989351fd22894c7ef524a0206cf45898185df109e8e4dbacd48d492c58f5eaf7060c80a65f4f99736c5a8922700c698dc2189009ae9768db4a1bd56d138f5b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- veezo-location-api (0.1.5)
4
+ veezo-location-api (0.1.9)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'openssl'
3
4
  require 'net/http'
4
5
  require 'json'
5
6
  require 'veezo_location_api/response'
@@ -36,7 +37,8 @@ module VeezoLocationApi
36
37
 
37
38
  def request(uri, request)
38
39
  http_client = Net::HTTP.new(uri.host, uri.port).tap do |client|
39
- client.use_ssl = (uri.scheme == 'https')
40
+ client.use_ssl = (uri.scheme == "https")
41
+ client.verify_mode = OpenSSL::SSL::VERIFY_NONE
40
42
  end
41
43
 
42
44
  response = http_client.request(request)
@@ -47,11 +49,11 @@ module VeezoLocationApi
47
49
 
48
50
  def response(response)
49
51
  code = response.code.to_i
50
- success = (code == 200)
52
+ success = (code >= 200 || code < 300)
51
53
 
52
54
  if success
53
55
  temp_data = JSON.parse(response.body)
54
- data = temp_data.data if temp_data.data.any?
56
+ data = temp_data['data'] if temp_data['data'].any?
55
57
  end
56
58
 
57
59
  Response.new(
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module VeezoLocationApi
4
- VERSION = '0.1.5'
4
+ VERSION = '0.1.10'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: veezo-location-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo Barbiero
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-10 00:00:00.000000000 Z
11
+ date: 2020-06-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Gsed to expose the methods used for integration with the api.
14
14
  email: