Class: Neetob::CLI::NeetoDeploy::ConfigVars::Remove

Inherits:
Base
  • Object
show all
Defined in:
lib/neetob/cli/neeto_deploy/config_vars/remove.rb

Constant Summary

Constants inherited from Base

Base::NEETO_APPS_LIST_LINK

Instance Attribute Summary collapse

Attributes inherited from Base

#client

Attributes inherited from Base

#ui

Instance Method Summary collapse

Methods included from Utils

#camel_case_to_slug, #is_upper?, #symbolize_keys

Constructor Details

#initialize(apps, keys = [], sandbox = false) ⇒ Remove

Returns a new instance of Remove.



12
13
14
15
16
17
# File 'lib/neetob/cli/neeto_deploy/config_vars/remove.rb', line 12

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

Instance Attribute Details

#appsObject

Returns the value of attribute apps.



10
11
12
# File 'lib/neetob/cli/neeto_deploy/config_vars/remove.rb', line 10

def apps
  @apps
end

#keysObject

Returns the value of attribute keys.



10
11
12
# File 'lib/neetob/cli/neeto_deploy/config_vars/remove.rb', line 10

def keys
  @keys
end

#sandboxObject

Returns the value of attribute sandbox.



10
11
12
# File 'lib/neetob/cli/neeto_deploy/config_vars/remove.rb', line 10

def sandbox
  @sandbox
end

Instance Method Details

#runObject



19
20
21
22
23
24
25
26
27
# File 'lib/neetob/cli/neeto_deploy/config_vars/remove.rb', line 19

def run
  matching_apps = find_all_matching_apps_or_repos(apps, :neetodeploy, sandbox)
  matching_apps.each do |app|
    ui.info("\nWorking on #{app}")
    keys.each do |key|
      ui.info(`neetodeploy env unset #{key} -a #{app}`)
    end
  end
end