Sha256: 8d48ffda736960468c2988c38c6f2f123e71fd2cdf847d70ab8b97970525290d

Contents?: true

Size: 1.11 KB

Versions: 2

Compression:

Stored size: 1.11 KB

Contents

#!/usr/bin/env ruby
require 'rubygems'
require File.join(File.dirname(__FILE__), "..", "lib", "bird_grinder")

BirdGrinder::Application.processing(ARGV) do |a|
  
  a.banner = "BirdGrinder v#{BirdGrinder.version}"

  a.generator!

  a.controller! :console, "Starts up a BirdGrinder friendly IRB instance"
  a.controller! :client,  "Controls the current BirdGrinder instance"

  a.option(:force, "force the creation of the application")
  a.add("create PATH", "Creates a BirdGrinder instance at a specified location") do |path, options|
    path = File.expand_path(path)
    if File.exists?(path) && !options[:force]
      die! "The path you tried to use, #{path}, already exists. Please try another or use the --force option"
    end
    setup_generator path
    folders 'tmp', 'config', 'handlers', 'test'
    template 'boot.erb', 'config/boot.rb'
    template 'setup.erb', 'config/setup.rb'
    template 'settings.yml.erb', 'config/settings.yml'
    template 'debug_handler.erb', 'handlers/debug_handler.rb'
    template 'hello_world_handler.erb', 'handlers/hello_world_handler.rb'
    template 'rakefile.erb', 'Rakefile'
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
birdgrinder-0.1.3.1 bin/birdgrinder
birdgrinder-0.1.3.0 bin/birdgrinder