distinguished_name 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,3 +1,22 @@
1
- A String Representation of Distinguished Names
1
+ #A String Representation of Distinguished Names
2
+
3
+ * This is a gem for interacting with the string representation of distinguished names, per the RFC-1779 (http://www.ietf.org/rfc/rfc1779.txt)
4
+
5
+ * It will allow you to transform a distinguished name that is passed from Apache in a particular format into another format.
6
+ ```
7
+ DistinguishedName::Transform.slashify("CN=Welker.Wes.83,OU=people,OU=Patriots,O=NFL,C=US")
8
+ # => "/C=US/O=NFL/OU=Patriots/OU=people/CN=Welker.Wes.83"
9
+ DistinguishedName::Transform.ldapify("/C=US/O=NFL/OU=Patriots/OU=people/CN=Welker.Wes.83")
10
+ # => "CN=Welker.Wes.83,OU=people,OU=Patriots,O=NFL,C=US"
11
+ ```
12
+
13
+ * It will also leave distinguished names 'unconverted', but still validate them
14
+ ```
15
+ DistinguishedName::Transform.slashify("/C=US/O=NFL/OU=Patriots/OU=people/CN=Welker.Wes.83")
16
+ # => "/C=US/O=NFL/OU=Patriots/OU=people/CN=Welker.Wes.83"
17
+ DistinguishedName::Transform.ldapify("CN=Welker.Wes.83,OU=people,OU=Patriots,O=NFL,C=US")
18
+ # => "CN=Welker.Wes.83,OU=people,OU=Patriots,O=NFL,C=US"
19
+ ```
20
+
21
+ * It will raise an OpenSSL::X509::NameError if you give it an invalid Distinguished Name
2
22
 
3
- This is a gem for interacting with the string representation of distinguished names, per the RFC-1779 (http://www.ietf.org/rfc/rfc1779.txt)
@@ -1,4 +1,5 @@
1
1
  require 'openssl'
2
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'distinguished_name'))
2
3
 
3
4
  class DistinguishedName::Transform
4
5
 
@@ -1,3 +1,3 @@
1
1
  module DistinguishedName
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -4,8 +4,8 @@ class TransformTest < Test::Unit::TestCase
4
4
 
5
5
 
6
6
  def setup
7
- @ldap_dn = "CN=Ward.Hines.86,OU=people,OU=Steelers,O=NFL,C=US"
8
- @slash_dn = "/C=US/O=NFL/OU=Steelers/OU=people/CN=Ward.Hines.86"
7
+ @ldap_dn = "CN=Welker.Wes.83,OU=people,OU=Patriots,O=NFL,C=US"
8
+ @slash_dn = "/C=US/O=NFL/OU=Patriots/OU=people/CN=Welker.Wes.83"
9
9
  super
10
10
  end
11
11
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: distinguished_name
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: