thinknear 0.0.5 → 0.0.6
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/VERSION +1 -1
- data/lib/think_near/client.rb +4 -0
- data/lib/think_near/endpoint.rb +4 -0
- data/lib/think_near/offer.rb +5 -0
- data/thinknear.gemspec +2 -2
- metadata +3 -3
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.6
|
data/lib/think_near/client.rb
CHANGED
|
@@ -50,6 +50,10 @@ module ThinkNear
|
|
|
50
50
|
post Endpoint.claim_offer(offer_id, latitude, longitude)
|
|
51
51
|
end
|
|
52
52
|
|
|
53
|
+
def save_offer(offer_id, email)
|
|
54
|
+
post Endpoint.save_offer(offer_id, email)
|
|
55
|
+
end
|
|
56
|
+
|
|
53
57
|
def get(endpoint, data=nil)
|
|
54
58
|
raise NoConnectionEstablished if @@connection.nil?
|
|
55
59
|
@@connection.get endpoint, data
|
data/lib/think_near/endpoint.rb
CHANGED
|
@@ -38,6 +38,10 @@ module ThinkNear
|
|
|
38
38
|
endpoint_url "offers/#{offer_id}/claim/#{latitude},#{longitude}"
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
+
def save_offer(offer_id, email)
|
|
42
|
+
endpoint_url("offers/#{offer_id}/save") + "?email=#{CGI.escape(email)}"
|
|
43
|
+
end
|
|
44
|
+
|
|
41
45
|
def endpoint_url(path, version = API_VERSION, format = 'json')
|
|
42
46
|
[REALM, version, [path, format].join('.')].join('/')
|
|
43
47
|
end
|
data/lib/think_near/offer.rb
CHANGED
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.6"
|
|
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-23}
|
|
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.6
|
|
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-23 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: -159261097566627230
|
|
132
132
|
segments:
|
|
133
133
|
- 0
|
|
134
134
|
version: "0"
|