Sha256: 2f405bc4ebfad6c695345a615c33efa47f0f84620d902ef58b80a2cdde75ebdf

Contents?: true

Size: 494 Bytes

Versions: 10

Compression:

Stored size: 494 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 "cd #{gem_name} && bundle exec rubocop --auto-correct > /dev/null"
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gemsmith-14.2.0 lib/gemsmith/generators/rubocop.rb
gemsmith-14.1.3 lib/gemsmith/generators/rubocop.rb
gemsmith-14.1.2 lib/gemsmith/generators/rubocop.rb
gemsmith-14.1.1 lib/gemsmith/generators/rubocop.rb
gemsmith-14.1.0 lib/gemsmith/generators/rubocop.rb
gemsmith-14.0.2 lib/gemsmith/generators/rubocop.rb
gemsmith-14.0.1 lib/gemsmith/generators/rubocop.rb
gemsmith-14.0.0 lib/gemsmith/generators/rubocop.rb
gemsmith-13.8.0 lib/gemsmith/generators/rubocop.rb
gemsmith-13.7.2 lib/gemsmith/generators/rubocop.rb