Sha256: 1f32d59f142a4d2a37e9e0060e50cb22a5a05b5a95bbdb091e9a8f28d7d24022

Contents?: true

Size: 777 Bytes

Versions: 9

Compression:

Stored size: 777 Bytes

Contents

require 'flydata/command/base'
require 'flydata/command/sender'
require 'flydata/command/helper'

module Flydata
  module Command
    class Start < Base
      def self.slop
        sender_opts = Flydata::Command::Sender.slop_start # Needs options for Sender#start
        sender_opts.on 'skip-helper', 'Skip starting the Helper'
        sender_opts
      end
      def run(*args)
        sender = Flydata::Command::Sender.new(opts)
        sender.start
        unless opts.skip_helper?
          helper_opts = Flydata::Command::Helper.slop_start
          helper_opts.parse!(args)
          helper = Flydata::Command::Helper.new(helper_opts)
          helper.stop # kill existing helper process (if any) and start
          helper.start
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
flydata-0.5.4 lib/flydata/command/start.rb
flydata-0.5.3 lib/flydata/command/start.rb
flydata-0.5.2 lib/flydata/command/start.rb
flydata-0.5.1 lib/flydata/command/start.rb
flydata-0.5.0 lib/flydata/command/start.rb
flydata-0.4.3 lib/flydata/command/start.rb
flydata-0.4.2 lib/flydata/command/start.rb
flydata-0.4.1 lib/flydata/command/start.rb
flydata-0.4.0 lib/flydata/command/start.rb