thinknear 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/think_near/client.rb +6 -1
- data/lib/think_near/connection.rb +1 -1
- data/lib/think_near/endpoint.rb +1 -1
- data/lib/think_near.rb +1 -1
- data/thinknear.gemspec +2 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.7
|
data/lib/think_near/client.rb
CHANGED
@@ -4,7 +4,8 @@ module ThinkNear
|
|
4
4
|
@@debug = false
|
5
5
|
|
6
6
|
class << self
|
7
|
-
def set_credentials(token, secret)
|
7
|
+
def set_credentials(token, secret, api_host = API_HOST)
|
8
|
+
@@api_host = api_host || API_HOST
|
8
9
|
@@connection = Connection.new(token, secret)
|
9
10
|
@@connection.debug = @@debug
|
10
11
|
end
|
@@ -18,6 +19,10 @@ module ThinkNear
|
|
18
19
|
@@debug
|
19
20
|
end
|
20
21
|
|
22
|
+
def api_host
|
23
|
+
@@api_host
|
24
|
+
end
|
25
|
+
|
21
26
|
def get_ping
|
22
27
|
get Endpoint.ping
|
23
28
|
end
|
@@ -6,7 +6,7 @@ module ThinkNear
|
|
6
6
|
attr_accessor :debug
|
7
7
|
|
8
8
|
def initialize(token, secret)
|
9
|
-
consumer = OAuth::Consumer.new(token, secret, :site =>
|
9
|
+
consumer = OAuth::Consumer.new(token, secret, :site => Client.api_host)
|
10
10
|
@access_token = OAuth::AccessToken.new(consumer)
|
11
11
|
debug = false
|
12
12
|
end
|
data/lib/think_near/endpoint.rb
CHANGED
data/lib/think_near.rb
CHANGED
@@ -9,7 +9,7 @@ require 'think_near/offer'
|
|
9
9
|
|
10
10
|
module ThinkNear
|
11
11
|
API_VERSION = '1.0'.freeze
|
12
|
-
|
12
|
+
API_HOST = 'api.thinknear.com'
|
13
13
|
VERSION = File.read(File.join(File.dirname(__FILE__), '..', 'VERSION'))
|
14
14
|
|
15
15
|
class ThinkNearError < StandardError; end
|
data/thinknear.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{thinknear}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Denis Barushev"]
|
12
|
-
s.date = %q{2011-03-
|
12
|
+
s.date = %q{2011-03-25}
|
13
13
|
s.email = %q{barushev@gmail.com}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"LICENSE.txt",
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: thinknear
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Denis Barushev
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-03-
|
13
|
+
date: 2011-03-25 00:00:00 +02:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -128,7 +128,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
128
128
|
requirements:
|
129
129
|
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
hash:
|
131
|
+
hash: 2003740883839399333
|
132
132
|
segments:
|
133
133
|
- 0
|
134
134
|
version: "0"
|