Sha256: 5f5de59511cbd7d96858c86d2a24b3c7e0790e90fdac992a52ba6c12ad0a7d65

Contents?: true

Size: 572 Bytes

Versions: 10

Compression:

Stored size: 572 Bytes

Contents

# frozen_string_literal: true

module Neptuno
  module CLI
    # Configure Neptuno defaults
    class Configure < Neptuno::CLI::Base
      desc 'Configure which services to start by default'

      def call(**)
        configured_services = config.fetch('configured_services')
        configured_services = prompt.multi_select('Active services: ', config.fetch('services')) do |menu|
          menu.default(*configured_services)
        end
        config.set(:configured_services, value: configured_services)
        config.write(force: true)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
neptuno-1.0.10 lib/neptuno/cli/configure.rb
neptuno-1.0.9 lib/neptuno/cli/configure.rb
neptuno-1.0.8 lib/neptuno/cli/configure.rb
neptuno-1.0.7 lib/neptuno/cli/configure.rb
neptuno-1.0.6 lib/neptuno/cli/configure.rb
neptuno-1.0.5 lib/neptuno/cli/configure.rb
neptuno-1.0.3 lib/neptuno/cli/configure.rb
neptuno-1.0.2 lib/neptuno/cli/configure.rb
neptuno-1.0.1 lib/neptuno/cli/configure.rb
neptuno-1.0.0 lib/neptuno/cli/configure.rb