Sha256: 385219b6e356cc94878da378f86059feefbd8483cfb831ce64164e198f208b66

Contents?: true

Size: 488 Bytes

Versions: 7

Compression:

Stored size: 488 Bytes

Contents

# frozen_string_literal: true

module Gemsmith
  module Generators
    # Generates Rubocop support.
    class Rubocop < Base
      def run
        return unless configuration.dig :generate, :rubocop

        cli.uncomment_lines "#{gem_name}/Rakefile", /require.+rubocop.+/
        cli.uncomment_lines "#{gem_name}/Rakefile", /RuboCop.+/
        template "%gem_name%/.rubocop.yml.tt"
        cli.run "bundle exec rubocop --auto-correct #{gem_name} > /dev/null"
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gemsmith-13.7.1 lib/gemsmith/generators/rubocop.rb
gemsmith-13.7.0 lib/gemsmith/generators/rubocop.rb
gemsmith-13.6.0 lib/gemsmith/generators/rubocop.rb
gemsmith-13.5.0 lib/gemsmith/generators/rubocop.rb
gemsmith-13.4.0 lib/gemsmith/generators/rubocop.rb
gemsmith-13.3.0 lib/gemsmith/generators/rubocop.rb
gemsmith-13.2.0 lib/gemsmith/generators/rubocop.rb