geoloqi 0.9.0 → 0.9.1
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/Gemfile +0 -1
- data/README.markdown +9 -0
- data/geoloqi.gemspec +3 -5
- data/lib/geoloqi.rb +2 -0
- data/lib/geoloqi/version.rb +2 -2
- data/license.txt +25 -0
- data/spec/geoloqi_spec.rb +19 -6
- metadata +7 -28
data/Gemfile
CHANGED
data/README.markdown
CHANGED
@@ -100,3 +100,12 @@ Now, here's a power example: Uses [sinatra-synchrony](http://github.com/kyledrak
|
|
100
100
|
username = geoloqi.get('account/username')['username']
|
101
101
|
"You have successfully logged in as #{username}!"
|
102
102
|
end
|
103
|
+
|
104
|
+
Found a bug?
|
105
|
+
---
|
106
|
+
Let us know! Send a pull request or a patch. Questions? Ask! We're here to help. File issues, we'll respond to them!
|
107
|
+
|
108
|
+
Authors
|
109
|
+
---
|
110
|
+
* Kyle Drake
|
111
|
+
* Aaron Parecki
|
data/geoloqi.gemspec
CHANGED
@@ -18,8 +18,6 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.add_dependency 'faraday'
|
19
19
|
|
20
20
|
s.add_development_dependency 'wrong', '= 0.5.0'
|
21
|
-
s.add_development_dependency 'minitest'
|
22
|
-
s.add_development_dependency '
|
23
|
-
|
24
|
-
s.add_development_dependency 'webmock'
|
25
|
-
end
|
21
|
+
s.add_development_dependency 'minitest', '= 2.2.2'
|
22
|
+
s.add_development_dependency 'webmock', '= 1.6.4'
|
23
|
+
end
|
data/lib/geoloqi.rb
CHANGED
data/lib/geoloqi/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module Geoloqi
|
2
|
-
VERSION = '0.9.
|
3
|
-
end
|
2
|
+
VERSION = '0.9.1'
|
3
|
+
end
|
data/license.txt
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
Copyright 2011 Geoloqi. All rights reserved.
|
2
|
+
|
3
|
+
Redistribution and use in source and binary forms, with or without modification, are
|
4
|
+
permitted provided that the following conditions are met:
|
5
|
+
|
6
|
+
1. Redistributions of source code must retain the above copyright notice, this list of
|
7
|
+
conditions and the following disclaimer.
|
8
|
+
|
9
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list
|
10
|
+
of conditions and the following disclaimer in the documentation and/or other materials
|
11
|
+
provided with the distribution.
|
12
|
+
|
13
|
+
THIS SOFTWARE IS PROVIDED BY GEOLOQI ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
14
|
+
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GEOLOQI OR
|
16
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
17
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
18
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
19
|
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
20
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
21
|
+
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
22
|
+
|
23
|
+
The views and conclusions contained in the software and documentation are those of the
|
24
|
+
authors and should not be interpreted as representing official policies, either expressed
|
25
|
+
or implied, of Geoloqi.
|
data/spec/geoloqi_spec.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
raise ArgumentError, 'usage: be ruby spec/geoloqi_spec.rb "client_id" "client_secret" "access_token"' unless ARGV.length == 3
|
2
|
-
Bundler.setup
|
2
|
+
# Bundler.setup
|
3
|
+
require 'rubygems'
|
3
4
|
require './lib/geoloqi.rb'
|
4
5
|
require 'minitest/autorun'
|
5
6
|
require 'wrong'
|
@@ -40,6 +41,10 @@ describe Geoloqi::Config do
|
|
40
41
|
end
|
41
42
|
|
42
43
|
describe Geoloqi::Session do
|
44
|
+
before do
|
45
|
+
WebMock.allow_net_connect!
|
46
|
+
end
|
47
|
+
|
43
48
|
describe 'with nothing passed' do
|
44
49
|
before do
|
45
50
|
@session = Geoloqi::Session.new
|
@@ -86,11 +91,19 @@ describe Geoloqi::Session do
|
|
86
91
|
end
|
87
92
|
end
|
88
93
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
+
# Ruby 1.9 only!
|
95
|
+
if RUBY_VERSION[0..2].to_f >= 1.9
|
96
|
+
begin
|
97
|
+
require 'em-synchrony'
|
98
|
+
rescue LoadError
|
99
|
+
puts 'NOTE: You need the em-synchrony gem for all tests to pass: gem install em-synchrony'
|
100
|
+
end
|
101
|
+
describe 'with em synchrony adapter and access token' do
|
102
|
+
it 'makes call to api' do
|
103
|
+
session = Geoloqi::Session.new :access_token => ARGV[2], :config => {:adapter => :em_synchrony}
|
104
|
+
response = session.get 'layer/info/Gx'
|
105
|
+
expect { response['layer_id'] == 'Gx' }
|
106
|
+
end
|
94
107
|
end
|
95
108
|
end
|
96
109
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: geoloqi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.9.
|
5
|
+
version: 0.9.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Kyle Drake
|
@@ -53,44 +53,22 @@ dependencies:
|
|
53
53
|
requirement: &id004 !ruby/object:Gem::Requirement
|
54
54
|
none: false
|
55
55
|
requirements:
|
56
|
-
- - "
|
56
|
+
- - "="
|
57
57
|
- !ruby/object:Gem::Version
|
58
|
-
version:
|
58
|
+
version: 2.2.2
|
59
59
|
type: :development
|
60
60
|
version_requirements: *id004
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
|
-
name:
|
62
|
+
name: webmock
|
63
63
|
prerelease: false
|
64
64
|
requirement: &id005 !ruby/object:Gem::Requirement
|
65
65
|
none: false
|
66
66
|
requirements:
|
67
|
-
- - "
|
67
|
+
- - "="
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
69
|
+
version: 1.6.4
|
70
70
|
type: :development
|
71
71
|
version_requirements: *id005
|
72
|
-
- !ruby/object:Gem::Dependency
|
73
|
-
name: em-synchrony
|
74
|
-
prerelease: false
|
75
|
-
requirement: &id006 !ruby/object:Gem::Requirement
|
76
|
-
none: false
|
77
|
-
requirements:
|
78
|
-
- - ">="
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: "0"
|
81
|
-
type: :development
|
82
|
-
version_requirements: *id006
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: webmock
|
85
|
-
prerelease: false
|
86
|
-
requirement: &id007 !ruby/object:Gem::Requirement
|
87
|
-
none: false
|
88
|
-
requirements:
|
89
|
-
- - ">="
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
version: "0"
|
92
|
-
type: :development
|
93
|
-
version_requirements: *id007
|
94
72
|
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.
|
95
73
|
email:
|
96
74
|
- kyledrake@gmail.com
|
@@ -114,6 +92,7 @@ files:
|
|
114
92
|
- lib/geoloqi/error.rb
|
115
93
|
- lib/geoloqi/session.rb
|
116
94
|
- lib/geoloqi/version.rb
|
95
|
+
- license.txt
|
117
96
|
- spec/geoloqi_spec.rb
|
118
97
|
has_rdoc: true
|
119
98
|
homepage: https://github.com/kyledrake/geoloqi-ruby
|