Skip to content

Commit

Permalink
Add subcommand for diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ellen Teapot committed Jan 17, 2019
1 parent 4ee4a1a commit 4b59ce1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
3 changes: 1 addition & 2 deletions lib/xcodeproj/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
10 changes: 10 additions & 0 deletions lib/xcodeproj/command/diff.rb
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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}/, '')
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 4b59ce1

Please sign in to comment.