Module: Noveku::Addon

Included in:
Core
Defined in:
lib/noveku/addon.rb

Instance Method Summary collapse

Instance Method Details

#addon_cmd_str(name) ⇒ Object

Command string to add an addon



4
5
6
# File 'lib/noveku/addon.rb', line 4

def addon_cmd_str(name)
  "addons:add #{name}"
end

#cleaned_addons_listObject

Clean the list of addons



21
22
23
24
25
26
27
28
29
# File 'lib/noveku/addon.rb', line 21

def cleaned_addons_list
  return @addons if @addons

  @addons = raw_list_addons.split("\n")
  @addons.reject! { |addon| addon.start_with?('===') }
  @addons.map! { |addon| addon.split(' ').first }
  @addons.uniq!
  @addons
end

#raw_list_addonsObject

Get the raw list of addons



14
15
16
17
18
# File 'lib/noveku/addon.rb', line 14

def raw_list_addons
  heroku = get_heroku raw_list_addons_str

  `#{heroku.command}`
end

#raw_list_addons_strObject

Command string to list addons for current env



9
10
11
# File 'lib/noveku/addon.rb', line 9

def raw_list_addons_str
  "addons"
end