Sha256: 1737a5d30bb3cb81a9ec6180c8b4c2764281e6c3832f5b9cc8bf7173684c6da4

Contents?: true

Size: 745 Bytes

Versions: 10

Compression:

Stored size: 745 Bytes

Contents

# frozen_string_literal: true

require "refinements/struct"

module Rubysmith
  module Builders
    module Rake
      # Builds project skeleton Rake file configuration.
      class Configuration < Abstract
        using Refinements::Struct

        def call
          return false unless settings.build_rake

          builder.call(settings.merge(template_path: "%project_name%/Rakefile.erb"))
                 .render
                 .replace(/\[\s+/, "[")
                 .replace(/\s+\]/, "]")
                 .replace("  ", "")
                 .replace("task.options", "  task.options")
                 .replace(/\n+(?=require)/, "\n")
                 .replace(/\n{2,}/, "\n\n")

          true
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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