Class: ElasticDot::Command::Addons
- Defined in:
- lib/elasticdot/command/addons.rb
Class Method Summary collapse
Class Method Details
.add(addon, opts) ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'lib/elasticdot/command/addons.rb', line 2 def self.add(addon, opts) find_app! opts addon, tier = addon[0].split ':', 2 puts "Configuring addon #{addon} for app #{@app}..." api.post "/apps/#{@app}/addons/#{addon}", tier: tier end |
.list ⇒ Object
23 24 25 26 27 28 |
# File 'lib/elasticdot/command/addons.rb', line 23 def self.list addons = api.get '/addons' puts '=== available' addons.each { |a, i| puts a['name'] } end |
.remove(addons, opts) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/elasticdot/command/addons.rb', line 12 def self.remove(addons, opts) find_app! opts addons.each do |addon| addon = addon.split(':')[0] puts "Removing addon #{addon} from app #{@app}..." api.delete "/apps/#{@app}/addons/#{addon}" end end |