Sha256: dacc330887d37033140baf50ef10ab86164ef80042730a754bef59bc277a3da5

Contents?: true

Size: 970 Bytes

Versions: 72

Compression:

Stored size: 970 Bytes

Contents

# frozen_string_literal: true

require_relative "../../base"

module Neetob
  class CLI
    module Heroku
      module Access
        class List < Base
          attr_accessor :apps, :sandbox

          def initialize(apps, sandbox = false)
            super()
            @apps = apps
            @sandbox = sandbox
          end

          def run
            matching_apps = find_all_matching_apps_or_repos(apps, :heroku, sandbox)
            matching_apps.each do |app|
              ui.info("\n  Users for \"#{app}\" app\n")
              users = `heroku access -a #{app}`
              unless $?.success?
                ui.error("There is a problem in accessing the app with name \"#{app}\" in your account.")
                ui.error("Please check the specified app name and ensure you're authorized to view that app.")
                next
              end

              ui.success(users)
            end
          end
        end
      end
    end
  end
end

Version data entries

72 entries across 72 versions & 1 rubygems

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