Sha256: d2156f9d1547df8214660f378dd7aad385ca9a193878357bcb4a815109ae20f1

Contents?: true

Size: 668 Bytes

Versions: 3

Compression:

Stored size: 668 Bytes

Contents

class HrImportPipeline < RubySync::Pipelines::BasePipeline

  client :hr

  vault :ldap_vault

  # Remove any fields that you don't want to set in the vault from the client
  allow_in 'id', 'first_name', 'last_name', 'skills'

  # "in" means going from client to vault
  in_transform do
    map 'cn', 'id'
    map 'sn', 'last_name'
    map 'givenname', 'first_name'
    map('employeeType') { value_of('skills').split(':') }
    drop_changes_to 'skills'
    map('objectclass') { 'inetOrgPerson' }
  end
  # Should evaluate to the path for placing a new record on the vault
  in_place do
    "cn=#{source_path},ou=users,o=my-organization,dc=my-domain,dc=com"
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubysync-0.1.1 examples/csv_to_ldap/config/pipelines/hr_import_pipeline.rb
rubysync-0.1.0 examples/csv_to_ldap/config/pipelines/hr_import_pipeline.rb
rubysync-0.2.1 examples/csv_to_ldap/config/pipelines/hr_import_pipeline.rb