Sha256: 93ab85689609494003451ab35773de0232d30e4a74bfcab5583d659a7979ef97
Contents?: true
Size: 1.59 KB
Versions: 64
Compression:
Stored size: 1.59 KB
Contents
#!/usr/bin/env ruby require 'rails/all' require 'caboose' require 'caboose/engine' require 'caboose/version' require 'caboose/caboose_helper' require 'trollop' #puts "Usage:" #puts "Create a new caboose app:" #puts " caboose new <app_path>" #puts "Initialize an existing rails app as a new caboose app:" #puts " caboose init [<app_path>]\n\n" #exit global_opts = Trollop::options do banner <<-EOS -------------------------------------------------------------------------------- Caboose CMS A content management system built on top of Ruby on Rails. -------------------------------------------------------------------------------- Usage: caboose new <path> caboose init [--force] [<path>] -------------------------------------------------------------------------------- EOS version "Caboose CMS Version #{Caboose::VERSION}\n\n" stop_on ['version', 'new', 'init'] end cmd = ARGV.shift case cmd when 'new' path = ARGV.shift if (path.nil?) puts "Error: path for new app is required.\n\n" global_opts.help exit end puts "Creating the new rails app..." `rails new #{path} -d=mysql` helper = CabooseHelper.new(path, true) helper.init_all when 'init' opts = Trollop::options do opt :force, 'Force re-installation of all caboose files.', :default => false end path = ARGV.shift path = Dir.pwd if path.nil? is_rails_app = File.exists?(File.join(path, 'config', 'environment.rb')) if (!is_rails_app) puts "Error: Not a rails app.\n\n" global_opts.help exit end helper = CabooseHelper.new(path, opts.force) helper.init_all else end
Version data entries
64 entries across 64 versions & 1 rubygems