Sha256: ef2ba28f5aee48306fa63996af965df5da0f79eb81f484fe8c5076fbbb698ce6

Contents?: true

Size: 483 Bytes

Versions: 11

Compression:

Stored size: 483 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 false unless settings.build_circle_ci

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

        true
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

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