Permalink
Browse files

more renaming modifications

  • Loading branch information...
1 parent bdb8e31 commit ccc70e85e98a238c6d3d496fcbeab1fe1fa78412 @cored cored committed May 9, 2012
View
202 README.md

Large diffs are not rendered by default.

Oops, something went wrong.
View
4 bin/tm
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
-# The 'ticketmaster' gem was installed using rubygems
-# This file is the CLI application to use with 'ticketmaster'
+# The 'taskmapper' gem was installed using rubygems
+# This file is the CLI application to use with 'taskmapper'
require File.dirname(__FILE__) + '/../lib/taskmapper/cli/init.rb'
View
@@ -18,7 +18,7 @@ class TaskMapper
exception
dummy/dummy.rb
tester/tester.rb
-}.each {|lib| require File.dirname(__FILE__) + '/ticketmaster/' + lib }
+}.each {|lib| require File.dirname(__FILE__) + '/taskmapper/' + lib }
# This is the TaskMapper class
@@ -29,7 +29,7 @@ class TaskMapper
# This initializes the TaskMapper instance and prepares the provider
# If called without any arguments, it conveniently tries searching for the information in
- # ~/.ticketmaster.yml
+ # ~/.taskmapper.yml
# See the documentation for more information on the format of that file.
#
# What it DOES NOT do is auto-require the provider...so make sure you have the providers required.
@@ -8,11 +8,11 @@ def config(options)
opts.separator ''
opts.separator 'Options:'
- opts.on('-a', '--add', 'Add a new entry to the configuration file based on ticketmaster options.') do
+ opts.on('-a', '--add', 'Add a new entry to the configuration file based on taskmapper options.') do
options[:subcommand] = 'add'
end
- opts.on('-e', '--edit', 'Edit an existing entry to the configuration file based on ticketmaster options') do
+ opts.on('-e', '--edit', 'Edit an existing entry to the configuration file based on taskmapper options') do
options[:subcommand] = 'edit'
end
@@ -5,21 +5,21 @@ def console(options)
# the actual method to do the irb opening
def open_irb(options, argv)
- tm_lib = File.dirname(__FILE__) + '/../../../ticketmaster.rb'
+ tm_lib = File.dirname(__FILE__) + '/../../../taskmapper.rb'
irb_name = RUBY_PLATFORM =~ /mswin32/ ? 'irb.bat' : 'irb'
requires = "-r rubygems -r #{tm_lib} "
cmd = ''
if File.exist?(config = File.expand_path(options[:config]))
- ENV['TICKETMASTER_CONFIG']=config
+ ENV['TASKMAPPER_CONFIG']=config
end
providers = !options[:provider].nil? ? [options[:provider]] : YAML.load_file(config).keys
providers.delete 'default'
require 'rubygems'
- require 'ticketmaster'
+ require 'taskmapper'
providers.inject(requires) do |mem, p|
begin
- require "ticketmaster-#{p}"
- requires << "-r ticketmaster-#{p} "
+ require "taskmapper-#{p}"
+ requires << "-r taskmapper-#{p} "
rescue Exception => exception
#puts exception
begin
@@ -9,7 +9,7 @@ def generate(options)
options[:provider_dir] = options[:provider]
else
options[:provider] = provider_name
- options[:provider_dir] = 'ticketmaster-' + options[:provider]
+ options[:provider_dir] = 'taskmapper-' + options[:provider]
end
end
options[:mkdir] = true
@@ -37,7 +37,7 @@ def generate(options)
exit
end
opts.separator ''
- opts.separator 'NOTE: ticketmaster- will be prepended to your provider name'
+ opts.separator 'NOTE: taskmapper- will be prepended to your provider name'
opts.separator 'unless you set the first character as _ (it will be removed)'
end.order!
rescue OptionParser::MissingArgument => exception
@@ -1,8 +1,8 @@
module TaskMapper::Provider
module Yoursystem
- # The comment class for ticketmaster-yoursystem
+ # The comment class for taskmapper-yoursystem
#
- # Do any mapping between Ticketmaster and your system's comment model here
+ # Do any mapping between TaskMapper and your system's comment model here
# versions of the ticket.
#
class Comment < TaskMapper::Provider::Base::Comment
@@ -1,6 +1,6 @@
module TaskMapper::Provider
module Yoursystem
- # Project class for ticketmaster-yoursystem
+ # Project class for taskmapper-yoursystem
#
#
class Project < TaskMapper::Provider::Base::Project
@@ -1,5 +1,5 @@
module TaskMapper::Provider
- # This is the Yoursystem Provider for ticketmaster
+ # This is the Yoursystem Provider for taskmapper
module Yoursystem
include TaskMapper::Provider::Base
#TICKET_API = Yoursystem::Ticket # The class to access the api's tickets
@@ -1,6 +1,6 @@
module TaskMapper::Provider
module Yoursystem
- # Ticket class for ticketmaster-yoursystem
+ # Ticket class for taskmapper-yoursystem
#
class Ticket < TaskMapper::Provider::Base::Ticket
@@ -63,8 +63,8 @@ def project(options)
end
parse_config!(options)
begin
- require 'ticketmaster'
- require "ticketmaster-#{options[:provider]}"
+ require 'taskmapper'
+ require "taskmapper-#{options[:provider]}"
rescue
require options[:provider]
end
@@ -74,23 +74,23 @@ def project(options)
# The create subcommand
def create(options)
- tm = TicketMaster.new(options[:provider], options[:authentication])
+ tm = TaskMapper.new(options[:provider], options[:authentication])
project = tm.project.create(options[:project_attributes])
read_project project
exit
end
# The read subcommand
def read(options)
- tm = TicketMaster.new(options[:provider], options[:authentication])
+ tm = TaskMapper.new(options[:provider], options[:authentication])
project = tm.project.find(options[:project])
read_project project
exit
end
# The update subcommand
def update(options)
- tm = TicketMaster.new(options[:provider], options[:authentication])
+ tm = TaskMapper.new(options[:provider], options[:authentication])
project = tm.project.find(options[:project])
if project.update!(options[:project_attributes])
puts "Successfully updated Project #{project.name} (#{project.id})"
@@ -103,7 +103,7 @@ def update(options)
# The destroy subcommand.
def destroy(options)
- tm = TicketMaster.new(options[:provider], options[:authentication])
+ tm = TaskMapper.new(options[:provider], options[:authentication])
project = tm.project.find(options[:project])
puts "Are you sure you want to delete Project #{project.name} (#{project.id})? (yes/no) [no]"
ARGV.clear
@@ -121,7 +121,7 @@ def destroy(options)
# The search and list subcommands
def search(options)
- tm = TicketMaster.new(options[:provider], options[:authentication])
+ tm = TaskMapper.new(options[:provider], options[:authentication])
projects = tm.projects(options[:project_attributes])
puts "Found #{projects.length} projects"
projects.each_with_index do |project, index|
@@ -64,8 +64,8 @@ def ticket(options)
end
parse_config!(options)
begin
- require 'ticketmaster'
- require "ticketmaster-#{options[:provider]}"
+ require 'taskmapper'
+ require "taskmapper-#{options[:provider]}"
rescue
require options[:provider]
end
@@ -75,15 +75,15 @@ def ticket(options)
# The create subcommand
def create(options)
- tm = TicketMaster.new(options[:provider], options[:authentication])
+ tm = TaskMapper.new(options[:provider], options[:authentication])
ticket = tm.ticket.create(options[:ticket_attributes].merge({:project_id => options[:project]}))
read_ticket ticket
exit
end
# The read subcommand
def read(options)
- tm = TicketMaster.new(options[:provider], options[:authentication])
+ tm = TaskMapper.new(options[:provider], options[:authentication])
project = tm.project(options[:project])
ticket = project.ticket(options[:ticket])
read_ticket ticket
@@ -92,7 +92,7 @@ def read(options)
# The update subcommand
def update(options)
- tm = TicketMaster.new(options[:provider], options[:authentication])
+ tm = TaskMapper.new(options[:provider], options[:authentication])
project = tm.project(options[:project])
ticket = project.ticket(options[:ticket])
if ticket.update!(options[:ticket_attributes])
@@ -106,7 +106,7 @@ def update(options)
# The destroy subcommand.
def destroy(options)
- tm = TicketMaster.new(options[:provider], options[:authentication])
+ tm = TaskMapper.new(options[:provider], options[:authentication])
project = tm.project(options[:project])
ticket = project.ticket(options[:ticket])
puts "Are you sure you want to delete Ticket #{ticket.title} (#{ticket.id})? (yes/no) [no]"
@@ -125,7 +125,7 @@ def destroy(options)
# The search and list subcommands
def search(options)
- tm = TicketMaster.new(options[:provider], options[:authentication])
+ tm = TaskMapper.new(options[:provider], options[:authentication])
project = tm.project(options[:project])
tickets = project.tickets(options[:ticket_attributes])
puts "Found #{tickets.length} tickets"
View
@@ -6,8 +6,8 @@
commands ={ 'help' => 'Get the help text for a particular command',
- 'console' => 'Open up a ticketmaster console session',
- 'config' => 'Setup and configure a ticketmaster.yml file',
+ 'console' => 'Open up a taskmapper console session',
+ 'config' => 'Setup and configure a taskmapper.yml file',
'ticket' => 'Work with tickets (create, edit, delete, etc)',
'project' => 'Work with projects (create, edit, delete, etc)',
'generate' => 'Generate skeleton library files for a new provider',
@@ -25,11 +25,11 @@
options = {:original_argv => ARGV.dup}
-if File.exist?(options[:config] = File.expand_path('ticketmaster.yml'))
-elsif File.exist?(options[:config] = File.expand_path('config/ticketmaster.yml'))
-elsif ENV['TICKETMASTER_CONFIG'] and File.exist?(options[:config] = File.expand_path(ENV['TICKETMASTER_CONFIG']))
+if File.exist?(options[:config] = File.expand_path('taskmapper.yml'))
+elsif File.exist?(options[:config] = File.expand_path('config/taskmapper.yml'))
+elsif ENV['TASKMAPPER_CONFIG'] and File.exist?(options[:config] = File.expand_path(ENV['TASKMAPPER_CONFIG']))
else
- options[:config] = File.expand_path('~/.ticketmaster.yml')
+ options[:config] = File.expand_path('~/.taskmapper.yml')
end
begin
@@ -38,7 +38,7 @@
opts.separator ''
opts.separator 'Options:'
- opts.on('-c', '--config CONFIG', 'Use CONFIG as the configuration file. default: ~/.ticketmaster.yml') do |c|
+ opts.on('-c', '--config CONFIG', 'Use CONFIG as the configuration file. default: ~/.taskmapper.yml') do |c|
options[:config] = c
end
@@ -72,6 +72,6 @@
require File.dirname(__FILE__) + '/commands/' + command
send(command, options)
else
- puts "'#{command}' is not a ticketmaster command\n\n", helptext.call
+ puts "'#{command}' is not a taskmapper command\n\n", helptext.call
exit
end
@@ -2,7 +2,7 @@ module TaskMapper::Provider
module Base
# The comment class
#
- # This will probably one of the most troublesome parts of creating a provider for ticketmaster
+ # This will probably one of the most troublesome parts of creating a provider for taskmapper
# since there are so many different ways comments are handled by different APIs.
# Keep in mind that if you do need to change/overwrite the methods, you will most likely
# only need to overwrite #find_by_id, #find_by_attributes, #search, and possibly #initialize
@@ -1,7 +1,7 @@
module TaskMapper::Provider
# This is the Dummy Provider
#
- # It doesn't really do anything, it exists in order to test the basic functionality of ticketmaster
+ # It doesn't really do anything, it exists in order to test the basic functionality of taskmapper
# and to provide an example the basics of what is to be expected from the providers.
#
# Note that the initial provider name is a module rather than a class. TaskMapper.new
@@ -5,7 +5,7 @@ module Base
# Providers should inherit this class and redefine the methods
#
# Each provider should have their own @system defined.
- # For example, ticketmaster-unfuddle's @system is :unfuddle and ticketmaster-lighthouse's
+ # For example, taskmapper-unfuddle's @system is :unfuddle and taskmapper-lighthouse's
# @system is :lighthouse.
#
# Methods that must be implemented by the provider
@@ -34,8 +34,8 @@ def valid?
# Providers should try to define this method
#
# It returns the project class for this provider, so that there can be calls such as
- # ticketmaster.project.find :all
- # ticketmaster.project(:id => 777, :name => 'Proj test')
+ # taskmapper.project.find :all
+ # taskmapper.project(:id => 777, :name => 'Proj test')
#
# Should try to implement a find :first (or find with singular result) if given parameters
def project(*options)
@@ -58,8 +58,8 @@ def project!(*options)
# Providers should try to define this method
#
# It returns the ticket class for this provider, so that there can be calls such as
- # ticketmaster.ticket.find :all
- # ticketmaster.ticket(:id => 102, :title => 'Ticket')
+ # taskmapper.ticket.find :all
+ # taskmapper.ticket(:id => 102, :title => 'Ticket')
#
# Don't confuse this with project.ticket.find(...) since that deals with tickets specific to a
# project. This is deals with tickets
@@ -1,7 +1,7 @@
module TaskMapper::Provider
# This is the Tester Provider
#
- # It doesn't really do anything, it exists in order to test the basic functionality of ticketmaster
+ # It doesn't really do anything, it exists in order to test the basic functionality of taskmapper
# and to provide an example the basics of what is to be expected from the providers.
#
# Note that the initial provider name is a module rather than a class. TaskMapper.new
View
@@ -1,6 +1,6 @@
module TaskMapper::Provider
module Base
- # The base ticket class for ticketmaster
+ # The base ticket class for taskmapper
# All providers should inherit this class
#
# The difference between the class methods and instance methods are that the instance
Oops, something went wrong.

0 comments on commit ccc70e8

Please sign in to comment.