Sha256: d7ba8c9ad8982a197158c4db147a62a4ecfbb09d27aa8d1b276cf1fd79579561

Contents?: true

Size: 1.26 KB

Versions: 50

Compression:

Stored size: 1.26 KB

Contents

# frozen_string_literal: true

require "thor"

require_relative "list"
require_relative "add"
require_relative "remove"
require_relative "../../sub_command_base"

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

          desc "list", "List all the users of the Heroku apps"
          def list
            List.new(options[:apps], options[:sandbox]).run
          end

          desc "add", "Add new users to the Heroku apps"
          option :users, type: :array, required: true, desc: "Users' emails that need to be added to Heroku apps"
          def add
            Add.new(options[:apps], options[:users], options[:sandbox]).run
          end

          desc "remove", "Remove the users from the Heroku apps"
          option :users, type: :array, required: true, desc: "Users' emails that need to be removed from the Heroku apps"
          def remove
            Remove.new(options[:apps], options[:users], options[:sandbox]).run
          end
        end
      end
    end
  end
end

Version data entries

50 entries across 50 versions & 2 rubygems

Version Path
neetob-0.1.5 lib/neetob/cli/heroku/access/commands.rb
neetob-ud-0.2.14 lib/neetob/cli/heroku/access/commands.rb
neetob-ud-0.2.13 lib/neetob/cli/heroku/access/commands.rb
neetob-0.1.4 lib/neetob/cli/heroku/access/commands.rb
neetob-ud-0.2.11 lib/neetob/cli/heroku/access/commands.rb
neetob-ud-0.2.9 lib/neetob/cli/heroku/access/commands.rb
neetob-ud-0.2.5 lib/neetob/cli/heroku/access/commands.rb
neetob-0.1.2 lib/neetob/cli/heroku/access/commands.rb
neetob-0.1.1 lib/neetob/cli/heroku/access/commands.rb
neetob-0.1.0 lib/neetob/cli/heroku/access/commands.rb