Sha256: 2184801fc9bc3fcfe29d2c5f52084dc213923304edaee101383d660a31bfa1c8

Contents?: true

Size: 576 Bytes

Versions: 2

Compression:

Stored size: 576 Bytes

Contents

# frozen_string_literal: true

require "refinements/struct"

module Rubysmith
  module Builders
    # Builds project skeleton GitHub CI template.
    class GitHubCI < Abstract
      using Refinements::Struct

      def call
        return configuration unless configuration.build_git_hub_ci

        builder.call(configuration_with_template).render.replace(/\n\n\Z/, "\n")
        configuration
      end

      private

      def configuration_with_template
        configuration.merge template_path: "%project_name%/.github/workflows/ci.yml.erb"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubysmith-6.10.0 lib/rubysmith/builders/git_hub_ci.rb
rubysmith-6.9.0 lib/rubysmith/builders/git_hub_ci.rb