foursquare2 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,48 @@
1
+ # rcov generated
2
+ coverage
3
+
4
+ # rdoc generated
5
+ rdoc
6
+
7
+ # yard generated
8
+ doc
9
+ .yardoc
10
+
11
+ # bundler
12
+ .bundle
13
+
14
+ # jeweler generated
15
+ pkg
16
+
17
+ # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
18
+ #
19
+ # * Create a file at ~/.gitignore
20
+ # * Include files you want ignored
21
+ # * Run: git config --global core.excludesfile ~/.gitignore
22
+ #
23
+ # After doing this, these files will be ignored in all your git projects,
24
+ # saving you from having to 'pollute' every project you touch with them
25
+ #
26
+ # Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
27
+ #
28
+ # For MacOS:
29
+ #
30
+ #.DS_Store
31
+ #
32
+ # For TextMate
33
+ #*.tmproj
34
+ #tmtags
35
+ #
36
+ # For emacs:
37
+ #*~
38
+ #\#*
39
+ #.\#*
40
+ #
41
+ # For vim:
42
+ *.swp
43
+ # RubyMine
44
+ .idea/*
45
+ # Rbenv
46
+ .rbenv-version
47
+ .ruby-version
48
+ Gemfile.lock
data/Gemfile CHANGED
@@ -1,28 +1,3 @@
1
1
  source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
2
 
6
- gem 'faraday', '~> 0.8'
7
- gem 'faraday_middleware', '>= 0.8'
8
- gem 'hashie', '>= 1.0', '< 3.0.0'
9
-
10
-
11
-
12
- # Add dependencies to develop your gem here.
13
- # Include everything needed to run rake, tests, features, etc.
14
- group :development do
15
- gem 'awesome_print'
16
- gem "shoulda"
17
- gem "bundler", "~> 1.0"
18
- gem "jeweler", "~> 1.5"
19
- gem "rcov"
20
- gem 'fakeweb', '~> 1.3'
21
- gem 'jnunemaker-matchy', '~> 0.4'
22
- gem 'json_pure', '~> 1.4'
23
- gem 'multi_json', '>= 0.0.5', '< 2.0.0'
24
- end
25
-
26
- group :test do
27
- gem 'mocha'
28
- end
3
+ gemspec
data/Rakefile CHANGED
@@ -29,13 +29,6 @@ Rake::TestTask.new(:test) do |test|
29
29
  test.verbose = true
30
30
  end
31
31
 
32
- require 'rcov/rcovtask'
33
- Rcov::RcovTask.new do |test|
34
- test.libs << 'test'
35
- test.pattern = 'test/**/test_*.rb'
36
- test.verbose = true
37
- end
38
-
39
32
  task :default => :test
40
33
 
41
34
  require 'rdoc/task'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.1
1
+ 2.0.2
@@ -5,118 +5,18 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "foursquare2"
8
- s.version = "2.0.1"
8
+ s.version = "2.0.2"
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 = "2014-08-13"
12
+ s.date = "2015-04-06"
13
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"
17
17
  ]
18
- s.files = [
19
- ".document",
20
- "Gemfile",
21
- "Gemfile.lock",
22
- "LICENSE.txt",
23
- "Rakefile",
24
- "Readme.md",
25
- "VERSION",
26
- "foursquare2.gemspec",
27
- "lib/foursquare2.rb",
28
- "lib/foursquare2/api_error.rb",
29
- "lib/foursquare2/campaigns.rb",
30
- "lib/foursquare2/checkins.rb",
31
- "lib/foursquare2/client.rb",
32
- "lib/foursquare2/events.rb",
33
- "lib/foursquare2/lists.rb",
34
- "lib/foursquare2/pages.rb",
35
- "lib/foursquare2/photos.rb",
36
- "lib/foursquare2/settings.rb",
37
- "lib/foursquare2/specials.rb",
38
- "lib/foursquare2/tips.rb",
39
- "lib/foursquare2/users.rb",
40
- "lib/foursquare2/venuegroups.rb",
41
- "lib/foursquare2/venues.rb",
42
- "test/config.rb",
43
- "test/fixtures/campaigns/campaign.json",
44
- "test/fixtures/campaigns/campaign_created.json",
45
- "test/fixtures/campaigns/campaigns_list.json",
46
- "test/fixtures/checkins/checkin.json",
47
- "test/fixtures/checkins/checkin_reply.json",
48
- "test/fixtures/checkins/friend_checkins.json",
49
- "test/fixtures/checkins/post_created.json",
50
- "test/fixtures/error.json",
51
- "test/fixtures/error_template.json",
52
- "test/fixtures/events/event.json",
53
- "test/fixtures/events/event_categories.json",
54
- "test/fixtures/lists/list.json",
55
- "test/fixtures/lists/list_created.json",
56
- "test/fixtures/lists/list_followed.json",
57
- "test/fixtures/lists/list_item.json",
58
- "test/fixtures/lists/list_moved_item.json",
59
- "test/fixtures/lists/list_updated.json",
60
- "test/fixtures/pages/managed_pages.json",
61
- "test/fixtures/pages/page.json",
62
- "test/fixtures/pages/page_venues.json",
63
- "test/fixtures/pages/search_pages.json",
64
- "test/fixtures/photos/photo.json",
65
- "test/fixtures/specials/search_specials.json",
66
- "test/fixtures/specials/special.json",
67
- "test/fixtures/specials/special_created.json",
68
- "test/fixtures/tips/search_tips.json",
69
- "test/fixtures/tips/tip.json",
70
- "test/fixtures/users/leaderboard.json",
71
- "test/fixtures/users/search_users.json",
72
- "test/fixtures/users/user.json",
73
- "test/fixtures/users/user_checkins_aftertimestamp.json",
74
- "test/fixtures/users/user_checkins_beforetimestamp.json",
75
- "test/fixtures/users/user_checkins_plain.json",
76
- "test/fixtures/users/user_lists.json",
77
- "test/fixtures/users/user_mayorships.json",
78
- "test/fixtures/users/user_photos.json",
79
- "test/fixtures/users/user_tips.json",
80
- "test/fixtures/users/user_venuestats.json",
81
- "test/fixtures/users/user_venuestats_friend_id.json",
82
- "test/fixtures/venuegroups/venuegroup.json",
83
- "test/fixtures/venuegroups/venuegroup_add.json",
84
- "test/fixtures/venuegroups/venuegroup_update.json",
85
- "test/fixtures/venues/edit_venue.json",
86
- "test/fixtures/venues/explore_venues.json",
87
- "test/fixtures/venues/managed_venues.json",
88
- "test/fixtures/venues/no_venues_by_tip.json",
89
- "test/fixtures/venues/search_venues.json",
90
- "test/fixtures/venues/search_venues_by_tip.json",
91
- "test/fixtures/venues/suggest_completion_venues.json",
92
- "test/fixtures/venues/trending_venues.json",
93
- "test/fixtures/venues/venue.json",
94
- "test/fixtures/venues/venue_events.json",
95
- "test/fixtures/venues/venue_herenow.json",
96
- "test/fixtures/venues/venue_hours.json",
97
- "test/fixtures/venues/venue_likes.json",
98
- "test/fixtures/venues/venue_links.json",
99
- "test/fixtures/venues/venue_listed.json",
100
- "test/fixtures/venues/venue_menus.json",
101
- "test/fixtures/venues/venue_nextvenues.json",
102
- "test/fixtures/venues/venue_photos.json",
103
- "test/fixtures/venues/venue_similar.json",
104
- "test/fixtures/venues/venue_stats.json",
105
- "test/fixtures/venues/venue_tips.json",
106
- "test/helper.rb",
107
- "test/test_campaigns.rb",
108
- "test/test_checkins.rb",
109
- "test/test_client.rb",
110
- "test/test_events.rb",
111
- "test/test_lists.rb",
112
- "test/test_pages.rb",
113
- "test/test_photos.rb",
114
- "test/test_specials.rb",
115
- "test/test_tips.rb",
116
- "test/test_users.rb",
117
- "test/test_venuegroups.rb",
118
- "test/test_venues.rb"
119
- ]
18
+ s.files = `git ls-files`.split("\n")
19
+ s.test_files = `git ls-files -- {test}/*`.split("\n")
120
20
  s.homepage = "http://github.com/mattmueller/foursquare2"
121
21
  s.licenses = ["MIT"]
122
22
  s.require_paths = ["lib"]
@@ -129,43 +29,41 @@ Gem::Specification.new do |s|
129
29
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
130
30
  s.add_runtime_dependency(%q<faraday>, ["~> 0.8"])
131
31
  s.add_runtime_dependency(%q<faraday_middleware>, [">= 0.8"])
132
- s.add_runtime_dependency(%q<hashie>, ["< 3.0.0", ">= 1.0"])
32
+ s.add_runtime_dependency(%q<hashie>, ["< 4.0.0", ">= 1.0"])
133
33
  s.add_development_dependency(%q<awesome_print>, [">= 0"])
134
34
  s.add_development_dependency(%q<shoulda>, [">= 0"])
135
35
  s.add_development_dependency(%q<bundler>, ["~> 1.0"])
136
36
  s.add_development_dependency(%q<jeweler>, ["~> 1.5"])
137
- s.add_development_dependency(%q<rcov>, [">= 0"])
138
37
  s.add_development_dependency(%q<fakeweb>, ["~> 1.3"])
139
- s.add_development_dependency(%q<jnunemaker-matchy>, ["~> 0.4"])
140
38
  s.add_development_dependency(%q<json_pure>, ["~> 1.4"])
141
39
  s.add_development_dependency(%q<multi_json>, ["< 2.0.0", ">= 0.0.5"])
40
+ s.add_development_dependency(%q<test-unit>, ["~> 3.0"])
41
+ s.add_development_dependency(%q<jnunemaker-matchy>, [">= 0"])
42
+ s.add_development_dependency(%q<mocha>, [">= 0"])
142
43
  else
143
44
  s.add_dependency(%q<faraday>, ["~> 0.8"])
144
45
  s.add_dependency(%q<faraday_middleware>, [">= 0.8"])
145
- s.add_dependency(%q<hashie>, ["< 3.0.0", ">= 1.0"])
46
+ s.add_dependency(%q<hashie>, ["< 4.0.0", ">= 1.0"])
146
47
  s.add_dependency(%q<awesome_print>, [">= 0"])
147
48
  s.add_dependency(%q<shoulda>, [">= 0"])
148
49
  s.add_dependency(%q<bundler>, ["~> 1.0"])
149
50
  s.add_dependency(%q<jeweler>, ["~> 1.5"])
150
- s.add_dependency(%q<rcov>, [">= 0"])
151
51
  s.add_dependency(%q<fakeweb>, ["~> 1.3"])
152
- s.add_dependency(%q<jnunemaker-matchy>, ["~> 0.4"])
153
52
  s.add_dependency(%q<json_pure>, ["~> 1.4"])
154
53
  s.add_dependency(%q<multi_json>, ["< 2.0.0", ">= 0.0.5"])
54
+ s.add_dependency(%q<test-unit>, ["~> 3.0"])
155
55
  end
156
56
  else
157
57
  s.add_dependency(%q<faraday>, ["~> 0.8"])
158
58
  s.add_dependency(%q<faraday_middleware>, [">= 0.8"])
159
- s.add_dependency(%q<hashie>, ["< 3.0.0", ">= 1.0"])
59
+ s.add_dependency(%q<hashie>, ["< 4.0.0", ">= 1.0"])
160
60
  s.add_dependency(%q<awesome_print>, [">= 0"])
161
61
  s.add_dependency(%q<shoulda>, [">= 0"])
162
62
  s.add_dependency(%q<bundler>, ["~> 1.0"])
163
63
  s.add_dependency(%q<jeweler>, ["~> 1.5"])
164
- s.add_dependency(%q<rcov>, [">= 0"])
165
64
  s.add_dependency(%q<fakeweb>, ["~> 1.3"])
166
- s.add_dependency(%q<jnunemaker-matchy>, ["~> 0.4"])
167
65
  s.add_dependency(%q<json_pure>, ["~> 1.4"])
168
66
  s.add_dependency(%q<multi_json>, ["< 2.0.0", ">= 0.0.5"])
67
+ s.add_dependency(%q<test-unit>, ["~> 3.0"])
169
68
  end
170
69
  end
171
-
@@ -81,10 +81,10 @@ module Foursquare2
81
81
  # Added just for convenience to avoid having to traverse farther down the response just to get to returned data.
82
82
 
83
83
  def return_error_or_body(response, response_body)
84
- if response.body.meta.code == 200
84
+ if response.body['meta'].code == 200
85
85
  response_body
86
86
  else
87
- raise Foursquare2::APIError.new(response.body.meta, response.body.response)
87
+ raise Foursquare2::APIError.new(response.body['meta'], response.body['response'])
88
88
  end
89
89
  end
90
90
 
@@ -14,7 +14,7 @@ require 'fakeweb'
14
14
  require 'json'
15
15
  require 'hashie'
16
16
  require 'awesome_print'
17
- require 'mocha'
17
+ require 'mocha/setup'
18
18
 
19
19
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
20
20
  $LOAD_PATH.unshift(File.dirname(__FILE__))
@@ -96,8 +96,8 @@ class TestClient < Test::Unit::TestCase
96
96
  response = Faraday::Response.new(:body => fixture_file('venues/search_venues.json', :parse => true))
97
97
  client = Foursquare2::Client.new
98
98
 
99
- subject = client.return_error_or_body(response, response.body.response)
100
- subject.should eql(response.body.response)
99
+ subject = client.return_error_or_body(response, response.body)
100
+ subject.should eql(response.body)
101
101
  end
102
102
  end
103
103
 
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: 2.0.1
4
+ version: 2.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-08-13 00:00:00.000000000 Z
13
+ date: 2015-04-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday
@@ -51,7 +51,7 @@ dependencies:
51
51
  requirements:
52
52
  - - <
53
53
  - !ruby/object:Gem::Version
54
- version: 3.0.0
54
+ version: 4.0.0
55
55
  - - ! '>='
56
56
  - !ruby/object:Gem::Version
57
57
  version: '1.0'
@@ -62,7 +62,7 @@ dependencies:
62
62
  requirements:
63
63
  - - <
64
64
  - !ruby/object:Gem::Version
65
- version: 3.0.0
65
+ version: 4.0.0
66
66
  - - ! '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.0'
@@ -131,29 +131,29 @@ dependencies:
131
131
  - !ruby/object:Gem::Version
132
132
  version: '1.5'
133
133
  - !ruby/object:Gem::Dependency
134
- name: rcov
134
+ name: fakeweb
135
135
  requirement: !ruby/object:Gem::Requirement
136
136
  none: false
137
137
  requirements:
138
- - - ! '>='
138
+ - - ~>
139
139
  - !ruby/object:Gem::Version
140
- version: '0'
140
+ version: '1.3'
141
141
  type: :development
142
142
  prerelease: false
143
143
  version_requirements: !ruby/object:Gem::Requirement
144
144
  none: false
145
145
  requirements:
146
- - - ! '>='
146
+ - - ~>
147
147
  - !ruby/object:Gem::Version
148
- version: '0'
148
+ version: '1.3'
149
149
  - !ruby/object:Gem::Dependency
150
- name: fakeweb
150
+ name: json_pure
151
151
  requirement: !ruby/object:Gem::Requirement
152
152
  none: false
153
153
  requirements:
154
154
  - - ~>
155
155
  - !ruby/object:Gem::Version
156
- version: '1.3'
156
+ version: '1.4'
157
157
  type: :development
158
158
  prerelease: false
159
159
  version_requirements: !ruby/object:Gem::Requirement
@@ -161,31 +161,37 @@ dependencies:
161
161
  requirements:
162
162
  - - ~>
163
163
  - !ruby/object:Gem::Version
164
- version: '1.3'
164
+ version: '1.4'
165
165
  - !ruby/object:Gem::Dependency
166
- name: jnunemaker-matchy
166
+ name: multi_json
167
167
  requirement: !ruby/object:Gem::Requirement
168
168
  none: false
169
169
  requirements:
170
- - - ~>
170
+ - - <
171
+ - !ruby/object:Gem::Version
172
+ version: 2.0.0
173
+ - - ! '>='
171
174
  - !ruby/object:Gem::Version
172
- version: '0.4'
175
+ version: 0.0.5
173
176
  type: :development
174
177
  prerelease: false
175
178
  version_requirements: !ruby/object:Gem::Requirement
176
179
  none: false
177
180
  requirements:
178
- - - ~>
181
+ - - <
179
182
  - !ruby/object:Gem::Version
180
- version: '0.4'
183
+ version: 2.0.0
184
+ - - ! '>='
185
+ - !ruby/object:Gem::Version
186
+ version: 0.0.5
181
187
  - !ruby/object:Gem::Dependency
182
- name: json_pure
188
+ name: test-unit
183
189
  requirement: !ruby/object:Gem::Requirement
184
190
  none: false
185
191
  requirements:
186
192
  - - ~>
187
193
  - !ruby/object:Gem::Version
188
- version: '1.4'
194
+ version: '3.0'
189
195
  type: :development
190
196
  prerelease: false
191
197
  version_requirements: !ruby/object:Gem::Requirement
@@ -193,29 +199,39 @@ dependencies:
193
199
  requirements:
194
200
  - - ~>
195
201
  - !ruby/object:Gem::Version
196
- version: '1.4'
202
+ version: '3.0'
197
203
  - !ruby/object:Gem::Dependency
198
- name: multi_json
204
+ name: jnunemaker-matchy
199
205
  requirement: !ruby/object:Gem::Requirement
200
206
  none: false
201
207
  requirements:
202
- - - <
203
- - !ruby/object:Gem::Version
204
- version: 2.0.0
205
208
  - - ! '>='
206
209
  - !ruby/object:Gem::Version
207
- version: 0.0.5
210
+ version: '0'
208
211
  type: :development
209
212
  prerelease: false
210
213
  version_requirements: !ruby/object:Gem::Requirement
211
214
  none: false
212
215
  requirements:
213
- - - <
216
+ - - ! '>='
214
217
  - !ruby/object:Gem::Version
215
- version: 2.0.0
218
+ version: '0'
219
+ - !ruby/object:Gem::Dependency
220
+ name: mocha
221
+ requirement: !ruby/object:Gem::Requirement
222
+ none: false
223
+ requirements:
216
224
  - - ! '>='
217
225
  - !ruby/object:Gem::Version
218
- version: 0.0.5
226
+ version: '0'
227
+ type: :development
228
+ prerelease: false
229
+ version_requirements: !ruby/object:Gem::Requirement
230
+ none: false
231
+ requirements:
232
+ - - ! '>='
233
+ - !ruby/object:Gem::Version
234
+ version: '0'
219
235
  description: Gives access to all endpoints in version 2 of foursquare's API with syntax
220
236
  that will be familiar to those who used the original foursquare gem by Jeremy Welch.
221
237
  email:
@@ -227,8 +243,8 @@ extra_rdoc_files:
227
243
  - LICENSE.txt
228
244
  files:
229
245
  - .document
246
+ - .gitignore
230
247
  - Gemfile
231
- - Gemfile.lock
232
248
  - LICENSE.txt
233
249
  - Rakefile
234
250
  - Readme.md
@@ -339,9 +355,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
339
355
  - - ! '>='
340
356
  - !ruby/object:Gem::Version
341
357
  version: '0'
342
- segments:
343
- - 0
344
- hash: 2866593979360003611
345
358
  required_rubygems_version: !ruby/object:Gem::Requirement
346
359
  none: false
347
360
  requirements:
@@ -355,3 +368,4 @@ signing_key:
355
368
  specification_version: 3
356
369
  summary: Foursquare API v2 gem in the spirit of the original foursquare gem
357
370
  test_files: []
371
+ has_rdoc:
@@ -1,43 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- awesome_print (1.0.2)
5
- fakeweb (1.3.0)
6
- faraday (0.8.0)
7
- multipart-post (~> 1.1)
8
- faraday_middleware (0.8.7)
9
- faraday (>= 0.7.4, < 0.9)
10
- git (1.2.5)
11
- hashie (2.0.4)
12
- jeweler (1.6.4)
13
- bundler (~> 1.0)
14
- git (>= 1.2.5)
15
- rake
16
- jnunemaker-matchy (0.4.0)
17
- json_pure (1.5.1)
18
- metaclass (0.0.1)
19
- mocha (0.11.4)
20
- metaclass (~> 0.0.1)
21
- multi_json (1.0.2)
22
- multipart-post (1.1.5)
23
- rake (0.9.2.2)
24
- rcov (0.9.9)
25
- shoulda (2.11.3)
26
-
27
- PLATFORMS
28
- ruby
29
-
30
- DEPENDENCIES
31
- awesome_print
32
- bundler (~> 1.0)
33
- fakeweb (~> 1.3)
34
- faraday (~> 0.8)
35
- faraday_middleware (>= 0.8)
36
- hashie (>= 1.0, < 3.0.0)
37
- jeweler (~> 1.5)
38
- jnunemaker-matchy (~> 0.4)
39
- json_pure (~> 1.4)
40
- mocha
41
- multi_json (>= 0.0.5, < 2.0.0)
42
- rcov
43
- shoulda