Sha256: 07d77ad071b69ad24460ef3310d2ef1b7c9374e6c7998e8b8fe46fcecbfce9a0

Contents?: true

Size: 721 Bytes

Versions: 1

Compression:

Stored size: 721 Bytes

Contents

#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
 
if ARGV[0] =~ /((svc)|Service)/i
  require 'rubygems'
  gem 'rails'

  # find the path to RAILS
  rails_gem = Gem.cache.search('rails').last
  RAILS = rails_gem.full_gem_path
  
  # find the path to SEAMLESS
  seamless_gem = Gem.cache.search('seamless').last
  SEAMLESS = seamless_gem.full_gem_path
  
  require RAILS + '/lib/rails_generator'
  require 'rails_generator/scripts/generate'
  
  path = SEAMLESS
  Rails::Generator::Base.sources << Rails::Generator::PathSource.new('', path)
  
  Rails::Generator::Scripts::Generate.new.run(ARGV, {:generator => 'service', :source_root => path, :source => path})
else
  require 'commands/generate'
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
seamless-1.0.0 seamless/templates/generate