Sha256: da0a010fd3f91457752c5789eef5805f0cf2a33ea9bad6053af70e9d3bb279d1

Contents?: true

Size: 1.46 KB

Versions: 4

Compression:

Stored size: 1.46 KB

Contents

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

Marvin::Application.processing(ARGV) do |a|
  version = Marvin.version
  version << "p#{Marvin::VERSION[3]}" if Marvin::VERSION[3] != 0
  a.banner = "Marvin v#{version} - An IRC Library for Ruby"
  
  a.generator!
  
  a.option      :development, "Runs the app in development mode (handler reloading)", :shortcut => "D"
  a.controller! :client, "Starts the actual Marvin client instance"
  a.controller! :console, "Opens a friendly IRB prompt with Marvin pre-loaded"
  a.controller! :distributed_client, "Starts a distributed client instance"
  
  a.option :force, "force the creation of the application"
  a.add "create PATH", "Creates a marvin application at the given 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', 'lib', 'handlers', 'test'
    template 'boot.erb',            'config/boot.rb'
    template 'setup.erb',           'config/setup.rb'
    template 'settings.yml.erb',    'config/settings.yml'
    template 'connections.yml.erb', 'config/connections.yml'
    template 'debug_handler.erb',   'handlers/debug_handler.rb'
    template 'hello_world.erb',     'handlers/hello_world.rb'
    template 'rakefile.erb',        'Rakefile'
  end
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
marvin-0.8.2 bin/marvin
marvin-0.8.1 bin/marvin
marvin-0.8.0.2 bin/marvin
marvin-0.8.0.1 bin/marvin