ticketmaster-lighthouse 0.5.5 → 0.5.6
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 +1 -1
- data/lib/provider/comment.rb +11 -10
- data/spec/tickets_spec.rb +3 -0
- data/ticketmaster-lighthouse.gemspec +32 -35
- metadata +8 -9
- data/.gitignore +0 -22
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.6
|
data/lib/provider/comment.rb
CHANGED
@@ -21,7 +21,7 @@ module TicketMaster::Provider
|
|
21
21
|
def self.find_by_id(project_id, ticket_id, id)
|
22
22
|
self.new API.find(ticket_id, :params => {:project_id => project_id}), id
|
23
23
|
end
|
24
|
-
|
24
|
+
|
25
25
|
# A custom find_by_attributes
|
26
26
|
#
|
27
27
|
def self.find_by_attributes(project_id, ticket_id, attributes = {})
|
@@ -31,7 +31,7 @@ module TicketMaster::Provider
|
|
31
31
|
self.new(result[1], index_of(result[1].versions, comment)) if !comment.body.blank?
|
32
32
|
end.compact
|
33
33
|
end
|
34
|
-
|
34
|
+
|
35
35
|
# The Array#index method doesn't work for the versions...
|
36
36
|
# because it seems they're all equal.
|
37
37
|
def self.index_of(versions, needle)
|
@@ -41,7 +41,7 @@ module TicketMaster::Provider
|
|
41
41
|
end
|
42
42
|
result
|
43
43
|
end
|
44
|
-
|
44
|
+
|
45
45
|
def self.create(*options)
|
46
46
|
attributes = options.first
|
47
47
|
ticket_id = attributes.delete(:ticket_id) || attributes.delete('ticket_id')
|
@@ -55,16 +55,17 @@ module TicketMaster::Provider
|
|
55
55
|
ticket.attributes['versions'] = versions
|
56
56
|
self.find_by_id project_id, ticket_id, ticket.versions.length
|
57
57
|
end
|
58
|
-
|
58
|
+
|
59
59
|
def initialize(ticket, id)
|
60
60
|
@system_data ||= {}
|
61
|
+
return super(ticket) unless ticket.respond_to?('versions') and ticket.versions.respond_to?('[]')
|
61
62
|
@system_data[:ticket] = @system_data[:client] = ticket
|
62
|
-
@system_data[:version] = ticket.versions[id]
|
63
|
-
self.project_id = ticket.prefix_options[:project_id]
|
63
|
+
@system_data[:version] = ticket.versions[id]
|
64
|
+
self.project_id = ticket.prefix_options[:project_id]
|
64
65
|
self.id = id
|
65
|
-
super(@system_data[:version].attributes)
|
66
|
+
super(@system_data[:version].attributes)
|
66
67
|
end
|
67
|
-
|
68
|
+
|
68
69
|
# A custom searcher
|
69
70
|
#
|
70
71
|
# It returns a custom result because we need the original ticket to make a comment.
|
@@ -73,12 +74,12 @@ module TicketMaster::Provider
|
|
73
74
|
comments = ticket.versions
|
74
75
|
[search_by_attribute(comments, options, limit), ticket]
|
75
76
|
end
|
76
|
-
|
77
|
+
|
77
78
|
# The author's name
|
78
79
|
def author
|
79
80
|
user_name
|
80
81
|
end
|
81
|
-
|
82
|
+
|
82
83
|
end
|
83
84
|
end
|
84
85
|
end
|
data/spec/tickets_spec.rb
CHANGED
@@ -7,6 +7,9 @@ describe "Ticketmaster::Provider::Lighthouse::Ticket" do
|
|
7
7
|
ActiveResource::HttpMock.respond_to do |mock|
|
8
8
|
mock.get '/projects/54448.xml', headers, fixture_for('projects/54448'), 200
|
9
9
|
mock.get '/projects/54448/tickets.xml', headers, fixture_for('tickets'), 200
|
10
|
+
1.upto(100) do |page|
|
11
|
+
mock.get "/projects/54448/tickets.xml?limit=100&page=#{page}", headers, fixture_for('tickets'), 200
|
12
|
+
end
|
10
13
|
mock.get '/projects/54448/tickets/5.xml', headers, fixture_for('tickets/5'), 200
|
11
14
|
mock.put '/projects/54448/tickets/5.xml', wheaders, '', 200
|
12
15
|
mock.post '/projects/54448/tickets.xml', wheaders, fixture_for('tickets/create'), 200
|
@@ -1,63 +1,60 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ticketmaster-lighthouse}
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Hong"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2011-04-08}
|
13
13
|
s.description = %q{Allows ticketmaster to interact with Lighthouse's issue tracking system.}
|
14
14
|
s.email = %q{hong.quach@abigfisch.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
17
|
-
|
17
|
+
"README.md"
|
18
18
|
]
|
19
19
|
s.files = [
|
20
20
|
".document",
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
"ticketmaster-lighthouse.gemspec"
|
21
|
+
"LICENSE",
|
22
|
+
"README.md",
|
23
|
+
"Rakefile",
|
24
|
+
"VERSION",
|
25
|
+
"lib/provider/comment.rb",
|
26
|
+
"lib/provider/lighthouse.rb",
|
27
|
+
"lib/provider/project.rb",
|
28
|
+
"lib/provider/ticket.rb",
|
29
|
+
"lib/ticketmaster-lighthouse.rb",
|
30
|
+
"spec/comments_spec.rb",
|
31
|
+
"spec/fixtures/projects.xml",
|
32
|
+
"spec/fixtures/projects/54448.xml",
|
33
|
+
"spec/fixtures/projects/create.xml",
|
34
|
+
"spec/fixtures/tickets.xml",
|
35
|
+
"spec/fixtures/tickets/2.xml",
|
36
|
+
"spec/fixtures/tickets/5.xml",
|
37
|
+
"spec/fixtures/tickets/create.xml",
|
38
|
+
"spec/projects_spec.rb",
|
39
|
+
"spec/spec.opts",
|
40
|
+
"spec/spec_helper.rb",
|
41
|
+
"spec/ticketmaster-lighthouse_spec.rb",
|
42
|
+
"spec/tickets_spec.rb",
|
43
|
+
"ticketmaster-lighthouse.gemspec"
|
45
44
|
]
|
46
45
|
s.homepage = %q{http://github.com/kiafaldorius/ticketmaster-lighthouse}
|
47
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
48
46
|
s.require_paths = ["lib"]
|
49
|
-
s.rubygems_version = %q{1.
|
47
|
+
s.rubygems_version = %q{1.6.1}
|
50
48
|
s.summary = %q{Ticketmaster Provider for Lighthouse}
|
51
49
|
s.test_files = [
|
52
50
|
"spec/comments_spec.rb",
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
51
|
+
"spec/projects_spec.rb",
|
52
|
+
"spec/spec_helper.rb",
|
53
|
+
"spec/ticketmaster-lighthouse_spec.rb",
|
54
|
+
"spec/tickets_spec.rb"
|
57
55
|
]
|
58
56
|
|
59
57
|
if s.respond_to? :specification_version then
|
60
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
61
58
|
s.specification_version = 3
|
62
59
|
|
63
60
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
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:
|
5
|
-
prerelease:
|
4
|
+
hash: 7
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 6
|
10
|
+
version: 0.5.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Hong
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2011-04-08 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -124,7 +124,6 @@ extra_rdoc_files:
|
|
124
124
|
- README.md
|
125
125
|
files:
|
126
126
|
- .document
|
127
|
-
- .gitignore
|
128
127
|
- LICENSE
|
129
128
|
- README.md
|
130
129
|
- Rakefile
|
@@ -153,8 +152,8 @@ homepage: http://github.com/kiafaldorius/ticketmaster-lighthouse
|
|
153
152
|
licenses: []
|
154
153
|
|
155
154
|
post_install_message:
|
156
|
-
rdoc_options:
|
157
|
-
|
155
|
+
rdoc_options: []
|
156
|
+
|
158
157
|
require_paths:
|
159
158
|
- lib
|
160
159
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -178,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
177
|
requirements: []
|
179
178
|
|
180
179
|
rubyforge_project:
|
181
|
-
rubygems_version: 1.
|
180
|
+
rubygems_version: 1.6.1
|
182
181
|
signing_key:
|
183
182
|
specification_version: 3
|
184
183
|
summary: Ticketmaster Provider for Lighthouse
|