ticketmaster-bugzilla 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -27,6 +27,10 @@ module TicketMaster::Provider
27
27
  end
28
28
  end
29
29
 
30
+ def body
31
+ self[:text]
32
+ end
33
+
30
34
  def created_at
31
35
  begin
32
36
  normalize_datetime(self[:time])
@@ -7,33 +7,51 @@ module TicketMaster::Provider
7
7
  # declare needed overloaded methods here
8
8
  TICKETS_API = Rubyzilla::Product
9
9
  def initialize(*object)
10
- object = object.first
11
- @system_data = {:client => object}
12
- unless object.is_a? Hash
13
- hash = {:product_id => object.product_id,
14
- :id => object.id,
15
- :project_id => object.product_id,
16
- :component_id => object.component_id,
17
- :summary => object.summary,
18
- :title => object.summary,
19
- :version => object.version,
20
- :op_sys => object.op_sys,
21
- :platform => object.platform,
22
- :priority => object.priority,
23
- :description => object.description,
24
- :alias => object.alias,
25
- :qa_contact => object.qa_contact,
26
- :assignee => object.qa_contact,
27
- :requestor => object.qa_contact,
28
- :status => object.status,
29
- :target_milestone => object.target_milestone,
30
- :severity => object.severity,
31
- :created_at => nil,
32
- :updated_at => nil}
33
- else
34
- hash = object
10
+ if object.first
11
+ object = object.first
12
+ unless object.is_a? Hash
13
+ @system_data = {:client => object}
14
+ hash = {:product_id => object.product_id,
15
+ :id => object.id,
16
+ :project_id => object.product_id,
17
+ :component_id => object.component_id,
18
+ :summary => object.summary,
19
+ :title => object.summary,
20
+ :version => object.version,
21
+ :op_sys => object.op_sys,
22
+ :platform => object.platform,
23
+ :priority => object.priority,
24
+ :description => object.description,
25
+ :alias => object.alias,
26
+ :qa_contact => object.qa_contact,
27
+ :assignee => object.assigned_to,
28
+ :requestor => object.qa_contact,
29
+ :status => object.status,
30
+ :target_milestone => object.target_milestone,
31
+ :severity => object.severity,
32
+ :created_at => nil,
33
+ :updated_at => nil}
34
+ else
35
+ hash = object
36
+ end
37
+ super hash
35
38
  end
36
- super hash
39
+ end
40
+
41
+ def title
42
+ self[:summary]
43
+ end
44
+
45
+ def description
46
+ self[:description]
47
+ end
48
+
49
+ def requestor
50
+ self[:requestor]
51
+ end
52
+
53
+ def assignee
54
+ self[:assignee]
37
55
  end
38
56
 
39
57
  def created_at
@@ -84,7 +102,7 @@ module TicketMaster::Provider
84
102
  end
85
103
 
86
104
  def comment(*options)
87
- Comment.find_by_id(self.id, options.first)
105
+ Comment.find_by_id(self.id, options.first)
88
106
  end
89
107
 
90
108
  private
@@ -8,7 +8,7 @@ module Rubyzilla
8
8
  end
9
9
  attributes.merge!(:product => self.name, :limit => 100)
10
10
  result = Bugzilla.server.call("Bug.search", attributes)
11
- result["bugs"]
11
+ result["bugs"].collect { |bug| Bug.new bug["id"] }
12
12
  end
13
13
  end
14
14
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ticketmaster-bugzilla}
8
- s.version = "0.0.3"
8
+ s.version = "0.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Rafael George"]
12
- s.date = %q{2011-02-14}
12
+ s.date = %q{2011-02-17}
13
13
  s.description = %q{Allows ticketmaster to interact with Bugzilla.}
14
14
  s.email = %q{rafael@hybridgroup.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ticketmaster-bugzilla
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Rafael George
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-14 00:00:00 -04:00
18
+ date: 2011-02-17 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency