geoplugin 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/geoplugin/locate.rb +1 -1
- data/lib/geoplugin/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee26af11b2f1f6fe3798d56de65783059973c715
|
4
|
+
data.tar.gz: 3aee2b55aa56c3759d2bf5d9ad41501a484c2a14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e27db2bc38d7569b9866ac76cd4fbcd9fe999310644618dec3140c9beffca94c6262ad608eb9e4a375625ec79d2054a1889c6b0e3024ee2c5904d2f1f842dfd
|
7
|
+
data.tar.gz: 11dc5898d46b151d313dd581dfa458c63b3d80624de749c876a79d50c74c2375718d3c1454141d3006a49085e144dd23e76a4408d3a21555805d18e8aa656252
|
data/lib/geoplugin/locate.rb
CHANGED
@@ -57,7 +57,7 @@ module Geoplugin
|
|
57
57
|
private_class_method
|
58
58
|
def self.apiresponse(ip = nil, options = {})
|
59
59
|
return [] unless (not ip or IPAddress.valid? ip)
|
60
|
-
url = "#{options[:ssl] ? API_SSL_URL : API_URL}?#{ip ? 'ip=' + ip : ''}#{options[:key] ? '&k=' + options[:key] : ''}#{options[:base_currency] ? '&base_currency=' + options[:base_currency] : ''}"
|
60
|
+
url = "#{options[:ssl] ? API_SSL_URL : API_URL}?#{ip ? 'ip=' + ip : '?jsoncallback=?'}#{options[:key] ? '&k=' + options[:key] : ''}#{options[:base_currency] ? '&base_currency=' + options[:base_currency] : ''}"
|
61
61
|
response = Faraday.get(URI.parse(URI.encode(url)))
|
62
62
|
response.success? ? JSON.parse(response.body) : []
|
63
63
|
end
|
data/lib/geoplugin/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geoplugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Davide Santangelo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|