Sha256: 2585f29848ce9d56ef62d6bb414ffc352f5c2e7f6e1fbbb97c9f5a05481f9889
Contents?: true
Size: 1017 Bytes
Versions: 14
Compression:
Stored size: 1017 Bytes
Contents
# frozen_string_literal: true require "pathname" require "pragmater" module Gemsmith module Generators # Formats pragma comments in source files. class Pragma < Base DEFAULT_COMMENTS = ["# frozen_string_literal: true"].freeze def run Pragmater::Runner.for(**attributes).call end # rubocop:disable Metrics/MethodLength def includes %W[ **/*Gemfile **/*Guardfile **/*Rakefile **/*config.ru **/*bin/#{configuration.dig :gem, :name} **/*bin/bundle **/*bin/rails **/*bin/rake **/*bin/setup **/*bin/update **/*bin/yarn **/*.gemspec **/*.rake **/*.rb ] end # rubocop:enable Metrics/MethodLength private def attributes { action: :insert, root_dir: gem_root, comments: DEFAULT_COMMENTS, includes: includes } end end end end
Version data entries
14 entries across 14 versions & 1 rubygems