Sha256: 3e3ead52ce19a9ec4c490fe133f0b42b699746b5535be95d3cbf83858c530f26

Contents?: true

Size: 567 Bytes

Versions: 11

Compression:

Stored size: 567 Bytes

Contents

# frozen_string_literal: true

require "refinements/struct"

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

        def call
          return false unless settings.build_git_hub_ci

          builder.call(with_template).render.replace(/\n\n\Z/, "\n")
          true
        end

        private

        def with_template
          settings.merge template_path: "%project_name%/.github/workflows/ci.yml.erb"
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

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