foursquare2 1.3.5 → 1.3.6

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -4,7 +4,7 @@ source "http://rubygems.org"
4
4
  # gem "activesupport", ">= 2.3.5"
5
5
 
6
6
  gem 'faraday', '>= 0.6', '< 0.8'
7
- gem 'faraday_middleware', '>= 0.6', '< 0.8'
7
+ gem 'faraday_middleware', '>= 0.8'
8
8
  gem 'hashie', '~> 1.0'
9
9
 
10
10
 
@@ -7,8 +7,8 @@ GEM
7
7
  addressable (~> 2.2.6)
8
8
  multipart-post (~> 1.1.0)
9
9
  rack (>= 1.1.0, < 2)
10
- faraday_middleware (0.7.0)
11
- faraday (~> 0.7.3)
10
+ faraday_middleware (0.8.1)
11
+ faraday (>= 0.7.4, < 0.9)
12
12
  git (1.2.5)
13
13
  hashie (1.1.0)
14
14
  jeweler (1.6.4)
@@ -31,7 +31,7 @@ DEPENDENCIES
31
31
  bundler (~> 1.0)
32
32
  fakeweb (~> 1.3)
33
33
  faraday (>= 0.6, < 0.8)
34
- faraday_middleware (>= 0.6, < 0.8)
34
+ faraday_middleware (>= 0.8)
35
35
  hashie (~> 1.0)
36
36
  jeweler (~> 1.5)
37
37
  jnunemaker-matchy (~> 0.4)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.5
1
+ 1.3.6
@@ -4,13 +4,13 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{foursquare2}
8
- s.version = "1.3.5"
7
+ s.name = "foursquare2"
8
+ s.version = "1.3.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matt Mueller", "Marco Moura"]
12
- s.date = %q{2012-01-23}
13
- s.description = %q{Gives access to all endpoints in version 2 of foursquare's API with syntax that will be familiar to those who used the original foursquare gem by Jeremy Welch.}
12
+ s.date = "2012-02-05"
13
+ s.description = "Gives access to all endpoints in version 2 of foursquare's API with syntax that will be familiar to those who used the original foursquare gem by Jeremy Welch."
14
14
  s.email = ["muellermr@gmail.com", "email@marcomoura.com"]
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE.txt"
@@ -66,18 +66,18 @@ Gem::Specification.new do |s|
66
66
  "test/test_users.rb",
67
67
  "test/test_venues.rb"
68
68
  ]
69
- s.homepage = %q{http://github.com/mattmueller/foursquare2}
69
+ s.homepage = "http://github.com/mattmueller/foursquare2"
70
70
  s.licenses = ["MIT"]
71
71
  s.require_paths = ["lib"]
72
- s.rubygems_version = %q{1.6.2}
73
- s.summary = %q{Foursquare API v2 gem in the spirit of the original foursquare gem}
72
+ s.rubygems_version = "1.8.10"
73
+ s.summary = "Foursquare API v2 gem in the spirit of the original foursquare gem"
74
74
 
75
75
  if s.respond_to? :specification_version then
76
76
  s.specification_version = 3
77
77
 
78
78
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
79
79
  s.add_runtime_dependency(%q<faraday>, ["< 0.8", ">= 0.6"])
80
- s.add_runtime_dependency(%q<faraday_middleware>, ["< 0.8", ">= 0.6"])
80
+ s.add_runtime_dependency(%q<faraday_middleware>, [">= 0.8"])
81
81
  s.add_runtime_dependency(%q<hashie>, ["~> 1.0"])
82
82
  s.add_development_dependency(%q<shoulda>, [">= 0"])
83
83
  s.add_development_dependency(%q<bundler>, ["~> 1.0"])
@@ -89,7 +89,7 @@ Gem::Specification.new do |s|
89
89
  s.add_development_dependency(%q<multi_json>, ["< 2.0.0", ">= 0.0.5"])
90
90
  else
91
91
  s.add_dependency(%q<faraday>, ["< 0.8", ">= 0.6"])
92
- s.add_dependency(%q<faraday_middleware>, ["< 0.8", ">= 0.6"])
92
+ s.add_dependency(%q<faraday_middleware>, [">= 0.8"])
93
93
  s.add_dependency(%q<hashie>, ["~> 1.0"])
94
94
  s.add_dependency(%q<shoulda>, [">= 0"])
95
95
  s.add_dependency(%q<bundler>, ["~> 1.0"])
@@ -102,7 +102,7 @@ Gem::Specification.new do |s|
102
102
  end
103
103
  else
104
104
  s.add_dependency(%q<faraday>, ["< 0.8", ">= 0.6"])
105
- s.add_dependency(%q<faraday_middleware>, ["< 0.8", ">= 0.6"])
105
+ s.add_dependency(%q<faraday_middleware>, [">= 0.8"])
106
106
  s.add_dependency(%q<hashie>, ["~> 1.0"])
107
107
  s.add_dependency(%q<shoulda>, [">= 0"])
108
108
  s.add_dependency(%q<bundler>, ["~> 1.0"])
@@ -16,6 +16,6 @@ module Foursquare2
16
16
  def message
17
17
  "#{@type}: #{@detail} (#{@code})"
18
18
  end
19
-
19
+ alias :to_s :message
20
20
  end
21
21
  end
@@ -4,9 +4,13 @@ module Foursquare2
4
4
  # Retrive information about a single checkin.
5
5
  #
6
6
  # @param [String] checkin_id the ID of the checkin.
7
+ # @param [Hash] options
8
+ # @option options String :signature - Signature allowing users to bypass the friends-only access check on checkins
7
9
 
8
- def checkin(checkin_id)
9
- response = connection.get("checkins/#{checkin_id}")
10
+ def checkin(checkin_id, options={})
11
+ response = connection.get do |req|
12
+ req.url "checkins/#{checkin_id}", options
13
+ end
10
14
  return_error_or_body(response, response.body.response.checkin)
11
15
  end
12
16
 
@@ -46,8 +46,8 @@ module Foursquare2
46
46
  builder.use Faraday::Request::Multipart
47
47
  builder.use Faraday::Request::UrlEncoded
48
48
 
49
- builder.use Faraday::Response::Mashify
50
- builder.use Faraday::Response::ParseJson
49
+ builder.use FaradayMiddleware::Mashify
50
+ builder.use FaradayMiddleware::ParseJson
51
51
 
52
52
  builder.adapter Faraday.default_adapter
53
53
 
@@ -36,10 +36,13 @@ module Foursquare2
36
36
  # @option options String :query - Only find tips matching this term.
37
37
 
38
38
  def venue_tips(venue_id, options={})
39
- response = connection.get("venues/#{venue_id}/tips")
39
+ query = options.delete(:query)
40
+ response = connection.get do |req|
41
+ req.url "venues/#{venue_id}/tips", options
42
+ end
40
43
  tips = return_error_or_body(response, response.body.response.tips)
41
- tips = Foursquare2.filter(tips, options[:query]) if options.has_key? :query
42
- tips
44
+ tips = Foursquare2.filter(tips, query) if query
45
+ tips
43
46
  end
44
47
 
45
48
  # Add a tip
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foursquare2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 1.3.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,12 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-01-23 00:00:00.000000000 -06:00
14
- default_executable:
13
+ date: 2012-02-05 00:00:00.000000000Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: faraday
18
- requirement: &13720700 !ruby/object:Gem::Requirement
17
+ requirement: &70323462614860 !ruby/object:Gem::Requirement
19
18
  none: false
20
19
  requirements:
21
20
  - - <
@@ -26,24 +25,21 @@ dependencies:
26
25
  version: '0.6'
27
26
  type: :runtime
28
27
  prerelease: false
29
- version_requirements: *13720700
28
+ version_requirements: *70323462614860
30
29
  - !ruby/object:Gem::Dependency
31
30
  name: faraday_middleware
32
- requirement: &16127680 !ruby/object:Gem::Requirement
31
+ requirement: &70323462599280 !ruby/object:Gem::Requirement
33
32
  none: false
34
33
  requirements:
35
- - - <
36
- - !ruby/object:Gem::Version
37
- version: '0.8'
38
34
  - - ! '>='
39
35
  - !ruby/object:Gem::Version
40
- version: '0.6'
36
+ version: '0.8'
41
37
  type: :runtime
42
38
  prerelease: false
43
- version_requirements: *16127680
39
+ version_requirements: *70323462599280
44
40
  - !ruby/object:Gem::Dependency
45
41
  name: hashie
46
- requirement: &17599120 !ruby/object:Gem::Requirement
42
+ requirement: &70323462575960 !ruby/object:Gem::Requirement
47
43
  none: false
48
44
  requirements:
49
45
  - - ~>
@@ -51,10 +47,10 @@ dependencies:
51
47
  version: '1.0'
52
48
  type: :runtime
53
49
  prerelease: false
54
- version_requirements: *17599120
50
+ version_requirements: *70323462575960
55
51
  - !ruby/object:Gem::Dependency
56
52
  name: shoulda
57
- requirement: &18082200 !ruby/object:Gem::Requirement
53
+ requirement: &70323462573380 !ruby/object:Gem::Requirement
58
54
  none: false
59
55
  requirements:
60
56
  - - ! '>='
@@ -62,10 +58,10 @@ dependencies:
62
58
  version: '0'
63
59
  type: :development
64
60
  prerelease: false
65
- version_requirements: *18082200
61
+ version_requirements: *70323462573380
66
62
  - !ruby/object:Gem::Dependency
67
63
  name: bundler
68
- requirement: &18742500 !ruby/object:Gem::Requirement
64
+ requirement: &70323462571040 !ruby/object:Gem::Requirement
69
65
  none: false
70
66
  requirements:
71
67
  - - ~>
@@ -73,10 +69,10 @@ dependencies:
73
69
  version: '1.0'
74
70
  type: :development
75
71
  prerelease: false
76
- version_requirements: *18742500
72
+ version_requirements: *70323462571040
77
73
  - !ruby/object:Gem::Dependency
78
74
  name: jeweler
79
- requirement: &18741600 !ruby/object:Gem::Requirement
75
+ requirement: &70323462566980 !ruby/object:Gem::Requirement
80
76
  none: false
81
77
  requirements:
82
78
  - - ~>
@@ -84,10 +80,10 @@ dependencies:
84
80
  version: '1.5'
85
81
  type: :development
86
82
  prerelease: false
87
- version_requirements: *18741600
83
+ version_requirements: *70323462566980
88
84
  - !ruby/object:Gem::Dependency
89
85
  name: rcov
90
- requirement: &18740600 !ruby/object:Gem::Requirement
86
+ requirement: &70323462565060 !ruby/object:Gem::Requirement
91
87
  none: false
92
88
  requirements:
93
89
  - - ! '>='
@@ -95,10 +91,10 @@ dependencies:
95
91
  version: '0'
96
92
  type: :development
97
93
  prerelease: false
98
- version_requirements: *18740600
94
+ version_requirements: *70323462565060
99
95
  - !ruby/object:Gem::Dependency
100
96
  name: fakeweb
101
- requirement: &18739120 !ruby/object:Gem::Requirement
97
+ requirement: &70323462562360 !ruby/object:Gem::Requirement
102
98
  none: false
103
99
  requirements:
104
100
  - - ~>
@@ -106,10 +102,10 @@ dependencies:
106
102
  version: '1.3'
107
103
  type: :development
108
104
  prerelease: false
109
- version_requirements: *18739120
105
+ version_requirements: *70323462562360
110
106
  - !ruby/object:Gem::Dependency
111
107
  name: jnunemaker-matchy
112
- requirement: &18737660 !ruby/object:Gem::Requirement
108
+ requirement: &70323462542700 !ruby/object:Gem::Requirement
113
109
  none: false
114
110
  requirements:
115
111
  - - ~>
@@ -117,10 +113,10 @@ dependencies:
117
113
  version: '0.4'
118
114
  type: :development
119
115
  prerelease: false
120
- version_requirements: *18737660
116
+ version_requirements: *70323462542700
121
117
  - !ruby/object:Gem::Dependency
122
118
  name: json_pure
123
- requirement: &18735740 !ruby/object:Gem::Requirement
119
+ requirement: &70323462527140 !ruby/object:Gem::Requirement
124
120
  none: false
125
121
  requirements:
126
122
  - - ~>
@@ -128,10 +124,10 @@ dependencies:
128
124
  version: '1.4'
129
125
  type: :development
130
126
  prerelease: false
131
- version_requirements: *18735740
127
+ version_requirements: *70323462527140
132
128
  - !ruby/object:Gem::Dependency
133
129
  name: multi_json
134
- requirement: &18731420 !ruby/object:Gem::Requirement
130
+ requirement: &70323462522940 !ruby/object:Gem::Requirement
135
131
  none: false
136
132
  requirements:
137
133
  - - <
@@ -142,7 +138,7 @@ dependencies:
142
138
  version: 0.0.5
143
139
  type: :development
144
140
  prerelease: false
145
- version_requirements: *18731420
141
+ version_requirements: *70323462522940
146
142
  description: Gives access to all endpoints in version 2 of foursquare's API with syntax
147
143
  that will be familiar to those who used the original foursquare gem by Jeremy Welch.
148
144
  email:
@@ -202,7 +198,6 @@ files:
202
198
  - test/test_tips.rb
203
199
  - test/test_users.rb
204
200
  - test/test_venues.rb
205
- has_rdoc: true
206
201
  homepage: http://github.com/mattmueller/foursquare2
207
202
  licenses:
208
203
  - MIT
@@ -218,7 +213,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
218
213
  version: '0'
219
214
  segments:
220
215
  - 0
221
- hash: -1796138896810768452
216
+ hash: -3165870062104531180
222
217
  required_rubygems_version: !ruby/object:Gem::Requirement
223
218
  none: false
224
219
  requirements:
@@ -227,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
227
222
  version: '0'
228
223
  requirements: []
229
224
  rubyforge_project:
230
- rubygems_version: 1.6.2
225
+ rubygems_version: 1.8.10
231
226
  signing_key:
232
227
  specification_version: 3
233
228
  summary: Foursquare API v2 gem in the spirit of the original foursquare gem