glomper 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/glomper.gemspec +2 -2
- data/lib/glomper/client.rb +1 -2
- data/lib/glomper/request.rb +1 -1
- data/test/fixtures/place.json +22 -17
- data/test/fixtures/search_places.json +6 -1
- data/test/fixtures/user.json +11 -6
- data/test/helper.rb +1 -1
- data/test/test_client.rb +1 -1
- metadata +25 -25
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/glomper.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{glomper}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["linchus"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-11-28}
|
13
13
|
s.description = %q{Gives access to all endpoints Glomper API}
|
14
14
|
s.email = %q{linchus@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/glomper/client.rb
CHANGED
data/lib/glomper/request.rb
CHANGED
@@ -21,7 +21,7 @@ module Glomper
|
|
21
21
|
response = @client.connection.send(@method) do |req|
|
22
22
|
req.url build_url(meth), *args
|
23
23
|
end
|
24
|
-
@client.return_error_or_body(response, response.body)
|
24
|
+
@client.return_error_or_body(response, response.body.response)
|
25
25
|
end
|
26
26
|
|
27
27
|
def build_url meth
|
data/test/fixtures/place.json
CHANGED
@@ -1,18 +1,23 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
|
4
|
-
|
5
|
-
"
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
2
|
+
"meta": {
|
3
|
+
"code": 200
|
4
|
+
},
|
5
|
+
"response":{
|
6
|
+
"code":"OMCTM",
|
7
|
+
"created_at":"2011-08-01T11:22:13+04:00",
|
8
|
+
"dislikes":0,
|
9
|
+
"id":855631,
|
10
|
+
"likes":0,
|
11
|
+
"name":"\u041e\u0444\u0438\u0441 \u043d\u0430 \u0411 \u0422\u0443\u043b\u044c\u0441\u043a\u043e\u0439 44",
|
12
|
+
"type":"Place",
|
13
|
+
"categories":[],
|
14
|
+
"dots":[
|
15
|
+
{"latitude":55.7053161,"longitude":37.6208033,"radius":15.0}
|
16
|
+
],
|
17
|
+
"address":"\u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0422\u0443\u043b\u044c\u0441\u043a\u0430\u044f 44",
|
18
|
+
"phone":"",
|
19
|
+
"wifi":true,
|
20
|
+
"url":"",
|
21
|
+
"text":""
|
22
|
+
}
|
23
|
+
}
|
@@ -1 +1,6 @@
|
|
1
|
-
|
1
|
+
{
|
2
|
+
"meta": {
|
3
|
+
"code": 200
|
4
|
+
},
|
5
|
+
"response":[{"code":"OMCTM","created_at":"2011-08-01T14:22:13+07:00","dislikes":0,"id":855631,"likes":0,"name":"\u041e\u0444\u0438\u0441 \u043d\u0430 \u0411 \u0422\u0443\u043b\u044c\u0441\u043a\u043e\u0439 44","type":"Place","categories":[],"dots":[{"latitude":55.7053161,"longitude":37.6208033,"radius":15.0}],"address":"\u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0422\u0443\u043b\u044c\u0441\u043a\u0430\u044f 44","phone":"","wifi":true,"url":"","text":""},{"code":"1TXK","created_at":"2010-12-14T23:10:17+07:00","dislikes":0,"id":23575,"likes":0,"name":"\u0410\u0439\u0422\u0438 \u0422\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u044f","type":"Place","categories":[],"dots":[{"latitude":55.705316,"longitude":37.620803,"radius":15.0}],"address":"\u0411. \u0422\u0443\u043b\u044c\u0441\u043a\u0430\u044f \u0443\u043b\u0438\u0446\u0430, 44","phone":null,"wifi":true,"url":null,"text":""},{"code":"MABH","created_at":"2010-12-17T18:28:17+07:00","dislikes":0,"id":37490,"likes":0,"name":"\u0410\u0432\u0442\u043e\u0441\u0442\u043e\u044f\u043d\u043a\u0430","type":"Place","categories":[{"id":77,"name":"\u0421\u0435\u0440\u0432\u0438\u0441-\u0446\u0435\u043d\u0442\u0440"}],"dots":[{"latitude":55.70569699,"longitude":37.620586,"radius":15.0}],"address":"\u0411. \u0422\u0443\u043b\u044c\u0441\u043a\u0430\u044f \u0443\u043b\u0438\u0446\u0430","phone":null,"wifi":false,"url":null,"text":""},{"code":"82EE","created_at":"2010-12-14T20:36:17+07:00","dislikes":0,"id":10436,"likes":0,"name":"\u0411\u0430\u043d\u043a\u043e\u043c\u0430\u0442 \u041f\u0435\u0442\u0440\u043e\u043a\u043e\u043c\u043c\u0435\u0440\u0446 \u0432 \u041e\u0410\u041e \u00ab\u042d\u043d\u0435\u0440\u0433\u043e\u0431\u0430\u043b\u0430\u043d\u0441 \u0421\u0442\u043e\u043b\u0438\u0446\u0430\u00bb","type":"Place","categories":[],"dots":[{"latitude":55.7049863,"longitude":37.6227668,"radius":15.0}],"address":"\u0420\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u0430\u044f \u0424\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044f, 115191, \u0433\u043e\u0440\u043e\u0434 \u041c\u043e\u0441\u043a\u0432\u0430, \u0411\u043e\u043b. \u0422\u0443\u043b\u044c\u0441\u043a\u0430\u044f \u0443\u043b., 43","phone":null,"wifi":false,"url":null,"text":""},{"code":"X7ACM","created_at":"2011-06-16T15:10:15+07:00","dislikes":0,"id":843141,"likes":0,"name":"\u041e\u0447\u043a\u0430\u0440\u0438\u043a","type":"Place","categories":[],"dots":[{"latitude":55.7061435,"longitude":37.6196692,"radius":15.0}],"address":null,"phone":null,"wifi":false,"url":null,"text":null},{"code":"HKXM","created_at":"2010-12-16T21:01:44+07:00","dislikes":0,"id":32703,"likes":0,"name":"McDonald's","type":"Place","categories":[{"id":104,"name":"\u0424\u0430\u0441\u0442\u0444\u0443\u0434\u044b"}],"dots":[{"latitude":55.70668,"longitude":37.621007,"radius":15.0}],"address":"\u0411. \u0422\u0443\u043b\u044c\u0441\u043a\u0430\u044f \u0443\u043b\u0438\u0446\u0430, 11 \u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 3","phone":null,"wifi":true,"url":null,"text":""},{"code":"YCTK","created_at":"2010-12-14T23:09:22+07:00","dislikes":0,"id":22670,"likes":0,"name":"\u041f\u043b\u0430\u043d\u0435\u0442\u0430 \u0441\u0443\u0448\u0438","type":"Place","categories":[{"id":2,"name":"\u041a\u0430\u0444\u0435"}],"dots":[{"latitude":55.70668,"longitude":37.621007,"radius":15.0}],"address":"\u0411. \u0422\u0443\u043b\u044c\u0441\u043a\u0430\u044f \u0443\u043b\u0438\u0446\u0430, 8","phone":"(495) 287-3183, (495) 287-3184, (495) 287-3185","wifi":true,"url":"http://planet-sushi.rosinter.ru/","text":""},{"code":"MYMK","created_at":"2010-12-14T22:57:09+07:00","dislikes":0,"id":20501,"likes":0,"name":"Drimmi","type":"Place","categories":[],"dots":[{"latitude":55.70615,"longitude":37.619312,"radius":15.0}],"address":"\u0411. \u0422\u0443\u043b\u044c\u0441\u043a\u0430\u044f \u0443\u043b\u0438\u0446\u0430, 10 \u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 9","phone":"(495) 787-27-90","wifi":false,"url":"http://www.drimmi.ru","text":""},{"code":"O14B","created_at":"2010-12-10T21:34:05+07:00","dislikes":0,"id":6874,"likes":0,"name":"\u041c\u043e\u0441\u043a\u043e\u0432\u0441\u043a\u0438\u0439 \u0433\u043e\u0440\u043e\u0434\u0441\u043a\u043e\u0439 \u043f\u0435\u0434\u0430\u0433\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442 (\u041c\u0413\u041f\u0423). \u0413\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0444\u0430\u043a\u0443\u043b\u044c\u0442\u0435\u0442","type":"Place","categories":[],"dots":[{"latitude":55.7039518,"longitude":37.6198925,"radius":15.0}],"address":"\u0420\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u0430\u044f \u0424\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044f, 115191, \u0433\u043e\u0440\u043e\u0434 \u041c\u043e\u0441\u043a\u0432\u0430, 2-\u0439 \u0422\u0443\u043b\u044c\u0441\u043a\u0438\u0439 \u043f\u0435\u0440., 4","phone":"+7 (499) 181 2177, +7 (495) 958 0460","wifi":false,"url":null,"text":""},{"code":"Y7ACM","created_at":"2011-06-16T15:10:15+07:00","dislikes":0,"id":843140,"likes":1,"name":"\u0418\u043d\u0433\u043e\u0441\u0441\u0442\u0440\u0430\u0445","type":"Place","categories":[],"dots":[{"latitude":55.7061327,"longitude":37.6190832,"radius":15.0}],"address":null,"phone":null,"wifi":false,"url":null,"text":null}]
|
6
|
+
}
|
data/test/fixtures/user.json
CHANGED
@@ -1,8 +1,13 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
|
4
|
-
|
5
|
-
"
|
6
|
-
|
7
|
-
|
2
|
+
"meta": {
|
3
|
+
"code": 200
|
4
|
+
},
|
5
|
+
"response": {
|
6
|
+
"first_name":"Sergey",
|
7
|
+
"glomp_rate":"248.5",
|
8
|
+
"id":6,
|
9
|
+
"last_name":"Sein",
|
10
|
+
"full_name":"Sergey Sein",
|
11
|
+
"avatar":"http://graph.facebook.com/1469130771/picture"
|
12
|
+
}
|
8
13
|
}
|
data/test/helper.rb
CHANGED
data/test/test_client.rb
CHANGED
@@ -5,7 +5,7 @@ class TestClient < Test::Unit::TestCase
|
|
5
5
|
context "when instantiating a client instance" do
|
6
6
|
should "use the correct url for api requests" do
|
7
7
|
@client = Glomper::Client.new
|
8
|
-
@client.api_url.should == "http://
|
8
|
+
@client.api_url.should == "http://glomper.com/api"
|
9
9
|
end
|
10
10
|
|
11
11
|
should "retain oauth token for requests" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glomper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,12 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-11-28 00:00:00.000000000 +03:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: faraday
|
17
|
-
requirement: &
|
17
|
+
requirement: &2152306060 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - <
|
@@ -25,10 +25,10 @@ dependencies:
|
|
25
25
|
version: '0.6'
|
26
26
|
type: :runtime
|
27
27
|
prerelease: false
|
28
|
-
version_requirements: *
|
28
|
+
version_requirements: *2152306060
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: faraday_middleware
|
31
|
-
requirement: &
|
31
|
+
requirement: &2152303080 !ruby/object:Gem::Requirement
|
32
32
|
none: false
|
33
33
|
requirements:
|
34
34
|
- - <
|
@@ -39,10 +39,10 @@ dependencies:
|
|
39
39
|
version: '0.6'
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
|
-
version_requirements: *
|
42
|
+
version_requirements: *2152303080
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: hashie
|
45
|
-
requirement: &
|
45
|
+
requirement: &2152299920 !ruby/object:Gem::Requirement
|
46
46
|
none: false
|
47
47
|
requirements:
|
48
48
|
- - ~>
|
@@ -50,10 +50,10 @@ dependencies:
|
|
50
50
|
version: '1.0'
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
|
-
version_requirements: *
|
53
|
+
version_requirements: *2152299920
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: shoulda
|
56
|
-
requirement: &
|
56
|
+
requirement: &2152280460 !ruby/object:Gem::Requirement
|
57
57
|
none: false
|
58
58
|
requirements:
|
59
59
|
- - ! '>='
|
@@ -61,10 +61,10 @@ dependencies:
|
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
|
-
version_requirements: *
|
64
|
+
version_requirements: *2152280460
|
65
65
|
- !ruby/object:Gem::Dependency
|
66
66
|
name: bundler
|
67
|
-
requirement: &
|
67
|
+
requirement: &2152279280 !ruby/object:Gem::Requirement
|
68
68
|
none: false
|
69
69
|
requirements:
|
70
70
|
- - ~>
|
@@ -72,10 +72,10 @@ dependencies:
|
|
72
72
|
version: 1.0.0
|
73
73
|
type: :development
|
74
74
|
prerelease: false
|
75
|
-
version_requirements: *
|
75
|
+
version_requirements: *2152279280
|
76
76
|
- !ruby/object:Gem::Dependency
|
77
77
|
name: jeweler
|
78
|
-
requirement: &
|
78
|
+
requirement: &2152278040 !ruby/object:Gem::Requirement
|
79
79
|
none: false
|
80
80
|
requirements:
|
81
81
|
- - ~>
|
@@ -83,10 +83,10 @@ dependencies:
|
|
83
83
|
version: 1.6.4
|
84
84
|
type: :development
|
85
85
|
prerelease: false
|
86
|
-
version_requirements: *
|
86
|
+
version_requirements: *2152278040
|
87
87
|
- !ruby/object:Gem::Dependency
|
88
88
|
name: rcov
|
89
|
-
requirement: &
|
89
|
+
requirement: &2152267340 !ruby/object:Gem::Requirement
|
90
90
|
none: false
|
91
91
|
requirements:
|
92
92
|
- - ! '>='
|
@@ -94,10 +94,10 @@ dependencies:
|
|
94
94
|
version: '0'
|
95
95
|
type: :development
|
96
96
|
prerelease: false
|
97
|
-
version_requirements: *
|
97
|
+
version_requirements: *2152267340
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: fakeweb
|
100
|
-
requirement: &
|
100
|
+
requirement: &2152265340 !ruby/object:Gem::Requirement
|
101
101
|
none: false
|
102
102
|
requirements:
|
103
103
|
- - ~>
|
@@ -105,10 +105,10 @@ dependencies:
|
|
105
105
|
version: '1.3'
|
106
106
|
type: :development
|
107
107
|
prerelease: false
|
108
|
-
version_requirements: *
|
108
|
+
version_requirements: *2152265340
|
109
109
|
- !ruby/object:Gem::Dependency
|
110
110
|
name: jnunemaker-matchy
|
111
|
-
requirement: &
|
111
|
+
requirement: &2152263100 !ruby/object:Gem::Requirement
|
112
112
|
none: false
|
113
113
|
requirements:
|
114
114
|
- - ~>
|
@@ -116,10 +116,10 @@ dependencies:
|
|
116
116
|
version: '0.4'
|
117
117
|
type: :development
|
118
118
|
prerelease: false
|
119
|
-
version_requirements: *
|
119
|
+
version_requirements: *2152263100
|
120
120
|
- !ruby/object:Gem::Dependency
|
121
121
|
name: json_pure
|
122
|
-
requirement: &
|
122
|
+
requirement: &2152260880 !ruby/object:Gem::Requirement
|
123
123
|
none: false
|
124
124
|
requirements:
|
125
125
|
- - ~>
|
@@ -127,10 +127,10 @@ dependencies:
|
|
127
127
|
version: '1.4'
|
128
128
|
type: :development
|
129
129
|
prerelease: false
|
130
|
-
version_requirements: *
|
130
|
+
version_requirements: *2152260880
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: multi_json
|
133
|
-
requirement: &
|
133
|
+
requirement: &2152257800 !ruby/object:Gem::Requirement
|
134
134
|
none: false
|
135
135
|
requirements:
|
136
136
|
- - <
|
@@ -141,7 +141,7 @@ dependencies:
|
|
141
141
|
version: 0.0.5
|
142
142
|
type: :development
|
143
143
|
prerelease: false
|
144
|
-
version_requirements: *
|
144
|
+
version_requirements: *2152257800
|
145
145
|
description: Gives access to all endpoints Glomper API
|
146
146
|
email: linchus@gmail.com
|
147
147
|
executables: []
|
@@ -185,7 +185,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
185
185
|
version: '0'
|
186
186
|
segments:
|
187
187
|
- 0
|
188
|
-
hash:
|
188
|
+
hash: 790468927243040275
|
189
189
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
190
190
|
none: false
|
191
191
|
requirements:
|