Sha256: ed4702d21f31db6435afe41a13024b4adfc8605550aba1287629d003d009ac56

Contents?: true

Size: 586 Bytes

Versions: 5

Compression:

Stored size: 586 Bytes

Contents

# frozen_string_literal: true

require "refinements/structs"

module Gemsmith
  module Builders
    # Builds project skeleton console for object inspection and exploration.
    class Console < Rubysmith::Builders::Console
      using Refinements::Structs

      def call
        return configuration unless configuration.build_console

        super
        builder.call(configuration.merge(template_path: "%project_name%/bin/console.erb"))
               .replace(/require Bundler.root.+/, %(require "#{configuration.project_path}"))

        configuration
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gemsmith-20.7.0 lib/gemsmith/builders/console.rb
gemsmith-20.6.1 lib/gemsmith/builders/console.rb
gemsmith-20.6.0 lib/gemsmith/builders/console.rb
gemsmith-20.5.0 lib/gemsmith/builders/console.rb
gemsmith-20.4.0 lib/gemsmith/builders/console.rb