Sha256: fbb5dabbde9b9753ade7dec87effd35f710cf1359ea7d955b340bbde821ac98f

Contents?: true

Size: 783 Bytes

Versions: 9

Compression:

Stored size: 783 Bytes

Contents

# Override the host and port of the upstream LDAP server
#
class RBMK::Upstream
	def self.host; 'ldap.example.com' end
	def self.port; 33389 end
end

# Override the host and port of RBMK server
#
class RBMK::Server
	def self.host; '0.0.0.0' end
	def self.port; 10389 end
end

# Override logger settings
#
module RBMK::Logger
	def self.level; ::Logger::DEBUG end
end

# The magic! You can transform the LDAP operations
#
module RBMK::Transform

	# For example, we can add a fooBar attribute to any resulting object
	#
	def self.entries entries
		entries.map do |entry|
			entry.merge 'fooBar' => 'baz'
		end
	end

	# In this example we override atrributes in the request so that all of them are requested all the time
	#
	def self.search opts
		opts.merge attrs: ['*', '+']
	end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rbmk-0.1.1 examples/rbmk.rb
rbmk-0.1.0 examples/rbmk.rb
rbmk-0.1.0.i examples/rbmk.rb
rbmk-0.1.0.g examples/rbmk.rb
rbmk-0.1.0.f examples/rbmk.rb
rbmk-0.1.0.e examples/rbmk.rb
rbmk-0.1.0.d examples/rbmk.rb
rbmk-0.1.0.c examples/rbmk.rb
rbmk-0.1.0.b examples/rbmk.rb