Sha256: 511efb5ddf4410683337d2baab939c3a2cfa927b74f7f70bf9d5e3f2ad8a9225

Contents?: true

Size: 643 Bytes

Versions: 7

Compression:

Stored size: 643 Bytes

Contents

# frozen_string_literal: true

require "refinements/struct"

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

        def call
          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

7 entries across 7 versions & 1 rubygems

Version Path
gemsmith-22.6.0 lib/gemsmith/builders/git/ignore.rb
gemsmith-22.5.0 lib/gemsmith/builders/git/ignore.rb
gemsmith-22.4.0 lib/gemsmith/builders/git/ignore.rb
gemsmith-22.3.0 lib/gemsmith/builders/git/ignore.rb
gemsmith-22.2.0 lib/gemsmith/builders/git/ignore.rb
gemsmith-22.1.0 lib/gemsmith/builders/git/ignore.rb
gemsmith-22.0.0 lib/gemsmith/builders/git/ignore.rb