bin/baleen in baleen-0.0.2 vs bin/baleen in baleen-0.0.9
- old
+ new
@@ -1,17 +1,29 @@
#!/usr/bin/env ruby
require "thor"
+require "baleen"
class BaleenCommand < Thor
desc "cucumber", "Running cucumber features"
option :image, :required => true
option :work_dir, :default => "./"
option :files, :default => "features"
option :before_command, :default => nil
+ option :host, :default => "127.0.0.1"
+ option :port, :default => "5533"
def cucumber
- puts options[:image]
+ client = Baleen::Client.new(options[:host], options[:port])
+ request = Baleen::Message::Request::Cucumber.new(
+ image: options[:image],
+ work_dir: options[:work_dir],
+ files: options[:files],
+ before_command: options[:before_command],
+ )
+
+ job = Baleen::Job.new(client, request)
+ job.start
end
end
BaleenCommand.start