lib/tms.rb in tms-1.2.0 vs lib/tms.rb in tms-1.3.0

- old
+ new

@@ -1,12 +1,20 @@ +require 'tms/path' +require 'tms/backup' +require 'tms/table' + module Tms class << self + def version + File.read(File.join(File.dirname(__FILE__), '../VERSION')).strip + end + def list backups = Backup.list Table.new do |t| - t.col '', :red - t.col '', :blue + t.col '', Backup.colorize? && :red + t.col '', Backup.colorize? && :blue t.col 'num' t.col 'name' if Backup.show_all_columns t.col 'state' t.col 'type' @@ -51,11 +59,11 @@ a_id, b_id = a_id - 1, a_id end end backup_a = Backup.list[a_id] or abort("No backup #{a}") backup_b = Backup.list[b_id] or abort("No backup #{b}") - Backup.diff(backup_a, backup_b) + Comparison.new(backup_a, backup_b).run end private def backup_id(arg) @@ -86,11 +94,5 @@ value end end end end - -require 'tms.so' -require 'tms/backup' -require 'tms/space' -require 'tms/table' -require 'tms/pathname'