Sha256: 316f29c78ea58a620049b79fe618648a568d6353cd666ff06faf8327dd27df18

Contents?: true

Size: 1.97 KB

Versions: 71

Compression:

Stored size: 1.97 KB

Contents

# frozen_string_literal: true

require "thor"

require_relative "list"
require_relative "upsert"
require_relative "remove"
require_relative "../../sub_command_base"

module Neetob
  class CLI
    module NeetoDeploy
      module ConfigVars
        class Commands < SubCommandBase
          class_option :apps,
            {
              type: :array, required: true,
              desc: "neetoDeploy app names. Can be matched using the '*' wildcard. Example: \"neeto*\" \"neeto-cal-web-staging\""
            }

          desc "list", "List all the config variables in the neetoDeploy apps"
          option :apps, type: :array, required: true, desc: "neetoDeploy app names. Can be matched using the '*' wildcard. Example: \"neeto*\" \"neeto-cal-web-staging\""
          def list
            List.new(options[:apps], options[:sandbox]).run
          end

          desc "upsert", "Update and insert the config vars in neetoDeploy apps"
          option :apps, type: :array, desc: "neetoDeploy app names. Can be matched using the '*' wildcard. Example: \"neeto*\" \"neeto-cal-web-staging\""
          option :path, type: :string, aliases: :p, desc: "The JSON file path from which config vars will be upserted"
          option :path_with_project_keys, type: :string, desc: "The JSON file path with the project names as the key containing required config vars for each project."
          def upsert
            Upsert.new(options[:apps], options[:path], options[:path_with_project_keys], options[:sandbox]).run
          end

          desc "remove", "Remove the config vars from neetoDeploy apps"
          option :apps, type: :array, required: true, desc: "neetoDeploy app names. Can be matched using the '*' wildcard. Example: \"neeto*\" \"neeto-cal-web-staging\""
          option :keys, type: :array, required: true, desc: "Array of config vars to be removed."
          def remove
            Remove.new(options[:apps], options[:keys], options[:sandbox]).run
          end
        end
      end
    end
  end
end

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
neetob-0.5.43 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.42 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.41 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.40 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.39 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.38 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.37 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.36 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.35 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.34 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.33 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.32 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.31 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.30 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.29 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.28 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.27 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.26 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.25 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.24 lib/neetob/cli/neeto_deploy/config_vars/commands.rb