Sha256: f6a6f5d89760c37469ee5f07376d0dddac5d6fd27d47d4260d806228b2b02a71

Contents?: true

Size: 584 Bytes

Versions: 10

Compression:

Stored size: 584 Bytes

Contents

# frozen_string_literal: true

require "refinements/struct"

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

      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

10 entries across 10 versions & 1 rubygems

Version Path
gemsmith-21.10.0 lib/gemsmith/builders/console.rb
gemsmith-21.9.0 lib/gemsmith/builders/console.rb
gemsmith-21.6.0 lib/gemsmith/builders/console.rb
gemsmith-21.5.1 lib/gemsmith/builders/console.rb
gemsmith-21.5.0 lib/gemsmith/builders/console.rb
gemsmith-21.4.0 lib/gemsmith/builders/console.rb
gemsmith-21.3.0 lib/gemsmith/builders/console.rb
gemsmith-21.2.0 lib/gemsmith/builders/console.rb
gemsmith-21.1.0 lib/gemsmith/builders/console.rb
gemsmith-21.0.0 lib/gemsmith/builders/console.rb