diff --git a/lib/xcodeproj/command.rb b/lib/xcodeproj/command.rb index 908750016..ffae84b59 100644 --- a/lib/xcodeproj/command.rb +++ b/lib/xcodeproj/command.rb @@ -4,8 +4,7 @@ module Xcodeproj class Command < CLAide::Command require 'xcodeproj/command/config_dump' - require 'xcodeproj/command/target_diff' - require 'xcodeproj/command/project_diff' + require 'xcodeproj/command/diff' require 'xcodeproj/command/show' require 'xcodeproj/command/sort' diff --git a/lib/xcodeproj/command/diff.rb b/lib/xcodeproj/command/diff.rb new file mode 100644 index 000000000..9ebe9dfeb --- /dev/null +++ b/lib/xcodeproj/command/diff.rb @@ -0,0 +1,10 @@ +module Xcodeproj + class DiffCommand < Command + require 'xcodeproj/command/diff/project' + require 'xcodeproj/command/diff/target' + + self.abstract_command = true + self.command = 'diff' + self.description = 'Shows the differences between Xcode objects.' + end +end diff --git a/lib/xcodeproj/command/project_diff.rb b/lib/xcodeproj/command/diff/project.rb similarity index 96% rename from lib/xcodeproj/command/project_diff.rb rename to lib/xcodeproj/command/diff/project.rb index 2f5d553bf..5d1dab69c 100644 --- a/lib/xcodeproj/command/project_diff.rb +++ b/lib/xcodeproj/command/diff/project.rb @@ -1,6 +1,6 @@ module Xcodeproj - class Command - class ProjectDiff < Command + class DiffCommand + class Project < DiffCommand self.summary = 'Shows the difference between two projects' self.description = summary + <<-EOS.gsub(/ {8}/, '') diff --git a/lib/xcodeproj/command/target_diff.rb b/lib/xcodeproj/command/diff/target.rb similarity index 95% rename from lib/xcodeproj/command/target_diff.rb rename to lib/xcodeproj/command/diff/target.rb index 7390beec6..94539ef67 100644 --- a/lib/xcodeproj/command/target_diff.rb +++ b/lib/xcodeproj/command/diff/target.rb @@ -1,6 +1,6 @@ module Xcodeproj - class Command - class TargetDiff < Command + class DiffCommand + class Target < DiffCommand self.summary = 'Shows the difference between two targets' def self.options