lib/phare/check/jscs.rb in phare-0.5 vs lib/phare/check/jscs.rb in phare-0.5.1

- old
+ new

@@ -7,15 +7,17 @@ def initialize(directory, options = {}) @config = File.expand_path("#{directory}.jscs.json", __FILE__) @path = File.expand_path("#{directory}app/assets", __FILE__) @extensions = %w(.js) @options = options + + super end def command - if tree_changed? - "jscs #{tree_changes.join(' ')}" + if @tree.changed? + "jscs #{@tree.changes.join(' ')}" else "jscs #{@path}" end end @@ -28,10 +30,10 @@ def configuration_exists? File.exists?(@config) end def argument_exists? - tree_changed? || Dir.exists?(@path) + @tree.changed? || Dir.exists?(@path) end def print_banner Phare.puts '---------------------------------------------' Phare.puts 'Running JSCS to check for JavaScript style…'