ticketmaster-kanbanpad 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
@@ -98,7 +98,7 @@ module KanbanpadAPI
98
98
  end
99
99
 
100
100
  class TaskComment < Base
101
- self.site += 'projects/:project_id/tasks/:id'
101
+ self.site += 'projects/:project_id/tasks/:task_id'
102
102
  self.element_name = 'comment'
103
103
  end
104
104
  end
@@ -8,6 +8,32 @@ module TicketMaster::Provider
8
8
  # Not supported by Kanbanpad API
9
9
  class Comment < TicketMaster::Provider::Base::Comment
10
10
  # declare needed overloaded methods here
11
+ API = KanbanpadAPI::TaskComment
12
+
13
+ def self.find_by_id(project_id, ticket_id, id)
14
+ self.new KanbanpadAPI::TaskComment.find(id, :params => {:project_id => project_id, :task_id => ticket_id})
15
+ end
16
+
17
+ def self.search(project_id, ticket_id, options = {}, limit = 1000)
18
+ comments = KanbanpadAPI::TaskComment.find(:all, :params => {:project_id => project_id, :task_id => ticket_id}).collect { |comment| self.new comment }
19
+ search_by_attribute(comments, options, limit)
20
+ end
21
+
22
+ def updated_at
23
+ @updated_at ||= begin
24
+ Time.parse(self[:updated_at])
25
+ rescue
26
+ self[:updated_at]
27
+ end
28
+ end
29
+
30
+ def created_at
31
+ @updated_at ||= begin
32
+ Time.parse(self[:created_at])
33
+ rescue
34
+ self[:created_at]
35
+ end
36
+ end
11
37
 
12
38
  end
13
39
  end
@@ -45,21 +45,15 @@ module TicketMaster::Provider
45
45
  end
46
46
  end
47
47
 
48
- #TODO?
49
- def comments
50
- warn 'Kanbanpad does not have comments. Perhaps you should leave feedback to request it?'
51
- []
52
- end
53
-
54
48
  #TODO?
55
49
  def comment
56
- warn 'Kanbanpad does not have comments. Perhaps you should leave feedback to request it?'
50
+ warn 'Kanbanpad does not allow find by id of comments. Perhaps you should leave feedback to request it?'
57
51
  nil
58
52
  end
59
53
 
60
- #TODO?
54
+ #TODO? Exists...need to hook this up and test
61
55
  def comment!
62
- warn 'Kanbanpad does not have comments. Perhaps you should leave feedback to request it?'
56
+ warn 'Perhaps you should leave feedback to request it?'
63
57
  []
64
58
  end
65
59
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ticketmaster-kanbanpad}
8
- s.version = "0.1.4"
8
+ s.version = "0.1.5"
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{2011-01-26}
12
+ s.date = %q{2011-02-01}
13
13
  s.description = %q{Allows ticketmaster to interact with kanbanpad.}
14
14
  s.email = %q{sonia@hybridgroup.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ticketmaster-kanbanpad
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 4
10
- version: 0.1.4
9
+ - 5
10
+ version: 0.1.5
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: 2011-01-26 00:00:00 -05:00
18
+ date: 2011-02-01 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency