ticketmaster-lighthouse 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/provider/ticket.rb +11 -4
- data/ticketmaster-lighthouse.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.5
|
data/lib/provider/ticket.rb
CHANGED
@@ -30,12 +30,19 @@ module TicketMaster::Provider
|
|
30
30
|
@@allowed_states = ['new', 'open', 'resolved', 'hold', 'invalid']
|
31
31
|
attr_accessor :prefix_options
|
32
32
|
API = ::Lighthouse::Ticket
|
33
|
-
|
33
|
+
|
34
34
|
# Lighthouse limits us to a 100 ticket limit per page...
|
35
|
-
#
|
35
|
+
# Since the paging sucks...we probably want to store this rather than do a call each time
|
36
36
|
def self.search(project_id, options = {}, limit = 1000)
|
37
|
-
|
38
|
-
|
37
|
+
page = 1
|
38
|
+
tickets = ::Lighthouse::Ticket.find(:all, :params => {:project_id => project_id, :limit => 100, :page => page})
|
39
|
+
result = []
|
40
|
+
while tickets.length > 0 and page <= 3 #limit to page 3 since lighthouse is so slow...
|
41
|
+
result += tickets.collect { |ticket| self.new ticket }
|
42
|
+
page += 1
|
43
|
+
tickets = ::Lighthouse::Ticket.find(:all, :params => {:project_id => project_id, :limit => 100, :page => page})
|
44
|
+
end
|
45
|
+
search_by_attribute(result, options, limit)
|
39
46
|
end
|
40
47
|
|
41
48
|
# This is to get the ticket id
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ticketmaster-lighthouse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 5
|
10
|
+
version: 0.5.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Hong
|