gowalla 0.5.7 → 0.5.8

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.
@@ -1,4 +1,7 @@
1
1
  # Changelog
2
+ ## 0.5.8 August 28, 2011
3
+ * update faraday and middleware dependencies
4
+ * fix checkin to work correctly with oauth token
2
5
  ## 0.5.7 June 19, 2011
3
6
  * user events pagination and readme updates from [tylerhunt](https://github.com/tylerhunt) and [ctide](https://github.com/ctide)
4
7
  ## 0.5.6 April 24, 2011
@@ -10,8 +10,8 @@ Gem::Specification.new do |s|
10
10
  s.description = %q{Ruby wrapper for the Gowalla API}
11
11
  s.homepage = 'http://wynnnetherland.com/projects/gowalla/'
12
12
 
13
- s.add_runtime_dependency 'faraday', '~> 0.6'
14
- s.add_runtime_dependency 'faraday_middleware', '~> 0.6'
13
+ s.add_runtime_dependency 'faraday', '~> 0.7'
14
+ s.add_runtime_dependency 'faraday_middleware', '~> 0.7'
15
15
  s.add_runtime_dependency 'hashie', '~> 1.0.0'
16
16
  s.add_runtime_dependency 'oauth2', '~> 0.4'
17
17
 
@@ -21,16 +21,10 @@ module Gowalla
21
21
  end
22
22
 
23
23
  def test_mode?
24
- !!self.test_mode
24
+ !!test_mode
25
25
  end
26
26
  end
27
27
 
28
- require 'gowalla/spots'
29
- require 'gowalla/items'
30
- require 'gowalla/trips'
31
- require 'gowalla/checkins'
32
- require 'gowalla/flags'
33
- require 'gowalla/users'
34
28
  require 'gowalla/client'
35
29
 
36
30
  end
@@ -9,7 +9,7 @@ module Gowalla
9
9
  connection.get("/checkins/#{id}").body
10
10
  end
11
11
 
12
- # Check in at a spot
12
+ # Check in at a spot (requires oauth token authentication)
13
13
  #
14
14
  # @option details [Integer] :spot_id Spot ID
15
15
  # @option details [Float] :lat Latitude of spot
@@ -1,4 +1,10 @@
1
1
  require 'forwardable'
2
+ require 'gowalla/spots'
3
+ require 'gowalla/items'
4
+ require 'gowalla/trips'
5
+ require 'gowalla/checkins'
6
+ require 'gowalla/flags'
7
+ require 'gowalla/users'
2
8
 
3
9
  module Gowalla
4
10
  class Client
@@ -37,13 +43,13 @@ module Gowalla
37
43
  # @return [Faraday::Connection]
38
44
  def connection
39
45
  params = {}
40
- params[:access_token] = @access_token if @access_token
46
+ params[:oauth_token] = @access_token if @access_token
41
47
  @connection ||= Faraday.new(:url => api_url, :params => params, :headers => default_headers) do |builder|
42
- builder.adapter Faraday.default_adapter
48
+ builder.use Faraday::Request::UrlEncoded
43
49
  builder.use Faraday::Response::Mashify
44
50
  builder.use Faraday::Response::ParseJson
51
+ builder.adapter Faraday.default_adapter
45
52
  end
46
-
47
53
  end
48
54
 
49
55
  # Provides the URL for accessing the API
@@ -1,3 +1,3 @@
1
1
  module Gowalla
2
- VERSION = '0.5.7'
2
+ VERSION = '0.5.8'
3
3
  end
@@ -2,17 +2,27 @@ require 'helper'
2
2
 
3
3
  class CheckinsTest < Test::Unit::TestCase
4
4
 
5
- context "When using the Gowalla API and working with checkins" do
6
- setup do
7
- @client = gowalla_test_client
8
- end
5
+ should "fetch info for a checkin" do
6
+ client = gowalla_basic_client
9
7
 
10
- should "fetch info for a checkin" do
11
- stub_get("https://pengwynn:0U812@api.gowalla.com/checkins/88", "checkin.json")
12
- checkin = @client.checkin_info(88)
13
- checkin.spot.name.should == 'Movie Tavern'
14
- checkin.message.should == 'There sending us Back-- to the Future!'
15
- end
8
+ stub_request("https://pengwynn:0U812@api.gowalla.com/checkins/88", "checkin_info.json")
9
+ checkin = client.checkin_info(88)
10
+ checkin.spot.name.should == 'Movie Tavern'
11
+ checkin.message.should == 'There sending us Back-- to the Future!'
12
+ end
13
+
14
+ should "create a checkin" do
15
+ client = gowalla_oauth_client
16
+
17
+ stub_request("https://api.gowalla.com/checkins?oauth_token=0U812", "checkin.json")
18
+ checkin = client.checkin \
19
+ :spot_id => 18568,
20
+ :lat => 33.237593417,
21
+ :lng => -96.960559033,
22
+ :comment => 'visiting',
23
+ :post_to_facebook => 0,
24
+ :post_to_twitter => 0
25
+ checkin.message.should == 'coffee test'
16
26
  end
17
27
 
18
28
  end
@@ -4,7 +4,7 @@ class ClientTest < Test::Unit::TestCase
4
4
 
5
5
  context "When using the Gowalla API" do
6
6
  setup do
7
- @client = gowalla_test_client
7
+ @client = gowalla_basic_client
8
8
  end
9
9
  end
10
10
 
@@ -1,21 +1,13 @@
1
- {
2
- "activity": [],
3
- "activity_url": "/checkins/13963823/activity",
4
- "created_at": "2010-08-06T01:42:13Z",
5
- "message": "There sending us Back-- to the Future!",
6
- "spot": {
7
- "image_url": "http://static.gowalla.com/categories/30-c21e752b813cd8873603a18e06431675-100.png?1",
8
- "name": "Movie Tavern",
9
- "url": "/spots/195556"
10
- },
11
- "type": "checkin",
12
- "url": "/checkins/13963823",
13
- "user": {
14
- "_is_friend": true,
15
- "first_name": "Wynn",
16
- "image_url": "http://s3.amazonaws.com/static.gowalla.com/users/1707-standard.jpg?1262011383?1",
17
- "last_name": "Netherland",
18
- "photos_url": "/users/1707/photos",
19
- "url": "/users/1707"
20
- }
21
- }
1
+ {"created_at":"2011-08-28T03:32:09Z",
2
+ "activity_url":"/checkins/123456/activity",
3
+ "spot":
4
+ {"image_url":
5
+ "http://static.gowalla.com/spots/21714-e178c13584f09af661f4cec1b4f24bdb-100.png",
6
+ "name":"Juan Pelota Cafe",
7
+ "url":"/spots/21714"},
8
+ "user":{"url":"/users/2385"},
9
+ "message":"coffee test",
10
+ "detail_text":
11
+ "\nThis is your 0th checkin at Juan Pelota Cafe. Spot Check In Message: Try out an iced honey latte - it's where it's at! You received a Big Bag o' Swag. Team Gowalla left you a note: Thanks for using the Gowalla API! You earned the Cup o' Joe Pin! My Happy Place Highlight from Scott Raymond: I think I could come here every day and not tire of it.\n",
12
+ "detail_html":"",
13
+ "url":"/checkins/123456"}
@@ -0,0 +1,21 @@
1
+ {
2
+ "activity": [],
3
+ "activity_url": "/checkins/13963823/activity",
4
+ "created_at": "2010-08-06T01:42:13Z",
5
+ "message": "There sending us Back-- to the Future!",
6
+ "spot": {
7
+ "image_url": "http://static.gowalla.com/categories/30-c21e752b813cd8873603a18e06431675-100.png?1",
8
+ "name": "Movie Tavern",
9
+ "url": "/spots/195556"
10
+ },
11
+ "type": "checkin",
12
+ "url": "/checkins/13963823",
13
+ "user": {
14
+ "_is_friend": true,
15
+ "first_name": "Wynn",
16
+ "image_url": "http://s3.amazonaws.com/static.gowalla.com/users/1707-standard.jpg?1262011383?1",
17
+ "last_name": "Netherland",
18
+ "photos_url": "/users/1707/photos",
19
+ "url": "/users/1707"
20
+ }
21
+ }
@@ -4,11 +4,11 @@ class FlagsTest < Test::Unit::TestCase
4
4
 
5
5
  context "When using the Gowalla API and working with flags" do
6
6
  setup do
7
- @client = gowalla_test_client
7
+ @client = gowalla_basic_client
8
8
  end
9
9
 
10
10
  should "retrieve a list of flags" do
11
- stub_get("https://pengwynn:0U812@api.gowalla.com/flags", "flags.json")
11
+ stub_request("https://pengwynn:0U812@api.gowalla.com/flags", "flags.json")
12
12
  flags = @client.list_flags
13
13
  flags.first.spot.name.should == 'Wild Gowallaby #1'
14
14
  flags.first.user.url.should == '/users/340897'
@@ -17,7 +17,7 @@ class FlagsTest < Test::Unit::TestCase
17
17
  end
18
18
 
19
19
  should "retrieve information about a specific flag" do
20
- stub_get("https://pengwynn:0U812@api.gowalla.com/flags/1", "flag.json")
20
+ stub_request("https://pengwynn:0U812@api.gowalla.com/flags/1", "flag.json")
21
21
  flag = @client.flag(1)
22
22
  flag.spot.name.should == 'Wild Gowallaby #1'
23
23
  flag.user.url.should == '/users/340897'
@@ -27,7 +27,7 @@ class FlagsTest < Test::Unit::TestCase
27
27
 
28
28
 
29
29
  should "retrieve flags associated with that spot" do
30
- stub_get("https://pengwynn:0U812@api.gowalla.com/spots/1/flags", "flags.json")
30
+ stub_request("https://pengwynn:0U812@api.gowalla.com/spots/1/flags", "flags.json")
31
31
  flags = @client.spot_flags(1)
32
32
  flags.first.spot.name.should == 'Wild Gowallaby #1'
33
33
  flags.first.user.url.should == '/users/340897'
@@ -37,7 +37,7 @@ class FlagsTest < Test::Unit::TestCase
37
37
 
38
38
  should "set a flag on a specific spot" do
39
39
  url = "https://pengwynn:0U812@api.gowalla.com/spots/1/flags/invalid"
40
- stub_post(url, "flag_created.json")
40
+ stub_request(url, "flag_created.json")
41
41
  response = @client.flag_spot(1, 'invalid', 'my problem description')
42
42
  response.result.should == 'flag created'
43
43
  end
@@ -11,10 +11,14 @@ require 'gowalla'
11
11
 
12
12
  FakeWeb.allow_net_connect = false
13
13
 
14
- def gowalla_test_client
14
+ def gowalla_basic_client
15
15
  Gowalla::Client.new(:username => 'pengwynn', :password => '0U812', :api_key => 'gowallawallabingbang')
16
16
  end
17
17
 
18
+ def gowalla_oauth_client
19
+ Gowalla::Client.new(:access_token => '0U812', :api_key => 'gowallawallabingbang')
20
+ end
21
+
18
22
  def fixture_file(filename)
19
23
  return '' if filename == ''
20
24
  file_path = File.expand_path(File.dirname(__FILE__) + '/fixtures/' + filename)
@@ -25,18 +29,10 @@ def gowalla_url(url)
25
29
  url =~ /^http/ ? url : "http://api.gowalla.com#{url}"
26
30
  end
27
31
 
28
- def stub_get(url, filename, options={})
29
- opts = {
30
- :body => fixture_file(filename),
31
- :content_type => 'application/json; charset=utf-8'
32
- }.merge(options)
33
- FakeWeb.register_uri(:get, gowalla_url(url), opts)
34
- end
35
-
36
- def stub_post(url, filename, options={})
32
+ def stub_request(url, filename, options={})
37
33
  opts = {
38
34
  :body => fixture_file(filename),
39
35
  :content_type => 'application/json; charset=utf-8'
40
36
  }.merge(options)
41
- FakeWeb.register_uri(:post, gowalla_url(url), opts)
37
+ FakeWeb.register_uri(:any, gowalla_url(url), opts)
42
38
  end
@@ -4,11 +4,11 @@ class ItemsTest < Test::Unit::TestCase
4
4
 
5
5
  context "When using the Gowalla API and working with items" do
6
6
  setup do
7
- @client = gowalla_test_client
7
+ @client = gowalla_basic_client
8
8
  end
9
9
 
10
10
  should "retrieve information about a specific item" do
11
- stub_get('https://pengwynn:0U812@api.gowalla.com/items/607583', 'item.json')
11
+ stub_request('https://pengwynn:0U812@api.gowalla.com/items/607583', 'item.json')
12
12
  item = @client.item(607583)
13
13
  item.issue_number.should == 13998
14
14
  item.name.should == 'Sweets'
@@ -16,7 +16,7 @@ class ItemsTest < Test::Unit::TestCase
16
16
  end
17
17
 
18
18
  should "retrieve events associated with a specific item" do
19
- stub_get('https://pengwynn:0U812@api.gowalla.com/items/607583/events', 'item_events.json')
19
+ stub_request('https://pengwynn:0U812@api.gowalla.com/items/607583/events', 'item_events.json')
20
20
  events = @client.item_events(607583)
21
21
  events.first.spot.name = 'Jerusalem Bakery'
22
22
  events.first.user.first_name = 'Scott'
@@ -4,24 +4,24 @@ class SpotsTest < Test::Unit::TestCase
4
4
 
5
5
  context "When using the Gowalla API and working with Spots" do
6
6
  setup do
7
- @client = gowalla_test_client
7
+ @client = gowalla_basic_client
8
8
  end
9
9
 
10
10
  should "Retrieve a list of spots within a specified distance of a location" do
11
- stub_get("https://pengwynn:0U812@api.gowalla.com/spots?lat=%2B33.237593417&lng=-96.960559033&radius=50", "spots.json")
11
+ stub_request("https://pengwynn:0U812@api.gowalla.com/spots?lat=%2B33.237593417&lng=-96.960559033&radius=50", "spots.json")
12
12
  spots = @client.list_spots(:lat => 33.237593417, :lng => -96.960559033, :radius => 50)
13
13
  spots.first.name.should == 'Gnomb Bar'
14
14
  spots.first.radius_meters.should == 50
15
15
  end
16
16
 
17
17
  should "Retrieve a list of spots within a specified bounds" do
18
- stub_get("https://pengwynn:0U812@api.gowalla.com/spots?sw=%2839.25565142103586%2C%20-8.717308044433594%29&nw=%2839.31411296530539%2C%20-8.490715026855469%29", "spots.json")
18
+ stub_request("https://pengwynn:0U812@api.gowalla.com/spots?sw=%2839.25565142103586%2C%20-8.717308044433594%29&nw=%2839.31411296530539%2C%20-8.490715026855469%29", "spots.json")
19
19
  spots = @client.list_spots(:sw => "(39.25565142103586, -8.717308044433594)", :nw => "(39.31411296530539, -8.490715026855469)")
20
20
  spots.first.name.should == 'Gnomb Bar'
21
21
  end
22
22
 
23
23
  should "Retrieve information about a specific spot" do
24
- stub_get('https://pengwynn:0U812@api.gowalla.com/spots/18568', 'spot.json')
24
+ stub_request('https://pengwynn:0U812@api.gowalla.com/spots/18568', 'spot.json')
25
25
  spot = @client.spot(18568)
26
26
  spot.name.should == "Wahoo's"
27
27
  spot.twitter_username.should == 'Wahoos512'
@@ -29,21 +29,21 @@ class SpotsTest < Test::Unit::TestCase
29
29
  end
30
30
 
31
31
  should "retrieve a list of check-ins at a particular spot. Shows only the activity that is visible to a given user" do
32
- stub_get('https://pengwynn:0U812@api.gowalla.com/spots/452593/events', 'spot_events.json')
32
+ stub_request('https://pengwynn:0U812@api.gowalla.com/spots/452593/events', 'spot_events.json')
33
33
  events = @client.spot_events(452593)
34
34
  events.first[:type].should == 'checkin'
35
35
  events.first.user.last_name.should == 'Mack'
36
36
  end
37
37
 
38
38
  should "retrieve a list of items available at a particular spot" do
39
- stub_get('https://pengwynn:0U812@api.gowalla.com/spots/18568/items', 'items.json')
39
+ stub_request('https://pengwynn:0U812@api.gowalla.com/spots/18568/items', 'items.json')
40
40
  items = @client.spot_items(18568)
41
41
  items.first.issue_number.should == 27868
42
42
  items.first.name.should == 'Bowl of Noodles'
43
43
  end
44
44
 
45
45
  should "lists all spot categories" do
46
- stub_get("https://pengwynn:0U812@api.gowalla.com/categories", "categories.json")
46
+ stub_request("https://pengwynn:0U812@api.gowalla.com/categories", "categories.json")
47
47
  categories = @client.categories
48
48
  categories.size.should == 9
49
49
  categories.first.name.should == 'Architecture & Buildings'
@@ -53,13 +53,13 @@ class SpotsTest < Test::Unit::TestCase
53
53
  end
54
54
 
55
55
  should "retrieve information about a specific category" do
56
- stub_get("https://pengwynn:0U812@api.gowalla.com/categories/1", "category.json")
56
+ stub_request("https://pengwynn:0U812@api.gowalla.com/categories/1", "category.json")
57
57
  category = @client.category(1)
58
58
  category.name.should == 'Coffee Shop'
59
59
  end
60
60
 
61
61
  should "retrieve photos taken at a spot" do
62
- stub_get('https://pengwynn:0U812@api.gowalla.com/spots/18568/photos', 'photos.json')
62
+ stub_request('https://pengwynn:0U812@api.gowalla.com/spots/18568/photos', 'photos.json')
63
63
  photos = @client.spot_photos(18568)
64
64
  #photos.first.type.should == 'photo'
65
65
  photos.first.photo_urls.square_50.should == 'http://static.gowalla.com/photos/912078_square_50.jpg'
@@ -4,18 +4,18 @@ class TripsTest < Test::Unit::TestCase
4
4
 
5
5
  context "When using the Gowalla API and working with trips" do
6
6
  setup do
7
- @client = gowalla_test_client
7
+ @client = gowalla_basic_client
8
8
  end
9
9
 
10
10
  should "retrieve a list of trips" do
11
- stub_get('https://pengwynn:0U812@api.gowalla.com/trips', 'trips.json')
11
+ stub_request('https://pengwynn:0U812@api.gowalla.com/trips', 'trips.json')
12
12
  trips = @client.trips
13
13
  trips.first.name.should == 'London Pub Crawl'
14
14
  trips.first.spots.first.url.should == '/spots/164009'
15
15
  end
16
16
 
17
17
  should "retrieve information about a specific trip" do
18
- stub_get('https://pengwynn:0U812@api.gowalla.com/trips/1', 'trip.json')
18
+ stub_request('https://pengwynn:0U812@api.gowalla.com/trips/1', 'trip.json')
19
19
  trip = @client.trip(1)
20
20
  trip.creator.last_name.should == 'Gowalla'
21
21
  trip.map_bounds.east.should == -63.457031
@@ -4,25 +4,25 @@ class UsersTest < Test::Unit::TestCase
4
4
 
5
5
  context "When using the Gowalla API and working with Users" do
6
6
  setup do
7
- @client = gowalla_test_client
7
+ @client = gowalla_basic_client
8
8
  end
9
9
 
10
10
  should "retrive information about the current user if no user specified" do
11
- stub_get('https://pengwynn:0U812@api.gowalla.com/users/pengwynn', 'user.json')
11
+ stub_request('https://pengwynn:0U812@api.gowalla.com/users/pengwynn', 'user.json')
12
12
  user = @client.user
13
13
  user.bio.should == "CTO & co-founder of Gowalla. Ruby/Cocoa/JavaScript developer. Game designer. Author. Indoorsman."
14
14
  user.stamps_count.should == 506
15
15
  end
16
16
 
17
17
  should "retrieve information about a specific user" do
18
- stub_get('https://pengwynn:0U812@api.gowalla.com/users/sco', 'user.json')
18
+ stub_request('https://pengwynn:0U812@api.gowalla.com/users/sco', 'user.json')
19
19
  user = @client.user('sco')
20
20
  user.bio.should == "CTO & co-founder of Gowalla. Ruby/Cocoa/JavaScript developer. Game designer. Author. Indoorsman."
21
21
  user.stamps_count.should == 506
22
22
  end
23
23
 
24
24
  should "retrieve a list of the stamps the user has collected" do
25
- stub_get('https://pengwynn:0U812@api.gowalla.com/users/1707/stamps?limit=20', 'stamps.json')
25
+ stub_request('https://pengwynn:0U812@api.gowalla.com/users/1707/stamps?limit=20', 'stamps.json')
26
26
  stamps = @client.stamps(1707)
27
27
  stamps.size.should == 20
28
28
  stamps.first.spot.name.should == "Muck-N-Dave's Texas BBQ"
@@ -30,7 +30,7 @@ class UsersTest < Test::Unit::TestCase
30
30
  end
31
31
 
32
32
  should "retrieve a list of spots the user has visited most often" do
33
- stub_get('https://pengwynn:0U812@api.gowalla.com/users/1707/top_spots', 'top_spots.json')
33
+ stub_request('https://pengwynn:0U812@api.gowalla.com/users/1707/top_spots', 'top_spots.json')
34
34
  top_spots = @client.top_spots(1707)
35
35
  top_spots.size.should == 10
36
36
  top_spots.first.name.should == 'Juan Pelota Cafe'
@@ -38,14 +38,14 @@ class UsersTest < Test::Unit::TestCase
38
38
  end
39
39
 
40
40
  should "retrieve a list of spot urls the user has visited" do
41
- stub_get('https://pengwynn:0U812@api.gowalla.com/users/sco/visited_spots_urls', 'spots_urls.json')
41
+ stub_request('https://pengwynn:0U812@api.gowalla.com/users/sco/visited_spots_urls', 'spots_urls.json')
42
42
  spot_urls = @client.visited_spots_urls('sco')
43
43
  spot_urls.size.should == 22
44
44
  spot_urls.first.should == '/spots/682460'
45
45
  end
46
46
 
47
47
  should "retrieve a list of the user's most recent checkins" do
48
- stub_get('https://pengwynn:0U812@api.gowalla.com/users/1707/events', 'user_events.json')
48
+ stub_request('https://pengwynn:0U812@api.gowalla.com/users/1707/events', 'user_events.json')
49
49
  user_events = @client.user_events(1707)
50
50
  user_events.size.should == 10
51
51
  user_events.first.url.should == '/checkins/18863224'
@@ -53,7 +53,7 @@ class UsersTest < Test::Unit::TestCase
53
53
  end
54
54
 
55
55
  should "retrieve a list of the user's most recent checkins with pagination" do
56
- stub_get('https://pengwynn:0U812@api.gowalla.com/users/1707/events?page=2&per_page=50', 'user_events.json')
56
+ stub_request('https://pengwynn:0U812@api.gowalla.com/users/1707/events?page=2&per_page=50', 'user_events.json')
57
57
  user_events = @client.user_events(1707, :page => 2, :per_page => 50)
58
58
  user_events.size.should == 10
59
59
  user_events.first.url.should == '/checkins/18863224'
@@ -61,34 +61,34 @@ class UsersTest < Test::Unit::TestCase
61
61
  end
62
62
 
63
63
  should "retrieve a list of items the user is carrying" do
64
- stub_get('https://pengwynn:0U812@api.gowalla.com/users/sco/items?context=vault', 'items.json')
64
+ stub_request('https://pengwynn:0U812@api.gowalla.com/users/sco/items?context=vault', 'items.json')
65
65
  items = @client.user_items('sco', 'vault')
66
66
  items.first.issue_number.should == 27868
67
67
  items.first.name.should == 'Bowl of Noodles'
68
68
  end
69
69
 
70
70
  should "retrieve a list of friends for the user" do
71
- stub_get('https://pengwynn:0U812@api.gowalla.com/users/sco/friends', 'users.json')
71
+ stub_request('https://pengwynn:0U812@api.gowalla.com/users/sco/friends', 'users.json')
72
72
  users = @client.friends('sco')
73
73
  users.first.first_name.should == 'Chalkbot'
74
74
  end
75
75
 
76
76
  should "retrieve a list of trips created by the user" do
77
- stub_get('https://pengwynn:0U812@api.gowalla.com/users/sco/trips', 'trips.json')
77
+ stub_request('https://pengwynn:0U812@api.gowalla.com/users/sco/trips', 'trips.json')
78
78
  trips = @client.user_trips('sco')
79
79
  trips.first.name.should == 'London Pub Crawl'
80
80
  trips.first.spots.first.url.should == '/spots/164009'
81
81
  end
82
82
 
83
83
  should "retrieve a list of photos taken by the user" do
84
- stub_get('https://pengwynn:0U812@api.gowalla.com/users/sco/photos', 'photos.json')
84
+ stub_request('https://pengwynn:0U812@api.gowalla.com/users/sco/photos', 'photos.json')
85
85
  photos = @client.user_photos('sco')
86
86
  #photos.first.type.should == 'photo'
87
87
  photos.first.photo_urls.square_50.should == 'http://static.gowalla.com/photos/912078_square_50.jpg'
88
88
  end
89
89
 
90
90
  should "retrieve a list of pins collected by the user" do
91
- stub_get('https://pengwynn:0U812@api.gowalla.com/users/sco/pins', 'pins.json')
91
+ stub_request('https://pengwynn:0U812@api.gowalla.com/users/sco/pins', 'pins.json')
92
92
  pins = @client.user_pins('sco')
93
93
  pins.first.name.should == '110 Film'
94
94
  #pins.first.trip.type.should == 'challenge'
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: gowalla
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.5.7
5
+ version: 0.5.8
6
6
  platform: ruby
7
7
  authors:
8
8
  - Wynn Netherland
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2011-06-19 00:00:00 -05:00
14
+ date: 2011-08-28 00:00:00 -05:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
@@ -22,7 +22,7 @@ dependencies:
22
22
  requirements:
23
23
  - - ~>
24
24
  - !ruby/object:Gem::Version
25
- version: "0.6"
25
+ version: "0.7"
26
26
  type: :runtime
27
27
  version_requirements: *id001
28
28
  - !ruby/object:Gem::Dependency
@@ -33,7 +33,7 @@ dependencies:
33
33
  requirements:
34
34
  - - ~>
35
35
  - !ruby/object:Gem::Version
36
- version: "0.6"
36
+ version: "0.7"
37
37
  type: :runtime
38
38
  version_requirements: *id002
39
39
  - !ruby/object:Gem::Dependency
@@ -168,6 +168,7 @@ files:
168
168
  - test/fixtures/category.json
169
169
  - test/fixtures/challenges.json
170
170
  - test/fixtures/checkin.json
171
+ - test/fixtures/checkin_info.json
171
172
  - test/fixtures/find_spots.json
172
173
  - test/fixtures/find_trips.json
173
174
  - test/fixtures/flag.json
@@ -240,6 +241,7 @@ test_files:
240
241
  - test/fixtures/category.json
241
242
  - test/fixtures/challenges.json
242
243
  - test/fixtures/checkin.json
244
+ - test/fixtures/checkin_info.json
243
245
  - test/fixtures/find_spots.json
244
246
  - test/fixtures/find_trips.json
245
247
  - test/fixtures/flag.json