gowalla 0.1.0 → 0.1.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/VERSION +1 -1
- data/gowalla.gemspec +2 -2
- data/lib/gowalla/client.rb +3 -3
- data/test/fixtures/categories.json +1810 -2040
- data/test/fixtures/category.json +3 -4
- data/test/fixtures/stamps.json +223 -151
- data/test/helper.rb +2 -1
- data/test/test_gowalla.rb +5 -6
- metadata +2 -2
data/test/fixtures/category.json
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
{
|
2
|
-
"image_url": "http://static.gowalla.com/categories/1-standard.png",
|
3
|
-
"name": "Coffee Shop",
|
4
2
|
"small_image_url": "http://static.gowalla.com/categories/1-small-standard.png",
|
3
|
+
"name": "Coffee Shop",
|
5
4
|
"url": "/categories/1",
|
6
|
-
"
|
7
|
-
"
|
5
|
+
"spot_categories": [],
|
6
|
+
"image_url": "http://static.gowalla.com/categories/1-standard.png",
|
8
7
|
"description": ""
|
9
8
|
}
|
data/test/fixtures/stamps.json
CHANGED
@@ -1,152 +1,224 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
"
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
"
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
"
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
"
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
"
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
"
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
"
|
99
|
-
|
100
|
-
|
101
|
-
},
|
102
|
-
{
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
"
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
"
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
1
|
+
{
|
2
|
+
"stamps": [
|
3
|
+
{
|
4
|
+
"user_checkins_count": 46,
|
5
|
+
"image_url": "http://static.gowalla.com/spots/21714-3fed705ea37c9c266efb70f3a62a2b6a.png",
|
6
|
+
"first_checkin_at": "2009-09-21T14:52:11+00:00",
|
7
|
+
"last_checkin_at": null,
|
8
|
+
"name": "Juan Pelota Cafe",
|
9
|
+
"location": {
|
10
|
+
"city": "Austin, TX"
|
11
|
+
},
|
12
|
+
"url": "/spots/21714"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"user_checkins_count": 1,
|
16
|
+
"image_url": "http://static.gowalla.com/categories/19-standard.png",
|
17
|
+
"first_checkin_at": "2010-02-16T02:33:09+00:00",
|
18
|
+
"last_checkin_at": null,
|
19
|
+
"name": "Asti",
|
20
|
+
"location": {
|
21
|
+
"city": "Austin, TX"
|
22
|
+
},
|
23
|
+
"url": "/spots/366666"
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"user_checkins_count": 10,
|
27
|
+
"image_url": "http://static.gowalla.com/spots/9410-132ed068e83fc11c465ec25f519ed677.png",
|
28
|
+
"first_checkin_at": "2009-09-24T12:06:09+00:00",
|
29
|
+
"last_checkin_at": null,
|
30
|
+
"name": "AUS Austin-Bergstrom",
|
31
|
+
"location": {
|
32
|
+
"city": "Austin, TX"
|
33
|
+
},
|
34
|
+
"url": "/spots/9410"
|
35
|
+
},
|
36
|
+
{
|
37
|
+
"user_checkins_count": 13,
|
38
|
+
"image_url": "http://static.gowalla.com/categories/1-standard.png",
|
39
|
+
"first_checkin_at": "2009-09-17T19:39:41+00:00",
|
40
|
+
"last_checkin_at": null,
|
41
|
+
"name": "Jo's Coffee",
|
42
|
+
"location": {
|
43
|
+
"city": "Austin, TX"
|
44
|
+
},
|
45
|
+
"url": "/spots/15326"
|
46
|
+
},
|
47
|
+
{
|
48
|
+
"user_checkins_count": 1,
|
49
|
+
"image_url": "http://static.gowalla.com/categories/64-standard.png",
|
50
|
+
"first_checkin_at": "2010-02-14T19:14:31+00:00",
|
51
|
+
"last_checkin_at": null,
|
52
|
+
"name": "The Mighty Cone",
|
53
|
+
"location": {
|
54
|
+
"city": "Austin, TX"
|
55
|
+
},
|
56
|
+
"url": "/spots/128073"
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"user_checkins_count": 9,
|
60
|
+
"image_url": "http://static.gowalla.com/spots/49904-d30046742175b5bc8dcbe1b0bdd151f8.png",
|
61
|
+
"first_checkin_at": "2009-10-19T18:40:00+00:00",
|
62
|
+
"last_checkin_at": null,
|
63
|
+
"name": "Torchy's Tacos",
|
64
|
+
"location": {
|
65
|
+
"city": "Austin, TX"
|
66
|
+
},
|
67
|
+
"url": "/spots/49904"
|
68
|
+
},
|
69
|
+
{
|
70
|
+
"user_checkins_count": 1,
|
71
|
+
"image_url": "http://static.gowalla.com/categories/1-standard.png",
|
72
|
+
"first_checkin_at": "2010-02-13T22:09:41+00:00",
|
73
|
+
"last_checkin_at": null,
|
74
|
+
"name": "Once Over Coffee",
|
75
|
+
"location": {
|
76
|
+
"city": "Austin, TX"
|
77
|
+
},
|
78
|
+
"url": "/spots/505008"
|
79
|
+
},
|
80
|
+
{
|
81
|
+
"user_checkins_count": 2,
|
82
|
+
"image_url": "http://static.gowalla.com/spots/20922-e2d45abb981c2716353af9c6d254d8b5.png",
|
83
|
+
"first_checkin_at": "2009-11-12T23:21:05+00:00",
|
84
|
+
"last_checkin_at": null,
|
85
|
+
"name": "Birds Barbershop - South Congress",
|
86
|
+
"location": {
|
87
|
+
"city": null
|
88
|
+
},
|
89
|
+
"url": "/spots/20922"
|
90
|
+
},
|
91
|
+
{
|
92
|
+
"user_checkins_count": 3,
|
93
|
+
"image_url": "http://static.gowalla.com/categories/121-standard.png",
|
94
|
+
"first_checkin_at": "2010-01-26T00:26:53+00:00",
|
95
|
+
"last_checkin_at": null,
|
96
|
+
"name": "Infinite Loop 1",
|
97
|
+
"location": {
|
98
|
+
"city": "Cupertino, CA"
|
99
|
+
},
|
100
|
+
"url": "/spots/39438"
|
101
|
+
},
|
102
|
+
{
|
103
|
+
"user_checkins_count": 18,
|
104
|
+
"image_url": "http://static.gowalla.com/categories/89-standard.png",
|
105
|
+
"first_checkin_at": "2009-09-16T17:15:02+00:00",
|
106
|
+
"last_checkin_at": null,
|
107
|
+
"name": "Raymond Ranch South",
|
108
|
+
"location": {
|
109
|
+
"city": "Austin, TX"
|
110
|
+
},
|
111
|
+
"url": "/spots/25151"
|
112
|
+
},
|
113
|
+
{
|
114
|
+
"user_checkins_count": 7,
|
115
|
+
"image_url": "http://static.gowalla.com/spots/420315-790176c52df5c1b8c00a97fa57b81991.png",
|
116
|
+
"first_checkin_at": "2010-01-20T20:45:55+00:00",
|
117
|
+
"last_checkin_at": null,
|
118
|
+
"name": "Gowalla Incorporated",
|
119
|
+
"location": {
|
120
|
+
"city": "Austin, TX"
|
121
|
+
},
|
122
|
+
"url": "/spots/420315"
|
123
|
+
},
|
124
|
+
{
|
125
|
+
"user_checkins_count": 2,
|
126
|
+
"image_url": "http://static.gowalla.com/categories/1-standard.png",
|
127
|
+
"first_checkin_at": "2010-01-15T00:33:59+00:00",
|
128
|
+
"last_checkin_at": null,
|
129
|
+
"name": "The Coffee Bean and Tea Leaf",
|
130
|
+
"location": {
|
131
|
+
"city": "San Francisco, CA"
|
132
|
+
},
|
133
|
+
"url": "/spots/15114"
|
134
|
+
},
|
135
|
+
{
|
136
|
+
"user_checkins_count": 4,
|
137
|
+
"image_url": "http://static.gowalla.com/categories/15-standard.png",
|
138
|
+
"first_checkin_at": "2009-12-08T03:48:20+00:00",
|
139
|
+
"last_checkin_at": null,
|
140
|
+
"name": "Tropisueño",
|
141
|
+
"location": {
|
142
|
+
"city": "San Francisco, CA"
|
143
|
+
},
|
144
|
+
"url": "/spots/19199"
|
145
|
+
},
|
146
|
+
{
|
147
|
+
"user_checkins_count": 1,
|
148
|
+
"image_url": "http://static.gowalla.com/categories/154-standard.png",
|
149
|
+
"first_checkin_at": "2010-02-09T04:23:16+00:00",
|
150
|
+
"last_checkin_at": null,
|
151
|
+
"name": "Burger Bar",
|
152
|
+
"location": {
|
153
|
+
"city": "San Francisco, CA"
|
154
|
+
},
|
155
|
+
"url": "/spots/52264"
|
156
|
+
},
|
157
|
+
{
|
158
|
+
"user_checkins_count": 2,
|
159
|
+
"image_url": "http://static.gowalla.com/spots/9114-35e553fc91c0f1d140c31b466185b317.png",
|
160
|
+
"first_checkin_at": "2010-01-13T05:02:01+00:00",
|
161
|
+
"last_checkin_at": null,
|
162
|
+
"name": "Union Square",
|
163
|
+
"location": {
|
164
|
+
"city": "San Francisco, CA"
|
165
|
+
},
|
166
|
+
"url": "/spots/9114"
|
167
|
+
},
|
168
|
+
{
|
169
|
+
"user_checkins_count": 1,
|
170
|
+
"image_url": "http://static.gowalla.com/spots/501252-b2413ccf9e99ad6c16fef5d5ab798960.png",
|
171
|
+
"first_checkin_at": "2010-02-09T01:15:51+00:00",
|
172
|
+
"last_checkin_at": null,
|
173
|
+
"name": "Barenaked Ladies Benefit Concert for Haiti",
|
174
|
+
"location": {
|
175
|
+
"city": "San Francisco, CA"
|
176
|
+
},
|
177
|
+
"url": "/spots/501252"
|
178
|
+
},
|
179
|
+
{
|
180
|
+
"user_checkins_count": 1,
|
181
|
+
"image_url": "http://static.gowalla.com/categories/26-standard.png",
|
182
|
+
"first_checkin_at": "2010-02-09T00:59:04+00:00",
|
183
|
+
"last_checkin_at": null,
|
184
|
+
"name": "Infusion Lounge",
|
185
|
+
"location": {
|
186
|
+
"city": "San Francisco, CA"
|
187
|
+
},
|
188
|
+
"url": "/spots/184596"
|
189
|
+
},
|
190
|
+
{
|
191
|
+
"user_checkins_count": 3,
|
192
|
+
"image_url": "http://static.gowalla.com/categories/230-standard.png",
|
193
|
+
"first_checkin_at": "2010-01-11T22:08:19+00:00",
|
194
|
+
"last_checkin_at": null,
|
195
|
+
"name": "Apple Company Store",
|
196
|
+
"location": {
|
197
|
+
"city": "Cupertino, CA"
|
198
|
+
},
|
199
|
+
"url": "/spots/39440"
|
200
|
+
},
|
201
|
+
{
|
202
|
+
"user_checkins_count": 1,
|
203
|
+
"image_url": "http://static.gowalla.com/categories/186-standard.png",
|
204
|
+
"first_checkin_at": "2010-02-08T22:42:43+00:00",
|
205
|
+
"last_checkin_at": null,
|
206
|
+
"name": "Bank of America",
|
207
|
+
"location": {
|
208
|
+
"city": "San Francisco, CA"
|
209
|
+
},
|
210
|
+
"url": "/spots/95590"
|
211
|
+
},
|
212
|
+
{
|
213
|
+
"user_checkins_count": 3,
|
214
|
+
"image_url": "http://static.gowalla.com/categories/101-standard.png",
|
215
|
+
"first_checkin_at": "2009-06-25T21:06:53+00:00",
|
216
|
+
"last_checkin_at": null,
|
217
|
+
"name": "The Sentinel",
|
218
|
+
"location": {
|
219
|
+
"city": "San Francisco, CA"
|
220
|
+
},
|
221
|
+
"url": "/spots/16002"
|
151
222
|
}
|
152
|
-
]
|
223
|
+
]
|
224
|
+
}
|
data/test/helper.rb
CHANGED
@@ -2,7 +2,7 @@ require 'test/unit'
|
|
2
2
|
require 'pathname'
|
3
3
|
require 'rubygems'
|
4
4
|
|
5
|
-
gem '
|
5
|
+
gem 'shoulda', '>= 2.10.1'
|
6
6
|
gem 'jnunemaker-matchy', '0.4.0'
|
7
7
|
gem 'fakeweb', '>= 1.2.5'
|
8
8
|
|
@@ -10,6 +10,7 @@ require 'shoulda'
|
|
10
10
|
require 'matchy'
|
11
11
|
require 'fakeweb'
|
12
12
|
|
13
|
+
begin require 'redgreen'; rescue LoadError; end
|
13
14
|
|
14
15
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
15
16
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
data/test/test_gowalla.rb
CHANGED
@@ -43,15 +43,14 @@ class TestGowalla < Test::Unit::TestCase
|
|
43
43
|
categories.size.should == 9
|
44
44
|
categories.first.name.should == 'Architecture & Buildings'
|
45
45
|
categories.first.description.should == 'Bridge, Corporate, Home, Church, etc.'
|
46
|
-
categories.first.
|
47
|
-
categories.first.
|
46
|
+
categories.first.spot_categories.size.should == 15
|
47
|
+
categories.first.spot_categories.first.name.should == 'Bridge'
|
48
48
|
end
|
49
49
|
|
50
50
|
should "retrieve information about a specific category" do
|
51
51
|
stub_get("http://pengwynn:0U812@api.gowalla.com/categories/1", "category.json")
|
52
52
|
category = @client.category(1)
|
53
53
|
category.name.should == 'Coffee Shop'
|
54
|
-
category.id.should == 1
|
55
54
|
end
|
56
55
|
end
|
57
56
|
|
@@ -67,9 +66,9 @@ class TestGowalla < Test::Unit::TestCase
|
|
67
66
|
should "retrieve a list of the stamps the user has collected" do
|
68
67
|
stub_get('http://pengwynn:0U812@api.gowalla.com/users/1707/stamps?limit=20', 'stamps.json')
|
69
68
|
stamps = @client.stamps(1707)
|
70
|
-
stamps.size.should ==
|
71
|
-
stamps.first.name.should == '
|
72
|
-
stamps.first.
|
69
|
+
stamps.size.should == 20
|
70
|
+
stamps.first.name.should == 'Juan Pelota Cafe'
|
71
|
+
stamps.first.location.city.should == 'Austin, TX'
|
73
72
|
end
|
74
73
|
|
75
74
|
should "retrieve a list of spots the user has visited most often" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gowalla
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wynn Netherland
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-02-
|
12
|
+
date: 2010-02-18 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|