lib/rubysmith/builders/git_hub_ci.rb in rubysmith-6.6.0 vs lib/rubysmith/builders/git_hub_ci.rb in rubysmith-6.9.0

- old
+ new

@@ -3,29 +3,20 @@ require "refinements/struct" module Rubysmith module Builders # Builds project skeleton GitHub CI template. - class GitHubCI + class GitHubCI < Abstract using Refinements::Struct - def self.call(...) = new(...).call - - def initialize configuration, builder: Builder - @configuration = configuration - @builder = builder - end - def call return configuration unless configuration.build_git_hub_ci builder.call(configuration_with_template).render.replace(/\n\n\Z/, "\n") configuration end private - - attr_reader :configuration, :builder def configuration_with_template configuration.merge template_path: "%project_name%/.github/workflows/ci.yml.erb" end end