Sha256: 316f29c78ea58a620049b79fe618648a568d6353cd666ff06faf8327dd27df18

Contents?: true

Size: 1.97 KB

Versions: 57

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

57 entries across 57 versions & 1 rubygems

Version Path
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
neetob-0.5.23 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.22 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.21 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.20 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.19 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.18 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.17 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
neetob-0.5.16 lib/neetob/cli/neeto_deploy/config_vars/commands.rb
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