Sha256: 8079e6ab4b6124d3b6b3d39fb2c84c8928e9a4b1da212062bcb975636c3db774

Contents?: true

Size: 632 Bytes

Versions: 3

Compression:

Stored size: 632 Bytes

Contents

#!/usr/bin/env ruby
require "rails/crud/tools/cli"

def display_help
  puts <<~HELP
    Usage: crud [command]

    Commands:
      init    Initialize by generating CRUD and config files
      gen_crud     Generate CRUD
      gen_config   Generate config
      help    Display this help message
  HELP
end

if ARGV.empty? || ARGV.include?("help")
  display_help
elsif ARGV.include?("init")
  RailsCrudTools::CLI.init
elsif ARGV.include?("gen_crud")
  RailsCrudTools::CLI.generate_crud_file
elsif ARGV.include?("gen_config")
  RailsCrudTools::CLI.generate_crudconfig
else
  puts "Unknown command: #{ARGV.join(' ')}"
  display_help
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rails-crud-tools-0.4.2 exe/crud
rails-crud-tools-0.4.1 exe/crud
rails-crud-tools-0.4.0 exe/crud