Sha256: e093f00211afd61fa9d471c1a9702aa13a6709fae46f5509adc3ee882c778e49

Contents?: true

Size: 906 Bytes

Versions: 20

Compression:

Stored size: 906 Bytes

Contents

require "potassium/version"
require 'potassium/cli_options'
require './spec/support/potassium_test_helpers'
require "term/ansicolor"
require "gli"

module Potassium::TestCLI
  extend self
  extend GLI::App
  extend PotassiumTestHelpers
  extend Potassium::CliOptions
  extend Term::ANSIColor

  program_desc "Platanus Rails TEST application generator"
  version Potassium::VERSION
  hide_commands_without_desc true

  desc "Create a new Potassium TEST project"
  command :create do |c|
    c.default_desc "Create a TEST project"

    create_options(true).each { |opts| c.send(opts.delete(:type), opts.delete(:name), opts) }

    c.action do |_global_options, options, _args|
      drop_dummy_database
      remove_project_directory
      create_dummy_project(options)
      puts green("Your test app was created inside the #{project_path} directory")
    end
  end

  exit Potassium::TestCLI.run(ARGV)
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
potassium-7.2.0 lib/potassium/test_cli.rb
potassium-7.1.0 lib/potassium/test_cli.rb
potassium-7.0.0 lib/potassium/test_cli.rb
potassium-6.7.0 lib/potassium/test_cli.rb
potassium-6.6.0 lib/potassium/test_cli.rb
potassium-6.5.0 lib/potassium/test_cli.rb
potassium-6.4.0 lib/potassium/test_cli.rb
potassium-6.3.0 lib/potassium/test_cli.rb
potassium-6.2.0 lib/potassium/test_cli.rb
potassium-6.1.0 lib/potassium/test_cli.rb
potassium-6.0.0 lib/potassium/test_cli.rb
potassium-5.2.3 lib/potassium/test_cli.rb
potassium-5.2.2 lib/potassium/test_cli.rb
potassium-5.2.1 lib/potassium/test_cli.rb
potassium-5.2.0 lib/potassium/test_cli.rb
potassium-5.1.4 lib/potassium/test_cli.rb
potassium-5.1.3 lib/potassium/test_cli.rb
potassium-5.1.2 lib/potassium/test_cli.rb
potassium-5.1.1 lib/potassium/test_cli.rb
potassium-3.0.0 lib/potassium/test_cli.rb