Sha256: e79d48a6b11d22c500660d84332073795b8e31360a2649bc3ad4a403027fac08

Contents?: true

Size: 610 Bytes

Versions: 11

Compression:

Stored size: 610 Bytes

Contents

# frozen_string_literal: true

require "refinements/struct"

module Hanamismith
  module Builders
    # Builds project skeleton Rake support.
    class Rake < Rubysmith::Builders::Rake
      using Refinements::Struct

      def call
        return configuration unless configuration.build_rake

        super
        builder.call(configuration.merge(template_path: "%project_name%/Rakefile.erb"))
               .render
               .insert_after(%r(bundler/setup), %(require "hanami/rake_tasks"))

        configuration
      end

      private

      attr_reader :configuration, :builder
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
hanamismith-0.34.0 lib/hanamismith/builders/rake.rb
hanamismith-0.33.0 lib/hanamismith/builders/rake.rb
hanamismith-0.32.0 lib/hanamismith/builders/rake.rb
hanamismith-0.31.0 lib/hanamismith/builders/rake.rb
hanamismith-0.30.0 lib/hanamismith/builders/rake.rb
hanamismith-0.29.0 lib/hanamismith/builders/rake.rb
hanamismith-0.28.1 lib/hanamismith/builders/rake.rb
hanamismith-0.28.0 lib/hanamismith/builders/rake.rb
hanamismith-0.27.0 lib/hanamismith/builders/rake.rb
hanamismith-0.26.0 lib/hanamismith/builders/rake.rb
hanamismith-0.25.0 lib/hanamismith/builders/rake.rb