Sha256: 809f60d747021141a48c7c6fde0b8f8145ef3ab1f603e263aab5290214fd531b

Contents?: true

Size: 938 Bytes

Versions: 6

Compression:

Stored size: 938 Bytes

Contents

module Phare
  class CLI
    def initialize(env)
      if env['SKIP_CODE_CHECK']
        puts '--------------------------------------------------------'
        puts 'Skipping code style checking… Really? Well alright then…'
        puts '--------------------------------------------------------'

        exit 0
      else
        if Phare::Check.new(Dir.getwd).tap { |c| c.run }.status == 0
          puts '------------------------------------------'
          puts 'Everything looks good, keep on committing!'
          puts '------------------------------------------'

          exit 0
        else
          puts '------------------------------------------------------------------------'
          puts 'Something’s wrong with your code style. Please fix it before committing.'
          puts '------------------------------------------------------------------------'

          exit 1
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
phare-0.3 lib/phare/cli.rb
phare-0.2.2 lib/phare/cli.rb
phare-0.2.1 lib/phare/cli.rb
phare-0.2 lib/phare/cli.rb
phare-0.1.2 lib/phare/cli.rb
phare-0.1.1 lib/phare/cli.rb