Sha256: 3948fd3dfc10841500b6b77fd6b244b34d30df3a59d2ea91d56b69a55dc7262a

Contents?: true

Size: 433 Bytes

Versions: 10

Compression:

Stored size: 433 Bytes

Contents

# frozen_string_literal: true

require 'optparse'
options = RailsBestPractices::OptionParser.parse!
if !ARGV.empty? && !File.exist?(ARGV.first)
  puts "#{ARGV.first} doesn't exist"
  exit 1
end

if options['generate']
  RailsBestPractices::Analyzer.new(ARGV.first).generate
else
  analyzer = RailsBestPractices::Analyzer.new(ARGV.first, options)
  analyzer.analyze
  analyzer.output
  exit !analyzer.runner.errors.empty? ? 1 : 0
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rails_best_practices-1.23.2 lib/rails_best_practices/command.rb
rails_best_practices-1.23.1 lib/rails_best_practices/command.rb
rails_best_practices-1.23.0 lib/rails_best_practices/command.rb
rails_best_practices-1.22.1 lib/rails_best_practices/command.rb
rails_best_practices-1.22.0 lib/rails_best_practices/command.rb
rails_best_practices-1.21.0 lib/rails_best_practices/command.rb
rails_best_practices-1.20.1 lib/rails_best_practices/command.rb
rails_best_practices-1.20.0 lib/rails_best_practices/command.rb
rails_best_practices-1.19.5 lib/rails_best_practices/command.rb
rails_best_practices-1.19.4 lib/rails_best_practices/command.rb