geoloqi 0.9.35 → 0.9.36
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/Rakefile +1 -1
- data/lib/geoloqi.rb +1 -1
- data/lib/geoloqi/config.rb +75 -2
- data/lib/geoloqi/error.rb +24 -1
- data/lib/geoloqi/response.rb +18 -1
- data/lib/geoloqi/session.rb +64 -23
- data/lib/geoloqi/version.rb +1 -1
- data/spec/{geoloqi_api_error_spec.rb → geoloqi/api_error_spec.rb} +1 -1
- data/spec/{geoloqi_config.rb → geoloqi/config_spec.rb} +1 -1
- data/spec/{geoloqi_session_spec.rb → geoloqi/session_spec.rb} +2 -2
- metadata +156 -129
data/.gitignore
CHANGED
data/Rakefile
CHANGED
data/lib/geoloqi.rb
CHANGED
@@ -11,7 +11,7 @@ require 'geoloqi/version'
|
|
11
11
|
|
12
12
|
module Geoloqi
|
13
13
|
# Location of the Bundle of CA Root Certificates.
|
14
|
-
SSL_CERT_FILE = File.join(File.dirname(__FILE__), 'geoloqi
|
14
|
+
SSL_CERT_FILE = File.join(File.dirname(__FILE__), 'geoloqi', 'data', 'ca-certificates.crt')
|
15
15
|
|
16
16
|
# Location of the global {Geoloqi::Config} object
|
17
17
|
@@config = Config.new
|
data/lib/geoloqi/config.rb
CHANGED
@@ -1,8 +1,77 @@
|
|
1
1
|
module Geoloqi
|
2
2
|
class Config
|
3
|
-
|
4
|
-
|
3
|
+
# OAuth2 Client ID for the application. Retrieve from the Geoloqi Developers Site.
|
4
|
+
#
|
5
|
+
# @return [String]
|
6
|
+
# @example
|
7
|
+
# Geoloqi.config.client_id = 'YOUR APPLICATION CLIENT ID'
|
8
|
+
attr_accessor :client_id
|
9
|
+
|
10
|
+
# OAuth2 Client Secret for the application. Retrieve from the Geoloqi Developers Site.
|
11
|
+
# @return [String]
|
12
|
+
attr_accessor :client_secret
|
13
|
+
|
14
|
+
# OAuth2 Redirect URI. This is the location the user will be redirected to after authorization from the Geoloqi OAuth2 server.
|
15
|
+
# If this is not provided, the user will be redirected to the URI configured at the Geoloqi Developers Site.
|
16
|
+
# @return [String]
|
17
|
+
attr_accessor :redirect_uri
|
18
|
+
|
19
|
+
# Which HTTP adapter to use for Faraday. Defaults to :net_http
|
20
|
+
#
|
21
|
+
# @return [Symbol]
|
22
|
+
# @example
|
23
|
+
# Geoloqi.config.adapter = :typhoeus
|
24
|
+
attr_accessor :adapter
|
25
|
+
|
26
|
+
# Provide a logger. This can be any object that responds to print and puts (anything that inherits IO).
|
27
|
+
#
|
28
|
+
# @return [IO]
|
29
|
+
# @example
|
30
|
+
# Geoloqi.config.logger = STDOUT
|
31
|
+
attr_accessor :logger
|
32
|
+
|
33
|
+
# Use Hashie::Mash for return objects, which provides dot-style data retrieval.
|
34
|
+
#
|
35
|
+
# @see https://github.com/intridea/hashie
|
36
|
+
# @return [Boolean]
|
37
|
+
# @example
|
38
|
+
# Geoloqi.config.use_hashie_mash = true
|
39
|
+
#
|
40
|
+
# # Get profile and retrieve data via Hashie::Mash dot notation
|
41
|
+
# result = Geoloqi.get 'YOUR ACCESS TOKEN', 'account/profile'
|
42
|
+
# result.name # => "Your Name"
|
43
|
+
attr_accessor :use_hashie_mash
|
44
|
+
|
45
|
+
# Throw Geoloqi::ApiError exception on API errors. Defaults to true. If set to false, you will need to check for the error key in responses.
|
46
|
+
#
|
47
|
+
# @return [Boolean]
|
48
|
+
# @example
|
49
|
+
# Geoloqi.config :throw_exceptions = false
|
50
|
+
attr_accessor :throw_exceptions
|
51
|
+
|
52
|
+
# Use dynamic error class names, which inherit from Geoloqi::ApiError. This may be deprecated in a future release.
|
53
|
+
#
|
54
|
+
# @return [Boolean]
|
55
|
+
attr_accessor :use_dynamic_exceptions
|
56
|
+
|
57
|
+
# Use symbols for keys in Hash response. Defaults to true.
|
58
|
+
#
|
59
|
+
# @return [Boolean]
|
60
|
+
# @example
|
61
|
+
# Geoloqi.config.throw_exceptions = true
|
62
|
+
attr_accessor :symbolize_names
|
5
63
|
|
64
|
+
|
65
|
+
# Instantiate a new Geoloqi::Config object.
|
66
|
+
#
|
67
|
+
# @param opts A hash of the config settings.
|
68
|
+
# @return [Config]
|
69
|
+
# @example
|
70
|
+
# # Dynamically create a Geoloqi::Config object
|
71
|
+
# geoloqi_config = Geoloqi::Config.new :use_hashie_mash => true, :throw_exceptions => false
|
72
|
+
#
|
73
|
+
# # Use geoloqi_config to create new session
|
74
|
+
# geoloqi_session = Geoloqi::Session.new :access_token => 'YOUR ACCESS TOKEN', :config => geoloqi_config
|
6
75
|
def initialize(opts={})
|
7
76
|
self.use_hashie_mash ||= false
|
8
77
|
self.throw_exceptions ||= true
|
@@ -18,10 +87,14 @@ module Geoloqi
|
|
18
87
|
end
|
19
88
|
end
|
20
89
|
|
90
|
+
# Check if the OAuth2 Client ID exists.
|
91
|
+
# @return [Boolean]
|
21
92
|
def client_id?
|
22
93
|
!client_id.nil? && !client_id.empty?
|
23
94
|
end
|
24
95
|
|
96
|
+
# Check if OAuth2 Client Secret exists.
|
97
|
+
# @return [Boolean]
|
25
98
|
def client_secret?
|
26
99
|
!client_secret.nil? && !client_secret.empty?
|
27
100
|
end
|
data/lib/geoloqi/error.rb
CHANGED
@@ -1,6 +1,26 @@
|
|
1
1
|
module Geoloqi
|
2
|
+
# Used for Geoloqi API errors (errors originating from the API server itself).
|
2
3
|
class ApiError < StandardError
|
3
|
-
|
4
|
+
# Status code of error
|
5
|
+
# @return [Fixnum]
|
6
|
+
# @example
|
7
|
+
# 404, 500
|
8
|
+
attr_reader :status
|
9
|
+
|
10
|
+
# Type of error
|
11
|
+
# @return [String]
|
12
|
+
# @example
|
13
|
+
# "not_found", "invalid_input"
|
14
|
+
attr_reader :type
|
15
|
+
|
16
|
+
# Human-readable explanation of error.
|
17
|
+
# @return [String]
|
18
|
+
# @example
|
19
|
+
# "The requested resource could not found"
|
20
|
+
attr_reader :reason
|
21
|
+
|
22
|
+
# Instantiate a new ApiError object
|
23
|
+
# @return [ApiError]
|
4
24
|
def initialize(status, type, reason=nil)
|
5
25
|
@status = status
|
6
26
|
@type = type
|
@@ -12,6 +32,9 @@ module Geoloqi
|
|
12
32
|
end
|
13
33
|
end
|
14
34
|
|
35
|
+
# Used for config errors.
|
15
36
|
class Error < StandardError; end
|
37
|
+
|
38
|
+
# Used for argument errors.
|
16
39
|
class ArgumentError < ArgumentError; end
|
17
40
|
end
|
data/lib/geoloqi/response.rb
CHANGED
@@ -1,6 +1,23 @@
|
|
1
1
|
module Geoloqi
|
2
2
|
class Response
|
3
|
-
|
3
|
+
# The HTTP status code of the response
|
4
|
+
# @return [Fixnum]
|
5
|
+
attr_reader :status
|
6
|
+
|
7
|
+
# The HTTP Headers of the response
|
8
|
+
# @return [Hash]
|
9
|
+
attr_reader :headers
|
10
|
+
|
11
|
+
# The body of the response
|
12
|
+
# @return [String]
|
13
|
+
attr_reader :body
|
14
|
+
|
15
|
+
# Instantiate a response object.
|
16
|
+
# @param status [Fixnum] The HTTP status code of the response
|
17
|
+
# @param headers [Hash] The HTTP Headers of the response
|
18
|
+
# @param body [String] The body of the response
|
19
|
+
# @example
|
20
|
+
# Geoloqi::Response.new 200, {'Server' => 'geoloqi-platform'}, '{"response":"ok"}'
|
4
21
|
def initialize(status, headers, body)
|
5
22
|
@status = status
|
6
23
|
@headers = headers
|
data/lib/geoloqi/session.rb
CHANGED
@@ -1,28 +1,39 @@
|
|
1
|
+
require 'thread'
|
2
|
+
|
1
3
|
module Geoloqi
|
2
|
-
# This class is used to instantiate a session object. It is designed to be thread safe, and multiple sessions can be used
|
3
|
-
# allowing for one ruby application to potentially handle multiple Geoloqi applications.
|
4
|
+
# This class is used to instantiate a session object. It is designed to be thread safe, and multiple sessions can be used
|
5
|
+
# simultaneously, allowing for one ruby application to potentially handle multiple Geoloqi applications.
|
4
6
|
#
|
5
7
|
# @example
|
6
8
|
# # Instantiate a session with your access token (obtained from the Geoloqi Developers Site):
|
7
|
-
#
|
9
|
+
# geoloqi_session = Geoloqi::Session.new :access_token => 'YOUR ACCESS TOKEN'
|
8
10
|
#
|
9
11
|
# # Instantiate a session with a custom config:
|
10
|
-
#
|
12
|
+
# geoloqi_session = Geoloqi::Session.new :access_token => 'YOUR ACCESS TOKEN', :config => {:use_hashie_mash => true}
|
11
13
|
#
|
12
14
|
# # Instantiate a session with OAuth2 credentials (obtained from the Geoloqi Developers Site):
|
13
|
-
#
|
15
|
+
# geoloqi_session = Geoloqi::Session.new :config => {:client_id => 'CLIENT ID', :client_secret => 'CLIENT SECRET'}
|
14
16
|
#
|
15
17
|
# # Get profile:
|
16
|
-
# result =
|
18
|
+
# result = geoloqi_session.get 'account/profile'
|
17
19
|
class Session
|
18
|
-
#
|
20
|
+
# The auth Hash, which is provided by the OAuth2 response. This can be stored externally and used to re-initialize the session.
|
19
21
|
# @return [Hash]
|
20
22
|
attr_reader :auth
|
21
|
-
|
22
|
-
#
|
23
|
-
# @return [
|
23
|
+
|
24
|
+
# The config object attached to this session. It is unique to this session, and can be replaced/changed dynamically.
|
25
|
+
# @return [Config]
|
24
26
|
attr_accessor :config
|
25
27
|
|
28
|
+
# Instantiate a Geoloqi session.
|
29
|
+
#
|
30
|
+
# @return [Config]
|
31
|
+
# @example
|
32
|
+
# # With access token
|
33
|
+
# geoloqi_session = Geoloqi::Session.new :access_token => 'YOUR ACCESS TOKEN'
|
34
|
+
#
|
35
|
+
# # With OAuth2
|
36
|
+
# geoloqi_session = Geoloqi::Session.new :config => {:client_id => 'CLIENT ID', :client_secret => 'CLIENT SECRET'}
|
26
37
|
def initialize(opts={})
|
27
38
|
opts[:config] = Geoloqi::Config.new opts[:config] if opts[:config].is_a? Hash
|
28
39
|
@config = opts[:config] || (Geoloqi.config || Geoloqi::Config.new)
|
@@ -35,7 +46,8 @@ module Geoloqi
|
|
35
46
|
end
|
36
47
|
|
37
48
|
def auth=(hash)
|
38
|
-
|
49
|
+
new_auth = hash.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
50
|
+
synchronize { @auth = new_auth }
|
39
51
|
end
|
40
52
|
|
41
53
|
# The access token for this session.
|
@@ -60,7 +72,7 @@ module Geoloqi
|
|
60
72
|
# Makes a GET request to the Geoloqi API server and returns response.
|
61
73
|
#
|
62
74
|
# @param [String] path
|
63
|
-
# Path to the resource being requested
|
75
|
+
# Path to the resource being requested.
|
64
76
|
#
|
65
77
|
# @param [String, Hash] query (optional)
|
66
78
|
# A query string or Hash to be appended to the request.
|
@@ -68,13 +80,14 @@ module Geoloqi
|
|
68
80
|
# @param [Hash] headers (optional)
|
69
81
|
# Adds and overwrites headers in request sent to server.
|
70
82
|
#
|
71
|
-
# @return [Hash
|
83
|
+
# @return [Hash,Hashie::Mash]
|
84
|
+
# @see #post
|
72
85
|
# @example
|
73
86
|
# # Get your user profile
|
74
|
-
#
|
87
|
+
# result = geoloqi_session.get 'YOUR ACCESS TOKEN', 'account/profile'
|
75
88
|
#
|
76
89
|
# # Get the last 5 locations
|
77
|
-
#
|
90
|
+
# result = geoloqi_session.get 'YOUR ACCESS TOKEN', 'account/profile', :count => 5
|
78
91
|
def get(path, query=nil, headers={})
|
79
92
|
run :get, path, query, headers
|
80
93
|
end
|
@@ -82,28 +95,29 @@ module Geoloqi
|
|
82
95
|
# Makes a POST request to the Geoloqi API server and returns response.
|
83
96
|
#
|
84
97
|
# @param [String] path
|
85
|
-
#
|
98
|
+
# Path to the resource being requested (example: '/account/profile').
|
86
99
|
#
|
87
100
|
# @param [String, Hash] query (optional)
|
88
|
-
#
|
101
|
+
# A query string or Hash to be converted to POST parameters.
|
89
102
|
#
|
90
103
|
# @param [Hash] headers (optional)
|
91
|
-
#
|
104
|
+
# Adds and overwrites headers in request sent to server.
|
92
105
|
#
|
93
|
-
# @return [Hash
|
106
|
+
# @return [Hash,Hashie::Mash]
|
107
|
+
# @see #get
|
94
108
|
# @example
|
95
109
|
# # Create a new layer
|
96
|
-
#
|
110
|
+
# result = geoloqi_session.post 'layer/create', :name => 'Portland Food Carts'
|
97
111
|
def post(path, query=nil, headers={})
|
98
112
|
run :post, path, query, headers
|
99
113
|
end
|
100
114
|
|
101
|
-
# Makes a
|
115
|
+
# Makes a request to the Geoloqi API server.
|
102
116
|
#
|
103
|
-
# @return [Hash
|
117
|
+
# @return [Hash,Hashie::Mash]
|
104
118
|
# @example
|
105
119
|
# # Create a new layer
|
106
|
-
#
|
120
|
+
# result = geoloqi_session.run :get, 'layer/create', :name => 'Northeast Portland'
|
107
121
|
def run(meth, path, query=nil, headers={})
|
108
122
|
renew_access_token! if auth[:expires_at] && Time.rfc2822(auth[:expires_at]) <= Time.now && !(path =~ /^\/?oauth\/token$/)
|
109
123
|
retry_attempt = 0
|
@@ -137,6 +151,11 @@ module Geoloqi
|
|
137
151
|
@config.use_hashie_mash ? Hashie::Mash.new(hash) : hash
|
138
152
|
end
|
139
153
|
|
154
|
+
# Makes a low-level request to the Geoloqi API server. It does no processing of the response.
|
155
|
+
#
|
156
|
+
# @return [Response]
|
157
|
+
# @example
|
158
|
+
# result = geoloqi_session.execute :get, 'account/profile'
|
140
159
|
def execute(meth, path, query=nil, headers={})
|
141
160
|
query = Rack::Utils.parse_query query if query.is_a?(String)
|
142
161
|
headers = default_headers.merge! headers
|
@@ -159,6 +178,11 @@ module Geoloqi
|
|
159
178
|
Response.new raw.status, raw.headers, raw.body
|
160
179
|
end
|
161
180
|
|
181
|
+
# Used to retrieve the access token from the Geoloqi OAuth2 server. This is fairly low level and you shouldn't need to use it directly.
|
182
|
+
#
|
183
|
+
# @return [Hash] - The auth hash used to persist the session object.
|
184
|
+
# @see #renew_access_token!
|
185
|
+
# @see #get_auth
|
162
186
|
def establish(opts={})
|
163
187
|
require 'client_id and client_secret are required to get access token' unless @config.client_id? && @config.client_secret?
|
164
188
|
auth = post 'oauth/token', {:client_id => @config.client_id,
|
@@ -171,10 +195,21 @@ module Geoloqi
|
|
171
195
|
self.auth
|
172
196
|
end
|
173
197
|
|
198
|
+
# Renew the access token provided from Geoloqi using the stored refresh token. This method is automatically called by the session object
|
199
|
+
# when it detects an expiration, so you shouldn't need to explicitly call it.
|
200
|
+
#
|
201
|
+
# @return [Hash] The auth hash used to persist the session object.
|
202
|
+
# @see #establish
|
174
203
|
def renew_access_token!
|
175
204
|
establish :grant_type => 'refresh_token', :refresh_token => self.auth[:refresh_token]
|
176
205
|
end
|
177
206
|
|
207
|
+
# Get the OAuth2 authentication information. This call also stores the auth to the session automatically.
|
208
|
+
#
|
209
|
+
# @param code [String] The code provided by the Geoloqi OAuth2 server.
|
210
|
+
# @param redirect_uri [String] The redirect URI provided to the Geoloqi OAuth2 server. This value must match the redirect_uri sent to the server.
|
211
|
+
# @return [Hash] The auth hash used to persist the session object.
|
212
|
+
# @see #establish
|
178
213
|
def get_auth(code, redirect_uri=@config.redirect_uri)
|
179
214
|
establish :grant_type => 'authorization_code', :code => code, :redirect_uri => redirect_uri
|
180
215
|
end
|
@@ -192,5 +227,11 @@ module Geoloqi
|
|
192
227
|
headers['Authorization'] = "OAuth #{access_token}" if access_token
|
193
228
|
headers
|
194
229
|
end
|
230
|
+
|
231
|
+
# Used to retrieve a semaphore lock for thread safety.
|
232
|
+
def synchronize(&block)
|
233
|
+
@@semaphore ||= Mutex.new
|
234
|
+
@@semaphore.synchronize &block
|
235
|
+
end
|
195
236
|
end
|
196
237
|
end
|
data/lib/geoloqi/version.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require File.join File.dirname(__FILE__), 'env.rb'
|
1
|
+
require File.join File.dirname(__FILE__), '..', 'env.rb'
|
2
2
|
|
3
3
|
describe Geoloqi::Session do
|
4
4
|
describe 'with nothing passed' do
|
@@ -299,4 +299,4 @@ describe Geoloqi::Session do
|
|
299
299
|
expect { @session.auth[:access_token] == 'access_token4567' }
|
300
300
|
end
|
301
301
|
end
|
302
|
-
end
|
302
|
+
end
|
metadata
CHANGED
@@ -1,110 +1,133 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geoloqi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 9
|
8
|
+
- 36
|
9
|
+
version: 0.9.36
|
6
10
|
platform: ruby
|
7
11
|
authors:
|
8
|
-
|
9
|
-
|
12
|
+
- Kyle Drake
|
13
|
+
- Aaron Parecki
|
10
14
|
autorequire:
|
11
15
|
bindir: bin
|
12
16
|
cert_chain: []
|
13
17
|
|
14
|
-
date: 2012-01-08 00:00:00
|
18
|
+
date: 2012-01-08 00:00:00 -08:00
|
19
|
+
default_executable:
|
15
20
|
dependencies:
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: json
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 0
|
30
|
+
version: "0"
|
31
|
+
type: :runtime
|
32
|
+
version_requirements: *id001
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: faraday
|
35
|
+
prerelease: false
|
36
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
segments:
|
41
|
+
- 0
|
42
|
+
- 6
|
43
|
+
- 1
|
44
|
+
version: 0.6.1
|
45
|
+
type: :runtime
|
46
|
+
version_requirements: *id002
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rake
|
49
|
+
prerelease: false
|
50
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
segments:
|
55
|
+
- 0
|
56
|
+
version: "0"
|
57
|
+
type: :development
|
58
|
+
version_requirements: *id003
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: wrong
|
61
|
+
prerelease: false
|
62
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - "="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
segments:
|
67
|
+
- 0
|
68
|
+
- 6
|
69
|
+
- 0
|
70
|
+
version: 0.6.0
|
71
|
+
type: :development
|
72
|
+
version_requirements: *id004
|
73
|
+
- !ruby/object:Gem::Dependency
|
74
|
+
name: minitest
|
75
|
+
prerelease: false
|
76
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - "="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
segments:
|
81
|
+
- 2
|
82
|
+
- 2
|
83
|
+
- 2
|
84
|
+
version: 2.2.2
|
85
|
+
type: :development
|
86
|
+
version_requirements: *id005
|
87
|
+
- !ruby/object:Gem::Dependency
|
88
|
+
name: webmock
|
89
|
+
prerelease: false
|
90
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - "="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
segments:
|
95
|
+
- 1
|
96
|
+
- 6
|
97
|
+
- 4
|
98
|
+
version: 1.6.4
|
99
|
+
type: :development
|
100
|
+
version_requirements: *id006
|
101
|
+
- !ruby/object:Gem::Dependency
|
102
|
+
name: hashie
|
103
|
+
prerelease: false
|
104
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - "="
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
segments:
|
109
|
+
- 1
|
110
|
+
- 0
|
111
|
+
- 0
|
112
|
+
version: 1.0.0
|
113
|
+
type: :development
|
114
|
+
version_requirements: *id007
|
115
|
+
- !ruby/object:Gem::Dependency
|
116
|
+
name: yard
|
117
|
+
prerelease: false
|
118
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
segments:
|
123
|
+
- 0
|
124
|
+
version: "0"
|
125
|
+
type: :development
|
126
|
+
version_requirements: *id008
|
104
127
|
description: Powerful, flexible, lightweight interface to the awesome Geoloqi platform API! Uses Faraday, and can be used with Ruby 1.9 and EM-Synchrony for really fast, highly concurrent development.
|
105
128
|
email:
|
106
|
-
|
107
|
-
|
129
|
+
- kyle@geoloqi.com
|
130
|
+
- aaron@geoloqi.com
|
108
131
|
executables: []
|
109
132
|
|
110
133
|
extensions: []
|
@@ -112,29 +135,30 @@ extensions: []
|
|
112
135
|
extra_rdoc_files: []
|
113
136
|
|
114
137
|
files:
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
+
- .gitignore
|
139
|
+
- .travis.yml
|
140
|
+
- .yardopts
|
141
|
+
- Gemfile
|
142
|
+
- LICENSE.md
|
143
|
+
- README.md
|
144
|
+
- Rakefile
|
145
|
+
- examples/simple.rb
|
146
|
+
- examples/sinatra_simple.rb
|
147
|
+
- examples/sinatra_synchrony.rb
|
148
|
+
- geoloqi.gemspec
|
149
|
+
- lib/geoloqi.rb
|
150
|
+
- lib/geoloqi/config.rb
|
151
|
+
- lib/geoloqi/data/ca-certificates.crt
|
152
|
+
- lib/geoloqi/error.rb
|
153
|
+
- lib/geoloqi/response.rb
|
154
|
+
- lib/geoloqi/session.rb
|
155
|
+
- lib/geoloqi/version.rb
|
156
|
+
- spec/env.rb
|
157
|
+
- spec/geoloqi/api_error_spec.rb
|
158
|
+
- spec/geoloqi/config_spec.rb
|
159
|
+
- spec/geoloqi/session_spec.rb
|
160
|
+
- spec/geoloqi_spec.rb
|
161
|
+
has_rdoc: true
|
138
162
|
homepage: http://github.com/geoloqi/geoloqi-ruby
|
139
163
|
licenses: []
|
140
164
|
|
@@ -142,26 +166,29 @@ post_install_message:
|
|
142
166
|
rdoc_options: []
|
143
167
|
|
144
168
|
require_paths:
|
145
|
-
|
169
|
+
- lib
|
146
170
|
required_ruby_version: !ruby/object:Gem::Requirement
|
147
|
-
none: false
|
148
171
|
requirements:
|
149
|
-
|
150
|
-
|
151
|
-
|
172
|
+
- - ">="
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
segments:
|
175
|
+
- 0
|
176
|
+
version: "0"
|
152
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
178
|
requirements:
|
155
|
-
|
156
|
-
|
157
|
-
|
179
|
+
- - ">="
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
segments:
|
182
|
+
- 1
|
183
|
+
- 3
|
184
|
+
- 4
|
185
|
+
version: 1.3.4
|
158
186
|
requirements: []
|
159
187
|
|
160
188
|
rubyforge_project: geoloqi
|
161
|
-
rubygems_version: 1.
|
189
|
+
rubygems_version: 1.3.6
|
162
190
|
signing_key:
|
163
191
|
specification_version: 3
|
164
192
|
summary: Powerful, flexible, lightweight interface to the awesome Geoloqi platform API
|
165
193
|
test_files: []
|
166
194
|
|
167
|
-
has_rdoc:
|