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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
104bfa2a
Commit
104bfa2a
authored
Dec 27, 2016
by
Alex Braha Stoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove WikiPage#full_path
parent
94dcadd6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
25 deletions
+0
-25
app/models/wiki_page.rb
app/models/wiki_page.rb
+0
-5
spec/models/wiki_page_spec.rb
spec/models/wiki_page_spec.rb
+0
-20
No files found.
app/models/wiki_page.rb
View file @
104bfa2a
...
@@ -114,11 +114,6 @@ class WikiPage
...
@@ -114,11 +114,6 @@ class WikiPage
@attributes
[
:format
]
||
:markdown
@attributes
[
:format
]
||
:markdown
end
end
# The full path for this page, including its filename and extension.
def
full_path
"
#{
directory
}
/
#{
page
.
filename
}
"
.
gsub
(
/\/+/
,
'/'
)
end
# The commit message for this page version.
# The commit message for this page version.
def
message
def
message
version
.
try
(
:message
)
version
.
try
(
:message
)
...
...
spec/models/wiki_page_spec.rb
View file @
104bfa2a
...
@@ -270,26 +270,6 @@ describe WikiPage, models: true do
...
@@ -270,26 +270,6 @@ describe WikiPage, models: true do
end
end
end
end
describe
'#full_path'
do
context
'when the page is at the root directory'
do
it
'returns /filename.fileextension'
do
create_page
(
'file'
,
'content'
)
page
=
wiki
.
find_page
(
'file'
)
expect
(
page
.
full_path
).
to
eq
(
'/file.md'
)
end
end
context
'when the page is inside an actual directory'
do
it
'returns /directory/filename.fileextension'
do
create_page
(
'dir/file'
,
'content'
)
page
=
wiki
.
find_page
(
'dir/file'
)
expect
(
page
.
full_path
).
to
eq
(
'/dir/file.md'
)
end
end
end
describe
'#historical?'
do
describe
'#historical?'
do
before
do
before
do
create_page
(
'Update'
,
'content'
)
create_page
(
'Update'
,
'content'
)
...
...
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