Sha256: ff4e779715745427f3a8024230ab6479d265e854671c26d899dc7340a0ff94e4

Contents?: true

Size: 1.27 KB

Versions: 47

Compression:

Stored size: 1.27 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]).process
          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]).process
          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]).process
          end
        end
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
neetob-0.5.29 lib/neetob/cli/heroku/access/commands.rb
neetob-0.5.28 lib/neetob/cli/heroku/access/commands.rb
neetob-0.5.27 lib/neetob/cli/heroku/access/commands.rb
neetob-0.5.26 lib/neetob/cli/heroku/access/commands.rb
neetob-0.5.25 lib/neetob/cli/heroku/access/commands.rb
neetob-0.5.24 lib/neetob/cli/heroku/access/commands.rb
neetob-0.5.23 lib/neetob/cli/heroku/access/commands.rb
neetob-0.5.22 lib/neetob/cli/heroku/access/commands.rb
neetob-0.5.21 lib/neetob/cli/heroku/access/commands.rb
neetob-0.5.20 lib/neetob/cli/heroku/access/commands.rb
neetob-0.5.19 lib/neetob/cli/heroku/access/commands.rb
neetob-0.5.18 lib/neetob/cli/heroku/access/commands.rb
neetob-0.5.17 lib/neetob/cli/heroku/access/commands.rb
neetob-0.5.16 lib/neetob/cli/heroku/access/commands.rb
neetob-0.5.15 lib/neetob/cli/heroku/access/commands.rb
neetob-0.5.14 lib/neetob/cli/heroku/access/commands.rb
neetob-0.5.13 lib/neetob/cli/heroku/access/commands.rb
neetob-0.5.12 lib/neetob/cli/heroku/access/commands.rb
neetob-0.5.11 lib/neetob/cli/heroku/access/commands.rb
neetob-0.5.10 lib/neetob/cli/heroku/access/commands.rb