ticketmaster-kanbanpad 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/LICENSE +22 -0
- data/README.md +39 -0
- data/VERSION +1 -0
- data/lib/kanbanpad/kanbanpad-api.rb +90 -0
- data/lib/provider/comment.rb +14 -0
- data/lib/provider/kanbanpad.rb +14 -0
- data/lib/provider/project.rb +26 -0
- data/lib/provider/ticket.rb +9 -0
- data/lib/ticketmaster-kanbanpad.rb +6 -0
- data/rakefile +45 -0
- data/spec/comments_spec.rb +5 -0
- data/spec/fixtures/projects/be74b643b64e3dc79aa0.xml +11 -0
- data/spec/fixtures/projects/create.xml +1 -0
- data/spec/fixtures/projects.xml +23 -0
- data/spec/fixtures/tasks/4cd428c496f0734eef000007.xml +12 -0
- data/spec/fixtures/tasks/4cd428c496f0734eef000008.xml +11 -0
- data/spec/fixtures/tasks/create.xml +1 -0
- data/spec/fixtures/tasks.xml +23 -0
- data/spec/projects_spec.rb +48 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +16 -0
- data/spec/ticketmaster-kanbanpad_spec.rb +11 -0
- data/spec/tickets_spec.rb +56 -0
- data/ticketmaster-kanbanpad.gemspec +71 -0
- metadata +111 -0
data/.document
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2010 YOU
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
NONE
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# ticketmaster-kanbanpad
|
2
|
+
|
3
|
+
This is the provider for interaction with [kanbanpad](http://www.kanbanpad.com) using [ticketmaster](http://ticketrb.com)
|
4
|
+
|
5
|
+
# Usage
|
6
|
+
|
7
|
+
Initialize the kanbanpad ticketmaster instance using a username and api key:
|
8
|
+
|
9
|
+
kanbanpad = TicketMaster.new(:kanbanpad, :username => 'you', :password => 'api_key')
|
10
|
+
|
11
|
+
|
12
|
+
## Requirements
|
13
|
+
|
14
|
+
* rubygems (obviously)
|
15
|
+
* ticketmaster gem (latest version preferred)
|
16
|
+
* jeweler gem (only if you want to repackage and develop)
|
17
|
+
|
18
|
+
The ticketmaster gem should automatically be installed during the installation of this gem if it is not already installed.
|
19
|
+
|
20
|
+
## Other Notes
|
21
|
+
|
22
|
+
Since this and the ticketmaster gem is still primarily a work-in-progress, minor changes may be incompatible with previous versions. Please be careful about using and updating this gem in production.
|
23
|
+
|
24
|
+
If you see or find any issues, feel free to open up an issue report.
|
25
|
+
|
26
|
+
|
27
|
+
## Note on Patches/Pull Requests
|
28
|
+
|
29
|
+
* Fork the project.
|
30
|
+
* Make your feature addition or bug fix.
|
31
|
+
* Add tests for it. This is important so I don't break it in a
|
32
|
+
future version unintentionally.
|
33
|
+
* Commit, do not mess with rakefile, version, or history.
|
34
|
+
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
35
|
+
* Send me a pull request. Bonus points for topic branches.
|
36
|
+
|
37
|
+
## Copyright
|
38
|
+
|
39
|
+
Copyright (c) 2010 The Hybrid Group. See LICENSE for details.
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
@@ -0,0 +1,90 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'active_support'
|
3
|
+
require 'active_resource'
|
4
|
+
|
5
|
+
# Ruby lib for working with the Kanbanpad API's XML interface.
|
6
|
+
# You should set the authentication using your login
|
7
|
+
# credentials with HTTP Basic Authentication.
|
8
|
+
#
|
9
|
+
# using email and user api key
|
10
|
+
# KanbanpadAPI.authenticate('rick@techno-weenie.net', '70b4b722d55387286b817642289392a64d20b25e')
|
11
|
+
#
|
12
|
+
#
|
13
|
+
# This library is a small wrapper around the REST interface.
|
14
|
+
|
15
|
+
module KanbanpadAPI
|
16
|
+
class Error < StandardError; end
|
17
|
+
class << self
|
18
|
+
|
19
|
+
# Sets up basic authentication credentials for all the resources.
|
20
|
+
def authenticate(email, password)
|
21
|
+
@email = email
|
22
|
+
@password = password
|
23
|
+
self::Base.user = email
|
24
|
+
self::Base.password = password
|
25
|
+
end
|
26
|
+
|
27
|
+
def resources
|
28
|
+
@resources ||= []
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
class Base < ActiveResource::Base
|
33
|
+
self.site = "http://www.kanbanpad.com/api/v1/"
|
34
|
+
def self.inherited(base)
|
35
|
+
KanbanpadAPI.resources << base
|
36
|
+
super
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# Find projects
|
41
|
+
#
|
42
|
+
# KanbanpadAPI::Project.find(:all) # find all projects for the current account.
|
43
|
+
# KanbanpadAPI::Project.find('7e2cad4b3cbe5954950c') # find individual project by slug
|
44
|
+
#
|
45
|
+
#
|
46
|
+
# Finding tickets
|
47
|
+
#
|
48
|
+
# project = KanbanpadAPI::Project.find('7e2cad4b3cbe5954950c')
|
49
|
+
# project.tickets
|
50
|
+
#
|
51
|
+
# Finding finished tickets from project
|
52
|
+
#
|
53
|
+
# KanbanpadAPI::Task.finished('7e2cad4b3cbe5954950c')
|
54
|
+
#
|
55
|
+
|
56
|
+
class Project < Base
|
57
|
+
def tasks(options = {})
|
58
|
+
Task.find(:all, :params => options.update(:project_id => slug))
|
59
|
+
end
|
60
|
+
|
61
|
+
def steps(options = {})
|
62
|
+
Step.find(:all, :params => options.update(:project_id => slug))
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
class Task < Base
|
67
|
+
self.site += 'projects/:project_id/'
|
68
|
+
|
69
|
+
def self.finished(project_id, options = {})
|
70
|
+
find(:all, :params => options.merge(:slug => project_id), :from => :finished)
|
71
|
+
end
|
72
|
+
|
73
|
+
def self.backlog(project_id, options = {})
|
74
|
+
find(:all, :params => options.merge(:slug => project_id), :from => :backlog)
|
75
|
+
end
|
76
|
+
|
77
|
+
def comments
|
78
|
+
self.note
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
class Step < Base
|
83
|
+
self.site += 'projects/:project_id/'
|
84
|
+
|
85
|
+
def tickets(options = {})
|
86
|
+
Task.find(:all, :params => options.merge(prefix_options).update(:q => %{slug:"#{project_id}"}))
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module TicketMaster::Provider
|
2
|
+
module Kanbanpad
|
3
|
+
# The comment class for ticketmaster-kanbanpad
|
4
|
+
#
|
5
|
+
# Do any mapping between Ticketmaster and your system's comment model here
|
6
|
+
# versions of the ticket.
|
7
|
+
#
|
8
|
+
# Not supported by Kanbanpad API
|
9
|
+
class Comment < TicketMaster::Provider::Base::Comment
|
10
|
+
# declare needed overloaded methods here
|
11
|
+
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module TicketMaster::Provider
|
2
|
+
# This is the Kanbanpad Provider for ticketmaster
|
3
|
+
|
4
|
+
module Kanbanpad
|
5
|
+
include TicketMaster::Provider::Base
|
6
|
+
TICKET_API = KanbanpadAPI::Task
|
7
|
+
PROJECT_API = KanbanpadAPI::Project
|
8
|
+
|
9
|
+
# This is for cases when you want to instantiate using TicketMaster::Provider::Kanbanpad.new(auth)
|
10
|
+
def self.new(auth = {})
|
11
|
+
TicketMaster.new(:kanbanpad, auth)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module TicketMaster::Provider
|
2
|
+
module Kanbanpad
|
3
|
+
# Project class for ticketmaster-kanbanpad
|
4
|
+
#
|
5
|
+
#
|
6
|
+
class Project < TicketMaster::Provider::Base::Project
|
7
|
+
# declare needed overloaded methods here
|
8
|
+
API = KanbanpadAPI::Project
|
9
|
+
|
10
|
+
alias_method :tasks, :tickets
|
11
|
+
alias_method :task, :ticket
|
12
|
+
|
13
|
+
# copy from this.copy(that) copies that into this
|
14
|
+
def copy(project)
|
15
|
+
project.tickets.each do |ticket|
|
16
|
+
copy_ticket = self.ticket!(:title => ticket.title, :description => ticket.description)
|
17
|
+
ticket.comments.each do |comment|
|
18
|
+
copy_ticket.comment!(:body => comment.body)
|
19
|
+
sleep 1
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/rakefile
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "ticketmaster-kanbanpad"
|
8
|
+
gem.summary = %Q{Ticketmaster Provider for Kanbanpad}
|
9
|
+
gem.description = %Q{Allows ticketmaster to interact with kanbanpad.}
|
10
|
+
gem.email = "sonia@hybridgroup.com"
|
11
|
+
gem.homepage = "http://github.com/hybridgroup/ticketmaster-kanbanpad"
|
12
|
+
gem.authors = ["HybridGroup"]
|
13
|
+
gem.add_development_dependency "rspec", ">= 1.2.9"
|
14
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
15
|
+
end
|
16
|
+
Jeweler::GemcutterTasks.new
|
17
|
+
rescue LoadError
|
18
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
19
|
+
end
|
20
|
+
|
21
|
+
require 'spec/rake/spectask'
|
22
|
+
Spec::Rake::SpecTask.new(:spec) do |spec|
|
23
|
+
spec.libs << 'lib' << 'spec'
|
24
|
+
spec.spec_files = FileList['spec/**/*_spec.rb']
|
25
|
+
end
|
26
|
+
|
27
|
+
Spec::Rake::SpecTask.new(:rcov) do |spec|
|
28
|
+
spec.libs << 'lib' << 'spec'
|
29
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
30
|
+
spec.rcov = true
|
31
|
+
end
|
32
|
+
|
33
|
+
task :spec => :check_dependencies
|
34
|
+
|
35
|
+
task :default => :spec
|
36
|
+
|
37
|
+
require 'rake/rdoctask'
|
38
|
+
Rake::RDocTask.new do |rdoc|
|
39
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
40
|
+
|
41
|
+
rdoc.rdoc_dir = 'rdoc'
|
42
|
+
rdoc.title = "ticketmaster-kanbanpad #{version}"
|
43
|
+
rdoc.rdoc_files.include('README*')
|
44
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
45
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project>
|
3
|
+
<email>cris@g.com</email>
|
4
|
+
<id>be74b643b64e3dc79aa0</id>
|
5
|
+
<slug>be74b643b64e3dc79aa0</slug>
|
6
|
+
<name>Untitled</name>
|
7
|
+
<wip_limit>10</wip_limit>
|
8
|
+
<organization_id></organization_id>
|
9
|
+
<collaborator_ids></collaborator_ids>
|
10
|
+
<privacy>0</privacy>
|
11
|
+
</project>
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<projects type="array">
|
3
|
+
<project>
|
4
|
+
<email>sonia@g.com</email>
|
5
|
+
<id>7e2cad4b3cbe5954950c</id>
|
6
|
+
<slug>7e2cad4b3cbe5954950c</slug>
|
7
|
+
<name>project1</name>
|
8
|
+
<wip_limit>10</wip_limit>
|
9
|
+
<organization_id>4cd428da96f0734eef000008</organization_id>
|
10
|
+
<collaborator_ids>4cd428da96f0734eef000009</collaborator_ids>
|
11
|
+
<privacy>0</privacy>
|
12
|
+
</project>
|
13
|
+
<project>
|
14
|
+
<email>jhon@g.com</email>
|
15
|
+
<id>be74b643b64e3dc79aa0</id>
|
16
|
+
<slug>be74b643b64e3dc79aa0</slug>
|
17
|
+
<name>project2</name>
|
18
|
+
<wip_limit>10</wip_limit>
|
19
|
+
<organization_id>4cd428da96f0734eef000008</organization_id>
|
20
|
+
<collaborator_ids>4cd428da96f0734eef000009</collaborator_ids>
|
21
|
+
<privacy>0</privacy>
|
22
|
+
</project>
|
23
|
+
</projects>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<task>
|
3
|
+
<id>4cd428c496f0734eef000007</id>
|
4
|
+
<title>Fix UI detail</title>
|
5
|
+
<assigned_to>jhon</assigned_to>
|
6
|
+
<note>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</note>
|
7
|
+
<wip type="boolean">false</wip>
|
8
|
+
<project_slug>be74b643b64e3dc79aa0</project_slug>
|
9
|
+
<project_id>be74b643b64e3dc79aa0</project_id>
|
10
|
+
<backlog>false</backlog>
|
11
|
+
<finished>false</finished>
|
12
|
+
</task>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<task>
|
3
|
+
<id>4cd428c496f0734eef000008</id>
|
4
|
+
<title>Fix bug</title>
|
5
|
+
<assigned_to>chris</assigned_to>
|
6
|
+
<note></note>
|
7
|
+
<wip type="boolean">false</wip>
|
8
|
+
<project_slug>be74b643b64e3dc79aa0</project_slug>
|
9
|
+
<backlog>false</backlog>
|
10
|
+
<finished>true</finished>
|
11
|
+
</task>
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<tasks type="array">
|
3
|
+
<task>
|
4
|
+
<id>4cd428c496f0734eef000007</id>
|
5
|
+
<title>Configure app</title>
|
6
|
+
<assigned_to>jhon</assigned_to>
|
7
|
+
<note></note>
|
8
|
+
<wip type="boolean">false</wip>
|
9
|
+
<project_slug>7e2cad4b3cbe5954950c</project_slug>
|
10
|
+
<backlog>false</backlog>
|
11
|
+
<finished>false</finished>
|
12
|
+
</task>
|
13
|
+
<task>
|
14
|
+
<id>4cd428c496f0734eef000008</id>
|
15
|
+
<title>Fix issue</title>
|
16
|
+
<assigned_to>james</assigned_to>
|
17
|
+
<note></note>
|
18
|
+
<wip type="boolean">false</wip>
|
19
|
+
<project_slug>7e2cad4b3cbe5954950c</project_slug>
|
20
|
+
<backlog>false</backlog>
|
21
|
+
<finished>true</finished>
|
22
|
+
</task>
|
23
|
+
</tasks>
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
describe "Ticketmaster::Provider::Kanbanpad::Project" do
|
4
|
+
before(:all) do
|
5
|
+
headers = {}
|
6
|
+
@project_id = 'be74b643b64e3dc79aa0'
|
7
|
+
ActiveResource::HttpMock.respond_to do |mock|
|
8
|
+
mock.get '/api/v1/projects.xml', headers, fixture_for('projects'), 200
|
9
|
+
mock.get '/api/v1/projects/be74b643b64e3dc79aa0.xml', headers, fixture_for('projects/be74b643b64e3dc79aa0'), 200
|
10
|
+
#mock.get '/api/v1/projects/create.xml', headers, fixture_for('projects/create'), 200
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
before(:each) do
|
15
|
+
@ticketmaster = TicketMaster.new(:kanbanpad, {})
|
16
|
+
@klass = TicketMaster::Provider::Kanbanpad::Project
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should be able to load all projects" do
|
20
|
+
@ticketmaster.projects.should be_an_instance_of(Array)
|
21
|
+
@ticketmaster.projects.first.should be_an_instance_of(@klass)
|
22
|
+
end
|
23
|
+
|
24
|
+
it "should be able to load projects from an array of ids" do
|
25
|
+
@projects = @ticketmaster.projects([@project_id])
|
26
|
+
@projects.should be_an_instance_of(Array)
|
27
|
+
@projects.first.should be_an_instance_of(@klass)
|
28
|
+
@projects.first.slug.should == @project_id
|
29
|
+
end
|
30
|
+
|
31
|
+
it "should be able to load all projects from attributes" do
|
32
|
+
@projects = @ticketmaster.projects(:slug => @project_id)
|
33
|
+
@projects.should be_an_instance_of(Array)
|
34
|
+
@projects.first.should be_an_instance_of(@klass)
|
35
|
+
@projects.first.slug.should == @project_id
|
36
|
+
end
|
37
|
+
|
38
|
+
it "should be able to find a project" do
|
39
|
+
@ticketmaster.project.should == @klass
|
40
|
+
@ticketmaster.project.find(@project_id).should be_an_instance_of(@klass)
|
41
|
+
end
|
42
|
+
|
43
|
+
it "should be able to find a project by slug" do
|
44
|
+
@ticketmaster.project(@project_id).should be_an_instance_of(@klass)
|
45
|
+
@ticketmaster.project(@project_id).slug.should == @project_id
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
data/spec/spec.opts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
3
|
+
require 'rubygems'
|
4
|
+
require 'ticketmaster'
|
5
|
+
require 'ticketmaster-kanbanpad'
|
6
|
+
require 'spec'
|
7
|
+
require 'spec/autorun'
|
8
|
+
|
9
|
+
Spec::Runner.configure do |config|
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
def fixture_for(name)
|
14
|
+
File.read(File.dirname(__FILE__) + '/fixtures/' + name + '.xml')
|
15
|
+
end
|
16
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
describe "Ticketmaster::Provider::Kanbanpad" do
|
4
|
+
|
5
|
+
it "should be able to instantiate a new instance" do
|
6
|
+
#@ticketmaster = TicketMaster.new(:kanbanpad, {:account => 'ticketmaster', :token => '000000'})
|
7
|
+
#@ticketmaster.should be_an_instance_of(TicketMaster)
|
8
|
+
#@ticketmaster.should be_a_kind_of(TicketMaster::Provider::Kanbanpad)
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
describe "Ticketmaster::Provider::Kanbanpad::Ticket" do
|
4
|
+
before(:all) do
|
5
|
+
headers = {}
|
6
|
+
ActiveResource::HttpMock.respond_to do |mock|
|
7
|
+
mock.get '/api/v1/projects/be74b643b64e3dc79aa0.xml', headers, fixture_for('projects/be74b643b64e3dc79aa0'), 200
|
8
|
+
mock.get '/api/v1/projects/be74b643b64e3dc79aa0/tasks.xml', headers, fixture_for('tasks'), 200
|
9
|
+
mock.get '/api/v1/projects/be74b643b64e3dc79aa0/tasks/4cd428c496f0734eef000007.xml', headers, fixture_for('tasks/4cd428c496f0734eef000007'), 200
|
10
|
+
end
|
11
|
+
@project_id = 'be74b643b64e3dc79aa0'
|
12
|
+
@ticket_id = '4cd428c496f0734eef000007'
|
13
|
+
end
|
14
|
+
|
15
|
+
before(:each) do
|
16
|
+
@ticketmaster = TicketMaster.new(:kanbanpad, {})
|
17
|
+
@project = @ticketmaster.project(@project_id)
|
18
|
+
@klass = TicketMaster::Provider::Kanbanpad::Ticket
|
19
|
+
@comment_klass = TicketMaster::Provider::Kanbanpad::Comment
|
20
|
+
end
|
21
|
+
|
22
|
+
it "should be able to load all tickets" do
|
23
|
+
@project.tickets.should be_an_instance_of(Array)
|
24
|
+
@project.tickets.first.should be_an_instance_of(@klass)
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should be able to load all tickets based on an array of ids" do
|
28
|
+
@tickets = @project.tickets([@ticket_id])
|
29
|
+
@tickets.should be_an_instance_of(Array)
|
30
|
+
@tickets.first.should be_an_instance_of(@klass)
|
31
|
+
@tickets.first.id.should == @ticket_id
|
32
|
+
end
|
33
|
+
|
34
|
+
it "should be able to load all tickets based on attributes" do
|
35
|
+
@tickets = @project.tickets(:id => @ticket_id)
|
36
|
+
@tickets.should be_an_instance_of(Array)
|
37
|
+
@tickets.first.should be_an_instance_of(@klass)
|
38
|
+
@tickets.first.id.should == @ticket_id
|
39
|
+
end
|
40
|
+
|
41
|
+
it "should return the ticket class" do
|
42
|
+
@project.ticket.should == @klass
|
43
|
+
end
|
44
|
+
|
45
|
+
it "should be able to load a single ticket" do
|
46
|
+
@ticket = @project.ticket(@ticket_id)
|
47
|
+
@ticket.should be_an_instance_of(@klass)
|
48
|
+
@ticket.id.should == @ticket_id
|
49
|
+
end
|
50
|
+
|
51
|
+
it "should be able to load a single ticket based on attributes" do
|
52
|
+
@ticket = @project.ticket(:id => @ticket_id)
|
53
|
+
@ticket.should be_an_instance_of(@klass)
|
54
|
+
@ticket.id.should == @ticket_id
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{ticketmaster-kanbanpad}
|
8
|
+
s.version = "0.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["HybridGroup"]
|
12
|
+
s.date = %q{2010-11-23}
|
13
|
+
s.description = %q{Allows ticketmaster to interact with kanbanpad.}
|
14
|
+
s.email = %q{sonia@hybridgroup.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.md"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
"LICENSE",
|
22
|
+
"README.md",
|
23
|
+
"VERSION",
|
24
|
+
"lib/kanbanpad/kanbanpad-api.rb",
|
25
|
+
"lib/provider/comment.rb",
|
26
|
+
"lib/provider/kanbanpad.rb",
|
27
|
+
"lib/provider/project.rb",
|
28
|
+
"lib/provider/ticket.rb",
|
29
|
+
"lib/ticketmaster-kanbanpad.rb",
|
30
|
+
"rakefile",
|
31
|
+
"spec/comments_spec.rb",
|
32
|
+
"spec/fixtures/projects.xml",
|
33
|
+
"spec/fixtures/projects/be74b643b64e3dc79aa0.xml",
|
34
|
+
"spec/fixtures/projects/create.xml",
|
35
|
+
"spec/fixtures/tasks.xml",
|
36
|
+
"spec/fixtures/tasks/4cd428c496f0734eef000007.xml",
|
37
|
+
"spec/fixtures/tasks/4cd428c496f0734eef000008.xml",
|
38
|
+
"spec/fixtures/tasks/create.xml",
|
39
|
+
"spec/projects_spec.rb",
|
40
|
+
"spec/spec.opts",
|
41
|
+
"spec/spec_helper.rb",
|
42
|
+
"spec/ticketmaster-kanbanpad_spec.rb",
|
43
|
+
"spec/tickets_spec.rb",
|
44
|
+
"ticketmaster-kanbanpad.gemspec"
|
45
|
+
]
|
46
|
+
s.homepage = %q{http://github.com/hybridgroup/ticketmaster-kanbanpad}
|
47
|
+
s.require_paths = ["lib"]
|
48
|
+
s.rubygems_version = %q{1.3.7}
|
49
|
+
s.summary = %q{Ticketmaster Provider for Kanbanpad}
|
50
|
+
s.test_files = [
|
51
|
+
"spec/comments_spec.rb",
|
52
|
+
"spec/projects_spec.rb",
|
53
|
+
"spec/spec_helper.rb",
|
54
|
+
"spec/ticketmaster-kanbanpad_spec.rb",
|
55
|
+
"spec/tickets_spec.rb"
|
56
|
+
]
|
57
|
+
|
58
|
+
if s.respond_to? :specification_version then
|
59
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
60
|
+
s.specification_version = 3
|
61
|
+
|
62
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
63
|
+
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
64
|
+
else
|
65
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
66
|
+
end
|
67
|
+
else
|
68
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
metadata
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ticketmaster-kanbanpad
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- HybridGroup
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2010-11-23 00:00:00 -05:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: rspec
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 13
|
30
|
+
segments:
|
31
|
+
- 1
|
32
|
+
- 2
|
33
|
+
- 9
|
34
|
+
version: 1.2.9
|
35
|
+
type: :development
|
36
|
+
version_requirements: *id001
|
37
|
+
description: Allows ticketmaster to interact with kanbanpad.
|
38
|
+
email: sonia@hybridgroup.com
|
39
|
+
executables: []
|
40
|
+
|
41
|
+
extensions: []
|
42
|
+
|
43
|
+
extra_rdoc_files:
|
44
|
+
- LICENSE
|
45
|
+
- README.md
|
46
|
+
files:
|
47
|
+
- .document
|
48
|
+
- LICENSE
|
49
|
+
- README.md
|
50
|
+
- VERSION
|
51
|
+
- lib/kanbanpad/kanbanpad-api.rb
|
52
|
+
- lib/provider/comment.rb
|
53
|
+
- lib/provider/kanbanpad.rb
|
54
|
+
- lib/provider/project.rb
|
55
|
+
- lib/provider/ticket.rb
|
56
|
+
- lib/ticketmaster-kanbanpad.rb
|
57
|
+
- rakefile
|
58
|
+
- spec/comments_spec.rb
|
59
|
+
- spec/fixtures/projects.xml
|
60
|
+
- spec/fixtures/projects/be74b643b64e3dc79aa0.xml
|
61
|
+
- spec/fixtures/projects/create.xml
|
62
|
+
- spec/fixtures/tasks.xml
|
63
|
+
- spec/fixtures/tasks/4cd428c496f0734eef000007.xml
|
64
|
+
- spec/fixtures/tasks/4cd428c496f0734eef000008.xml
|
65
|
+
- spec/fixtures/tasks/create.xml
|
66
|
+
- spec/projects_spec.rb
|
67
|
+
- spec/spec.opts
|
68
|
+
- spec/spec_helper.rb
|
69
|
+
- spec/ticketmaster-kanbanpad_spec.rb
|
70
|
+
- spec/tickets_spec.rb
|
71
|
+
- ticketmaster-kanbanpad.gemspec
|
72
|
+
has_rdoc: true
|
73
|
+
homepage: http://github.com/hybridgroup/ticketmaster-kanbanpad
|
74
|
+
licenses: []
|
75
|
+
|
76
|
+
post_install_message:
|
77
|
+
rdoc_options: []
|
78
|
+
|
79
|
+
require_paths:
|
80
|
+
- lib
|
81
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
hash: 3
|
87
|
+
segments:
|
88
|
+
- 0
|
89
|
+
version: "0"
|
90
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
hash: 3
|
96
|
+
segments:
|
97
|
+
- 0
|
98
|
+
version: "0"
|
99
|
+
requirements: []
|
100
|
+
|
101
|
+
rubyforge_project:
|
102
|
+
rubygems_version: 1.3.7
|
103
|
+
signing_key:
|
104
|
+
specification_version: 3
|
105
|
+
summary: Ticketmaster Provider for Kanbanpad
|
106
|
+
test_files:
|
107
|
+
- spec/comments_spec.rb
|
108
|
+
- spec/projects_spec.rb
|
109
|
+
- spec/spec_helper.rb
|
110
|
+
- spec/ticketmaster-kanbanpad_spec.rb
|
111
|
+
- spec/tickets_spec.rb
|