Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed references in code to ticketmaster and renamed file names to …
…taskmapper
- Loading branch information
Showing
46 changed files
with
213 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,27 @@ | |||
This command is used to configure taskmapper settings for use in your terminal. | |||
|
|||
By default, taskmapper searches for the config information in a file named 'taskmapper.yml' in the current directory. Next it searches for 'config/taskmapper.yml' and if that fails, it uses the home directory's ~/.taskmapper.yml (note the . in front on this one). There is also the TASKMAPPER environment variable that you can set to point to another configuration file anywhere if necessary. | |||
|
|||
This command helps facilitate the creation of a taskmapper.yml. | |||
|
|||
Warning: Due to the way the authentication is parsed, if any keys or values contain a comma (,) or colin (:), it can not be parsed through the -A command. Usually this isn't a problem, and if it is, it can be resolved though putting the values in a config file. | |||
|
|||
Example: | |||
tm -c ~/.taskmapper.yml -p dummy -A username:cheese,password:cakes -P 555 config --add | |||
tm -p dummy config --set-default-provider | |||
|
|||
The format for taskmapper.yml is: | |||
default: <default provider> | |||
<provider name>: | |||
authentication: | |||
<authentication information> | |||
project: <project> | |||
[...] | |||
|
|||
For example, a taskmapper.yml with the Dummy provider would look something like this: | |||
default: dummy | |||
dummy: | |||
authentication: | |||
username: name | |||
password: doesnt-matter | |||
project: 555 |
6 changes: 3 additions & 3 deletions
6
lib/ticketmaster/cli/commands/help/console → lib/taskmapper/cli/commands/help/console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,160 @@ | |||
$LOAD_PATH.unshift(File.dirname(__FILE__)) | |||
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) | |||
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') | |||
require 'rubygems' | |||
require 'ticketmaster' | |||
|
|||
describe "TaskMapper Exception Messages" do | |||
let(:exception) { TaskMapper::Exception } | |||
let(:tm) { TaskMapper.new(:tester, {}) } | |||
let(:validation_error) { "TaskMapper::Provider::Base::valid? method must be implemented by the provider" } | |||
let(:easy_finder_error) { "TaskMapper::Provider::Helper::easy_finder method must be implemented by the provider" } | |||
|
|||
describe TaskMapper::Provider::Base do | |||
context "when calling #valid? method" do | |||
subject { lambda { tm.valid? } } | |||
it { should raise_error(exception, validation_error) } | |||
end | |||
end | |||
|
|||
describe TaskMapper::Provider::Helper do | |||
context "when calling #easy_finder" do | |||
subject { lambda { tm.easy_finder(1, :test, {}) } } | |||
it { should raise_error(exception, easy_finder_error) } | |||
end | |||
end | |||
|
|||
describe TaskMapper::Provider::Tester::Project do | |||
let(:find_by_id_error) { "TaskMapper::Provider::Tester::Project::find_by_id method must be implemented by the provider" } | |||
let(:find_by_attributes_error) { "TaskMapper::Provider::Tester::Project::find_by_attributes method must be implemented by the provider" } | |||
let(:search_error) { "TaskMapper::Provider::Tester::Project::search method must be implemented by the provider"} | |||
let(:create_error) { "TaskMapper::Provider::Tester::Project::create method must be implemented by the provider"} | |||
let(:save_error) { "TaskMapper::Provider::Tester::Project::save method must be implemented by the provider"} | |||
let(:destroy_error) { "TaskMapper::Provider::Tester::Project::destroy method must be implemented by the provider" } | |||
|
|||
context "when calling #find_by_id" do | |||
subject { lambda { tm.project([1]) } } | |||
it { should raise_error(exception, find_by_id_error) } | |||
end | |||
|
|||
context "when calling #find_by_attributes" do | |||
subject { lambda { tm.project.find :all, :name => 'Test Project' } } | |||
it { should raise_error(exception, find_by_attributes_error) } | |||
end | |||
|
|||
context "when calling #search" do | |||
subject { lambda { tm.project.search :tag => 'testing' } } | |||
it { should raise_error(exception, search_error) } | |||
end | |||
|
|||
context "when calling #create" do | |||
subject { lambda { tm.project.create :name => 'Foo Bar' } } | |||
it { should raise_error(exception, create_error) } | |||
end | |||
|
|||
context "when calling #save" do | |||
subject { lambda { tm.project.save } } | |||
pending { should raise_error(exception, save_error) } | |||
end | |||
|
|||
context "when calling #destroy" do | |||
let(:project) { TaskMapper::Provider::Tester::Project.new } | |||
subject { lambda { project.destroy } } | |||
it { should raise_error(exception, destroy_error) } | |||
end | |||
end | |||
|
|||
describe TaskMapper::Provider::Tester::Ticket do | |||
let(:ticket) { TaskMapper::Provider::Tester::Ticket.new(1) } | |||
let(:find_by_id_error) { "TaskMapper::Provider::Tester::Ticket::find_by_id method must be implemented by the provider" } | |||
let(:find_by_attributes_error) { "TaskMapper::Provider::Tester::Ticket::find_by_attributes method must be implemented by the provider" } | |||
let(:search_error) { "TaskMapper::Provider::Tester::Ticket::search method must be implemented by the provider" } | |||
let(:create_error) { "TaskMapper::Provider::Tester::Ticket::create method must be implemented by the provider" } | |||
let(:save_error) { "TaskMapper::Provider::Tester::Ticket::save method must be implemented by the provider" } | |||
let(:destroy_error) { "TaskMapper::Provider::Tester::Ticket::destroy method must be implemented by the provider" } | |||
let(:close_error) { "TaskMapper::Provider::Tester::Ticket::close method must be implemented by the provider" } | |||
let(:reload_error) { "TaskMapper::Provider::Tester::Ticket::reload! method must be implemented by the provider" } | |||
|
|||
context "when #find_by_id" do | |||
subject { lambda { tm.tickets(:id => 22) } } | |||
it { should raise_error(exception, find_by_id_error) } | |||
end | |||
|
|||
context "when #find_by_attributes" do | |||
subject { lambda { tm.ticket.find(1, :all, :title => 'Test ticket') } } | |||
it { should raise_error(exception, find_by_attributes_error) } | |||
end | |||
|
|||
context "when #search" do | |||
subject { lambda { tm.ticket.search :tag => 'testing' } } | |||
it { should raise_error(exception, search_error) } | |||
end | |||
|
|||
context "when #create" do | |||
subject { lambda { tm.ticket.create :name => 'Foo Bar' } } | |||
it { should raise_error(exception, create_error) } | |||
end | |||
|
|||
context "when #save" do | |||
subject { lambda { ticket.save } } | |||
it { should raise_error(exception, save_error) } | |||
end | |||
|
|||
context "when #destroy" do | |||
subject { lambda { ticket.destroy } } | |||
it { should raise_error(exception, destroy_error) } | |||
end | |||
|
|||
context "when #close" do | |||
subject { lambda { ticket.close } } | |||
it { should raise_error(exception, close_error) } | |||
end | |||
|
|||
context "when #reload!" do | |||
subject { lambda { ticket.reload! } } | |||
it { should raise_error(exception, reload_error) } | |||
end | |||
end | |||
|
|||
describe TaskMapper::Provider::Tester::Comment do | |||
let(:ticket_with_comments) { TaskMapper::Provider::Tester::Ticket.new(1) } | |||
let(:comment) { TaskMapper::Provider::Tester::Comment.new(1, 1) } | |||
let(:find_by_id_error) { "TaskMapper::Provider::Tester::Comment::find_by_id method must be implemented by the provider" } | |||
let(:find_by_attributes_error) { "TaskMapper::Provider::Tester::Comment::find_by_attributes method must be implemented by the provider" } | |||
let(:search_error) { "TaskMapper::Provider::Tester::Comment::search method must be implemented by the provider" } | |||
let(:create_error) { "TaskMapper::Provider::Tester::Comment::create method must be implemented by the provider" } | |||
let(:save_error) { "TaskMapper::Provider::Tester::Comment::save method must be implemented by the provider" } | |||
let(:destroy_error) { "TaskMapper::Provider::Tester::Comment::destroy method must be implemented by the provider" } | |||
|
|||
context "when #find_by_id" do | |||
subject { lambda { ticket_with_comments.comment.find(1,1,[1,2]) } } | |||
it { should raise_error(exception, find_by_id_error) } | |||
end | |||
|
|||
context "when #find_by_attributes" do | |||
subject { lambda { ticket_with_comments.comment.find(1, 1, :all, :tag => 'tag') } } | |||
it { should raise_error(exception, find_by_attributes_error) } | |||
end | |||
|
|||
context "when #search" do | |||
subject { lambda { ticket_with_comments.comment.search(1, 1, :tag => 'testing') } } | |||
it { should raise_error(exception, search_error) } | |||
end | |||
|
|||
context "when #create" do | |||
subject { lambda { ticket_with_comments.comment.create :name => 'Foo Bar' } } | |||
it { should raise_error(exception, create_error) } | |||
end | |||
|
|||
context "when #save" do | |||
subject { lambda { comment.save } } | |||
it { should raise_error(exception, save_error) } | |||
end | |||
|
|||
context "when #destroy" do | |||
subject { lambda { comment.destroy } } | |||
it { should raise_error(exception, destroy_error) } | |||
end | |||
end | |||
end | |||
|
File renamed without changes.