ticketmaster-lighthouse 0.5.3 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.3
1
+ 0.5.4
@@ -30,6 +30,13 @@ module TicketMaster::Provider
30
30
  @@allowed_states = ['new', 'open', 'resolved', 'hold', 'invalid']
31
31
  attr_accessor :prefix_options
32
32
  API = ::Lighthouse::Ticket
33
+
34
+ # Lighthouse limits us to a 100 ticket limit per page...
35
+ # might have to implement paging later...
36
+ def self.search(project_id, options = {}, limit = 1000)
37
+ tickets = ::Lighthouse::Ticket.find(:all, :params => {:project_id => project_id, :limit => 100}).collect { |ticket| self.new ticket }
38
+ search_by_attribute(tickets, options, limit)
39
+ end
33
40
 
34
41
  # This is to get the ticket id
35
42
  # We can't set ids, so there's no 'id=' method.
@@ -1,5 +1,5 @@
1
1
  require 'lighthouse-api'
2
- require File.dirname(__FILE__) + '/api/monkey.rb'
2
+
3
3
  # Monkey Patch - remove when the lighthouse gem gets updated.
4
4
  # texel's changes got merged, but looks like a new gem didn't get released. ugh!
5
5
  module Lighthouse
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ticketmaster-lighthouse}
8
- s.version = "0.5.3"
8
+ s.version = "0.5.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Hong"]
@@ -23,7 +23,6 @@ Gem::Specification.new do |s|
23
23
  "README.md",
24
24
  "Rakefile",
25
25
  "VERSION",
26
- "lib/api/monkey.rb",
27
26
  "lib/provider/comment.rb",
28
27
  "lib/provider/lighthouse.rb",
29
28
  "lib/provider/project.rb",
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: 13
4
+ hash: 3
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 3
10
- version: 0.5.3
9
+ - 4
10
+ version: 0.5.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Hong
@@ -129,7 +129,6 @@ files:
129
129
  - README.md
130
130
  - Rakefile
131
131
  - VERSION
132
- - lib/api/monkey.rb
133
132
  - lib/provider/comment.rb
134
133
  - lib/provider/lighthouse.rb
135
134
  - lib/provider/project.rb
data/lib/api/monkey.rb DELETED
@@ -1,7 +0,0 @@
1
- module Lighthouse
2
- class Project
3
- def tickets(options = {:limit => 100}) #Give us more results than the default 30
4
- Ticket.find(:all, :params => options.update(:project_id => id))
5
- end
6
- end
7
- end