ticketmaster 0.4.3 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -153,11 +153,17 @@ The source code is located at [ticketmaster-unfuddle](http://github.com/hybridgr
153
153
  ## Creating a provider
154
154
  Creating a provider consists of three steps:
155
155
 
156
- * Create the ticketmaster provider (a.k.a. the remap) using the skeleton located at http://github.com/hybridgroup/ticketmaster-provider-skeleton
156
+ * Run the generator like this:
157
+ tm generate myprovider
157
158
  * Implement whatever is needed to connect to your desired backend
158
159
  * Release it to RubyGems
159
160
 
160
161
  ### Create the ticketmaster provider
162
+ Thanks to a simple generator, it is easy to get started with a new provider. Run this from the command line:
163
+ tm generate myprovider
164
+
165
+ This will generate a new skeleton provider called ticketmaster-myprovider in the current directory. Create a repo from that directory, and you can start implementing your provider.
166
+
161
167
  Almost all APIs are different. And so are their Ruby providers. ticketmaster attempts to create an universal API for ticket and project management systems, and thus, we need to map the functionality to the ticketmaster API. This is the providers job. The provider is the glue between ticketmaster, and the ticket management system's API.
162
168
  Usually, your provider would rely on another library for the raw HTTP interaction. For instance, [ticketmaster-lighthouse](http://github.com/hybridgroup/ticketmaster-lighthouse) relies on ActiveResource in order to interact with the Lighthouse API. Look at it like this:
163
169
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.3
1
+ 0.4.5
@@ -37,8 +37,6 @@ module TicketMaster::Provider
37
37
  first, attributes = options
38
38
  if first.nil? or (first == :all and attributes.nil?)
39
39
  self.find_by_attributes(project_id, ticket_id)
40
- elsif first.is_a? Fixnum
41
- self.find_by_id(project_id, ticket_id, first)
42
40
  elsif first.is_a? Array
43
41
  first.collect { |id| self.find_by_id(project_id, ticket_id, id) }
44
42
  elsif first == :first
@@ -49,6 +47,8 @@ module TicketMaster::Provider
49
47
  comments.last
50
48
  elsif first == :all
51
49
  self.find_by_attributes(project_id, ticket_id, attributes)
50
+ else
51
+ self.find_by_id(project_id, ticket_id, first)
52
52
  end
53
53
  end
54
54
 
@@ -57,8 +57,6 @@ module TicketMaster::Provider
57
57
  attributes = options.shift
58
58
  if first.nil? or (first == :all and attributes.nil?)
59
59
  self.find_by_attributes
60
- elsif first.is_a? Fixnum
61
- self.find_by_id(first)
62
60
  elsif first.is_a? Array
63
61
  first.collect { |id| self.find_by_id(id) }
64
62
  elsif first == :first
@@ -69,6 +67,8 @@ module TicketMaster::Provider
69
67
  projects.last
70
68
  elsif first == :all
71
69
  self.find_by_attributes(attributes)
70
+ else
71
+ self.find_by_id(first)
72
72
  end
73
73
  end
74
74
 
@@ -59,8 +59,6 @@ module TicketMaster::Provider
59
59
  first, attributes = options
60
60
  if first.nil? or (first == :all and attributes.nil?)
61
61
  self.find_by_attributes(project_id)
62
- elsif first.is_a? Fixnum
63
- self.find_by_id(project_id, first)
64
62
  elsif first.is_a? Array
65
63
  first.collect { |id| self.find_by_id(project_id, id) }
66
64
  elsif first == :first
@@ -71,6 +69,8 @@ module TicketMaster::Provider
71
69
  tickets.last
72
70
  elsif first == :all
73
71
  self.find_by_attributes(project_id, attributes)
72
+ else
73
+ self.find_by_id(project_id, first)
74
74
  end
75
75
  end
76
76
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ticketmaster}
8
- s.version = "0.4.3"
8
+ s.version = "0.4.5"
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-16}
12
+ s.date = %q{2010-07-23}
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: 9
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 3
10
- version: 0.4.3
9
+ - 5
10
+ version: 0.4.5
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-16 00:00:00 -07:00
20
+ date: 2010-07-23 00:00:00 -07:00
21
21
  default_executable: tm
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency