TODO: Write a gem description
Add this line to your application's Gemfile:
gem 'config-ldif-dsl' , github: 'Galathius/config-ldif-dsl'
And then execute:
$ bundle
require 'ldif'
block =
proc do
person do
first_name 'John'
second_name 'Doe'
password '123qwe'
end
group do
name 'administrators'
member 'John_Doe'
end
end
LDIF::DSL.ldif(&block))
Result:
version: 1
dn: ou=people,dc=test
ou: people
objectClass: top
objectclass: organizationalUnit
dn: ou=groups,dc=test
ou: groups
objectClass: top
objectclass: organizationalUnit
dn: cn=administrators,ou=groups,dc=test
objectclass: top
objectClass: groupOfUniqueNames
cn: administrators
ou: groups
uniqueMember: cn=John_Doe,ou=people,dc=test
dn: cn=John_Doe,ou=people,dc=test
cn: John_Doe
sn: Doe
givenName: John
mail: [email protected]
userpassword: {SHA}Bf50YcYHwzIpdy1AJQVgEBan0Oo=
objectclass: top
objectclass: person
objectClass: organizationalPerson
objectclass: inetOrgPerson
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request