Sha256: f408d804b9e83721e24ff41e1b6bcfb815a16a5dc644383610264323738531ef

Contents?: true

Size: 723 Bytes

Versions: 12

Compression:

Stored size: 723 Bytes

Contents

# frozen_string_literal: true

require "refinements/struct"

module Rubysmith
  module Builders
    module GitHub
      # Builds project skeleton GitHub templates.
      class Template < Abstract
        using Refinements::Struct

        def call
          return false unless settings.build_git_hub

          builder.call(with_issue).render
          builder.call(with_code_review).render
          true
        end

        private

        def with_issue
          settings.merge template_path: "%project_name%/.github/ISSUE_TEMPLATE.md.erb"
        end

        def with_code_review
          settings.merge template_path: "%project_name%/.github/PULL_REQUEST_TEMPLATE.md.erb"
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rubysmith-8.1.0 lib/rubysmith/builders/git_hub/template.rb
rubysmith-8.0.0 lib/rubysmith/builders/git_hub/template.rb
rubysmith-7.9.0 lib/rubysmith/builders/git_hub/template.rb
rubysmith-7.8.0 lib/rubysmith/builders/git_hub/template.rb
rubysmith-7.7.0 lib/rubysmith/builders/git_hub/template.rb
rubysmith-7.6.0 lib/rubysmith/builders/git_hub/template.rb
rubysmith-7.5.0 lib/rubysmith/builders/git_hub/template.rb
rubysmith-7.4.0 lib/rubysmith/builders/git_hub/template.rb
rubysmith-7.3.0 lib/rubysmith/builders/git_hub/template.rb
rubysmith-7.2.0 lib/rubysmith/builders/git_hub/template.rb
rubysmith-7.1.0 lib/rubysmith/builders/git_hub/template.rb
rubysmith-7.0.0 lib/rubysmith/builders/git_hub/template.rb