ticketmaster 0.5.2 → 0.5.3

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/README.md CHANGED
@@ -61,7 +61,7 @@ To retrieve all projects, simply pass no argument to find:
61
61
 
62
62
  Now that we grabbed the right project. Let's go ahead and create a ticket at this project:
63
63
 
64
- project.ticket!(:summary => "Test", :description => "Hello World")
64
+ project.ticket!(:title => "Test", :description => "Hello World")
65
65
 
66
66
  We create our ticket with three properties.
67
67
 
@@ -163,7 +163,7 @@ Once you require it, then you are ready to use Github and ticketmaster
163
163
 
164
164
  The source code is located at [ticketmaster-github](http://github.com/hybridgroup/ticketmaster-github)
165
165
 
166
- ### Unfuddle (Alpha, needs compatibility update)
166
+ ### Unfuddle
167
167
 
168
168
  To use Unfuddle with ticketmaster, install it:
169
169
  gem install ticketmaster-unfuddle
@@ -172,10 +172,75 @@ Then simply require it, and you are good to use Unfuddle with ticketmaster!
172
172
 
173
173
  require 'ticketmaster'
174
174
  require 'ticketmaster-unfuddle'
175
- unfuddle = TicketMaster.new(:unfuddle, {:username => "..", :password => "..", :subdomain => ".."})
175
+ unfuddle = TicketMaster.new(:unfuddle, {:username => "..", :password => "..", :account => ".."})
176
176
 
177
177
  The source code is located at [ticketmaster-unfuddle](http://github.com/hybridgroup/ticketmaster-unfuddle)
178
178
 
179
+ ### Kanban Pad
180
+
181
+ To use Kanban Pad with ticketmaster, install it:
182
+ gem install ticketmaster-kanbanpad
183
+
184
+ Once you require it, you can connect to Kanban Pad using ticketmaster!
185
+
186
+ require 'ticketmaster'
187
+ require 'ticketmaster-kanbanpad'
188
+ kanbanpad = TicketMaster.new(:kanbanpad, {:username => "xx", :password => "xx"})
189
+
190
+ The source code is located at [ticketmaster-kanbanpad](https://github.com/hybridgroup/ticketmaster-kanbanpad)
191
+
192
+ ### Redmine
193
+
194
+ To use Redmine with ticketmaster, install it:
195
+ gem install ticketmaster-redmine
196
+
197
+ Just require it, and you are ready to use Redmine with ticketmaster!
198
+
199
+ require 'ticketmaster'
200
+ require 'ticketmaster-redmine'
201
+ redmine = TicketMaster.new(:redmine, {:username => "..", :password => "..", :server => ".."})
202
+
203
+ The source code is located at [ticketmaster-redmine](http://github.com/hybridgroup/ticketmaster-redmine)
204
+
205
+ ### Trac
206
+
207
+ To use Trac with ticketmaster, install it:
208
+ gem install ticketmaster-trac
209
+
210
+ Require it, and you are happening to call Trac with ticketmaster!
211
+
212
+ require 'ticketmaster'
213
+ require 'ticketmaster-trac'
214
+ trac = TicketMaster.new(:trac, {:username => "..", :password => "..", :url => ".."})
215
+
216
+ The source code is located at [ticketmaster-trac](http://github.com/hybridgroup/ticketmaster-trac)
217
+
218
+ ### Codaset
219
+
220
+ To use Codaset with ticketmaster, install it:
221
+ gem install ticketmaster-codaset
222
+
223
+ Require and you have connected to Codaset with ticketmaster!
224
+
225
+ require 'ticketmaster'
226
+ require 'ticketmaster-codaset'
227
+ codaset = TicketMaster.new(:codaset, {:username => "foo", :password => "bar", :client_id => "your_client_id", :client_secret => "your_client_secret"})
228
+
229
+ The source code is located at [ticketmaster-codaset](http://github.com/hybridgroup/ticketmaster-codaset)
230
+
231
+ ### Bugzilla
232
+
233
+ To use Bugzilla with ticketmaster, install it:
234
+ gem install ticketmaster-bugzilla
235
+
236
+ Require and you can talk to Bugzilla with ticketmaster!
237
+
238
+ require 'ticketmaster'
239
+ require 'ticketmaster-bugzilla'
240
+ codaset = TicketMaster.new(:bugzilla, {:username => "foo", :password => "bar", :url => "https://bugzilla.mozilla.org"})
241
+
242
+ The source code is located at [ticketmaster-bugzilla](http://github.com/hybridgroup/ticketmaster-bugzilla)
243
+
179
244
  ## Creating a provider
180
245
  Creating a provider consists of three steps:
181
246
 
@@ -217,7 +282,7 @@ This makes it easy for people to find providers, simply by issuing:
217
282
  They should be presented with a nice list of all available providers.
218
283
 
219
284
  ## Note on Patches/Pull Requests
220
-
285
+
221
286
  * Fork the project.
222
287
  * Make your feature addition or bug fix.
223
288
  * Add tests for it. This is important so we don't break it in a
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.2
1
+ 0.5.3
@@ -3,22 +3,18 @@ require 'ticketmaster'
3
3
  require 'ticketmaster-pivotal'
4
4
  require 'ticketmaster-lighthouse'
5
5
 
6
- # copy all tickets and comments from pivotal tracker to new lighthouse project
7
- puts "Copy started..."
6
+ # copy all tickets and comments from pivotal tracker to new lighthouse project (the hard way)
8
7
  pivotal = TicketMaster.new(:pivotal)
9
8
  pivotal_project = pivotal.project(97107)
10
9
  lighthouse = TicketMaster.new(:lighthouse)
11
- puts "Creating new project in Lighthouse..."
12
- lighthouse_project = lighthouse.project!(:name => "Copy Test on #{Time.now}", :description => "A copy test")
10
+
11
+ lighthouse_project = lighthouse.project!(:name => "Copy Test on #{Time.now}",
12
+ :description => "A copy test")
13
13
 
14
14
  pivotal_project.tickets.each do |pivotal_ticket|
15
- puts "Copying ticket '#{pivotal_ticket.title}'..."
16
-
17
15
  lighthouse_ticket = lighthouse_project.ticket!({:title => pivotal_ticket.title,
18
16
  :description => pivotal_ticket.description})
19
17
  pivotal_ticket.comments.each do |comment|
20
18
  lighthouse_ticket.comment!(:body => comment.body)
21
19
  end
22
20
  end
23
- puts "Copy finished."
24
-
@@ -0,0 +1,15 @@
1
+ require 'rubygems'
2
+ require 'ticketmaster'
3
+ require 'ticketmaster-pivotal'
4
+ require 'ticketmaster-lighthouse'
5
+
6
+ # copy all tickets and comments from pivotal tracker to new lighthouse project (the easy way)
7
+ pivotal = TicketMaster.new(:pivotal)
8
+ pivotal_project = pivotal.project(97107)
9
+ lighthouse = TicketMaster.new(:lighthouse)
10
+
11
+ lighthouse_project = lighthouse.project!(:name => "Copy Test on #{Time.now}",
12
+ :description => "A copy test")
13
+ lighthouse_project.copy(pivotal_project)
14
+ puts "Copy finished."
15
+
@@ -17,6 +17,7 @@ end
17
17
  provider
18
18
  exception
19
19
  dummy/dummy.rb
20
+ tester/tester.rb
20
21
  }.each {|lib| require File.dirname(__FILE__) + '/ticketmaster/' + lib }
21
22
 
22
23
 
@@ -68,7 +68,7 @@ module TicketMaster::Provider
68
68
  if self::API.is_a? Class
69
69
  self.new self::API.find(id, :params => {:project_id => project_id, :ticket_id => ticket_id})
70
70
  else
71
- raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
71
+ raise TicketMaster::Exception.new("#{self.name}::#{this_method} method must be implemented by the provider")
72
72
  end
73
73
  end
74
74
 
@@ -79,7 +79,7 @@ module TicketMaster::Provider
79
79
  if self::API.is_a? Class
80
80
  self.search(project_id, ticket_id, attributes)
81
81
  else
82
- raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
82
+ raise TicketMaster::Exception.new("#{self.name}::#{this_method} method must be implemented by the provider")
83
83
  end
84
84
  end
85
85
 
@@ -89,7 +89,7 @@ module TicketMaster::Provider
89
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
- raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
92
+ raise TicketMaster::Exception.new("#{self.name}::#{this_method} method must be implemented by the provider")
93
93
  end
94
94
  end
95
95
  end
@@ -12,7 +12,7 @@ module TicketMaster::Provider
12
12
  something.save
13
13
  self.new something
14
14
  else
15
- raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
15
+ raise TicketMaster::Exception.new("#{self.name}::#{this_method} method must be implemented by the provider")
16
16
  end
17
17
  end
18
18
  end
@@ -58,7 +58,7 @@ module TicketMaster::Provider
58
58
  end
59
59
  something.save if changes > 0
60
60
  else
61
- raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
61
+ raise TicketMaster::Exception.new("#{self.class.name}::#{this_method} method must be implemented by the provider")
62
62
  end
63
63
  end
64
64
 
@@ -68,7 +68,7 @@ module TicketMaster::Provider
68
68
  if @system_data and @system_data[:client] and @system_data[:client].respond_to?(:destroy)
69
69
  return @system_data[:client].destroy
70
70
  else
71
- raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
71
+ raise TicketMaster::Exception.new("#{self.class.name}::#{this_method} method must be implemented by the provider")
72
72
  end
73
73
  end
74
74
 
@@ -2,6 +2,13 @@ module TicketMaster::Provider
2
2
  # Contains a series of helper methods
3
3
  module Helper
4
4
 
5
+ # Current method name reflection
6
+ # http://www.ruby-forum.com/topic/75258#895630
7
+ # Call when raising 'implemented by the provider' exceptions
8
+ def this_method
9
+ caller[0][/`([^']*)'/, 1]
10
+ end
11
+
5
12
  # A helper method for easy finding
6
13
  def easy_finder(api, symbol, options, at_index = 0)
7
14
  if api.is_a? Class
@@ -9,7 +16,7 @@ module TicketMaster::Provider
9
16
  options.insert(at_index, symbol) if options[at_index].is_a?(Hash)
10
17
  api.find(*options)
11
18
  else
12
- raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
19
+ raise TicketMaster::Exception.new("#{Helper.name}::#{this_method} method must be implemented by the provider")
13
20
  end
14
21
  end
15
22
 
@@ -88,7 +88,7 @@ module TicketMaster::Provider
88
88
  if self::API.is_a? Class
89
89
  self.new self::API.find(id)
90
90
  else
91
- raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
91
+ raise TicketMaster::Exception.new("#{self.name}::#{this_method} method must be implemented by the provider")
92
92
  end
93
93
  end
94
94
 
@@ -99,7 +99,7 @@ module TicketMaster::Provider
99
99
  if self::API.is_a? Class
100
100
  self.search(attributes)
101
101
  else
102
- raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
102
+ raise TicketMaster::Exception.new("#{self.name}::#{this_method} method must be implemented by the provider")
103
103
  end
104
104
  end
105
105
 
@@ -109,7 +109,7 @@ module TicketMaster::Provider
109
109
  projects = self::API.find(:all).collect { |project| self.new project }
110
110
  search_by_attribute(projects, options, limit)
111
111
  else
112
- raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
112
+ raise TicketMaster::Exception.new("#{self.name}::#{this_method} method must be implemented by the provider")
113
113
  end
114
114
  end
115
115
 
@@ -0,0 +1,18 @@
1
+ module TicketMaster::Provider
2
+ module Tester
3
+ # This is the Comment class for the Tester provider
4
+ class Comment < TicketMaster::Provider::Base::Comment
5
+
6
+ # You don't need to define an initializer, this is only here to initialize tester data
7
+ def initialize(project_id, ticket_id, *options)
8
+ data = {:id => rand(1000), :status => ['lol', 'rofl', 'lmao', 'lamo', 'haha', 'heh'][rand(6)],
9
+ :priority => rand(10), :summary => 'Tickets ticket ticket ticket', :resolution => false,
10
+ :created_at => Time.now, :updated_at => Time.now, :description => 'Ticket ticket ticket ticket laughing',
11
+ :assignee => 'lol-man'}
12
+ @system = :tester
13
+ super(data.merge(options.first || {}))
14
+ end
15
+
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,19 @@
1
+ module TicketMaster::Provider
2
+ module Tester
3
+ # This is the Project class for the Tester provider
4
+ class Project < TicketMaster::Provider::Base::Project
5
+
6
+ # You should define @system and @system_data here.
7
+ # The data stuff is just to initialize fake data. In a real provider, you would use the API
8
+ # to grab the information and then initialize based on that info.
9
+ # @system_data would hold the API's model/instance for reference
10
+ def initialize(*options)
11
+ data = {:id => rand(1000).to_i, :name => 'Tester', :description => 'Mock!-ing Bird',
12
+ :created_at => Time.now, :updated_at => Time.now}
13
+ @system = :tester
14
+ super(data.merge(options.first || {}))
15
+ end
16
+
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,28 @@
1
+ module TicketMaster::Provider
2
+ # This is the Tester Provider
3
+ #
4
+ # It doesn't really do anything, it exists in order to test the basic functionality of ticketmaster
5
+ # and to provide an example the basics of what is to be expected from the providers.
6
+ #
7
+ # Note that the initial provider name is a module rather than a class. TicketMaster.new
8
+ # extends on an instance-based fashion. If you would rather initialize using code that is
9
+ # closer to:
10
+ #
11
+ # TicketMaster::Provider::Tester.new(authentication)
12
+ #
13
+ # You will have to do a little magic trick and define new on the provider as a wrapper
14
+ # around the TicketMaster.new call.
15
+ module Tester
16
+ include TicketMaster::Provider::Base
17
+ # An example of what to do if you would like to do TicketMaster::Provider::Tester.new(...)
18
+ # rather than TicketMaster.new(:tester, ...)
19
+ def self.new(authentication = {})
20
+ TicketMaster.new(:tester, authentication)
21
+ # maybe do some other stuff
22
+ end
23
+ end
24
+ end
25
+
26
+ %w| project ticket comment |.each do |f|
27
+ require File.dirname(__FILE__) + '/' + f +'.rb'
28
+ end
@@ -0,0 +1,19 @@
1
+ module TicketMaster::Provider
2
+ module Tester
3
+ # The Tester Provider's Ticket class
4
+ class Ticket < TicketMaster::Provider::Base::Ticket
5
+ @system = :tester
6
+
7
+ # You don't need to define an initializer, this is only here to initialize tester data
8
+ def initialize(project_id, *options)
9
+ data = {:id => rand(1000), :status => ['lol', 'rofl', 'lmao', 'lamo', 'haha', 'heh'][rand(6)],
10
+ :priority => rand(10), :summary => 'Tickets ticket ticket ticket', :resolution => false,
11
+ :created_at => Time.now, :updated_at => Time.now, :description => 'Ticket ticket ticket ticket laughing',
12
+ :assignee => 'lol-man', :project_id => project_id}
13
+ @system = :tester
14
+ super(data.merge(options.first || {}))
15
+ end
16
+
17
+ end
18
+ end
19
+ end
@@ -90,7 +90,7 @@ module TicketMaster::Provider
90
90
  if self::API.is_a? Class
91
91
  self.new self::API.find(ticket_id, :params => {:project_id => project_id})
92
92
  else
93
- raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
93
+ raise TicketMaster::Exception.new("#{self.name}::#{this_method} method must be implemented by the provider")
94
94
  end
95
95
  end
96
96
 
@@ -101,7 +101,7 @@ module TicketMaster::Provider
101
101
  if self::API.is_a? Class
102
102
  self.search(project_id, attributes)
103
103
  else
104
- raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
104
+ raise TicketMaster::Exception.new("#{self.name}::#{this_method} method must be implemented by the provider")
105
105
  end
106
106
  end
107
107
 
@@ -111,7 +111,7 @@ module TicketMaster::Provider
111
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
- raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
114
+ raise TicketMaster::Exception.new("#{self.name}::#{this_method} method must be implemented by the provider")
115
115
  end
116
116
  end
117
117
 
@@ -141,12 +141,12 @@ module TicketMaster::Provider
141
141
  #
142
142
  # On success it should return true, otherwise false
143
143
  def close(*options)
144
- raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
144
+ raise TicketMaster::Exception.new("#{self.class.name}::#{this_method} method must be implemented by the provider")
145
145
  end
146
146
 
147
147
  # Reload this ticket
148
148
  def reload!(*options)
149
- raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
149
+ raise TicketMaster::Exception.new("#{self.class.name}::#{this_method} method must be implemented by the provider")
150
150
  end
151
151
 
152
152
  end
@@ -0,0 +1,123 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
2
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+ require 'rubygems'
4
+ require 'rspec'
5
+ require 'ticketmaster'
6
+
7
+ describe "Ticketmaster Exception Messages" do
8
+
9
+ before(:all) do
10
+ @exception = TicketMaster::Exception
11
+ end
12
+
13
+ before(:each) do
14
+ @ticketmaster = TicketMaster.new(:tester, {})
15
+ end
16
+
17
+ describe "TicketMaster::Provider::Helper" do
18
+ it "easy_finder method raises correct exception" do
19
+ msg = "TicketMaster::Provider::Helper::easy_finder method must be implemented by the provider"
20
+ lambda { @ticketmaster.easy_finder(1, :test, {}) }.should raise_error(@exception, msg)
21
+ end
22
+ end
23
+
24
+ describe "TicketMaster::Provider::Tester::Project" do
25
+ it "find_by_id method raises correct exception" do
26
+ msg = "TicketMaster::Provider::Tester::Project::find_by_id method must be implemented by the provider"
27
+ lambda { @ticketmaster.project([1]) }.should raise_error(@exception, msg)
28
+ end
29
+ it "find_by_attributes method raises correct exception" do
30
+ msg = "TicketMaster::Provider::Tester::Project::find_by_attributes method must be implemented by the provider"
31
+ lambda { @ticketmaster.project.find :all, :name => 'Test Project' }.should raise_error(@exception, msg)
32
+ end
33
+ it "search method raises correct exception" do
34
+ msg = "TicketMaster::Provider::Tester::Project::search method must be implemented by the provider"
35
+ lambda { @ticketmaster.project.search :tag => 'testing' }.should raise_error(@exception, msg)
36
+ end
37
+ it "create method raises correct exception" do
38
+ msg = "TicketMaster::Provider::Tester::Project::create method must be implemented by the provider"
39
+ lambda { @ticketmaster.project.create :name => 'Foo Bar' }.should raise_error(@exception, msg)
40
+ end
41
+ it "save method raises correct exception" do
42
+ project = TicketMaster::Provider::Tester::Project.new
43
+ msg = "TicketMaster::Provider::Tester::Project::save method must be implemented by the provider"
44
+ lambda { project.save }.should raise_error(@exception, msg)
45
+ end
46
+ it "destroy method raises correct exception" do
47
+ project = TicketMaster::Provider::Tester::Project.new
48
+ msg = "TicketMaster::Provider::Tester::Project::destroy method must be implemented by the provider"
49
+ lambda { project.destroy }.should raise_error(@exception, msg)
50
+ end
51
+ end
52
+
53
+ describe "TicketMaster::Provider::Tester::Ticket" do
54
+ before(:each) do
55
+ @ticket = TicketMaster::Provider::Tester::Ticket.new(1)
56
+ end
57
+ it "find_by_id method raises correct exception" do
58
+ msg = "TicketMaster::Provider::Tester::Ticket::find_by_id method must be implemented by the provider"
59
+ lambda { @ticketmaster.tickets(:id => 22) }.should raise_error(@exception, msg)
60
+ end
61
+ it "find_by_attributes method raises correct exception" do
62
+ msg = "TicketMaster::Provider::Tester::Ticket::find_by_attributes method must be implemented by the provider"
63
+ lambda { @ticketmaster.ticket.find(1, :all, :title => 'Test ticket') }.should raise_error(@exception, msg)
64
+ end
65
+ it "search method raises correct exception" do
66
+ msg = "TicketMaster::Provider::Tester::Ticket::search method must be implemented by the provider"
67
+ lambda { @ticketmaster.ticket.search :tag => 'testing' }.should raise_error(@exception, msg)
68
+ end
69
+ it "create method raises correct exception" do
70
+ msg = "TicketMaster::Provider::Tester::Ticket::create method must be implemented by the provider"
71
+ lambda { @ticketmaster.ticket.create :name => 'Foo Bar' }.should raise_error(@exception, msg)
72
+ end
73
+ it "save method raises correct exception" do
74
+ msg = "TicketMaster::Provider::Tester::Ticket::save method must be implemented by the provider"
75
+ lambda { @ticket.save }.should raise_error(@exception, msg)
76
+ end
77
+ it "destroy method raises correct exception" do
78
+ msg = "TicketMaster::Provider::Tester::Ticket::destroy method must be implemented by the provider"
79
+ lambda { @ticket.destroy }.should raise_error(@exception, msg)
80
+ end
81
+ it "close method raises correct exception" do
82
+ msg = "TicketMaster::Provider::Tester::Ticket::close method must be implemented by the provider"
83
+ lambda { @ticket.close }.should raise_error(@exception, msg)
84
+ end
85
+ it "reload! method raises correct exception" do
86
+ msg = "TicketMaster::Provider::Tester::Ticket::reload! method must be implemented by the provider"
87
+ lambda { @ticket.reload! }.should raise_error(@exception, msg)
88
+ end
89
+ end
90
+
91
+ describe "TicketMaster::Provider::Tester::Comment" do
92
+ before(:each) do
93
+ @ticket_with_comments = TicketMaster::Provider::Tester::Ticket.new(1)
94
+ @comment = TicketMaster::Provider::Tester::Comment.new(1, 1)
95
+ end
96
+ it "find_by_id method raises correct exception" do
97
+ msg = "TicketMaster::Provider::Tester::Comment::find_by_id method must be implemented by the provider"
98
+ lambda { @ticket_with_comments.comment.find(1, 1, [1,2]) }.should raise_error(@exception, msg)
99
+ end
100
+ it "find_by_attributes method raises correct exception" do
101
+ msg = "TicketMaster::Provider::Tester::Comment::find_by_attributes method must be implemented by the provider"
102
+ lambda { @ticket_with_comments.comment.find(1, 1, :all, :tag => "tag") }.should raise_error(@exception, msg)
103
+ end
104
+ it "search method raises correct exception" do
105
+ msg = "TicketMaster::Provider::Tester::Comment::search method must be implemented by the provider"
106
+ lambda { @ticket_with_comments.comment.search(1, 1, :tag => 'testing') }.should raise_error(@exception, msg)
107
+ end
108
+ it "create method raises correct exception" do
109
+ msg = "TicketMaster::Provider::Tester::Comment::create method must be implemented by the provider"
110
+ lambda { @ticket_with_comments.comment.create :name => 'Foo Bar' }.should raise_error(@exception, msg)
111
+ end
112
+ it "save method raises correct exception" do
113
+ msg = "TicketMaster::Provider::Tester::Comment::save method must be implemented by the provider"
114
+ lambda { @comment.save }.should raise_error(@exception, msg)
115
+ end
116
+ it "destroy method raises correct exception" do
117
+ msg = "TicketMaster::Provider::Tester::Comment::destroy method must be implemented by the provider"
118
+ lambda { @comment.destroy }.should raise_error(@exception, msg)
119
+ end
120
+ end
121
+
122
+ end
123
+
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ticketmaster}
8
- s.version = "0.5.2"
8
+ s.version = "0.5.3"
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-11-22}
12
+ s.date = %q{2011-02-02}
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}
@@ -32,6 +32,7 @@ Gem::Specification.new do |s|
32
32
  "examples/tm_example.rb",
33
33
  "examples/tm_example_2.rb",
34
34
  "examples/tm_example_3.rb",
35
+ "examples/tm_example_4.rb",
35
36
  "lib/ticketmaster.rb",
36
37
  "lib/ticketmaster/authenticator.rb",
37
38
  "lib/ticketmaster/cli/commands/config.rb",
@@ -63,6 +64,10 @@ Gem::Specification.new do |s|
63
64
  "lib/ticketmaster/helper.rb",
64
65
  "lib/ticketmaster/project.rb",
65
66
  "lib/ticketmaster/provider.rb",
67
+ "lib/ticketmaster/tester/comment.rb",
68
+ "lib/ticketmaster/tester/project.rb",
69
+ "lib/ticketmaster/tester/tester.rb",
70
+ "lib/ticketmaster/tester/ticket.rb",
66
71
  "lib/ticketmaster/ticket.rb",
67
72
  "spec/project_spec.rb",
68
73
  "spec/rcov.opts",
@@ -70,6 +75,7 @@ Gem::Specification.new do |s|
70
75
  "spec/spec_helper.rb",
71
76
  "spec/ticket_spec.rb",
72
77
  "spec/ticketmaster-cli_spec.rb",
78
+ "spec/ticketmaster-exception_spec.rb",
73
79
  "spec/ticketmaster_spec.rb",
74
80
  "ticketmaster.gemspec"
75
81
  ]
@@ -83,10 +89,12 @@ Gem::Specification.new do |s|
83
89
  "spec/spec_helper.rb",
84
90
  "spec/ticket_spec.rb",
85
91
  "spec/ticketmaster-cli_spec.rb",
92
+ "spec/ticketmaster-exception_spec.rb",
86
93
  "spec/ticketmaster_spec.rb",
87
94
  "examples/tm_example.rb",
88
95
  "examples/tm_example_2.rb",
89
- "examples/tm_example_3.rb"
96
+ "examples/tm_example_3.rb",
97
+ "examples/tm_example_4.rb"
90
98
  ]
91
99
 
92
100
  if s.respond_to? :specification_version then
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: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 2
10
- version: 0.5.2
9
+ - 3
10
+ version: 0.5.3
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-11-22 00:00:00 -08:00
20
+ date: 2011-02-02 00:00:00 -08:00
21
21
  default_executable: tm
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -91,6 +91,7 @@ files:
91
91
  - examples/tm_example.rb
92
92
  - examples/tm_example_2.rb
93
93
  - examples/tm_example_3.rb
94
+ - examples/tm_example_4.rb
94
95
  - lib/ticketmaster.rb
95
96
  - lib/ticketmaster/authenticator.rb
96
97
  - lib/ticketmaster/cli/commands/config.rb
@@ -122,6 +123,10 @@ files:
122
123
  - lib/ticketmaster/helper.rb
123
124
  - lib/ticketmaster/project.rb
124
125
  - lib/ticketmaster/provider.rb
126
+ - lib/ticketmaster/tester/comment.rb
127
+ - lib/ticketmaster/tester/project.rb
128
+ - lib/ticketmaster/tester/tester.rb
129
+ - lib/ticketmaster/tester/ticket.rb
125
130
  - lib/ticketmaster/ticket.rb
126
131
  - spec/project_spec.rb
127
132
  - spec/rcov.opts
@@ -129,6 +134,7 @@ files:
129
134
  - spec/spec_helper.rb
130
135
  - spec/ticket_spec.rb
131
136
  - spec/ticketmaster-cli_spec.rb
137
+ - spec/ticketmaster-exception_spec.rb
132
138
  - spec/ticketmaster_spec.rb
133
139
  - ticketmaster.gemspec
134
140
  has_rdoc: true
@@ -170,7 +176,9 @@ test_files:
170
176
  - spec/spec_helper.rb
171
177
  - spec/ticket_spec.rb
172
178
  - spec/ticketmaster-cli_spec.rb
179
+ - spec/ticketmaster-exception_spec.rb
173
180
  - spec/ticketmaster_spec.rb
174
181
  - examples/tm_example.rb
175
182
  - examples/tm_example_2.rb
176
183
  - examples/tm_example_3.rb
184
+ - examples/tm_example_4.rb