ticketmaster-kanbanpad 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/kanbanpad/kanbanpad-api.rb +17 -4
- data/spec/fixtures/projects.json +8 -0
- data/spec/fixtures/projects/be74b643b64e3dc79aa0.json +2 -0
- data/spec/fixtures/tasks.json +7 -0
- data/spec/fixtures/tasks/4cd428c496f0734eef000007.json +3 -0
- data/spec/fixtures/tasks/4cd428c496f0734eef000008.json +3 -0
- data/spec/projects_spec.rb +5 -4
- data/spec/spec_helper.rb +1 -1
- data/spec/tickets_spec.rb +6 -5
- data/ticketmaster-kanbanpad.gemspec +7 -2
- metadata +9 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
@@ -62,6 +62,10 @@ module KanbanpadAPI
|
|
62
62
|
def steps(options = {})
|
63
63
|
Step.find(:all, :params => options.update(:project_id => slug))
|
64
64
|
end
|
65
|
+
|
66
|
+
def comments(options = {})
|
67
|
+
ProjectComment.find(:all, :params => options.update(:project_id => slug))
|
68
|
+
end
|
65
69
|
end
|
66
70
|
|
67
71
|
class Task < Base
|
@@ -75,8 +79,8 @@ module KanbanpadAPI
|
|
75
79
|
find(:all, :params => options.merge(:slug => project_id), :from => :backlog)
|
76
80
|
end
|
77
81
|
|
78
|
-
def comments
|
79
|
-
|
82
|
+
def comments(options = {})
|
83
|
+
TaskComment.find(:all, :params => options.merge(prefix_options).update(:id => id))
|
80
84
|
end
|
81
85
|
end
|
82
86
|
|
@@ -84,8 +88,17 @@ module KanbanpadAPI
|
|
84
88
|
self.site += 'projects/:project_id/'
|
85
89
|
|
86
90
|
def tickets(options = {})
|
87
|
-
Task.find(:all, :params => options.merge(prefix_options)
|
91
|
+
Task.find(:all, :params => options.merge(prefix_options))
|
88
92
|
end
|
89
93
|
end
|
90
|
-
|
94
|
+
|
95
|
+
class ProjectComment < Base
|
96
|
+
self.site += 'projects/:project_id/'
|
97
|
+
self.element_name = 'comment'
|
98
|
+
end
|
99
|
+
|
100
|
+
class TaskComment < Base
|
101
|
+
self.site += 'projects/:project_id/tasks/:id'
|
102
|
+
self.element_name = 'comment'
|
103
|
+
end
|
91
104
|
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
[
|
2
|
+
{"email":"sonia@g.com", "id":"7e2cad4b3cbe5954950c","slug":"7e2cad4b3cbe5954950c","name":"project1",
|
3
|
+
"wip_limit":"10", "organization_id":"4cd428da96f0734eef000008", "collaborator_ids":"4cd428da96f0734eef000009",
|
4
|
+
"privacy":"0"},
|
5
|
+
{"email":"jhon@g.com", "id":"be74b643b64e3dc79aa0","slug":"be74b643b64e3dc79aa0","name":"project2",
|
6
|
+
"wip_limit":"10", "organization_id":"4cd428da96f0734eef000008", "collaborator_ids":"4cd428da96f0734eef000009",
|
7
|
+
"privacy":"0"}
|
8
|
+
]
|
@@ -0,0 +1,7 @@
|
|
1
|
+
[{"id":"4cd428c496f0734eef000007","title":"Configure app","assigned_to":"jhon",
|
2
|
+
"note":"","wip":"false","project_slug":"7e2cad4b3cbe5954950c",
|
3
|
+
"project_id":"7e2cad4b3cbe5954950c","backlog":"false","finished":"false"},
|
4
|
+
{"id":"4cd428c496f0734eef000008","title":"Fix issue","assigned_to":"james",
|
5
|
+
"note":"","wip":"false","project_slug":"7e2cad4b3cbe5954950c",
|
6
|
+
"project_id":"7e2cad4b3cbe5954950c","backlog":"false","finished":"true"}
|
7
|
+
]
|
data/spec/projects_spec.rb
CHANGED
@@ -2,17 +2,18 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
|
2
2
|
|
3
3
|
describe "Ticketmaster::Provider::Kanbanpad::Project" do
|
4
4
|
before(:all) do
|
5
|
-
headers = {}
|
5
|
+
headers = {'Authorization' => 'Basic YWJjQGcuY29tOmllODIzZDYzanM='}
|
6
|
+
wheaders = headers.merge('Accept' => 'application/json')
|
6
7
|
@project_id = 'be74b643b64e3dc79aa0'
|
7
8
|
ActiveResource::HttpMock.respond_to do |mock|
|
8
|
-
mock.get '/api/v1/projects.
|
9
|
-
mock.get '/api/v1/projects/be74b643b64e3dc79aa0.
|
9
|
+
mock.get '/api/v1/projects.json', wheaders, fixture_for('projects'), 200
|
10
|
+
mock.get '/api/v1/projects/be74b643b64e3dc79aa0.json', wheaders, fixture_for('projects/be74b643b64e3dc79aa0'), 200
|
10
11
|
#mock.get '/api/v1/projects/create.xml', headers, fixture_for('projects/create'), 200
|
11
12
|
end
|
12
13
|
end
|
13
14
|
|
14
15
|
before(:each) do
|
15
|
-
|
16
|
+
@ticketmaster = TicketMaster.new(:kanbanpad, :username => 'abc@g.com', :password => 'ie823d63js')
|
16
17
|
@klass = TicketMaster::Provider::Kanbanpad::Project
|
17
18
|
end
|
18
19
|
|
data/spec/spec_helper.rb
CHANGED
data/spec/tickets_spec.rb
CHANGED
@@ -2,18 +2,19 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
|
2
2
|
|
3
3
|
describe "Ticketmaster::Provider::Kanbanpad::Ticket" do
|
4
4
|
before(:all) do
|
5
|
-
headers = {}
|
5
|
+
headers = {'Authorization' => 'Basic YWJjQGcuY29tOmllODIzZDYzanM='}
|
6
|
+
wheaders = headers.merge('Accept' => 'application/json')
|
6
7
|
ActiveResource::HttpMock.respond_to do |mock|
|
7
|
-
mock.get '/api/v1/projects/be74b643b64e3dc79aa0.
|
8
|
-
mock.get '/api/v1/projects/be74b643b64e3dc79aa0/tasks.
|
9
|
-
mock.get '/api/v1/projects/be74b643b64e3dc79aa0/tasks/4cd428c496f0734eef000007.
|
8
|
+
mock.get '/api/v1/projects/be74b643b64e3dc79aa0.json', wheaders, fixture_for('projects/be74b643b64e3dc79aa0'), 200
|
9
|
+
mock.get '/api/v1/projects/be74b643b64e3dc79aa0/tasks.json', wheaders, fixture_for('tasks'), 200
|
10
|
+
mock.get '/api/v1/projects/be74b643b64e3dc79aa0/tasks/4cd428c496f0734eef000007.json', wheaders, fixture_for('tasks/4cd428c496f0734eef000007'), 200
|
10
11
|
end
|
11
12
|
@project_id = 'be74b643b64e3dc79aa0'
|
12
13
|
@ticket_id = '4cd428c496f0734eef000007'
|
13
14
|
end
|
14
15
|
|
15
16
|
before(:each) do
|
16
|
-
@ticketmaster = TicketMaster.new(:kanbanpad,
|
17
|
+
@ticketmaster = TicketMaster.new(:kanbanpad, :username => 'abc@g.com', :password => 'ie823d63js')
|
17
18
|
@project = @ticketmaster.project(@project_id)
|
18
19
|
@klass = TicketMaster::Provider::Kanbanpad::Ticket
|
19
20
|
@comment_klass = TicketMaster::Provider::Kanbanpad::Comment
|
@@ -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.
|
8
|
+
s.version = "0.1.3"
|
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{
|
12
|
+
s.date = %q{2011-01-21}
|
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 = [
|
@@ -29,11 +29,16 @@ Gem::Specification.new do |s|
|
|
29
29
|
"lib/ticketmaster-kanbanpad.rb",
|
30
30
|
"rakefile",
|
31
31
|
"spec/comments_spec.rb",
|
32
|
+
"spec/fixtures/projects.json",
|
32
33
|
"spec/fixtures/projects.xml",
|
34
|
+
"spec/fixtures/projects/be74b643b64e3dc79aa0.json",
|
33
35
|
"spec/fixtures/projects/be74b643b64e3dc79aa0.xml",
|
34
36
|
"spec/fixtures/projects/create.xml",
|
37
|
+
"spec/fixtures/tasks.json",
|
35
38
|
"spec/fixtures/tasks.xml",
|
39
|
+
"spec/fixtures/tasks/4cd428c496f0734eef000007.json",
|
36
40
|
"spec/fixtures/tasks/4cd428c496f0734eef000007.xml",
|
41
|
+
"spec/fixtures/tasks/4cd428c496f0734eef000008.json",
|
37
42
|
"spec/fixtures/tasks/4cd428c496f0734eef000008.xml",
|
38
43
|
"spec/fixtures/tasks/create.xml",
|
39
44
|
"spec/projects_spec.rb",
|
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:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
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:
|
18
|
+
date: 2011-01-21 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -56,11 +56,16 @@ files:
|
|
56
56
|
- lib/ticketmaster-kanbanpad.rb
|
57
57
|
- rakefile
|
58
58
|
- spec/comments_spec.rb
|
59
|
+
- spec/fixtures/projects.json
|
59
60
|
- spec/fixtures/projects.xml
|
61
|
+
- spec/fixtures/projects/be74b643b64e3dc79aa0.json
|
60
62
|
- spec/fixtures/projects/be74b643b64e3dc79aa0.xml
|
61
63
|
- spec/fixtures/projects/create.xml
|
64
|
+
- spec/fixtures/tasks.json
|
62
65
|
- spec/fixtures/tasks.xml
|
66
|
+
- spec/fixtures/tasks/4cd428c496f0734eef000007.json
|
63
67
|
- spec/fixtures/tasks/4cd428c496f0734eef000007.xml
|
68
|
+
- spec/fixtures/tasks/4cd428c496f0734eef000008.json
|
64
69
|
- spec/fixtures/tasks/4cd428c496f0734eef000008.xml
|
65
70
|
- spec/fixtures/tasks/create.xml
|
66
71
|
- spec/projects_spec.rb
|