lib/inch/cli/command/output/suggest.rb in inch-0.5.0.rc5 vs lib/inch/cli/command/output/suggest.rb in inch-0.5.0.rc6

- old
+ new

@@ -1,6 +1,6 @@ -require "sparkr" +require 'sparkr' module Inch module CLI module Command module Output @@ -9,14 +9,14 @@ attr_reader :objects, :files FILE_COLOR = :dark # TODO: store all colors somewhere RANGE_LABELS = { - A: "Nearly perfect:", - B: "Properly documented, could be improved:", - C: "Not properly documented:", - U: "Undocumented:" + A: 'Nearly perfect:', + B: 'Properly documented, could be improved:', + C: 'Not properly documented:', + U: 'Undocumented:' } # @param options [Command::Options::Suggest] # @param relevant_objects [Array<CodeObject::Proxy>] the objects # meeting the criteria defined in +options+ @@ -45,12 +45,12 @@ def base_dir "#{Dir.pwd}/" end def display_distribution - sparkline = grades_sparkline(@relevant_objects).to_s(" ") - ui.trace "Grade distribution (undocumented, C, B, A): " + sparkline + sparkline = grades_sparkline(@relevant_objects).to_s(' ') + ui.trace 'Grade distribution (undocumented, C, B, A): ' + sparkline ui.trace ui.trace priority_filter_hint end def priority_filter_hint @@ -63,15 +63,15 @@ "#{pretext} (use `--help` for options).".dark end def display_files ui.trace - ui.trace "You might want to look at these files:" + ui.trace 'You might want to look at these files:' ui.trace files.each do |file| - filename = file.fullname.gsub(base_dir, "") + filename = file.fullname.gsub(base_dir, '') ui.edged(FILE_COLOR, filename.color(FILE_COLOR)) end ui.trace end @@ -91,19 +91,19 @@ end end def display_no_objects_hint hint = if @options.pedantic - "Even by my standards." + 'Even by my standards.' else - "Try --pedantic to be excessively concerned with minor " \ - "details and rules." + 'Try --pedantic to be excessively concerned with minor ' \ + 'details and rules.' end - ui.trace "Nothing to suggest.".color(:green) + " #{hint}" + ui.trace 'Nothing to suggest.'.color(:green) + " #{hint}" end def min_priority_arrows - priority_arrows_gte(@options.object_min_priority).join(" ") + priority_arrows_gte(@options.object_min_priority).join(' ') end def priority_arrows_gte(min_priority) Evaluation::PriorityRange.all.select do |priority_range| priority_range.priorities.min >= min_priority