Sha256: aee94c82c696fd3e011561f8b434b5dbd7b78091e1cbe6578db6aa30e9fd7338

Contents?: true

Size: 685 Bytes

Versions: 6

Compression:

Stored size: 685 Bytes

Contents

# frozen_string_literal: true

require_relative 'base'

module Bankai
  module Generators
    # :nodoc:
    class LintGenerator < Base
      def configure_overcommit
        template 'overcommit.yml.erb', '.overcommit.yml'
      end

      def configure_rubocop
        template 'rubocop.yml.erb', '.rubocop.yml'
      end

      def install_overcommit
        Bundler.with_clean_env { run 'bundle exec overcommit --install' }
      end

      def rubocop_autocorrect
        Bundler.with_clean_env { run 'bundle exec rubocop --auto-correct' }
      end

      def rubocop_todo
        Bundler.with_clean_env { run 'bundle exec rubocop --auto-gen-config' }
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bankai-0.8.1 lib/bankai/generators/lint_generator.rb
bankai-0.8.0 lib/bankai/generators/lint_generator.rb
bankai-0.7.0 lib/bankai/generators/lint_generator.rb
bankai-0.6.0 lib/bankai/generators/lint_generator.rb
bankai-0.5.1 lib/bankai/generators/lint_generator.rb
bankai-0.5.0 lib/bankai/generators/lint_generator.rb