seatgeek 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- seatgeek (0.1.1)
4
+ seatgeek (0.1.2)
5
5
  faraday
6
6
  multi_json
7
7
  rake
@@ -57,12 +57,12 @@ SeatGeek::Connection objects can be instantiated before calls. Any parameters pa
57
57
 
58
58
  There are a number of class level options that can be overridden.
59
59
 
60
- - SeatGeek::Connection.adapter - the Faraday adapter to use (default: :net_http)
61
- - SeatGeek::Connection.logger - a Logger object for logging requests (default: nil)
62
- - SeatGeek::Connection.protocol - http or https (default: :http)
63
- - SeatGeek::Connection.response_format - ruby, json, jsonp or xml (default: ruby)
64
- - SeatGeek::Connection.url - api.seatgeek::Connection.com [Advanced tuning]
65
- - SeatGeek::Connection.version - 2 [Forward thinking]
60
+ SeatGeek::Connection.adapter # the Faraday adapter to use (default: :net_http)
61
+ SeatGeek::Connection.logger # a Logger object for logging requests (default: nil)
62
+ SeatGeek::Connection.protocol # http or https (default: :http)
63
+ SeatGeek::Connection.response_format # ruby, json, jsonp or xml (default: ruby)
64
+ SeatGeek::Connection.url # api.seatgeek.com [Advanced tuning]
65
+ SeatGeek::Connection.version # 2 [Forward thinking]
66
66
 
67
67
  Example:
68
68
 
@@ -102,7 +102,7 @@ module SeatGeek
102
102
  def builder(uri_segment, params)
103
103
  return [
104
104
  uri([].tap do |part|
105
- part << "/events"
105
+ part << uri_segment
106
106
  part << "/#{params.delete(:id)}" unless params[:id].nil?
107
107
  end.join),
108
108
  {
@@ -1,3 +1,3 @@
1
1
  module SeatGeek
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -220,7 +220,8 @@ describe SeatGeek::Connection do
220
220
  end
221
221
 
222
222
  describe "#request" do
223
- let(:url) { 'http://api.seatgeek.com/2/events' }
223
+ let(:uri_segment) { '/venues' }
224
+ let(:url) { "http://api.seatgeek.com/2#{uri_segment}" }
224
225
  let(:params) { {} }
225
226
  let(:faraday) { mock(:faraday, :get => OpenStruct.new({:status => 200, :body => "[]"})) }
226
227
 
@@ -230,7 +231,7 @@ describe SeatGeek::Connection do
230
231
 
231
232
  it "should set the format param to jsonp" do
232
233
  Faraday.should_receive(:new).with(url, expected_params).and_return(faraday)
233
- instance.request(url, params)
234
+ instance.request(uri_segment, params)
234
235
  end
235
236
  end
236
237
 
@@ -240,7 +241,7 @@ describe SeatGeek::Connection do
240
241
 
241
242
  it "should set the format param to xml" do
242
243
  Faraday.should_receive(:new).with(url, expected_params).and_return(faraday)
243
- instance.request(url, params)
244
+ instance.request(uri_segment, params)
244
245
  end
245
246
  end
246
247
 
@@ -250,7 +251,7 @@ describe SeatGeek::Connection do
250
251
 
251
252
  it "should add those parameters to the request params" do
252
253
  Faraday.should_receive(:new).with(url, expected_params).and_return(faraday)
253
- instance.request(url, params)
254
+ instance.request(uri_segment, params)
254
255
  end
255
256
  end
256
257
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seatgeek
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-05-15 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
16
- requirement: &70345881699200 !ruby/object:Gem::Requirement
16
+ requirement: &70113496285860 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70345881699200
24
+ version_requirements: *70113496285860
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: multi_json
27
- requirement: &70345881697820 !ruby/object:Gem::Requirement
27
+ requirement: &70113496284680 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70345881697820
35
+ version_requirements: *70113496284680
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rake
38
- requirement: &70345881696440 !ruby/object:Gem::Requirement
38
+ requirement: &70113496283200 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70345881696440
46
+ version_requirements: *70113496283200
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: yajl-ruby
49
- requirement: &70345881695420 !ruby/object:Gem::Requirement
49
+ requirement: &70113496282160 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70345881695420
57
+ version_requirements: *70113496282160
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rspec
60
- requirement: &70345881693420 !ruby/object:Gem::Requirement
60
+ requirement: &70113496280220 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70345881693420
68
+ version_requirements: *70113496280220
69
69
  description: This gem provides Ruby functionality around the SeatGeek Platform API
70
70
  (http://platform.seatgeek.com). It is designed to be framework agnostic and was
71
71
  originally developed for use in my day job at Ticket Evolution.
@@ -106,7 +106,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
106
106
  version: '0'
107
107
  segments:
108
108
  - 0
109
- hash: 2766271802599134346
109
+ hash: -355504323308768320
110
110
  required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  none: false
112
112
  requirements:
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  version: '0'
116
116
  segments:
117
117
  - 0
118
- hash: 2766271802599134346
118
+ hash: -355504323308768320
119
119
  requirements: []
120
120
  rubyforge_project: seatgeek
121
121
  rubygems_version: 1.8.6