Sha256: 2f0d1a00e8be2e46d5bc1d0b710e42fe4f8ff6c0206d256b3ca4c8413feb4dbf

Contents?: true

Size: 1.52 KB

Versions: 9

Compression:

Stored size: 1.52 KB

Contents

# frozen_string_literal: true

require "thor"

module Neetob
  class CLI < Thor
    require_relative "cli/heroku/commands"
    require_relative "cli/github/commands"
    require_relative "cli/users/commands"
    require_relative "cli/fetchorupdate_repos/execute"
    require_relative "cli/local/commands"
    require_relative "cli/code/commands"

    class_option :sandbox,
      {
        type: :boolean, default: false,
        desc: "All the commands in sandbox mode will run only on the \"neeto-dummy\" app."
      }

    def self.start(*)
      super
    end

    desc "heroku", "Interact with any resource in Heroku"
    subcommand "heroku", Heroku::Commands

    desc "github", "Interact with any resource in Github"
    subcommand "github", Github::Commands

    desc "users", "Interact with the contributors of neeto apps"
    subcommand "users", Users::Commands

    desc "local", "Interact with the local neeto repos"
    subcommand "local", Local::Commands

    desc "code", "Interact with code base of neeto products"
    subcommand "code", Code::Commands

    desc "make_repos_uptodate", "Uptodate all neeto repos"
    option :repos, type: :array, aliases: "-r", default: ["*"],
      desc: "Github repo names. Can be matched using the '*' wildcard. Example: \"neeto*\" \"neeto-cal-web\", also providing \"all\" as value matches all neeto repos. Note: The default value is \"*\", hence all neeto repos would be affected."
    def make_repos_uptodate
      FetchorupdateRepos::Execute.new(options[:sandbox], options[:repos]).run
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
neetob-0.4.6 lib/neetob/cli.rb
neetob-0.4.5 lib/neetob/cli.rb
neetob-0.4.4 lib/neetob/cli.rb
neetob-0.4.3 lib/neetob/cli.rb
neetob-0.4.2 lib/neetob/cli.rb
neetob-0.4.1 lib/neetob/cli.rb
neetob-0.4.0 lib/neetob/cli.rb
neetob-0.3.2 lib/neetob/cli.rb
neetob-0.3.1 lib/neetob/cli.rb