Sha256: 150eb8e809c75f629e9155d41992c8fed8d3c7dfc8e021e065c65a6d75ec145e

Contents?: true

Size: 663 Bytes

Versions: 6

Compression:

Stored size: 663 Bytes

Contents

# frozen_string_literal: true

require "refinements/struct"

module Gemsmith
  module Builders
    module Git
      # Builds project skeleton Git ignore.
      class Ignore < Rubysmith::Builders::Git::Ignore
        using Refinements::Struct

        def call
          super

          return false unless settings.build_git

          builder.call(settings.merge(template_path: "%project_name%/.gitignore.erb"))
                 .touch
                 .prepend("*.gem\n")
                 .insert_before "tmp\n", <<~CONTENT
                   Gemfile.lock
                   pkg
                 CONTENT

          true
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gemsmith-23.1.0 lib/gemsmith/builders/git/ignore.rb
gemsmith-23.0.0 lib/gemsmith/builders/git/ignore.rb
gemsmith-22.10.0 lib/gemsmith/builders/git/ignore.rb
gemsmith-22.9.0 lib/gemsmith/builders/git/ignore.rb
gemsmith-22.8.0 lib/gemsmith/builders/git/ignore.rb
gemsmith-22.7.0 lib/gemsmith/builders/git/ignore.rb