Sha256: 1a70ad039bbf59ba5be7aa5b0e4f2a20696a9f545af06630d6b4a45d4a8ff53f

Contents?: true

Size: 496 Bytes

Versions: 10

Compression:

Stored size: 496 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 "rubocop --auto-correct #{gem_name} > /dev/null"
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gemsmith-10.2.0 lib/gemsmith/generators/rubocop.rb
gemsmith-10.1.0 lib/gemsmith/generators/rubocop.rb
gemsmith-10.0.0 lib/gemsmith/generators/rubocop.rb
gemsmith-9.6.0 lib/gemsmith/generators/rubocop.rb
gemsmith-9.5.0 lib/gemsmith/generators/rubocop.rb
gemsmith-9.4.0 lib/gemsmith/generators/rubocop.rb
gemsmith-9.3.0 lib/gemsmith/generators/rubocop.rb
gemsmith-9.2.0 lib/gemsmith/generators/rubocop.rb
gemsmith-9.1.0 lib/gemsmith/generators/rubocop.rb
gemsmith-9.0.0 lib/gemsmith/generators/rubocop.rb