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.4.16 lib/neetob/cli/heroku/access/commands.rb
neetob-0.4.15 lib/neetob/cli/heroku/access/commands.rb
neetob-0.4.14 lib/neetob/cli/heroku/access/commands.rb
neetob-0.4.13 lib/neetob/cli/heroku/access/commands.rb
neetob-0.4.12 lib/neetob/cli/heroku/access/commands.rb
neetob-0.4.11 lib/neetob/cli/heroku/access/commands.rb
neetob-0.4.10 lib/neetob/cli/heroku/access/commands.rb
neetob-0.4.9 lib/neetob/cli/heroku/access/commands.rb
neetob-0.4.8 lib/neetob/cli/heroku/access/commands.rb
neetob-0.4.7 lib/neetob/cli/heroku/access/commands.rb
neetob-0.4.6 lib/neetob/cli/heroku/access/commands.rb
neetob-0.4.5 lib/neetob/cli/heroku/access/commands.rb
neetob-0.4.4 lib/neetob/cli/heroku/access/commands.rb
neetob-ud-1.0.59 lib/neetob/cli/heroku/access/commands.rb
neetob-ud-0.2.8 lib/neetob/cli/heroku/access/commands.rb
neetob-ud-0.2.6 lib/neetob/cli/heroku/access/commands.rb
neetob-ud-0.2.4 lib/neetob/cli/heroku/access/commands.rb
neetob-ud-0.2.3 lib/neetob/cli/heroku/access/commands.rb
neetob-ud-0.2.2 lib/neetob/cli/heroku/access/commands.rb
neetob-ud-0.2.1 lib/neetob/cli/heroku/access/commands.rb