ticketmaster-pivotal 0.2.0 → 0.3.0

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.2.0
1
+ 0.3.0
@@ -32,6 +32,17 @@ module TicketMaster::Provider
32
32
  search_by_attribute(comments, options, limit)
33
33
  end
34
34
 
35
+ # A custom creator
36
+ # We didn't really need to do much other than change the :ticket_id attribute to :story_id
37
+ def self.create(*options)
38
+ first = options.first
39
+ first[:story_id] ||= first.delete(:ticket_id) || first.delete('ticket_id')
40
+ first[:text] ||= first.delete(:body) || first.delete('body')
41
+ note = PivotalAPI::Note.new(first)
42
+ note.save
43
+ self.new note
44
+ end
45
+
35
46
  def initialize(note, ticket = nil)
36
47
  @system_data ||= {}
37
48
  @system_data[:ticket] = @system_data[:client] = ticket if ticket
@@ -6,15 +6,6 @@ module TicketMaster::Provider
6
6
  attr_accessor :prefix_options
7
7
  API = PivotalAPI::Story
8
8
 
9
- # The creator
10
- def self.create(*options)
11
- new_ticket = PivotalAPI::Story.new(:project_id => (options.first.delete(:project_id) || options.first.delete('project_id')).to_i)
12
- ticket_attr.each do |k, v|
13
- new_ticket.send(k + '=', v)
14
- end
15
- new_ticket.save
16
- self.new new_ticket
17
- end
18
9
 
19
10
  # The saver
20
11
  def save(*options)
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ticketmaster-pivotal}
8
- s.version = "0.2.0"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["HybridGroup"]
12
- s.date = %q{2010-07-03}
12
+ s.date = %q{2010-07-05}
13
13
  s.description = %q{This is a ticketmaster provider for interacting with Pivotal Tracker .}
14
14
  s.email = %q{hong.quach@abigfisch.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ticketmaster-pivotal
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 2
8
+ - 3
9
9
  - 0
10
- version: 0.2.0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - HybridGroup
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-03 00:00:00 -07:00
18
+ date: 2010-07-05 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency