|
Revision 1203, 0.7 kB
(checked in by jon.egil.stra..@gmail.com, 11 months ago)
|
mrblog, updated to merb 0.4.2, still a bit raw though
|
- Property svn:executable set to
*
|
| Line | |
|---|
| 1 |
#!/usr/bin/env ruby |
|---|
| 2 |
APP_ROOT = File.join(File.dirname(__FILE__), '..') |
|---|
| 3 |
|
|---|
| 4 |
begin |
|---|
| 5 |
require 'rubigen' |
|---|
| 6 |
rescue LoadError |
|---|
| 7 |
require 'rubygems' |
|---|
| 8 |
require 'rubigen' |
|---|
| 9 |
end |
|---|
| 10 |
|
|---|
| 11 |
require File.join(File.dirname(__FILE__), "..", 'config', 'boot') |
|---|
| 12 |
require (APP_ROOT / "config" / "merb_init" ) |
|---|
| 13 |
module Kernel |
|---|
| 14 |
undef dependency if defined?(Kernel.dependency) |
|---|
| 15 |
end |
|---|
| 16 |
|
|---|
| 17 |
# Make the App's local gems available |
|---|
| 18 |
Gem.clear_paths |
|---|
| 19 |
Gem.path.unshift(APP_ROOT / "gems") |
|---|
| 20 |
|
|---|
| 21 |
require 'rubigen/scripts/generate' |
|---|
| 22 |
|
|---|
| 23 |
ARGV.shift if ['--help', '-h'].include?(ARGV[0]) |
|---|
| 24 |
|
|---|
| 25 |
# Default is to use rspec generators in gems. To change this to |
|---|
| 26 |
# Test::Unit use [:merb, :test_unit] |
|---|
| 27 |
RubiGen::Base.use_component_sources! Merb::GENERATOR_SCOPE |
|---|
| 28 |
RubiGen::Scripts::Generate.new.run(ARGV) |
|---|