Sha256: 6474806faedf8fcecc3a473c5e929d1abaa5ad69c1d3f2332ef7be3a03cb5eda

Contents?: true

Size: 632 Bytes

Versions: 13

Compression:

Stored size: 632 Bytes

Contents

#!/usr/bin/env ruby

require 'erb'
require 'fileutils'

FileUtils.chdir(File.dirname(__FILE__))

## For OSX:
ENV['PATH'] = "#{ENV['PATH']}:/usr/libexec"

template = File.read('slapd-test.conf.erb')
normal_out = 'slapd-test.conf'
ssl_out = 'slapd-ssl-test.conf'

File.open(normal_out, 'w') do |f|
  @ssl = false
  f.write ERB.new(template).result(binding)
end
File.open(ssl_out, 'w') do |f|
  @ssl = true
  f.write ERB.new(template).result(binding)
end

if ARGV.first == '--ssl'
  cmd = "slapd -d 1 -f #{ssl_out} -h ldaps://localhost:3389"
else
  cmd = "slapd -d 1 -f #{normal_out} -h ldap://localhost:3389"
end

puts(cmd)
exec(cmd)

Version data entries

13 entries across 13 versions & 4 rubygems

Version Path
devise_ldap_authenticatable-0.8.7 spec/ldap/run-server
devise_ldap_authenticatable-0.8.6 spec/ldap/run-server
houston-devise_ldap_authenticatable-0.7.1 spec/ldap/run-server
houston-devise_ldap_authenticatable-0.7.0 spec/ldap/run-server
xn_devise_ldap_authenticatable-0.8.5 spec/ldap/run-server
devise_ldap_authenticatable-0.8.5 spec/ldap/run-server
devise_ldap_authenticatable-0.8.4 spec/ldap/run-server
devise_ldap_authenticatable-0.8.3 spec/ldap/run-server
devise_ldap_norm-0.2.0 spec/ldap/run-server
devise_ldap_authenticatable-0.8.1 spec/ldap/run-server
devise_ldap_authenticatable-0.8.0 spec/ldap/run-server
devise_ldap_authenticatable-0.8.0.pre spec/ldap/run-server
devise_ldap_authenticatable-0.7.0 spec/ldap/run-server