safeguard-api 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +8 -8
  2. data/lib/safeguard-api/api.rb +4 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OGE5NTE2YWU3ZjRkZDBhNTkyNjNkNGZlZTdlNTVlNTU4MzZhMGFjMQ==
4
+ MDU4NmFkOWU2MGYxNGNjY2YzNTBhMzQ1ZGZiMWRhZTYxZDc5NDI1ZQ==
5
5
  data.tar.gz: !binary |-
6
- OTA0Zjc2MTk2MDIzNzgxMjhlNzk5M2FmMjE2MWViZTI0MjhmMDc0MA==
6
+ ZDcwZWM5MGRjYzhjNWU4ZTMxNjMwMmZkNmY5NGY0ZTZmNjYxYTJiNQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NTA4NjY3NWM3ZWY0NTYzM2E3YjJmN2Q0NjkyODJiYjZlOTk0OWQ4NTYxNzdm
10
- MzQ0NjM0ZGMzODIxNmJjNDIwYTI3ZWM3ZjZlNDg1ZTEzMjI5ZGFhMTBiNDYx
11
- OGE1MDcwMjYwZGYxNzUzZmU3NmE3YTE4ODQzYjBlMGFmNjY3ZTA=
9
+ NWNmMTIzMGYzMzYwYzJhMTQ0ZTJhZTdmYWJlMDQxOTNlZTdlZjE0ODIxMGYw
10
+ NTYxNjU2ZDdlYjgyYjhiZDc5NWNkMDdmMmIyZDU1MjNkYWJmMWNiMDI5ZDRl
11
+ OWQyNzhkYzg1ZTRlNDc3ZDNmNWIzZjUwNGQ5ZTZkZTlmOWE1ZTE=
12
12
  data.tar.gz: !binary |-
13
- Nzc4MTg5YzdiYjhlN2FhYTM0YjBkMzdmNTlkOTY3YjEwY2MyZDI3MGZlMjRk
14
- Mjc0Y2JiNDMwNzg4OGI3ZDU3Nzk1Y2IxNmRmYjY2MzQwNDRmNjg4NzU0ZTM4
15
- YmIxMTAxODM1YzUyNDY1M2FhNTc2MGI2OGNlYzZhNzUxYmFjNjE=
13
+ ZTAwZmY1ZmZmOWJmNjE2OWI4YzU3M2FhNzE4OWNiMzJhMTk4OTU3OTAxMDll
14
+ MzhmYWUxODJjMzg2ZjJlMWFjZWVjM2UzZjVjYzNmMTJhYWZiOWVjMzI0MTkz
15
+ Nzc3ZDAzM2NjMzg4MTQxNWY2M2I3ZjA2NjE2Mzg0NDE5MWJjOTg=
@@ -1,6 +1,7 @@
1
1
  require 'net/http'
2
2
  require 'open-uri'
3
3
  require 'json'
4
+ require 'httpclient'
4
5
  module Safeguard
5
6
  class API
6
7
 
@@ -16,8 +17,9 @@ module Safeguard
16
17
  def self.get uri
17
18
  begin
18
19
  url = "#{Safeguard.api_uri}/#{uri}&api_key=#{Safeguard.api_key}"
19
- response = URI.parse(url).read
20
- parsed_response = parse_response response
20
+ http = HTTPClient.new
21
+ response = http.get(url)
22
+ parsed_response = parse_response response.body
21
23
  rescue
22
24
  parsed_response = {:status => 500}
23
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: safeguard-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''