Sha256: 459439c4738ed349ba8f50aa18bd2d6e1bd56d4d6885cb5faab3180452cb2109

Contents?: true

Size: 489 Bytes

Versions: 8

Compression:

Stored size: 489 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

8 entries across 8 versions & 1 rubygems

Version Path
gemsmith-13.1.0 lib/gemsmith/generators/rubocop.rb
gemsmith-13.0.0 lib/gemsmith/generators/rubocop.rb
gemsmith-12.4.0 lib/gemsmith/generators/rubocop.rb
gemsmith-12.3.0 lib/gemsmith/generators/rubocop.rb
gemsmith-12.2.0 lib/gemsmith/generators/rubocop.rb
gemsmith-12.1.0 lib/gemsmith/generators/rubocop.rb
gemsmith-12.0.0 lib/gemsmith/generators/rubocop.rb
gemsmith-11.3.0 lib/gemsmith/generators/rubocop.rb