Sha256: 60dd568f033c294ccae83df4fa3bd519b5498a94057495636c2263a7a83a169c

Contents?: true

Size: 1.59 KB

Versions: 5

Compression:

Stored size: 1.59 KB

Contents

- build: package
  default: all
  description: "Generate a Sinatra project"

- properties:
  - name: sinatra
  - description: |
      This script will create a Sinatra project. Generated build file has a 
      target 'run' to run the server, 'zip' to generate a distribution archive
      and 'clean' to delete generated files.

- target: welcome
  description: "Print information message"
  script:
  - print: :description

- target: prompt
  depends: welcome
  description: "Prompt for project information"
  script:
  - print: "Please answer following questions to generate the project:"
  - prompt:
      message: "What is the project's name?"
      default: :name
      property: name

- target: generate
  depends: prompt
  description: "Generate project"
  script:
  - print: "Generating project..."
  - rb: |
      error "A directory named '#{name}' already exists, aborting" if
        File.exists?("#{here}/#{name}")
  - mkdir: "#{here}/#{name}"
  - erb:
      src:  "#{base}/sinatra/build.yml"
      dest: "#{here}/#{name}/build.yml"
  - cp:
      src:  "#{base}/sinatra/server.rb"
      dest: "#{here}/#{name}/server.rb"

- target: customization
  depends: generate
  description: "Print information about project customization"
  script:
  - print: |
      Project has been generated in directory '#{name}'. Type 'bee -b' to print
      information about generated build file. To start server, type 'b run'. To
      send a request, call URL 'http://localhost:4567/hello/world', typing
      'b call' for instance (which requires curl).
      Enjoy!

- target: all
  depends: [welcome, prompt, generate, customization]

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bee-0.9.0 egg/sinatra.yml
bee-0.8.1 egg/sinatra.yml
bee-0.8.0 egg/sinatra.yml
bee-0.7.1 egg/sinatra.yml
bee-0.7.0 egg/sinatra.yml