Sha256: a282af13e870c8e98af022bb2dcf2cac15c17d5ca85f2c0ec038de38669679af

Contents?: true

Size: 508 Bytes

Versions: 8

Compression:

Stored size: 508 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.+/
        cli.template "%gem_name%/.rubocop.yml.tt", configuration
        cli.run "bundle exec rubocop --auto-correct #{gem_name} > /dev/null"
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
gemsmith-11.2.0 lib/gemsmith/generators/rubocop.rb
gemsmith-11.1.0 lib/gemsmith/generators/rubocop.rb
gemsmith-11.0.1 lib/gemsmith/generators/rubocop.rb
gemsmith-11.0.0 lib/gemsmith/generators/rubocop.rb
gemsmith-10.4.2 lib/gemsmith/generators/rubocop.rb
gemsmith-10.4.1 lib/gemsmith/generators/rubocop.rb
gemsmith-10.4.0 lib/gemsmith/generators/rubocop.rb
gemsmith-10.3.0 lib/gemsmith/generators/rubocop.rb