Sha256: aa04d4853b5aa906d2769ee831777bed96602e8dc191d0f34b751be2fa17e585

Contents?: true

Size: 893 Bytes

Versions: 7

Compression:

Stored size: 893 Bytes

Contents

Capricorn.runtime_gem('thor', Capricorn::THOR_VERSION)

module Capricorn
  module Apps # :nodoc:
    
    class Satellite < Thor
      desc 'list', 'show all managed satellites'
      method_options :token => :optional
      def list
        Capricorn.client(options[:token]).satellites.each do |sat|
          puts sat.domain
          sat.engines.each do |name, options|
            puts "- #{name} #{options.inspect}"
          end
        end
      end
      
      desc 'install DOMAIN', 'install a satellite'
      method_options :token => :optional
      def install(domain)
        Capricorn.client(options[:token]).install_satellite(domain)
      end
      
      desc 'uninstall DOMAIN', 'uninstall a satellite'
      method_options :token => :optional
      def uninstall(domain)
        Capricorn.client(options[:token]).uninstall_satellite(domain)
      end
    end
    
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
simonmenke-capricorn-0.2.00 lib/capricorn/apps/satellite.rb
simonmenke-capricorn-0.2.03 lib/capricorn/apps/satellite.rb
capricorn-0.2.04 lib/capricorn/apps/satellite.rb
capricorn-0.2.03 lib/capricorn/apps/satellite.rb
capricorn-0.2.02 lib/capricorn/apps/satellite.rb
capricorn-0.2.01 lib/capricorn/apps/satellite.rb
capricorn-0.2.00 lib/capricorn/apps/satellite.rb