ticketmaster 0.3.7 → 0.3.8

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.3.7
1
+ 0.3.8
@@ -20,10 +20,14 @@ def open_irb(options, argv)
20
20
  begin
21
21
  require "ticketmaster-#{p}"
22
22
  requires << "-r ticketmaster-#{p} "
23
- rescue LoadError => exception
24
- puts exception
25
- require "#{p}"
26
- requires << "-r #{p} "
23
+ rescue Exception => exception
24
+ #puts exception
25
+ begin
26
+ require "#{p}"
27
+ requires << "-r #{p} "
28
+ rescue Exception => exception
29
+ warn "Could not require the '#{p}' provider. Is it installed?"
30
+ end
27
31
  end
28
32
  end
29
33
  cmd << "#{irb_name} #{requires} --simple-prompt #{ARGV.join(' ')}"
@@ -77,7 +77,7 @@ module TicketMaster::Provider
77
77
  # Must be defined by the provider
78
78
  def self.find_by_attributes(project_id, ticket_id, attributes = {})
79
79
  if self::API.is_a? Class
80
- self.search(project_id, ticket_id, attributes).collect { |thing| self.new thing }
80
+ self.search(project_id, ticket_id, attributes)
81
81
  else
82
82
  raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
83
83
  end
@@ -86,7 +86,7 @@ module TicketMaster::Provider
86
86
  # This is a helper method to find
87
87
  def self.search(project_id, ticket_id, options = {}, limit = 1000)
88
88
  if self::API.is_a? Class
89
- comments = self::API.find(:all, :params => {:project_id => project_id, :ticket_id => ticket_id})
89
+ comments = self::API.find(:all, :params => {:project_id => project_id, :ticket_id => ticket_id}).collect { |comment| self.new comment }
90
90
  search_by_attribute(comments, options, limit)
91
91
  else
92
92
  raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
@@ -97,7 +97,7 @@ module TicketMaster::Provider
97
97
  # Must be defined by the provider
98
98
  def self.find_by_attributes(attributes = {})
99
99
  if self::API.is_a? Class
100
- self.search(attributes).collect { |thing| self.new thing }
100
+ self.search(attributes)
101
101
  else
102
102
  raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
103
103
  end
@@ -106,7 +106,7 @@ module TicketMaster::Provider
106
106
  # This is a helper method to find
107
107
  def self.search(options = {}, limit = 1000)
108
108
  if self::API.is_a? Class
109
- projects = self::API.find(:all)
109
+ projects = self::API.find(:all).collect { |project| self.new project }
110
110
  search_by_attribute(projects, options, limit)
111
111
  else
112
112
  raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
@@ -99,7 +99,7 @@ module TicketMaster::Provider
99
99
  # Must be defined by the provider
100
100
  def self.find_by_attributes(project_id, attributes = {})
101
101
  if self::API.is_a? Class
102
- self.search(project_id, attributes).collect { |thing| self.new thing }
102
+ self.search(project_id, attributes)
103
103
  else
104
104
  raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
105
105
  end
@@ -108,7 +108,7 @@ module TicketMaster::Provider
108
108
  # This is a helper method to find
109
109
  def self.search(project_id, options = {}, limit = 1000)
110
110
  if self::API.is_a? Class
111
- tickets = self::API.find(:all, :params => {:project_id => project_id})
111
+ tickets = self::API.find(:all, :params => {:project_id => project_id}).collect { |ticket| self.new ticket }
112
112
  search_by_attribute(tickets, options, limit)
113
113
  else
114
114
  raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
data/ticketmaster.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ticketmaster}
8
- s.version = "0.3.7"
8
+ s.version = "0.3.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["kiafaldorius", "Sirupsen", "deadprogrammer"]
12
- s.date = %q{2010-07-08}
12
+ s.date = %q{2010-07-12}
13
13
  s.default_executable = %q{tm}
14
14
  s.description = %q{Ticketmaster provides a universal API to ticket tracking and project management systems.}
15
15
  s.email = %q{info@hybridgroup.com}
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ticketmaster
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 3
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 7
10
- version: 0.3.7
9
+ - 8
10
+ version: 0.3.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - kiafaldorius
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-07-08 00:00:00 -07:00
20
+ date: 2010-07-12 00:00:00 -07:00
21
21
  default_executable: tm
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency