Sha256: 154a2e8de95491b4281533c3b7035ec8ca186348c41917e14a6887478387347c
Contents?: true
Size: 871 Bytes
Versions: 8
Compression:
Stored size: 871 Bytes
Contents
# frozen_string_literal: true require "refinements/struct" module Gemsmith module Builders module Git # Builds project skeleton Git ignore. class Ignore using Refinements::Struct def self.call(...) = new(...).call def initialize configuration, builder: Rubysmith::Builder @configuration = configuration @builder = builder end def call return configuration unless configuration.build_git builder.call(configuration.merge(template_path: "%project_name%/.gitignore.erb")) .touch .prepend("*.gem\n") .insert_before("tmp\n", "Gemfile.lock\n") .insert_before("tmp\n", "pkg\n") configuration end private attr_reader :configuration, :builder end end end end
Version data entries
8 entries across 8 versions & 1 rubygems