Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
e0a0c6b0
Commit
e0a0c6b0
authored
Oct 06, 2017
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make internal methods private
parent
8c29a045
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
20 deletions
+22
-20
lib/gitlab/ldap/dn.rb
lib/gitlab/ldap/dn.rb
+22
-20
No files found.
lib/gitlab/ldap/dn.rb
View file @
e0a0c6b0
...
@@ -48,26 +48,6 @@ module Gitlab
...
@@ -48,26 +48,6 @@ module Gitlab
end
end
end
end
def
initialize_array
(
args
)
buffer
=
StringIO
.
new
args
.
each_with_index
do
|
arg
,
index
|
if
index
.
even?
# key
buffer
<<
","
if
index
>
0
buffer
<<
arg
else
# value
buffer
<<
"="
buffer
<<
self
.
class
.
escape
(
arg
)
end
end
@dn
=
buffer
.
string
end
def
initialize_string
(
arg
)
@dn
=
arg
.
to_s
end
##
##
# Parse a DN into key value pairs using ASN from
# Parse a DN into key value pairs using ASN from
# http://tools.ietf.org/html/rfc2253 section 3.
# http://tools.ietf.org/html/rfc2253 section 3.
...
@@ -281,6 +261,28 @@ module Gitlab
...
@@ -281,6 +261,28 @@ module Gitlab
escaped
.
gsub
(
HEX_ESCAPE_RE
)
{
|
char
|
HEX_ESCAPES
[
char
]
}
escaped
.
gsub
(
HEX_ESCAPE_RE
)
{
|
char
|
HEX_ESCAPES
[
char
]
}
end
end
private
def
initialize_array
(
args
)
buffer
=
StringIO
.
new
args
.
each_with_index
do
|
arg
,
index
|
if
index
.
even?
# key
buffer
<<
","
if
index
>
0
buffer
<<
arg
else
# value
buffer
<<
"="
buffer
<<
self
.
class
.
escape
(
arg
)
end
end
@dn
=
buffer
.
string
end
def
initialize_string
(
arg
)
@dn
=
arg
.
to_s
end
##
##
# Proxy all other requests to the string object, because a DN is mainly
# Proxy all other requests to the string object, because a DN is mainly
# used within the library as a string
# used within the library as a string
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment