Sha256: f1a15566c51f5d431bae47e191ae64c236af87078debed97eedaea14a73e17c6

Contents?: true

Size: 541 Bytes

Versions: 1

Compression:

Stored size: 541 Bytes

Contents

require 'English'

module Phare
  class CLI
    attr_reader :status

    def initialize(directory)
      @directory = directory
      @directory << '/' unless @directory.end_with?('/')
    end

    def run
      ruby = Checks::RubyRubocop.new
      ruby.run

      puts ''

      jshint = Checks::JavaScriptJSHint.new(@directory)
      jshint.run

      puts ''

      jscs = Checks::JavaScriptJSCS.new(@directory)
      jscs.run

      @status = [ruby.status, jshint.status, jscs.status].find { |status| status > 0 } || 0
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
phare-0.1 lib/phare/cli.rb