Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
5323bdb3
Unverified
Commit
5323bdb3
authored
Oct 21, 2016
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FileTree] Sort children
parent
ee6c7297
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
file_tree.rb
spec/integration/file_tree.rb
+1
-1
No files found.
spec/integration/file_tree.rb
View file @
5323bdb3
...
@@ -5,7 +5,7 @@ module FileTree
...
@@ -5,7 +5,7 @@ module FileTree
path
=
Pathname
(
path
)
path
=
Pathname
(
path
)
indentation
=
' '
*
depth
*
2
indentation
=
' '
*
depth
*
2
tree
=
indentation
<<
path
.
to_path
<<
"
\n
"
tree
=
indentation
<<
path
.
to_path
<<
"
\n
"
path
.
children
.
each
do
|
child
|
path
.
children
.
sort_by
{
|
p
|
p
.
to_s
.
downcase
}.
each
do
|
child
|
tree
<<
to_tree
(
child
,
depth
+
1
)
tree
<<
to_tree
(
child
,
depth
+
1
)
end
if
path
.
directory?
end
if
path
.
directory?
tree
tree
...
...
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