geoloqi 0.9.37 → 0.9.38
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.
- data/.travis.yml +5 -1
 - data/README.md +3 -3
 - data/geoloqi.gemspec +0 -1
 - data/lib/geoloqi/batch.rb +9 -4
 - data/lib/geoloqi/session.rb +14 -0
 - data/lib/geoloqi/version.rb +1 -1
 - data/spec/env.rb +4 -4
 - data/spec/geoloqi/api_error_spec.rb +4 -4
 - data/spec/geoloqi/config_spec.rb +9 -9
 - data/spec/geoloqi/session_spec.rb +89 -45
 - data/spec/geoloqi_spec.rb +14 -14
 - metadata +11 -25
 
    
        data/.travis.yml
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | 
         @@ -1,8 +1,8 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            Geoloqi Library for Ruby [](http://travis-ci.org/geoloqi/geoloqi-ruby)
         
     | 
| 
       2 
2 
     | 
    
         
             
            ===
         
     | 
| 
       3 
     | 
    
         
            -
            Powerful, flexible, lightweight interface to the Geoloqi  
     | 
| 
      
 3 
     | 
    
         
            +
            Powerful, flexible, lightweight interface to the Geoloqi Platform API.
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
     | 
    
         
            -
            This library was developed with two goals in mind: to be as simple as possible, but also to be very powerful to allow for much higher-end development (multiple Geoloqi apps per instance, concurrency, performance).
         
     | 
| 
      
 5 
     | 
    
         
            +
            This library was developed with two goals in mind: to be as simple as possible, but also to be very powerful to allow for much higher-end development (multiple Geoloqi apps per instance, concurrency, performance, thread-safety).
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         
             
            Installation
         
     | 
| 
       8 
8 
     | 
    
         
             
            ---
         
     | 
| 
         @@ -98,7 +98,7 @@ Implementing OAuth2 is not difficult, because we've done all the hard work for y 
     | 
|
| 
       98 
98 
     | 
    
         
             
                  "You have successfully logged in as #{username}!"
         
     | 
| 
       99 
99 
     | 
    
         
             
                end
         
     | 
| 
       100 
100 
     | 
    
         | 
| 
       101 
     | 
    
         
            -
            Visit the [Geoloqi Sinatra plugin](http://geoloqi/sinatra-geoloqi) page to see instructions on usage.
         
     | 
| 
      
 101 
     | 
    
         
            +
            Visit the [Geoloqi Sinatra plugin](http://github.com/geoloqi/sinatra-geoloqi) page to see instructions on usage.
         
     | 
| 
       102 
102 
     | 
    
         | 
| 
       103 
103 
     | 
    
         
             
            A lower-level demonstration of the OAuth2 code can be found in the examples folder. This may be useful for anyone working to embed with other frameworks (such as Ruby on Rails).
         
     | 
| 
       104 
104 
     | 
    
         | 
    
        data/geoloqi.gemspec
    CHANGED
    
    | 
         @@ -18,7 +18,6 @@ Gem::Specification.new do |s| 
     | 
|
| 
       18 
18 
     | 
    
         
             
              s.add_dependency 'faraday',     '>= 0.6.1'
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
       20 
20 
     | 
    
         
             
              s.add_development_dependency 'rake',     '>= 0'
         
     | 
| 
       21 
     | 
    
         
            -
              s.add_development_dependency 'wrong',    '= 0.6.0'
         
     | 
| 
       22 
21 
     | 
    
         
             
              s.add_development_dependency 'minitest', '= 2.2.2'
         
     | 
| 
       23 
22 
     | 
    
         
             
              s.add_development_dependency 'webmock', '= 1.6.4'
         
     | 
| 
       24 
23 
     | 
    
         
             
              s.add_development_dependency 'hashie',  '= 1.0.0'
         
     | 
    
        data/lib/geoloqi/batch.rb
    CHANGED
    
    | 
         @@ -15,6 +15,15 @@ module Geoloqi 
     | 
|
| 
       15 
15 
     | 
    
         
             
                end
         
     | 
| 
       16 
16 
     | 
    
         | 
| 
       17 
17 
     | 
    
         
             
                def post(path, query=nil, headers={})
         
     | 
| 
      
 18 
     | 
    
         
            +
                   build_request path, query, headers
         
     | 
| 
      
 19 
     | 
    
         
            +
                end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                def get(path, query=nil, headers={})
         
     | 
| 
      
 22 
     | 
    
         
            +
                  path += "?#{Rack::Utils.parse_query query}" if query.is_a?(String)
         
     | 
| 
      
 23 
     | 
    
         
            +
                  build_request path, nil, headers
         
     | 
| 
      
 24 
     | 
    
         
            +
                end
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
                def build_request(path, query=nil, headers={})
         
     | 
| 
       18 
27 
     | 
    
         
             
                  @jobs << {
         
     | 
| 
       19 
28 
     | 
    
         
             
                    :relative_url => path,
         
     | 
| 
       20 
29 
     | 
    
         
             
                    :body => query,
         
     | 
| 
         @@ -22,10 +31,6 @@ module Geoloqi 
     | 
|
| 
       22 
31 
     | 
    
         
             
                  }
         
     | 
| 
       23 
32 
     | 
    
         
             
                end
         
     | 
| 
       24 
33 
     | 
    
         | 
| 
       25 
     | 
    
         
            -
                def get(path, query=nil, headers={})
         
     | 
| 
       26 
     | 
    
         
            -
                  raise NotImplementedError, 'get requests are not yet implemented in batch'
         
     | 
| 
       27 
     | 
    
         
            -
                end
         
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
34 
     | 
    
         
             
                def run!
         
     | 
| 
       30 
35 
     | 
    
         
             
                  results = []
         
     | 
| 
       31 
36 
     | 
    
         | 
    
        data/lib/geoloqi/session.rb
    CHANGED
    
    | 
         @@ -55,6 +55,20 @@ module Geoloqi 
     | 
|
| 
       55 
55 
     | 
    
         
             
                def access_token
         
     | 
| 
       56 
56 
     | 
    
         
             
                  @auth[:access_token]
         
     | 
| 
       57 
57 
     | 
    
         
             
                end
         
     | 
| 
      
 58 
     | 
    
         
            +
                
         
     | 
| 
      
 59 
     | 
    
         
            +
                # Retreive the application access token for this session.
         
     | 
| 
      
 60 
     | 
    
         
            +
                # This token is used in the same manner as the user access token, it simply allows the appliction to make
         
     | 
| 
      
 61 
     | 
    
         
            +
                # requests on behalf of itself instead of a user within the app.
         
     | 
| 
      
 62 
     | 
    
         
            +
                # It is strongly recommended that you keep this token private, and don't share it with
         
     | 
| 
      
 63 
     | 
    
         
            +
                # clients.
         
     | 
| 
      
 64 
     | 
    
         
            +
                #
         
     | 
| 
      
 65 
     | 
    
         
            +
                # This call makes a request to the API server for each instantiation of the object (so it will request once per
         
     | 
| 
      
 66 
     | 
    
         
            +
                # session object, and then cache the result). It is recommended that you cache this
         
     | 
| 
      
 67 
     | 
    
         
            +
                # with something like memcache to avoid latency issues.
         
     | 
| 
      
 68 
     | 
    
         
            +
                # @return [String]
         
     | 
| 
      
 69 
     | 
    
         
            +
                def application_access_token
         
     | 
| 
      
 70 
     | 
    
         
            +
                  @application_access_token ||= establish(:grant_type => 'client_credentials')[:access_token]
         
     | 
| 
      
 71 
     | 
    
         
            +
                end
         
     | 
| 
       58 
72 
     | 
    
         | 
| 
       59 
73 
     | 
    
         
             
                # Determines if the access token exists.
         
     | 
| 
       60 
74 
     | 
    
         
             
                # @return [Boolean]
         
     | 
    
        data/lib/geoloqi/version.rb
    CHANGED
    
    
    
        data/spec/env.rb
    CHANGED
    
    | 
         @@ -2,10 +2,11 @@ 
     | 
|
| 
       2 
2 
     | 
    
         
             
            require 'rubygems'
         
     | 
| 
       3 
3 
     | 
    
         
             
            require './lib/geoloqi.rb'
         
     | 
| 
       4 
4 
     | 
    
         
             
            require 'minitest/autorun'
         
     | 
| 
       5 
     | 
    
         
            -
            require 'wrong'
         
     | 
| 
       6 
     | 
    
         
            -
            require 'wrong/adapters/minitest'
         
     | 
| 
       7 
5 
     | 
    
         
             
            require 'webmock'
         
     | 
| 
       8 
6 
     | 
    
         | 
| 
      
 7 
     | 
    
         
            +
            # Fix for RBX
         
     | 
| 
      
 8 
     | 
    
         
            +
            require 'hashie/hash'
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
       9 
10 
     | 
    
         
             
            CLIENT_ID = 'client_id1234'
         
     | 
| 
       10 
11 
     | 
    
         
             
            CLIENT_SECRET = 'client_secret1234'
         
     | 
| 
       11 
12 
     | 
    
         
             
            ACCESS_TOKEN = 'access_token1234'
         
     | 
| 
         @@ -19,5 +20,4 @@ end 
     | 
|
| 
       19 
20 
     | 
    
         | 
| 
       20 
21 
     | 
    
         
             
            def api_url(path); "#{Geoloqi.api_url}/#{Geoloqi.api_version}/#{path}" end
         
     | 
| 
       21 
22 
     | 
    
         | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
            include WebMock::API
         
     | 
| 
      
 23 
     | 
    
         
            +
            include WebMock::API
         
     | 
| 
         @@ -3,9 +3,9 @@ require File.join File.dirname(__FILE__), '..', 'env.rb' 
     | 
|
| 
       3 
3 
     | 
    
         
             
            describe Geoloqi::ApiError do
         
     | 
| 
       4 
4 
     | 
    
         
             
              it 'throws exception properly and allows drill-down of message' do
         
     | 
| 
       5 
5 
     | 
    
         
             
                error = Geoloqi::ApiError.new 405, 'not_enough_cats', 'not enough cats to complete this request'
         
     | 
| 
       6 
     | 
    
         
            -
                 
     | 
| 
       7 
     | 
    
         
            -
                 
     | 
| 
       8 
     | 
    
         
            -
                 
     | 
| 
       9 
     | 
    
         
            -
                 
     | 
| 
      
 6 
     | 
    
         
            +
                error.status.must_equal 405
         
     | 
| 
      
 7 
     | 
    
         
            +
                error.type.must_equal 'not_enough_cats'
         
     | 
| 
      
 8 
     | 
    
         
            +
                error.reason.must_equal 'not enough cats to complete this request'
         
     | 
| 
      
 9 
     | 
    
         
            +
                error.message.must_equal "#{error.type} - #{error.reason} (405)"
         
     | 
| 
       10 
10 
     | 
    
         
             
              end
         
     | 
| 
       11 
11 
     | 
    
         
             
            end
         
     | 
    
        data/spec/geoloqi/config_spec.rb
    CHANGED
    
    | 
         @@ -5,10 +5,10 @@ describe Geoloqi::Config do 
     | 
|
| 
       5 
5 
     | 
    
         
             
                it 'returns authorize url' do
         
     | 
| 
       6 
6 
     | 
    
         
             
                  Geoloqi.config :client_id => CLIENT_ID, :client_secret => CLIENT_SECRET, :redirect_uri => 'http://blah.blah/test'
         
     | 
| 
       7 
7 
     | 
    
         
             
                  authorize_url = Geoloqi.authorize_url 'test'
         
     | 
| 
       8 
     | 
    
         
            -
                   
     | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
      
 8 
     | 
    
         
            +
                  authorize_url.must_equal "#{Geoloqi.oauth_url}?"+
         
     | 
| 
      
 9 
     | 
    
         
            +
                                           'response_type=code&'+
         
     | 
| 
      
 10 
     | 
    
         
            +
                                           "client_id=#{Rack::Utils.escape 'test'}&"+
         
     | 
| 
      
 11 
     | 
    
         
            +
                                           "redirect_uri=#{Rack::Utils.escape 'http://blah.blah/test'}"
         
     | 
| 
       12 
12 
     | 
    
         
             
                end
         
     | 
| 
       13 
13 
     | 
    
         
             
              end
         
     | 
| 
       14 
14 
     | 
    
         | 
| 
         @@ -21,7 +21,7 @@ describe Geoloqi::Config do 
     | 
|
| 
       21 
21 
     | 
    
         
             
                Geoloqi.config :client_id => CLIENT_ID, :client_secret => CLIENT_SECRET, :logger => io
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
23 
     | 
    
         
             
                Geoloqi.get ACCESS_TOKEN, 'account/username', :cats => 'lol'
         
     | 
| 
       24 
     | 
    
         
            -
                 
     | 
| 
      
 24 
     | 
    
         
            +
                io.string.must_match /Geoloqi::Session/
         
     | 
| 
       25 
25 
     | 
    
         
             
              end
         
     | 
| 
       26 
26 
     | 
    
         | 
| 
       27 
27 
     | 
    
         
             
              it 'displays log information if logger is provided and query is nil' do
         
     | 
| 
         @@ -33,14 +33,14 @@ describe Geoloqi::Config do 
     | 
|
| 
       33 
33 
     | 
    
         
             
                Geoloqi.config :client_id => CLIENT_ID, :client_secret => CLIENT_SECRET, :logger => io
         
     | 
| 
       34 
34 
     | 
    
         | 
| 
       35 
35 
     | 
    
         
             
                Geoloqi.get ACCESS_TOKEN, 'account/username'
         
     | 
| 
       36 
     | 
    
         
            -
                 
     | 
| 
      
 36 
     | 
    
         
            +
                io.string.must_match /Geoloqi::Session/
         
     | 
| 
       37 
37 
     | 
    
         
             
              end
         
     | 
| 
       38 
38 
     | 
    
         | 
| 
       39 
39 
     | 
    
         
             
              it 'correctly checks booleans for client_id and client_secret' do
         
     | 
| 
       40 
40 
     | 
    
         
             
                [:client_id, :client_secret].each do |k|
         
     | 
| 
       41 
     | 
    
         
            -
                   
     | 
| 
       42 
     | 
    
         
            -
                   
     | 
| 
       43 
     | 
    
         
            -
                   
     | 
| 
      
 41 
     | 
    
         
            +
                  Geoloqi.config(k => '').send("#{k}?").must_equal false
         
     | 
| 
      
 42 
     | 
    
         
            +
                  Geoloqi.config(k => nil).send("#{k}?").must_equal false
         
     | 
| 
      
 43 
     | 
    
         
            +
                  Geoloqi.config(k => 'lol').send("#{k}?").must_equal true
         
     | 
| 
       44 
44 
     | 
    
         
             
                end
         
     | 
| 
       45 
45 
     | 
    
         
             
              end
         
     | 
| 
       46 
46 
     | 
    
         
             
            end
         
     | 
| 
         @@ -7,7 +7,7 @@ describe Geoloqi::Session do 
     | 
|
| 
       7 
7 
     | 
    
         
             
                end
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
                it 'should not find access token' do
         
     | 
| 
       10 
     | 
    
         
            -
                   
     | 
| 
      
 10 
     | 
    
         
            +
                  @session.access_token?.must_equal false
         
     | 
| 
       11 
11 
     | 
    
         
             
                end
         
     | 
| 
       12 
12 
     | 
    
         
             
              end
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
         @@ -17,7 +17,9 @@ describe Geoloqi::Session do 
     | 
|
| 
       17 
17 
     | 
    
         
             
                          with(:headers => auth_headers).
         
     | 
| 
       18 
18 
     | 
    
         
             
                          to_return(:status => 404, :body => {:error => 'not_found'}.to_json)
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
       20 
     | 
    
         
            -
                   
     | 
| 
      
 20 
     | 
    
         
            +
                  lambda {
         
     | 
| 
      
 21 
     | 
    
         
            +
                    Geoloqi::Session.new(:access_token => 'access_token1234').get('badmethodcall')
         
     | 
| 
      
 22 
     | 
    
         
            +
                  }.must_raise Geoloqi::ApiError
         
     | 
| 
       21 
23 
     | 
    
         
             
                end
         
     | 
| 
       22 
24 
     | 
    
         
             
              end
         
     | 
| 
       23 
25 
     | 
    
         | 
| 
         @@ -32,7 +34,14 @@ describe Geoloqi::Session do 
     | 
|
| 
       32 
34 
     | 
    
         
             
                          with(:headers => auth_headers).
         
     | 
| 
       33 
35 
     | 
    
         
             
                          to_return(:status => 404, :body => {:error => 'not_found'}.to_json)
         
     | 
| 
       34 
36 
     | 
    
         | 
| 
       35 
     | 
    
         
            -
                   
     | 
| 
      
 37 
     | 
    
         
            +
                  # Class is autogenerated, so pre-create it so we don't get a missing constant error.
         
     | 
| 
      
 38 
     | 
    
         
            +
                  module Geoloqi
         
     | 
| 
      
 39 
     | 
    
         
            +
                    class NotFoundError < ApiError; end
         
     | 
| 
      
 40 
     | 
    
         
            +
                  end
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
                  lambda {
         
     | 
| 
      
 43 
     | 
    
         
            +
                    @session.get 'specialerror'
         
     | 
| 
      
 44 
     | 
    
         
            +
                  }.must_raise Geoloqi::NotFoundError
         
     | 
| 
       36 
45 
     | 
    
         
             
                end
         
     | 
| 
       37 
46 
     | 
    
         | 
| 
       38 
47 
     | 
    
         
             
                it 'should throw api error exception without custom name if empty' do
         
     | 
| 
         @@ -40,7 +49,9 @@ describe Geoloqi::Session do 
     | 
|
| 
       40 
49 
     | 
    
         
             
                          with(:headers => auth_headers).
         
     | 
| 
       41 
50 
     | 
    
         
             
                          to_return(:status => 404, :body => {:error => ''}.to_json)
         
     | 
| 
       42 
51 
     | 
    
         | 
| 
       43 
     | 
    
         
            -
                   
     | 
| 
      
 52 
     | 
    
         
            +
                  lambda {
         
     | 
| 
      
 53 
     | 
    
         
            +
                    @session.get 'specialerror'
         
     | 
| 
      
 54 
     | 
    
         
            +
                  }.must_raise Geoloqi::ApiError
         
     | 
| 
       44 
55 
     | 
    
         
             
                end
         
     | 
| 
       45 
56 
     | 
    
         
             
              end
         
     | 
| 
       46 
57 
     | 
    
         | 
| 
         @@ -55,7 +66,7 @@ describe Geoloqi::Session do 
     | 
|
| 
       55 
66 
     | 
    
         
             
                          to_return(:status => 404, :body => {:error => 'not_found'}.to_json)
         
     | 
| 
       56 
67 
     | 
    
         | 
| 
       57 
68 
     | 
    
         
             
                  response = @session.get 'badmethodcall'
         
     | 
| 
       58 
     | 
    
         
            -
                   
     | 
| 
      
 69 
     | 
    
         
            +
                  response[:error].must_equal 'not_found'
         
     | 
| 
       59 
70 
     | 
    
         
             
                end
         
     | 
| 
       60 
71 
     | 
    
         
             
              end
         
     | 
| 
       61 
72 
     | 
    
         | 
| 
         @@ -70,9 +81,10 @@ describe Geoloqi::Session do 
     | 
|
| 
       70 
81 
     | 
    
         
             
                    to_return(:body => {:username => 'bulbasaurrulzok'}.to_json)
         
     | 
| 
       71 
82 
     | 
    
         | 
| 
       72 
83 
     | 
    
         
             
                  response = @session.get 'account/username'
         
     | 
| 
       73 
     | 
    
         
            -
             
     | 
| 
       74 
     | 
    
         
            -
                   
     | 
| 
       75 
     | 
    
         
            -
                   
     | 
| 
      
 84 
     | 
    
         
            +
             
     | 
| 
      
 85 
     | 
    
         
            +
                  response['username'].must_equal 'bulbasaurrulzok'
         
     | 
| 
      
 86 
     | 
    
         
            +
                  response.username.must_equal    'bulbasaurrulzok'
         
     | 
| 
      
 87 
     | 
    
         
            +
                  response[:username].must_equal  'bulbasaurrulzok'
         
     | 
| 
       76 
88 
     | 
    
         
             
                end
         
     | 
| 
       77 
89 
     | 
    
         
             
              end
         
     | 
| 
       78 
90 
     | 
    
         | 
| 
         @@ -110,9 +122,9 @@ describe Geoloqi::Session do 
     | 
|
| 
       110 
122 
     | 
    
         
             
                    post '/layer/create', :name => 'Test 2'
         
     | 
| 
       111 
123 
     | 
    
         
             
                  end
         
     | 
| 
       112 
124 
     | 
    
         | 
| 
       113 
     | 
    
         
            -
                   
     | 
| 
       114 
     | 
    
         
            -
                   
     | 
| 
       115 
     | 
    
         
            -
                   
     | 
| 
      
 125 
     | 
    
         
            +
                  response.first[:code].must_equal 201
         
     | 
| 
      
 126 
     | 
    
         
            +
                  response.first[:body][:layer_id].must_equal 'abc'
         
     | 
| 
      
 127 
     | 
    
         
            +
                  response.last[:body][:layer_id].must_equal 'def'
         
     | 
| 
       116 
128 
     | 
    
         
             
                end
         
     | 
| 
       117 
129 
     | 
    
         | 
| 
       118 
130 
     | 
    
         
             
                it 'throws an exception on a hard request error' do
         
     | 
| 
         @@ -120,11 +132,15 @@ describe Geoloqi::Session do 
     | 
|
| 
       120 
132 
     | 
    
         
             
                    with(:headers => auth_headers).
         
     | 
| 
       121 
133 
     | 
    
         
             
                    to_return(:status => 500, :body => 'Something broke hard!')
         
     | 
| 
       122 
134 
     | 
    
         | 
| 
       123 
     | 
    
         
            -
             
     | 
| 
       124 
     | 
    
         
            -
                     
     | 
| 
       125 
     | 
    
         
            -
             
     | 
| 
       126 
     | 
    
         
            -
             
     | 
| 
       127 
     | 
    
         
            -
             
     | 
| 
      
 135 
     | 
    
         
            +
                  lambda {
         
     | 
| 
      
 136 
     | 
    
         
            +
                    Geoloqi::Session.new(:access_token => 'access_token1234').get('crashing_method')
         
     | 
| 
      
 137 
     | 
    
         
            +
                  }.must_raise Geoloqi::Error
         
     | 
| 
      
 138 
     | 
    
         
            +
                  
         
     | 
| 
      
 139 
     | 
    
         
            +
                  begin
         
     | 
| 
      
 140 
     | 
    
         
            +
                    Geoloqi::Session.new(:access_token => 'access_token1234').get('crashing_method')
         
     | 
| 
      
 141 
     | 
    
         
            +
                  rescue => e
         
     | 
| 
      
 142 
     | 
    
         
            +
                    e.message.must_equal "API returned invalid JSON. Status: 500 Body: Something broke hard!"
         
     | 
| 
      
 143 
     | 
    
         
            +
                  end
         
     | 
| 
       128 
144 
     | 
    
         
             
                end
         
     | 
| 
       129 
145 
     | 
    
         | 
| 
       130 
146 
     | 
    
         
             
                it 'successfully makes call with array' do
         
     | 
| 
         @@ -132,7 +148,7 @@ describe Geoloqi::Session do 
     | 
|
| 
       132 
148 
     | 
    
         
             
                    with(:headers => auth_headers, :body => [{:artist => 'Television'}].to_json).
         
     | 
| 
       133 
149 
     | 
    
         
             
                    to_return(:body => {:result => 'ok'}.to_json)
         
     | 
| 
       134 
150 
     | 
    
         | 
| 
       135 
     | 
    
         
            -
                   
     | 
| 
      
 151 
     | 
    
         
            +
                  @session.post('play_record_at_geoloqi_hq', [{:artist => 'Television'}])[:result].must_equal 'ok'
         
     | 
| 
       136 
152 
     | 
    
         
             
                end
         
     | 
| 
       137 
153 
     | 
    
         | 
| 
       138 
154 
     | 
    
         
             
                it 'successfully makes call to api' do
         
     | 
| 
         @@ -141,7 +157,7 @@ describe Geoloqi::Session do 
     | 
|
| 
       141 
157 
     | 
    
         
             
                    to_return(:status => 200, :body => {:layer_id => 'Gx'}.to_json)
         
     | 
| 
       142 
158 
     | 
    
         | 
| 
       143 
159 
     | 
    
         
             
                  %w{/layer/info/Gx layer/info/Gx}.each do |path|
         
     | 
| 
       144 
     | 
    
         
            -
                     
     | 
| 
      
 160 
     | 
    
         
            +
                    @session.get(path)[:layer_id].must_equal 'Gx'
         
     | 
| 
       145 
161 
     | 
    
         
             
                  end
         
     | 
| 
       146 
162 
     | 
    
         
             
                end
         
     | 
| 
       147 
163 
     | 
    
         | 
| 
         @@ -153,15 +169,15 @@ describe Geoloqi::Session do 
     | 
|
| 
       153 
169 
     | 
    
         
             
                  end
         
     | 
| 
       154 
170 
     | 
    
         | 
| 
       155 
171 
     | 
    
         
             
                  it 'makes a location/history call with get and hash params' do
         
     | 
| 
       156 
     | 
    
         
            -
                     
     | 
| 
      
 172 
     | 
    
         
            +
                    @session.get('location/history', :count => 2)[:points].count.must_equal 2
         
     | 
| 
       157 
173 
     | 
    
         
             
                  end
         
     | 
| 
       158 
174 
     | 
    
         | 
| 
       159 
175 
     | 
    
         
             
                  it 'makes a location/history call with get and query string directly in path' do
         
     | 
| 
       160 
     | 
    
         
            -
                     
     | 
| 
      
 176 
     | 
    
         
            +
                    @session.get('location/history?count=2')[:points].count.must_equal 2
         
     | 
| 
       161 
177 
     | 
    
         
             
                  end
         
     | 
| 
       162 
178 
     | 
    
         | 
| 
       163 
179 
     | 
    
         
             
                  it 'makes a location/history call with get and query string params' do
         
     | 
| 
       164 
     | 
    
         
            -
                     
     | 
| 
      
 180 
     | 
    
         
            +
                    @session.get('location/history', 'count=2')[:points].count.must_equal 2
         
     | 
| 
       165 
181 
     | 
    
         
             
                  end
         
     | 
| 
       166 
182 
     | 
    
         
             
                end
         
     | 
| 
       167 
183 
     | 
    
         
             
              end
         
     | 
| 
         @@ -171,8 +187,8 @@ describe Geoloqi::Session do 
     | 
|
| 
       171 
187 
     | 
    
         
             
                  @session = Geoloqi::Session.new :access_token => ACCESS_TOKEN,
         
     | 
| 
       172 
188 
     | 
    
         
             
                                                  :config => Geoloqi::Config.new(:client_id => CLIENT_ID,
         
     | 
| 
       173 
189 
     | 
    
         
             
                                                                                 :client_secret => CLIENT_SECRET)
         
     | 
| 
       174 
     | 
    
         
            -
                   
     | 
| 
       175 
     | 
    
         
            -
                   
     | 
| 
      
 190 
     | 
    
         
            +
                  @session.config.client_id.must_equal     CLIENT_ID
         
     | 
| 
      
 191 
     | 
    
         
            +
                  @session.config.client_secret.must_equal CLIENT_SECRET
         
     | 
| 
       176 
192 
     | 
    
         
             
                end
         
     | 
| 
       177 
193 
     | 
    
         
             
              end
         
     | 
| 
       178 
194 
     | 
    
         | 
| 
         @@ -184,28 +200,28 @@ describe Geoloqi::Session do 
     | 
|
| 
       184 
200 
     | 
    
         
             
                end
         
     | 
| 
       185 
201 
     | 
    
         | 
| 
       186 
202 
     | 
    
         
             
                it 'should return access token' do
         
     | 
| 
       187 
     | 
    
         
            -
                   
     | 
| 
      
 203 
     | 
    
         
            +
                  @session.access_token.must_equal ACCESS_TOKEN
         
     | 
| 
       188 
204 
     | 
    
         
             
                end
         
     | 
| 
       189 
205 
     | 
    
         | 
| 
       190 
206 
     | 
    
         
             
                it 'should recognize access token exists' do
         
     | 
| 
       191 
     | 
    
         
            -
                   
     | 
| 
      
 207 
     | 
    
         
            +
                  @session.access_token?.must_equal true
         
     | 
| 
       192 
208 
     | 
    
         
             
                end
         
     | 
| 
       193 
209 
     | 
    
         | 
| 
       194 
210 
     | 
    
         
             
                it 'gets authorize url' do
         
     | 
| 
       195 
211 
     | 
    
         
             
                  authorize_url = @session.authorize_url 'http://blah.blah/test'
         
     | 
| 
       196 
     | 
    
         
            -
                   
     | 
| 
       197 
     | 
    
         
            -
             
     | 
| 
       198 
     | 
    
         
            -
             
     | 
| 
       199 
     | 
    
         
            -
             
     | 
| 
      
 212 
     | 
    
         
            +
                  authorize_url.must_equal "#{Geoloqi.oauth_url}?"+
         
     | 
| 
      
 213 
     | 
    
         
            +
                                           "response_type=code&"+
         
     | 
| 
      
 214 
     | 
    
         
            +
                                           "client_id=#{Rack::Utils.escape CLIENT_ID}&"+
         
     | 
| 
      
 215 
     | 
    
         
            +
                                           "redirect_uri=#{Rack::Utils.escape 'http://blah.blah/test'}"
         
     | 
| 
       200 
216 
     | 
    
         
             
                end
         
     | 
| 
       201 
217 
     | 
    
         | 
| 
       202 
218 
     | 
    
         
             
                it 'gets authorize url with scope' do
         
     | 
| 
       203 
219 
     | 
    
         
             
                  authorize_url = @session.authorize_url 'http://blah.blah/test', :scope => 'party_hard'
         
     | 
| 
       204 
     | 
    
         
            -
                   
     | 
| 
       205 
     | 
    
         
            -
             
     | 
| 
       206 
     | 
    
         
            -
             
     | 
| 
       207 
     | 
    
         
            -
             
     | 
| 
       208 
     | 
    
         
            -
             
     | 
| 
      
 220 
     | 
    
         
            +
                  authorize_url.must_equal "#{Geoloqi.oauth_url}?"+
         
     | 
| 
      
 221 
     | 
    
         
            +
                                           "response_type=code&"+
         
     | 
| 
      
 222 
     | 
    
         
            +
                                           "client_id=#{Rack::Utils.escape CLIENT_ID}&"+
         
     | 
| 
      
 223 
     | 
    
         
            +
                                           "redirect_uri=#{Rack::Utils.escape 'http://blah.blah/test'}&"+
         
     | 
| 
      
 224 
     | 
    
         
            +
                                           "scope=party_hard"
         
     | 
| 
       209 
225 
     | 
    
         
             
                end
         
     | 
| 
       210 
226 
     | 
    
         
             
              end
         
     | 
| 
       211 
227 
     | 
    
         | 
| 
         @@ -222,19 +238,47 @@ describe Geoloqi::Session do 
     | 
|
| 
       222 
238 
     | 
    
         
             
                  begin
         
     | 
| 
       223 
239 
     | 
    
         
             
                    @session.post 'message/send'
         
     | 
| 
       224 
240 
     | 
    
         
             
                  rescue Exception => e
         
     | 
| 
       225 
     | 
    
         
            -
                     
     | 
| 
       226 
     | 
    
         
            -
                     
     | 
| 
       227 
     | 
    
         
            -
                     
     | 
| 
       228 
     | 
    
         
            -
                     
     | 
| 
      
 241 
     | 
    
         
            +
                    e.class.must_equal Geoloqi::ApiError
         
     | 
| 
      
 242 
     | 
    
         
            +
                    e.status.must_equal 401
         
     | 
| 
      
 243 
     | 
    
         
            +
                    e.type.must_equal 'invalid_token'
         
     | 
| 
      
 244 
     | 
    
         
            +
                    e.message.must_equal 'invalid_token (401)'
         
     | 
| 
       229 
245 
     | 
    
         
             
                  end
         
     | 
| 
       230 
246 
     | 
    
         
             
                end
         
     | 
| 
       231 
247 
     | 
    
         
             
              end
         
     | 
| 
       232 
248 
     | 
    
         | 
| 
      
 249 
     | 
    
         
            +
              # PUT GENERAL TESTS IN HERE
         
     | 
| 
      
 250 
     | 
    
         
            +
             
     | 
| 
       233 
251 
     | 
    
         
             
              describe 'with config' do
         
     | 
| 
       234 
252 
     | 
    
         
             
                before do
         
     | 
| 
       235 
253 
     | 
    
         
             
                  @session = Geoloqi::Session.new :config => {:client_id => CLIENT_ID, :client_secret => CLIENT_SECRET}
         
     | 
| 
       236 
254 
     | 
    
         
             
                end
         
     | 
| 
       237 
255 
     | 
    
         | 
| 
      
 256 
     | 
    
         
            +
                it 'retreives application access token data' do
         
     | 
| 
      
 257 
     | 
    
         
            +
                  stub_request(:post, api_url('oauth/token')).
         
     | 
| 
      
 258 
     | 
    
         
            +
                    with(:body => {:client_id => CLIENT_ID,
         
     | 
| 
      
 259 
     | 
    
         
            +
                                   :client_secret => CLIENT_SECRET,
         
     | 
| 
      
 260 
     | 
    
         
            +
                                   :grant_type => 'client_credentials'}.to_json).
         
     | 
| 
      
 261 
     | 
    
         
            +
                    to_return(:status => 200,
         
     | 
| 
      
 262 
     | 
    
         
            +
                              :body => {:display_name => 'My App',
         
     | 
| 
      
 263 
     | 
    
         
            +
                                        :username => 'madeuphashdontuseforanything',
         
     | 
| 
      
 264 
     | 
    
         
            +
                                        :user_id => 'userid',
         
     | 
| 
      
 265 
     | 
    
         
            +
                                        :is_anonymous => 0,
         
     | 
| 
      
 266 
     | 
    
         
            +
                                        :access_token => 'app_access_token',
         
     | 
| 
      
 267 
     | 
    
         
            +
                                        :scope => nil,
         
     | 
| 
      
 268 
     | 
    
         
            +
                                        :expires_at => nil}.to_json)
         
     | 
| 
      
 269 
     | 
    
         
            +
             
     | 
| 
      
 270 
     | 
    
         
            +
                  resp = @session.establish :grant_type => 'client_credentials'
         
     | 
| 
      
 271 
     | 
    
         
            +
             
     | 
| 
      
 272 
     | 
    
         
            +
                  resp[:display_name].must_equal 'My App'
         
     | 
| 
      
 273 
     | 
    
         
            +
                  resp[:access_token].must_equal 'app_access_token'
         
     | 
| 
      
 274 
     | 
    
         
            +
             
     | 
| 
      
 275 
     | 
    
         
            +
                  @session.application_access_token.must_equal 'app_access_token'
         
     | 
| 
      
 276 
     | 
    
         
            +
             
     | 
| 
      
 277 
     | 
    
         
            +
                  # Test the cache.
         
     | 
| 
      
 278 
     | 
    
         
            +
                  @session.send(:instance_variable_set, :'@application_access_token', 'works')
         
     | 
| 
      
 279 
     | 
    
         
            +
                  @session.application_access_token.must_equal 'works'
         
     | 
| 
      
 280 
     | 
    
         
            +
                end
         
     | 
| 
      
 281 
     | 
    
         
            +
             
     | 
| 
       238 
282 
     | 
    
         
             
                it 'retrieves auth with mock' do
         
     | 
| 
       239 
283 
     | 
    
         
             
                  stub_request(:post, api_url('oauth/token')).
         
     | 
| 
       240 
284 
     | 
    
         
             
                    with(:body => {:client_id => CLIENT_ID,
         
     | 
| 
         @@ -253,7 +297,7 @@ describe Geoloqi::Session do 
     | 
|
| 
       253 
297 
     | 
    
         
             
                   :scope => nil,
         
     | 
| 
       254 
298 
     | 
    
         
             
                   :expires_in => '86400',
         
     | 
| 
       255 
299 
     | 
    
         
             
                   :refresh_token => 'refresh_token1234'}.each do |k,v|
         
     | 
| 
       256 
     | 
    
         
            -
                     
     | 
| 
      
 300 
     | 
    
         
            +
                    response[k].must_equal v
         
     | 
| 
       257 
301 
     | 
    
         
             
                  end
         
     | 
| 
       258 
302 
     | 
    
         
             
                end
         
     | 
| 
       259 
303 
     | 
    
         | 
| 
         @@ -275,13 +319,13 @@ describe Geoloqi::Session do 
     | 
|
| 
       275 
319 
     | 
    
         | 
| 
       276 
320 
     | 
    
         
             
                  response = @session.get_auth '1234', 'http://neverexpires.example.com/'
         
     | 
| 
       277 
321 
     | 
    
         | 
| 
       278 
     | 
    
         
            -
                   
     | 
| 
       279 
     | 
    
         
            -
                   
     | 
| 
      
 322 
     | 
    
         
            +
                  @session.auth[:expires_in].must_equal '0'
         
     | 
| 
      
 323 
     | 
    
         
            +
                  @session.auth[:expires_at].nil?.must_equal true
         
     | 
| 
       280 
324 
     | 
    
         | 
| 
       281 
325 
     | 
    
         
             
                  response = @session.get 'account/username'
         
     | 
| 
       282 
326 
     | 
    
         | 
| 
       283 
     | 
    
         
            -
                   
     | 
| 
       284 
     | 
    
         
            -
                   
     | 
| 
      
 327 
     | 
    
         
            +
                  @session.auth[:access_token].must_equal 'access_token1234'
         
     | 
| 
      
 328 
     | 
    
         
            +
                  response[:username].must_equal 'bulbasaurrulzok'
         
     | 
| 
       285 
329 
     | 
    
         
             
                end
         
     | 
| 
       286 
330 
     | 
    
         | 
| 
       287 
331 
     | 
    
         
             
                it 'does not attempt to refresh for auth code expire' do
         
     | 
| 
         @@ -300,7 +344,7 @@ describe Geoloqi::Session do 
     | 
|
| 
       300 
344 
     | 
    
         
             
                    with(:headers => auth_headers).
         
     | 
| 
       301 
345 
     | 
    
         
             
                    to_return(:status => 200, :body => {:points => [1,2]}.to_json)
         
     | 
| 
       302 
346 
     | 
    
         | 
| 
       303 
     | 
    
         
            -
                   
     | 
| 
      
 347 
     | 
    
         
            +
                  ###################################################################### FINISH IMPLEMENTING
         
     | 
| 
       304 
348 
     | 
    
         
             
                end
         
     | 
| 
       305 
349 
     | 
    
         
             
              end
         
     | 
| 
       306 
350 
     | 
    
         | 
| 
         @@ -330,7 +374,7 @@ describe Geoloqi::Session do 
     | 
|
| 
       330 
374 
     | 
    
         
             
                    to_return(:body => {:username => 'pikachu4lyfe'}.to_json)
         
     | 
| 
       331 
375 
     | 
    
         | 
| 
       332 
376 
     | 
    
         
             
                  @session.get 'account/username'
         
     | 
| 
       333 
     | 
    
         
            -
                   
     | 
| 
      
 377 
     | 
    
         
            +
                  @session.auth[:access_token].must_equal 'access_token4567'
         
     | 
| 
       334 
378 
     | 
    
         
             
                end
         
     | 
| 
       335 
379 
     | 
    
         
             
              end
         
     | 
| 
       336 
380 
     | 
    
         
             
            end
         
     | 
    
        data/spec/geoloqi_spec.rb
    CHANGED
    
    | 
         @@ -3,27 +3,27 @@ require File.join File.dirname(__FILE__), 'env.rb' 
     | 
|
| 
       3 
3 
     | 
    
         
             
            describe Geoloqi do
         
     | 
| 
       4 
4 
     | 
    
         
             
              it 'reads geoloqi config' do
         
     | 
| 
       5 
5 
     | 
    
         
             
                Geoloqi.config :client_id => 'client_id', :client_secret => 'client_secret'
         
     | 
| 
       6 
     | 
    
         
            -
                 
     | 
| 
       7 
     | 
    
         
            -
                 
     | 
| 
       8 
     | 
    
         
            -
                 
     | 
| 
      
 6 
     | 
    
         
            +
                Geoloqi.config.is_a?(Geoloqi::Config).must_equal true
         
     | 
| 
      
 7 
     | 
    
         
            +
                Geoloqi.config.client_id.must_equal 'client_id'
         
     | 
| 
      
 8 
     | 
    
         
            +
                Geoloqi.config.client_secret.must_equal 'client_secret'
         
     | 
| 
       9 
9 
     | 
    
         
             
              end
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
       11 
11 
     | 
    
         
             
              describe 'authorize_url' do
         
     | 
| 
       12 
12 
     | 
    
         
             
                it 'is valid' do
         
     | 
| 
       13 
13 
     | 
    
         
             
                  authorize_url = Geoloqi.authorize_url 'test', 'http://blah.blah/test'
         
     | 
| 
       14 
     | 
    
         
            -
                   
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
      
 14 
     | 
    
         
            +
                  authorize_url.must_equal "#{Geoloqi.oauth_url}?"+
         
     | 
| 
      
 15 
     | 
    
         
            +
                                           'response_type=code&'+
         
     | 
| 
      
 16 
     | 
    
         
            +
                                           "client_id=#{Rack::Utils.escape 'test'}&"+
         
     | 
| 
      
 17 
     | 
    
         
            +
                                           "redirect_uri=#{Rack::Utils.escape 'http://blah.blah/test'}"
         
     | 
| 
       18 
18 
     | 
    
         
             
                end
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
       20 
20 
     | 
    
         
             
                it 'is valid with scope' do
         
     | 
| 
       21 
21 
     | 
    
         
             
                  authorize_url = Geoloqi.authorize_url 'test', 'http://blah.blah/test', :scope => 'can_party_hard'
         
     | 
| 
       22 
     | 
    
         
            -
                   
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
      
 22 
     | 
    
         
            +
                  authorize_url.must_equal "#{Geoloqi.oauth_url}?"+
         
     | 
| 
      
 23 
     | 
    
         
            +
                                           'response_type=code&'+
         
     | 
| 
      
 24 
     | 
    
         
            +
                                           "client_id=#{Rack::Utils.escape 'test'}&"+
         
     | 
| 
      
 25 
     | 
    
         
            +
                                           "redirect_uri=#{Rack::Utils.escape 'http://blah.blah/test'}&"+
         
     | 
| 
      
 26 
     | 
    
         
            +
                                           "scope=can_party_hard"
         
     | 
| 
       27 
27 
     | 
    
         
             
                end
         
     | 
| 
       28 
28 
     | 
    
         
             
              end
         
     | 
| 
       29 
29 
     | 
    
         | 
| 
         @@ -33,7 +33,7 @@ describe Geoloqi do 
     | 
|
| 
       33 
33 
     | 
    
         
             
                  to_return(:body => {:result => 'ok'}.to_json)
         
     | 
| 
       34 
34 
     | 
    
         | 
| 
       35 
35 
     | 
    
         
             
                response = Geoloqi.get ACCESS_TOKEN, '/quick_get', {:lol => 'cats'}, 'Special' => 'header'
         
     | 
| 
       36 
     | 
    
         
            -
                 
     | 
| 
      
 36 
     | 
    
         
            +
                response[:result].must_equal 'ok'
         
     | 
| 
       37 
37 
     | 
    
         
             
              end
         
     | 
| 
       38 
38 
     | 
    
         | 
| 
       39 
39 
     | 
    
         
             
              it 'makes post request' do
         
     | 
| 
         @@ -43,6 +43,6 @@ describe Geoloqi do 
     | 
|
| 
       43 
43 
     | 
    
         
             
                  to_return(:body => {:result => 'ok'}.to_json)
         
     | 
| 
       44 
44 
     | 
    
         | 
| 
       45 
45 
     | 
    
         
             
                response = Geoloqi.post ACCESS_TOKEN, '/quick_post', {:lol => 'dogs'}, 'Special' => 'header'
         
     | 
| 
       46 
     | 
    
         
            -
                 
     | 
| 
      
 46 
     | 
    
         
            +
                response[:result].must_equal 'ok'
         
     | 
| 
       47 
47 
     | 
    
         
             
              end
         
     | 
| 
       48 
48 
     | 
    
         
             
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version 
     | 
|
| 
       5 
5 
     | 
    
         
             
              segments: 
         
     | 
| 
       6 
6 
     | 
    
         
             
              - 0
         
     | 
| 
       7 
7 
     | 
    
         
             
              - 9
         
     | 
| 
       8 
     | 
    
         
            -
              -  
     | 
| 
       9 
     | 
    
         
            -
              version: 0.9. 
     | 
| 
      
 8 
     | 
    
         
            +
              - 38
         
     | 
| 
      
 9 
     | 
    
         
            +
              version: 0.9.38
         
     | 
| 
       10 
10 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       11 
11 
     | 
    
         
             
            authors: 
         
     | 
| 
       12 
12 
     | 
    
         
             
            - Kyle Drake
         
     | 
| 
         @@ -15,7 +15,7 @@ autorequire: 
     | 
|
| 
       15 
15 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       16 
16 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
     | 
    
         
            -
            date: 2012- 
     | 
| 
      
 18 
     | 
    
         
            +
            date: 2012-03-05 00:00:00 -08:00
         
     | 
| 
       19 
19 
     | 
    
         
             
            default_executable: 
         
     | 
| 
       20 
20 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       21 
21 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
         @@ -56,24 +56,10 @@ dependencies: 
     | 
|
| 
       56 
56 
     | 
    
         
             
                    version: "0"
         
     | 
| 
       57 
57 
     | 
    
         
             
              type: :development
         
     | 
| 
       58 
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 
59 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       74 
60 
     | 
    
         
             
              name: minitest
         
     | 
| 
       75 
61 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       76 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 62 
     | 
    
         
            +
              requirement: &id004 !ruby/object:Gem::Requirement 
         
     | 
| 
       77 
63 
     | 
    
         
             
                requirements: 
         
     | 
| 
       78 
64 
     | 
    
         
             
                - - "="
         
     | 
| 
       79 
65 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
         @@ -83,11 +69,11 @@ dependencies: 
     | 
|
| 
       83 
69 
     | 
    
         
             
                    - 2
         
     | 
| 
       84 
70 
     | 
    
         
             
                    version: 2.2.2
         
     | 
| 
       85 
71 
     | 
    
         
             
              type: :development
         
     | 
| 
       86 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 72 
     | 
    
         
            +
              version_requirements: *id004
         
     | 
| 
       87 
73 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       88 
74 
     | 
    
         
             
              name: webmock
         
     | 
| 
       89 
75 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       90 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 76 
     | 
    
         
            +
              requirement: &id005 !ruby/object:Gem::Requirement 
         
     | 
| 
       91 
77 
     | 
    
         
             
                requirements: 
         
     | 
| 
       92 
78 
     | 
    
         
             
                - - "="
         
     | 
| 
       93 
79 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
         @@ -97,11 +83,11 @@ dependencies: 
     | 
|
| 
       97 
83 
     | 
    
         
             
                    - 4
         
     | 
| 
       98 
84 
     | 
    
         
             
                    version: 1.6.4
         
     | 
| 
       99 
85 
     | 
    
         
             
              type: :development
         
     | 
| 
       100 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 86 
     | 
    
         
            +
              version_requirements: *id005
         
     | 
| 
       101 
87 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       102 
88 
     | 
    
         
             
              name: hashie
         
     | 
| 
       103 
89 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       104 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 90 
     | 
    
         
            +
              requirement: &id006 !ruby/object:Gem::Requirement 
         
     | 
| 
       105 
91 
     | 
    
         
             
                requirements: 
         
     | 
| 
       106 
92 
     | 
    
         
             
                - - "="
         
     | 
| 
       107 
93 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
         @@ -111,11 +97,11 @@ dependencies: 
     | 
|
| 
       111 
97 
     | 
    
         
             
                    - 0
         
     | 
| 
       112 
98 
     | 
    
         
             
                    version: 1.0.0
         
     | 
| 
       113 
99 
     | 
    
         
             
              type: :development
         
     | 
| 
       114 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 100 
     | 
    
         
            +
              version_requirements: *id006
         
     | 
| 
       115 
101 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       116 
102 
     | 
    
         
             
              name: yard
         
     | 
| 
       117 
103 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       118 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 104 
     | 
    
         
            +
              requirement: &id007 !ruby/object:Gem::Requirement 
         
     | 
| 
       119 
105 
     | 
    
         
             
                requirements: 
         
     | 
| 
       120 
106 
     | 
    
         
             
                - - ">="
         
     | 
| 
       121 
107 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
         @@ -123,7 +109,7 @@ dependencies: 
     | 
|
| 
       123 
109 
     | 
    
         
             
                    - 0
         
     | 
| 
       124 
110 
     | 
    
         
             
                    version: "0"
         
     | 
| 
       125 
111 
     | 
    
         
             
              type: :development
         
     | 
| 
       126 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 112 
     | 
    
         
            +
              version_requirements: *id007
         
     | 
| 
       127 
113 
     | 
    
         
             
            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.
         
     | 
| 
       128 
114 
     | 
    
         
             
            email: 
         
     | 
| 
       129 
115 
     | 
    
         
             
            - kyle@geoloqi.com
         
     |