Sha256: 829093805a5016cbf0a7de4a454649e7485e6a61340abedea89d400f1e1874b8

Contents?: true

Size: 731 Bytes

Versions: 9

Compression:

Stored size: 731 Bytes

Contents

module Parade
  module Commands

    #
    # Generates the a Rackup `config.ru` file to allow for presentations to
    # be deployed to locations like Heroku.
    #
    class GenerateRackup
      include RenderFromTemplate

      def description
        "A default rackup file (i.e. #{rackup_filename})"
      end

      def generate(options)
        create_file_with_contents rackup_filename, rackup_template(options), options
      end

      def rackup_filename
        "config.ru"
      end

      def rackup_template(options)
        template_options = {  'erb_template_file' => File.join(default_template_path, "#{rackup_filename}.erb") }.merge(options)

        render_template template_options
      end

    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
parade-0.10.2 lib/parade/commands/generate_rackup.rb
parade-0.10.1 lib/parade/commands/generate_rackup.rb
parade-0.10.0 lib/parade/commands/generate_rackup.rb
parade-0.9.2 lib/parade/commands/generate_rackup.rb
parade-0.9.1 lib/parade/commands/generate_rackup.rb
parade-0.9.0 lib/parade/commands/generate_rackup.rb
parade-0.8.2 lib/parade/commands/generate_rackup.rb
parade-0.8.1 lib/parade/commands/generate_rackup.rb
parade-0.8.0 lib/parade/commands/generate_rackup.rb