Sha256: 29d95a9d106740b4d8e003f750337cff9a65579208d3e1a06987c3958abe49e6

Contents?: true

Size: 1.74 KB

Versions: 36

Compression:

Stored size: 1.74 KB

Contents

#!/usr/bin/env ruby

require File.join(File.dirname(__FILE__), '..', 'config', 'boot')

$LOAD_PATH << File.join(File.dirname(__FILE__), '..')

require 'lib/ruby_version_check'
Signal.trap("INT") { puts; exit }

require 'lib/radiant'
if ARGV.any? { |arg| %w(--version -v).any? { |flag| arg == flag } }
  puts "Radiant #{Radiant::Version}"
  exit 0
end

app_path = ARGV.first

require 'lib/rails_generator'
require 'rails_generator/scripts/generate'

class Rails::Generator::Base

  def self.use_application_sources!
    reset_sources
    sources << Rails::Generator::PathSource.new(:builtin, "#{File.dirname(__FILE__)}/../lib/generators")
  end

  def add_general_options!(opt)
    opt.separator ''
    opt.separator 'Radiant Info:'
    opt.on('-v', '--version', 'Show the Radiant version number and quit.')
    opt.on('-h', '--help', 'Show this help message and quit.') { |v| options[:help] = v }

    opt.separator ''
    opt.separator 'General Options:'

    opt.on('-p', '--pretend', 'Run but do not make any changes.') { |v| options[:pretend] = v }
    opt.on('-f', '--force', 'Overwrite files that already exist.') { options[:collision] = :force }
    opt.on('-s', '--skip', 'Skip files that already exist.') { options[:collision] = :skip }
    opt.on('-q', '--quiet', 'Suppress normal output.') { |v| options[:quiet] = v }
    opt.on('-t', '--backtrace', 'Debugging: show backtrace on errors.') { |v| options[:backtrace] = v }
    opt.on('-c', '--svn', 'Modify files with subversion. (Note: svn must be in path)') do
      options[:svn] = `svn status`.inject({}) do |opt, e|
        opt[e.chomp[7..-1]] = true
        opt
      end
    end
  end

end

Rails::Generator::Base.use_application_sources!
Rails::Generator::Scripts::Generate.new.run(ARGV, :generator => 'instance')

Version data entries

36 entries across 36 versions & 3 rubygems

Version Path
radiant-1.0.0.rc2 bin/radiant
radiant-1.0.0.rc1 bin/radiant
radiantcms-couchrest_model-0.2.4 bin/radiant
radiantcms-couchrest_model-0.2.2 bin/radiant
radiantcms-couchrest_model-0.2.1 bin/radiant
radiantcms-couchrest_model-0.2 bin/radiant
radiantcms-couchrest_model-0.1.9 bin/radiant
radiantcms-couchrest_model-0.1.8 bin/radiant
radiantcms-couchrest_model-0.1.7 bin/radiant
radiantcms-couchrest_model-0.1.6 bin/radiant
radiantcms-couchrest_model-0.1.5 bin/radiant
radiantcms-couchrest_model-0.1.4 bin/radiant
radiantcms-couchrest_model-0.1.3 bin/radiant
radiantcms-couchrest_model-0.1.2 bin/radiant
radiantcms-couchrest_model-0.1.1 bin/radiant
radiantcms-couchrest_model-0.1 bin/radiant
radiant-0.7.2 bin/radiant
radiant-0.9.1 bin/radiant
radiant-0.8.2 bin/radiant
radiant-0.9.0.rc2 bin/radiant