Sha256: 32b73b1882da604e3ef4a9b0a08b648cc4c455baf33ed21572620de7b7a94ba2

Contents?: true

Size: 510 Bytes

Versions: 2

Compression:

Stored size: 510 Bytes

Contents

# frozen_string_literal: true

require "refinements/struct"

module Rubysmith
  module Builders
    # Builds project skeleton Circle CI configuration.
    class CircleCI < Abstract
      using Refinements::Struct

      def call
        return configuration unless configuration.build_circle_ci

        builder.call(configuration.merge(template_path: "%project_name%/.circleci/config.yml.erb"))
               .render
               .replace(/\n\n\Z/, "\n")

        configuration
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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