Class: Neetob::CLI::Heroku::ConfigVars::List
- Defined in:
- lib/neetob/cli/heroku/config_vars/list.rb
Constant Summary
Constants inherited from Base
Constants inherited from Base
Instance Attribute Summary collapse
-
#apps ⇒ Object
Returns the value of attribute apps.
-
#keys ⇒ Object
Returns the value of attribute keys.
-
#required_config_vars_file_path ⇒ Object
Returns the value of attribute required_config_vars_file_path.
-
#sandbox ⇒ Object
Returns the value of attribute sandbox.
Attributes inherited from Base
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(apps, keys = [], required_config_vars_file_path = "", sandbox = false) ⇒ List
constructor
A new instance of List.
- #run ⇒ Object
Methods inherited from Base
Methods included from Utils
#camel_case_to_slug, #is_upper?, #symbolize_keys
Constructor Details
#initialize(apps, keys = [], required_config_vars_file_path = "", sandbox = false) ⇒ List
Returns a new instance of List.
12 13 14 15 16 17 18 |
# File 'lib/neetob/cli/heroku/config_vars/list.rb', line 12 def initialize(apps, keys = [], required_config_vars_file_path = "", sandbox = false) super() @apps = apps @sandbox = sandbox @keys = keys @required_config_vars_file_path = required_config_vars_file_path end |
Instance Attribute Details
#apps ⇒ Object
Returns the value of attribute apps.
10 11 12 |
# File 'lib/neetob/cli/heroku/config_vars/list.rb', line 10 def apps @apps end |
#keys ⇒ Object
Returns the value of attribute keys.
10 11 12 |
# File 'lib/neetob/cli/heroku/config_vars/list.rb', line 10 def keys @keys end |
#required_config_vars_file_path ⇒ Object
Returns the value of attribute required_config_vars_file_path.
10 11 12 |
# File 'lib/neetob/cli/heroku/config_vars/list.rb', line 10 def required_config_vars_file_path @required_config_vars_file_path end |
#sandbox ⇒ Object
Returns the value of attribute sandbox.
10 11 12 |
# File 'lib/neetob/cli/heroku/config_vars/list.rb', line 10 def sandbox @sandbox end |
Instance Method Details
#run ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/neetob/cli/heroku/config_vars/list.rb', line 20 def run matching_apps = find_all_matching_apps_or_repos(apps, :heroku, sandbox) matching_apps.each do |app| ui.info("\n Config of #{app}\n") config = `heroku config -a #{app} --json` 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 table = Terminal::Table.new headings: table_columns, rows: filter_config(config) ui.success(table) end end |