Sha256: bbe91e9a0c00359526cd85bf9daf45f52d1a2a2c694bfaf67e9b109025d3f1cb

Contents?: true

Size: 1.71 KB

Versions: 14

Compression:

Stored size: 1.71 KB

Contents

require "souls"
module Souls
  class CLI < Thor
    desc "generate [COMMAND]", "SOULs Generate Commands"
    subcommand "generate", Generate

    desc "update [COMMAND]", "SOULs Update Commands"
    subcommand "update", Update

    desc "create [COMMAND]", "SOULs Create Worker"
    subcommand "create", Create

    desc "db [COMMAND]", "SOULs DB Commands"
    subcommand "db", DB

    desc "docker [COMMAND]", "SOULs Docker Commands"
    subcommand "docker", Docker

    desc "gcloud [COMMAND]", "SOULs Gcloud Commands"
    subcommand "gcloud", Gcloud

    desc "sync", " SOULs Sync Commands"
    subcommand "sync", Sync

    desc "upgrade [COMMAND]", "SOULs Upgrade Commands"
    subcommand "upgrade", Upgrade

    # rubocop:disable Style/StringHashKeys
    map "c" => :console
    map "s" => :server
    map "g" => :generate
    map "t" => :test
    map ["-v", "--v", "--version", "-version"] => :version
    # rubocop:enable Style/StringHashKeys

    desc "version", "SOULs Version"
    def version
      puts(Souls::VERSION)
    end

    desc "test", "Run Rspec & Rubocop"
    method_option :all, type: :boolean, aliases: "--all", default: false, desc: "Run (Rspec & steep check & Rubocop)"
    def test
      if options[:all]
        Dir.chdir(Souls.get_mother_path.to_s) do
          system("steep check")
        end
        Dir.chdir(Souls.get_api_path.to_s) do
          system("rubocop -A")
          system("bundle exec rspec")
        end
      else
        system("rubocop -A")
        system("bundle exec rspec")
      end
    end

    desc "check", "Run steep check"
    def check
      Dir.chdir(Souls.get_mother_path.to_s) do
        system("steep check")
      end
    end

    def self.exit_on_failure?
      false
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
souls-0.68.7 lib/souls/cli.rb
souls-0.68.6 lib/souls/cli.rb
souls-0.68.5 lib/souls/cli.rb
souls-0.68.4 lib/souls/cli.rb
souls-0.68.3 lib/souls/cli.rb
souls-0.68.2 lib/souls/cli.rb
souls-0.68.1 lib/souls/cli.rb
souls-0.68.0 lib/souls/cli.rb
souls-0.67.3 lib/souls/cli.rb
souls-0.67.2 lib/souls/cli.rb
souls-0.67.1 lib/souls/cli.rb
souls-0.67.0 lib/souls/cli.rb
souls-0.66.3 lib/souls/cli.rb
souls-0.66.2 lib/souls/cli.rb