Skip to content

Commit

Permalink
Started renaming to TicGit-ng
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffWelling committed Feb 14, 2011
1 parent a5b76b0 commit 6787235
Show file tree
Hide file tree
Showing 20 changed files with 20 additions and 26 deletions.
12 changes: 3 additions & 9 deletions bin/ti
@@ -1,19 +1,13 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby

# This is a command line client that does all the actual tic commands
#
# author : Scott Chacon (schacon@gmail.com)
#

require 'rubygems' require 'rubygems'
require 'fileutils' require 'fileutils'


# Add the library from the source tree to the front of the load path. # Add the library from the source tree to the front of the load path.
# This allows ti to run without first installing a ticgit gem, which is # This allows ti to run without first installing a ticgit gem, which is
# important when testing multiple branches of development. # important when testing multiple branches of development.
if File.exist? File.join('lib', 'ticgit.rb') if File.exist? File.join('lib', 'ticgit-ng.rb')
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib') $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
end end
require 'ticgit' require 'ticgit-ng'


TicGit::CLI.execute TicGitNG::CLI.execute
8 changes: 4 additions & 4 deletions lib/ticgit.rb → lib/ticgit-ng.rb
Expand Up @@ -23,10 +23,10 @@
# Author:: Scott Chacon (mailto:schacon@gmail.com) # Author:: Scott Chacon (mailto:schacon@gmail.com)
# License:: MIT License # License:: MIT License
# #
module TicGit module TicGitNG
autoload :VERSION, 'ticgit/version' autoload :VERSION, 'ticgit-ng/version'
autoload :Comment, 'ticgit/comment' autoload :Comment, 'ticgit-ng/comment'
autoload :Ticket, 'ticgit/ticket' autoload :Ticket, 'ticgit-ng/ticket'


# options # options
# :logger => Logger.new(STDOUT) # :logger => Logger.new(STDOUT)
Expand Down
26 changes: 13 additions & 13 deletions lib/ticgit/base.rb → lib/ticgit-ng/base.rb
@@ -1,4 +1,4 @@
module TicGit module TicGitNG
class NoRepoFound < StandardError;end class NoRepoFound < StandardError;end
class Base class Base


Expand All @@ -15,7 +15,7 @@ def initialize(git_dir, opts = {})


proj = Ticket.clean_string(@git.dir.path) proj = Ticket.clean_string(@git.dir.path)


@tic_dir = opts[:tic_dir] || '~/.ticgit' @tic_dir = opts[:tic_dir] || '~/.ticgit-ng'
@tic_working = opts[:working_directory] || File.expand_path(File.join(@tic_dir, proj, 'working')) @tic_working = opts[:working_directory] || File.expand_path(File.join(@tic_dir, proj, 'working'))
@tic_index = opts[:index_file] || File.expand_path(File.join(@tic_dir, proj, 'index')) @tic_index = opts[:index_file] || File.expand_path(File.join(@tic_dir, proj, 'index'))


Expand All @@ -32,7 +32,7 @@ def initialize(git_dir, opts = {})
if File.file?(@state) if File.file?(@state)
load_state load_state
else else
reset_ticgit reset_ticgitng
end end
end end


Expand Down Expand Up @@ -68,36 +68,36 @@ def load_state


# returns new Ticket # returns new Ticket
def ticket_new(title, options = {}) def ticket_new(title, options = {})
t = TicGit::Ticket.create(self, title, options) t = TicGitNG::Ticket.create(self, title, options)
reset_ticgit reset_ticgitng
TicGit::Ticket.open(self, t.ticket_name, tickets[t.ticket_name]) TicGitNG::Ticket.open(self, t.ticket_name, tickets[t.ticket_name])
end end


#This is a legacy function from back when ticgit needed to have its #This is a legacy function from back when ticgit needed to have its
#cache reset in order to avoid cache corruption. #cache reset in order to avoid cache corruption.
def reset_ticgit def reset_ticgitng
tickets tickets
save_state save_state
end end


# returns new Ticket # returns new Ticket
def ticket_comment(comment, ticket_id = nil) def ticket_comment(comment, ticket_id = nil)
if t = ticket_revparse(ticket_id) if t = ticket_revparse(ticket_id)
ticket = TicGit::Ticket.open(self, t, tickets[t]) ticket = TicGitNG::Ticket.open(self, t, tickets[t])
ticket.add_comment(comment) ticket.add_comment(comment)
reset_ticgit reset_ticgitng
end end
end end


# returns array of Tickets # returns array of Tickets
def ticket_list(options = {}) def ticket_list(options = {})
reset_ticgit reset_ticgitng
ts = [] ts = []
@last_tickets = [] @last_tickets = []
@config['list_options'] ||= {} @config['list_options'] ||= {}


tickets.to_a.each do |name, t| tickets.to_a.each do |name, t|
ts << TicGit::Ticket.open(self, name, t) ts << TicGitNG::Ticket.open(self, name, t)
end end


if name = options[:saved] if name = options[:saved]
Expand Down Expand Up @@ -185,9 +185,9 @@ def ticket_list(options = {})
# returns single Ticket # returns single Ticket
def ticket_show(ticket_id = nil) def ticket_show(ticket_id = nil)
# ticket_id can be index of last_tickets, partial sha or nil => last ticket # ticket_id can be index of last_tickets, partial sha or nil => last ticket
reset_ticgit reset_ticgitng
if t = ticket_revparse(ticket_id) if t = ticket_revparse(ticket_id)
return TicGit::Ticket.open(self, t, tickets[t]) return TicGitNG::Ticket.open(self, t, tickets[t])
end end
end end


Expand Down
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.

0 comments on commit 6787235

Please sign in to comment.