Class: RailsAppGenerator::Cli::Diff
- Inherits:
-
Thor
- Object
- Thor
- RailsAppGenerator::Cli::Diff
- Defined in:
- lib/rails_app_generator/cli/diff.rb
Overview
Folder Diff
Instance Method Summary collapse
-
#diff(lhs_folder, rhs_folder) ⇒ Object
rubocop:disable Metrics/AbcSize.
Instance Method Details
#diff(lhs_folder, rhs_folder) ⇒ Object
rubocop:disable Metrics/AbcSize
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/rails_app_generator/cli/diff.rb', line 22 def diff(lhs_folder, rhs_folder) # puts "Diffing #{lhs_folder} and #{rhs_folder}" # puts JSON.pretty_generate(options) processor = RailsAppGenerator::Diff::Processor.new(lhs_folder, rhs_folder) compare_info = processor.compare report = RailsAppGenerator::Diff::Report.new( compare_info, show_left_only: [:show_left_only], show_right_only: [:show_right_only], show_same: [:show_same], show_different: [:show_different] ) report.display vscode = RailsAppGenerator::Diff::OpenInEditor.new( compare_info, open_left_only: [:open_left_only], open_right_only: [:open_right_only], open_same: [:open_same], open_different: [:show_different] ) vscode.open end |