eventbrite_gateway 0.0.1.beta → 0.0.1.beta.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -24,7 +24,7 @@ module EventbriteGateway
|
|
24
24
|
|
25
25
|
def object_method method_name, *args, &block
|
26
26
|
response = @client.call(method_name, *args, &block)
|
27
|
-
key = method_name.split('_')[
|
27
|
+
key = method_name.to_s.split('_')[0]
|
28
28
|
response[key]
|
29
29
|
rescue RuntimeError => e
|
30
30
|
{}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"user":{"date_created":"2013-09-05 11:55:30","user_id":74517961,"email":"test@example.com","date_modified":"2014-01-18 09:29:24"}}
|
@@ -1 +1 @@
|
|
1
|
-
{"user_tickets":[{"user":{"id":71513061,"email":"
|
1
|
+
{"user_tickets":[{"user":{"id":71513061,"email":"test@example.com"}},{"orders":[{"order":{"status":"Order Completed","gross":"0.00","first_name":"Chris","last_name":"Radford","attendees":[{"attendee":{"status":"Attending","first_name":"Chris","last_name":"Radford","created":"2014-01-18 09:29:22","modified":"2014-01-18 09:29:24","id":310622543}}],"created":"2014-01-18 09:29:22","event":{"description":"","end_date":"2014-02-27 22:00:00","title":"Test Event","url":"https://www.eventbrite.com/e/test-event-tickets-10237557811","privacy":"Public","start_date":"2014-02-27 19:00:00","logo_ssl":"https://www.eventbrite.com/php/logo.php?id=","logo":"http://eventbrite-s3.s3.amazonaws.com/eventlogos/71513061/","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"id":10237557811},"modified":"2014-01-18 09:29:24","delivery_method":"eTicket","currency":"USD","payment_type":"free","id":244982321}}]}]}
|
@@ -30,5 +30,15 @@ describe EventbriteGateway::Gateway do
|
|
30
30
|
EventbriteGateway::Gateway.new(EBClient.new(nil)).
|
31
31
|
user_list_tickets.must_be_instance_of Array
|
32
32
|
end
|
33
|
+
|
34
|
+
it "returns a Hash for User get" do
|
35
|
+
EventbriteGateway::Gateway.new(EBClient.new(:user_get)).
|
36
|
+
user_get.must_be_instance_of Hash
|
37
|
+
end
|
38
|
+
|
39
|
+
it "return a Hash for empty User get" do
|
40
|
+
EventbriteGateway::Gateway.new(EBClient.new(nil)).
|
41
|
+
user_get.must_be_instance_of Hash
|
42
|
+
end
|
33
43
|
end
|
34
44
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eventbrite_gateway
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1.beta
|
4
|
+
version: 0.0.1.beta.2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-01-
|
12
|
+
date: 2014-01-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventbrite-client
|
@@ -191,6 +191,7 @@ files:
|
|
191
191
|
- lib/eventbrite_gateway/client.rb
|
192
192
|
- lib/eventbrite_gateway/gateway.rb
|
193
193
|
- lib/eventbrite_gateway/version.rb
|
194
|
+
- spec/assets/user_get.json
|
194
195
|
- spec/assets/user_list_events.json
|
195
196
|
- spec/assets/user_list_tickets.json
|
196
197
|
- spec/cassettes/AuthenticationError.yml
|
@@ -213,6 +214,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
213
214
|
- - ! '>='
|
214
215
|
- !ruby/object:Gem::Version
|
215
216
|
version: '0'
|
217
|
+
segments:
|
218
|
+
- 0
|
219
|
+
hash: 4207547990474950263
|
216
220
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
217
221
|
none: false
|
218
222
|
requirements:
|
@@ -226,6 +230,7 @@ signing_key:
|
|
226
230
|
specification_version: 3
|
227
231
|
summary: A gateway class for the Eventbrite API
|
228
232
|
test_files:
|
233
|
+
- spec/assets/user_get.json
|
229
234
|
- spec/assets/user_list_events.json
|
230
235
|
- spec/assets/user_list_tickets.json
|
231
236
|
- spec/cassettes/AuthenticationError.yml
|