Sha256: 316f29c78ea58a620049b79fe618648a568d6353cd666ff06faf8327dd27df18

Contents?: true

Size: 1.97 KB

Versions: 63

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

63 entries across 63 versions & 1 rubygems

Version Path
neetob-0.5.15 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.14 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.13 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.12 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.11 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.10 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.9 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.8 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.7 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.6 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.5 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.4 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.3 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.2 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.1 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.0 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.4.37 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.4.36 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.4.35 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.4.34 lib/neetob/cli/neeto_deploy/config_vars/commands.rb