Sha256: 317d84f792ee071be2499e8f6c3714cca364a3a4033f1623313475f91441da09

Contents?: true

Size: 887 Bytes

Versions: 11

Compression:

Stored size: 887 Bytes

Contents

require 'aruba/cucumber'
$:.push "#{File.dirname(__FILE__)}/../../lib/"
require 'nexus_cli'
require 'rspec'

module ArubaOverrides
  def detect_ruby(cmd)
    processor, platform, *rest = RUBY_PLATFORM.split("-")
    if platform =~ /w32$/ && cmd =~ /^nexus-cli /
      "ruby -I../../lib -S ../../bin/#{cmd}"
    else
      "#{cmd}"
    end
  end
end

World(ArubaOverrides)

Before do
  @aruba_timeout_seconds = 10
end

def get_overrides_string
  @overrides_string ||= "url:http://localhost:8081/nexus repository:releases username:admin password:admin123"
end

def get_overrides
  @overrides ||= {'url' => 'http://localhost:8081/nexus', 'repository' => 'releases', 'username' => 'admin', 'password' => 'admin123'}
end

def temp_dir
  @tmpdir ||= Dir.mktmpdir
end

def nexus_remote
  @nexus_remote ||= NexusCli::Factory.create(get_overrides)
end

at_exit do
  FileUtils.rm_rf(temp_dir)
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
nexus_cli-0.8.4 features/support/env.rb
nexus_cli-0.8.3 features/support/env.rb
nexus_cli-0.8.2 features/support/env.rb
nexus_cli-0.8.1 features/support/env.rb
nexus_cli-0.8.0 features/support/env.rb
nexus_cli-0.7.3 features/support/env.rb
nexus_cli-0.7.2 features/support/env.rb
nexus_cli-0.7.1 features/support/env.rb
nexus_cli-0.7.0 features/support/env.rb
nexus_cli-0.6.0 features/support/env.rb
nexus_cli-0.5.0 features/support/env.rb