Sha256: 03fd74ae8bc426d2a9c0420ee27082850ccef80d68fe3665afe4fe9a536a565f
Contents?: true
Size: 1.09 KB
Versions: 7
Compression:
Stored size: 1.09 KB
Contents
#!/usr/bin/env ruby # frozen_string_literal: true USAGE = <<~END calagator: setup Calagator in a new or existing Rails application Usage: calagator new APP_PATH [options] calagator install calagator new: generates a new Rails app and install Calagator into it Options: --test_app # Generates an app suitable for use in spec/test_app for Calagator # development and testing In the case of `calagator new`, all other options will be passed along to `rails new`; see `rails new --help` for supported options. To generate an app using a specific Rails version, e.g. for 4.2.1: calagator _4.2.1_ new my_great_calendar calagator install: install Calagator into an existing Rails application Options: none END TEMPLATE_PATH = File.expand_path('../rails_template.rb', __dir__) command = ARGV.shift case command when /_\d+\.\d+\.\d+_/, 'new' system "rails #{command} #{ARGV.join(' ')} -m #{TEMPLATE_PATH} --skip-bundle" when 'install' system "bundle exec rake rails:template LOCATION=#{TEMPLATE_PATH}" else puts USAGE end
Version data entries
7 entries across 7 versions & 3 rubygems