Sha256: f44845672ce63406f2e81c24beb4da5d2a0b9279a0c043c23760bf6304af3db5

Contents?: true

Size: 631 Bytes

Versions: 30

Compression:

Stored size: 631 Bytes

Contents

require "open3"

class Command_Helper

  attr_reader(:output, :result)

  attr_writer(:command, :params, :controlrepo)

  def initialize
    @executable = ENV["BUNDLE_GEMFILE"] ? "bundle exec onceover" : "onceover"
  end

  def run
    @output, @result = Open3.capture2e generate_command
  end

  def success?
    return @result.success?
  end

  def exit_code
    @result.exitstatus
  end

  def generate_command
    controlrepo_param = @controlrepo ? "--path #{File.expand_path(@controlrepo.root_folder)}" : ''
    return "#{@executable} #{@command} #{controlrepo_param}"
  end

  def to_s
    return generate_command
  end

end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
onceover-3.22.0 features/support/command_helper.rb
onceover-3.21.0 features/support/command_helper.rb
onceover-3.20.0 features/support/command_helper.rb
onceover-3.19.2 features/support/command_helper.rb
onceover-3.19.1 features/support/command_helper.rb
onceover-3.19.0 features/support/command_helper.rb
onceover-3.18.1 features/support/command_helper.rb
onceover-3.18.0 features/support/command_helper.rb
onceover-3.17.3 features/support/command_helper.rb
onceover-3.17.2 features/support/command_helper.rb
onceover-3.17.1 features/support/command_helper.rb
onceover-3.17.0 features/support/command_helper.rb
onceover-3.16.0 features/support/command_helper.rb
onceover-3.15.2 features/support/command_helper.rb
onceover-3.15.1 features/support/command_helper.rb
onceover-3.15.0 features/support/command_helper.rb
onceover-3.14.1 features/support/command_helper.rb
onceover-3.14.0 features/support/command_helper.rb
onceover-3.13.4 features/support/command_helper.rb
onceover-3.13.3 features/support/command_helper.rb