Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add help to refinerycms command. #1538, #1539.

  • Loading branch information...
commit 5202779e4111f0cf34196b4af6cdaa471f217c92 1 parent 33f86c0
@ugisozols ugisozols authored
Showing with 15 additions and 1 deletion.
  1. +15 −1 bin/refinerycms
View
16 bin/refinerycms
@@ -2,9 +2,23 @@
gem 'railties'
require 'rails/generators'
require 'rails/generators/rails/app/app_generator'
+require File.expand_path('../../core/lib/generators/refinery/cms/cms_generator', __FILE__)
template_path = File.expand_path('../../templates/refinery/installer.rb', __FILE__)
+if ARGV.size == 0 || ARGV[0] == "--help"
+ puts "Usage:"
+ puts " refinerycms APP_NAME [options]"
+ puts ""
+ puts "Options:"
+ options = Refinery::CmsGenerator.class_options
+ options.keys.each do |option_key|
+ puts " --#{option_key}".ljust(28) << "# #{options[option_key].description}"
+ end
+ exit(0)
+end
+
application_name = ARGV.shift
+
result = Rails::Generators::AppGenerator.start [application_name, '-m', template_path, '--skip-test-unit'] | ARGV
if result && result.include?('Gemfile')
@@ -24,4 +38,4 @@ if result && result.include?('Gemfile')
note << "---------\n\n"
puts note
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.