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
79a02df9
Commit
79a02df9
authored
Sep 17, 2012
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update usages of tree_file_project_ref_path to project_tree_path
parent
e33cbb9b
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
41 additions
and
36 deletions
+41
-36
app/controllers/refs_controller.rb
app/controllers/refs_controller.rb
+3
-3
app/decorators/tree_decorator.rb
app/decorators/tree_decorator.rb
+2
-2
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+5
-5
app/helpers/tree_helper.rb
app/helpers/tree_helper.rb
+5
-0
app/views/commits/_commit.html.haml
app/views/commits/_commit.html.haml
+1
-1
app/views/commits/_commit_box.html.haml
app/views/commits/_commit_box.html.haml
+1
-1
app/views/commits/_diffs.html.haml
app/views/commits/_diffs.html.haml
+1
-1
app/views/layouts/_head.html.haml
app/views/layouts/_head.html.haml
+1
-1
app/views/layouts/_project_menu.html.haml
app/views/layouts/_project_menu.html.haml
+1
-1
app/views/refs/_head.html.haml
app/views/refs/_head.html.haml
+1
-1
app/views/refs/blame.html.haml
app/views/refs/blame.html.haml
+2
-2
app/views/refs/logs_tree.js.haml
app/views/refs/logs_tree.js.haml
+1
-1
app/views/tree/_head.html.haml
app/views/tree/_head.html.haml
+2
-2
app/views/tree/_tree.html.haml
app/views/tree/_tree.html.haml
+5
-5
app/views/tree/_tree_file.html.haml
app/views/tree/_tree_file.html.haml
+2
-2
app/views/tree/_tree_item.html.haml
app/views/tree/_tree_item.html.haml
+2
-2
features/steps/project/project_browse_files.rb
features/steps/project/project_browse_files.rb
+1
-1
features/steps/shared/paths.rb
features/steps/shared/paths.rb
+3
-3
spec/requests/gitlab_flavored_markdown_spec.rb
spec/requests/gitlab_flavored_markdown_spec.rb
+1
-1
spec/requests/security/project_access_spec.rb
spec/requests/security/project_access_spec.rb
+1
-1
No files found.
app/controllers/refs_controller.rb
View file @
79a02df9
...
@@ -18,7 +18,7 @@ class RefsController < ApplicationController
...
@@ -18,7 +18,7 @@ class RefsController < ApplicationController
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
do
format
.
html
do
new_path
=
if
params
[
:destination
]
==
"tree"
new_path
=
if
params
[
:destination
]
==
"tree"
tree_project_ref_path
(
@project
,
params
[
:ref
])
project_tree_path
(
@project
,
params
[
:ref
])
else
else
project_commits_path
(
@project
,
ref:
params
[
:ref
])
project_commits_path
(
@project
,
ref:
params
[
:ref
])
end
end
...
@@ -96,10 +96,10 @@ class RefsController < ApplicationController
...
@@ -96,10 +96,10 @@ class RefsController < ApplicationController
@hex_path
=
Digest
::
SHA1
.
hexdigest
(
params
[
:path
]
||
"/"
)
@hex_path
=
Digest
::
SHA1
.
hexdigest
(
params
[
:path
]
||
"/"
)
if
params
[
:path
]
if
params
[
:path
]
@history_path
=
tree_file_project_ref_path
(
@project
,
@ref
,
params
[
:path
]
)
@history_path
=
project_tree_path
(
@project
,
File
.
join
(
@ref
,
params
[
:path
])
)
@logs_path
=
logs_file_project_ref_path
(
@project
,
@ref
,
params
[
:path
])
@logs_path
=
logs_file_project_ref_path
(
@project
,
@ref
,
params
[
:path
])
else
else
@history_path
=
tree_project_ref
_path
(
@project
,
@ref
)
@history_path
=
project_tree
_path
(
@project
,
@ref
)
@logs_path
=
logs_tree_project_ref_path
(
@project
,
@ref
)
@logs_path
=
logs_tree_project_ref_path
(
@project
,
@ref
)
end
end
rescue
rescue
...
...
app/decorators/tree_decorator.rb
View file @
79a02df9
...
@@ -15,7 +15,7 @@ class TreeDecorator < ApplicationDecorator
...
@@ -15,7 +15,7 @@ class TreeDecorator < ApplicationDecorator
part_path
=
part
if
part_path
.
empty?
part_path
=
part
if
part_path
.
empty?
next
unless
parts
.
last
(
2
).
include?
(
part
)
if
parts
.
count
>
max_links
next
unless
parts
.
last
(
2
).
include?
(
part
)
if
parts
.
count
>
max_links
yield
(
h
.
link_to
(
h
.
truncate
(
part
,
length:
40
),
h
.
tree_file_project_ref_path
(
project
,
ref
,
path:
part_path
),
remote: :true
))
yield
(
h
.
link_to
(
h
.
truncate
(
part
,
length:
40
),
h
.
project_tree_path
(
project
,
h
.
tree_join
(
ref
,
part_path
)
),
remote: :true
))
end
end
end
end
end
end
...
@@ -26,7 +26,7 @@ class TreeDecorator < ApplicationDecorator
...
@@ -26,7 +26,7 @@ class TreeDecorator < ApplicationDecorator
def
up_dir_path
def
up_dir_path
file
=
File
.
join
(
path
,
".."
)
file
=
File
.
join
(
path
,
".."
)
h
.
tree_file_project_ref_path
(
project
,
ref
,
file
)
h
.
project_tree_path
(
project
,
h
.
tree_join
(
ref
,
file
)
)
end
end
def
history_path
def
history_path
...
...
app/helpers/application_helper.rb
View file @
79a02df9
...
@@ -58,11 +58,11 @@ module ApplicationHelper
...
@@ -58,11 +58,11 @@ module ApplicationHelper
if
@project
&&
!
@project
.
new_record?
if
@project
&&
!
@project
.
new_record?
project_nav
=
[
project_nav
=
[
{
label:
"
#{
@project
.
name
}
/ Issues"
,
url:
project_issues_path
(
@project
)
},
{
label:
"
#{
@project
.
name
}
/ Issues"
,
url:
project_issues_path
(
@project
)
},
{
label:
"
#{
@project
.
name
}
/ Wall"
,
url:
wall_project_path
(
@project
)
},
{
label:
"
#{
@project
.
name
}
/ Wall"
,
url:
wall_project_path
(
@project
)
},
{
label:
"
#{
@project
.
name
}
/ Tree"
,
url:
tree_project_ref_path
(
@project
,
@project
.
root_ref
)
},
{
label:
"
#{
@project
.
name
}
/ Tree"
,
url:
project_tree_path
(
@project
,
@ref
||
@project
.
root_ref
)
},
{
label:
"
#{
@project
.
name
}
/ Commits"
,
url:
project_commits_path
(
@project
)
},
{
label:
"
#{
@project
.
name
}
/ Commits"
,
url:
project_commits_path
(
@project
,
@ref
||
@project
.
root_ref
)
},
{
label:
"
#{
@project
.
name
}
/ Team"
,
url:
project_team_index_path
(
@project
)
}
{
label:
"
#{
@project
.
name
}
/ Team"
,
url:
project_team_index_path
(
@project
)
}
]
]
end
end
...
...
app/helpers/tree_helper.rb
View file @
79a02df9
...
@@ -39,4 +39,9 @@ module TreeHelper
...
@@ -39,4 +39,9 @@ module TreeHelper
def
gitlab_markdown?
(
filename
)
def
gitlab_markdown?
(
filename
)
filename
.
end_with?
(
*
%w(.mdown .md .markdown)
)
filename
.
end_with?
(
*
%w(.mdown .md .markdown)
)
end
end
# Simple shortcut to File.join
def
tree_join
(
*
args
)
File
.
join
(
*
args
)
end
end
end
app/views/commits/_commit.html.haml
View file @
79a02df9
%li
.commit
%li
.commit
.browse_code_link_holder
.browse_code_link_holder
%p
%p
%strong
=
link_to
"Browse Code »"
,
tree_project_ref
_path
(
@project
,
commit
),
class:
"right"
%strong
=
link_to
"Browse Code »"
,
project_tree
_path
(
@project
,
commit
),
class:
"right"
%p
%p
=
link_to
commit
.
short_id
(
8
),
project_commit_path
(
@project
,
commit
),
class:
"commit_short_id"
=
link_to
commit
.
short_id
(
8
),
project_commit_path
(
@project
,
commit
),
class:
"commit_short_id"
%strong
.commit-author-name
=
commit
.
author_name
%strong
.commit-author-name
=
commit
.
author_name
...
...
app/views/commits/_commit_box.html.haml
View file @
79a02df9
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
=
link_to
patch_project_commit_path
(
@project
,
@commit
.
id
),
class:
"btn small grouped"
do
=
link_to
patch_project_commit_path
(
@project
,
@commit
.
id
),
class:
"btn small grouped"
do
%i
.icon-download-alt
%i
.icon-download-alt
Get Patch
Get Patch
=
link_to
tree_project_ref_path
(
@project
,
@commit
.
id
),
class:
"browse-button primary grouped"
do
=
link_to
project_tree_path
(
@project
,
@commit
),
class:
"browse-button primary grouped"
do
%strong
Browse Code »
%strong
Browse Code »
%h3
.commit-title.page_title
%h3
.commit-title.page_title
=
gfm
escape_once
(
@commit
.
title
)
=
gfm
escape_once
(
@commit
.
title
)
...
...
app/views/commits/_diffs.html.haml
View file @
79a02df9
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
%i
.icon-file
%i
.icon-file
%span
{
id:
"#{diff.old_path}"
}=
diff
.
old_path
%span
{
id:
"#{diff.old_path}"
}=
diff
.
old_path
-
else
-
else
=
link_to
tree_file_project_ref_path
(
@project
,
@commit
.
id
,
diff
.
new_path
)
do
=
link_to
project_tree_path
(
@project
,
@commit
,
diff
.
new_path
)
do
%i
.icon-file
%i
.icon-file
%span
{
id:
"#{diff.new_path}"
}=
diff
.
new_path
%span
{
id:
"#{diff.new_path}"
}=
diff
.
new_path
%br
/
%br
/
...
...
app/views/layouts/_head.html.haml
View file @
79a02df9
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
-
if
controller_name
==
'projects'
&&
action_name
==
'index'
-
if
controller_name
==
'projects'
&&
action_name
==
'index'
=
auto_discovery_link_tag
:atom
,
projects_url
(
:atom
,
private_token:
current_user
.
private_token
),
title:
"Dashboard feed"
=
auto_discovery_link_tag
:atom
,
projects_url
(
:atom
,
private_token:
current_user
.
private_token
),
title:
"Dashboard feed"
-
if
@project
&&
!
@project
.
new_record?
-
if
@project
&&
!
@project
.
new_record?
-
if
current_page?
(
tree_project_ref
_path
(
@project
,
@project
.
root_ref
))
||
current_page?
(
project_commits_path
(
@project
))
-
if
current_page?
(
project_tree
_path
(
@project
,
@project
.
root_ref
))
||
current_page?
(
project_commits_path
(
@project
))
=
auto_discovery_link_tag
(
:atom
,
project_commits_url
(
@project
,
:atom
,
ref:
@ref
,
private_token:
current_user
.
private_token
),
title:
"Recent commits to
#{
@project
.
name
}
:
#{
@ref
}
"
)
=
auto_discovery_link_tag
(
:atom
,
project_commits_url
(
@project
,
:atom
,
ref:
@ref
,
private_token:
current_user
.
private_token
),
title:
"Recent commits to
#{
@project
.
name
}
:
#{
@ref
}
"
)
-
if
request
.
path
==
project_issues_path
(
@project
)
-
if
request
.
path
==
project_issues_path
(
@project
)
=
auto_discovery_link_tag
(
:atom
,
project_issues_url
(
@project
,
:atom
,
private_token:
current_user
.
private_token
),
title:
"
#{
@project
.
name
}
issues"
)
=
auto_discovery_link_tag
(
:atom
,
project_issues_url
(
@project
,
:atom
,
private_token:
current_user
.
private_token
),
title:
"
#{
@project
.
name
}
issues"
)
...
...
app/views/layouts/_project_menu.html.haml
View file @
79a02df9
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
-
if
@project
.
repo_exists?
-
if
@project
.
repo_exists?
-
if
can?
current_user
,
:download_code
,
@project
-
if
can?
current_user
,
:download_code
,
@project
%li
{
class:
tree_tab_class
}
%li
{
class:
tree_tab_class
}
=
link_to
tree_project_ref
_path
(
@project
,
@project
.
root_ref
)
do
=
link_to
project_tree
_path
(
@project
,
@project
.
root_ref
)
do
Files
Files
%li
{
class:
commit_tab_class
}
%li
{
class:
commit_tab_class
}
=
link_to
"Commits"
,
project_commits_path
(
@project
)
=
link_to
"Commits"
,
project_commits_path
(
@project
)
...
...
app/views/refs/_head.html.haml
View file @
79a02df9
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
%li
%li
=
render
partial:
'shared/ref_switcher'
,
locals:
{
destination:
'tree'
,
path:
params
[
:path
]}
=
render
partial:
'shared/ref_switcher'
,
locals:
{
destination:
'tree'
,
path:
params
[
:path
]}
%li
{
class:
"#{'active' if (controller.controller_name == "
refs
") }"
}
%li
{
class:
"#{'active' if (controller.controller_name == "
refs
") }"
}
=
link_to
tree_project_ref
_path
(
@project
,
@ref
)
do
=
link_to
project_tree
_path
(
@project
,
@ref
)
do
Source
Source
%li
.right
%li
.right
.input-prepend.project_clone_holder
.input-prepend.project_clone_holder
...
...
app/views/refs/blame.html.haml
View file @
79a02df9
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
%ul
.breadcrumb
%ul
.breadcrumb
%li
%li
%span
.arrow
%span
.arrow
=
link_to
tree_project_ref_path
(
@project
,
@ref
,
path:
nil
)
do
=
link_to
project_tree_path
(
@project
,
@ref
)
do
=
@project
.
name
=
@project
.
name
-
@tree
.
breadcrumbs
(
6
)
do
|
link
|
-
@tree
.
breadcrumbs
(
6
)
do
|
link
|
\/
\/
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
%span
.options
%span
.options
=
link_to
"raw"
,
blob_project_ref_path
(
@project
,
@ref
,
path:
params
[
:path
]),
class:
"btn very_small"
,
target:
"_blank"
=
link_to
"raw"
,
blob_project_ref_path
(
@project
,
@ref
,
path:
params
[
:path
]),
class:
"btn very_small"
,
target:
"_blank"
=
link_to
"history"
,
project_commits_path
(
@project
,
path:
params
[
:path
],
ref:
@ref
),
class:
"btn very_small"
=
link_to
"history"
,
project_commits_path
(
@project
,
path:
params
[
:path
],
ref:
@ref
),
class:
"btn very_small"
=
link_to
"source"
,
tree_file_project_ref_path
(
@project
,
@ref
,
path:
params
[
:path
]
),
class:
"btn very_small"
=
link_to
"source"
,
project_tree_path
(
@project
,
tree_join
(
@ref
,
params
[
:path
])
),
class:
"btn very_small"
.file_content.blame
.file_content.blame
%table
%table
-
@blame
.
each
do
|
commit
,
lines
|
-
@blame
.
each
do
|
commit
,
lines
|
...
...
app/views/refs/logs_tree.js.haml
View file @
79a02df9
...
@@ -6,4 +6,4 @@
...
@@ -6,4 +6,4 @@
:plain
:plain
var row = $("table.table_
#{
@hex_path
}
tr.file_
#{
hexdigest
(
file_name
)
}
");
var row = $("table.table_
#{
@hex_path
}
tr.file_
#{
hexdigest
(
file_name
)
}
");
row.find("td.tree_time_ago").html('
#{
escape_javascript
(
time_ago_in_words
(
content_commit
.
committed_date
))
}
ago');
row.find("td.tree_time_ago").html('
#{
escape_javascript
(
time_ago_in_words
(
content_commit
.
committed_date
))
}
ago');
row.find("td.tree_commit").html('
#{
escape_javascript
(
render
(
"tree_commit"
,
tm:
tm
,
content_commit:
content_commit
))
}
');
row.find("td.tree_commit").html('
#{
escape_javascript
(
render
(
"tree
/tree
_commit"
,
tm:
tm
,
content_commit:
content_commit
))
}
');
app/views/tree/_head.html.haml
View file @
79a02df9
%ul
.nav.nav-tabs
%ul
.nav.nav-tabs
%li
%li
=
render
partial:
'shared/ref_switcher'
,
locals:
{
destination:
'tree'
,
path:
params
[
:path
]}
=
render
partial:
'shared/ref_switcher'
,
locals:
{
destination:
'tree'
,
path:
params
[
:path
]}
%li
{
class:
"#{'active' if (controller.controller_name == "
refs
") }"
}
%li
{
class:
"#{'active' if (controller.controller_name == "
tree
") }"
}
=
link_to
tree_project_ref
_path
(
@project
,
@ref
)
do
=
link_to
project_tree
_path
(
@project
,
@ref
)
do
Source
Source
%li
.right
%li
.right
.input-prepend.project_clone_holder
.input-prepend.project_clone_holder
...
...
app/views/tree/_tree.html.haml
View file @
79a02df9
%ul
.breadcrumb
%ul
.breadcrumb
%li
%li
%span
.arrow
%span
.arrow
=
link_to
tree_project_ref_path
(
@project
,
@ref
,
path:
nil
),
remote:
true
do
=
link_to
project_tree_path
(
@project
,
@ref
),
remote:
true
do
=
@project
.
name
=
@project
.
name
-
tree
.
breadcrumbs
(
6
)
do
|
link
|
-
tree
.
breadcrumbs
(
6
)
do
|
link
|
\/
\/
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
%div
.tree_progress
%div
.tree_progress
#tree-content-holder
#tree-content-holder
-
if
tree
.
is_blob?
-
if
tree
.
is_blob?
=
render
partial:
"
refs
/tree_file"
,
locals:
{
name:
tree
.
name
,
content:
tree
.
data
,
file:
tree
}
=
render
partial:
"
tree
/tree_file"
,
locals:
{
name:
tree
.
name
,
content:
tree
.
data
,
file:
tree
}
-
else
-
else
-
contents
=
tree
.
contents
-
contents
=
tree
.
contents
%table
#tree-slider
{
class:
"table_#{@hex_path}"
}
%table
#tree-slider
{
class:
"table_#{@hex_path}"
}
...
@@ -31,11 +31,11 @@
...
@@ -31,11 +31,11 @@
-
index
=
0
-
index
=
0
-
contents
.
select
{
|
i
|
i
.
is_a?
(
Grit
::
Tree
)}.
each
do
|
content
|
-
contents
.
select
{
|
i
|
i
.
is_a?
(
Grit
::
Tree
)}.
each
do
|
content
|
=
render
partial:
"
refs
/tree_item"
,
locals:
{
content:
content
,
index:
(
index
+=
1
)
}
=
render
partial:
"
tree
/tree_item"
,
locals:
{
content:
content
,
index:
(
index
+=
1
)
}
-
contents
.
select
{
|
i
|
i
.
is_a?
(
Grit
::
Blob
)}.
each
do
|
content
|
-
contents
.
select
{
|
i
|
i
.
is_a?
(
Grit
::
Blob
)}.
each
do
|
content
|
=
render
partial:
"
refs
/tree_item"
,
locals:
{
content:
content
,
index:
(
index
+=
1
)
}
=
render
partial:
"
tree
/tree_item"
,
locals:
{
content:
content
,
index:
(
index
+=
1
)
}
-
contents
.
select
{
|
i
|
i
.
is_a?
(
Grit
::
Submodule
)}.
each
do
|
content
|
-
contents
.
select
{
|
i
|
i
.
is_a?
(
Grit
::
Submodule
)}.
each
do
|
content
|
=
render
partial:
"
refs
/submodule_item"
,
locals:
{
content:
content
,
index:
(
index
+=
1
)
}
=
render
partial:
"
tree
/submodule_item"
,
locals:
{
content:
content
,
index:
(
index
+=
1
)
}
-
if
content
=
contents
.
select
{
|
c
|
c
.
is_a?
(
Grit
::
Blob
)
and
c
.
name
=~
/^readme/i
}.
first
-
if
content
=
contents
.
select
{
|
c
|
c
.
is_a?
(
Grit
::
Blob
)
and
c
.
name
=~
/^readme/i
}.
first
.file_holder
#README
.file_holder
#README
...
...
app/views/tree/_tree_file.html.haml
View file @
79a02df9
...
@@ -5,9 +5,9 @@
...
@@ -5,9 +5,9 @@
=
name
.
force_encoding
(
'utf-8'
)
=
name
.
force_encoding
(
'utf-8'
)
%small
#{
file
.
mode
}
%small
#{
file
.
mode
}
%span
.options
%span
.options
=
link_to
"raw"
,
blob_project_ref_path
(
@project
,
@ref
,
path:
params
[
:path
]
),
class:
"btn very_small"
,
target:
"_blank"
=
link_to
"raw"
,
blob_project_ref_path
(
@project
,
@ref
,
path:
@path
),
class:
"btn very_small"
,
target:
"_blank"
=
link_to
"history"
,
project_commits_path
(
@project
,
path:
params
[
:path
],
ref:
@ref
),
class:
"btn very_small"
=
link_to
"history"
,
project_commits_path
(
@project
,
path:
params
[
:path
],
ref:
@ref
),
class:
"btn very_small"
=
link_to
"blame"
,
blame_file_project_ref_path
(
@project
,
@ref
,
path:
params
[
:path
]
),
class:
"btn very_small"
=
link_to
"blame"
,
blame_file_project_ref_path
(
@project
,
@ref
,
path:
@path
.
gsub
(
/^\//
,
''
)
),
class:
"btn very_small"
-
if
file
.
text?
-
if
file
.
text?
-
if
gitlab_markdown?
(
name
)
-
if
gitlab_markdown?
(
name
)
.file_content.wiki
.file_content.wiki
...
...
app/views/tree/_tree_item.html.haml
View file @
79a02df9
-
file
=
tree_full_path
(
content
)
-
file
=
tree_full_path
(
content
)
%tr
{
class:
"tree-item #{tree_hex_class(content)}"
,
url:
tree_file_project_ref_path
(
@project
,
@ref
,
file
)
}
%tr
{
class:
"tree-item #{tree_hex_class(content)}"
,
url:
project_tree_path
(
@project
,
tree_join
(
@id
,
file
)
)
}
%td
.tree-item-file-name
%td
.tree-item-file-name
=
tree_icon
(
content
)
=
tree_icon
(
content
)
%strong
=
link_to
truncate
(
content
.
name
,
length:
40
),
tree_file_project_ref_path
(
@project
,
@ref
||
@commit
.
id
,
file
),
remote: :true
%strong
=
link_to
truncate
(
content
.
name
,
length:
40
),
project_tree_path
(
@project
,
tree_join
(
@id
||
@commit
.
id
,
file
)
),
remote: :true
%td
.tree_time_ago.cgray
%td
.tree_time_ago.cgray
-
if
index
==
1
-
if
index
==
1
%span
.log_loading
%span
.log_loading
...
...
features/steps/project/project_browse_files.rb
View file @
79a02df9
...
@@ -10,7 +10,7 @@ class ProjectBrowseFiles < Spinach::FeatureSteps
...
@@ -10,7 +10,7 @@ class ProjectBrowseFiles < Spinach::FeatureSteps
end
end
Then
'I should see files from repository for "8470d70"'
do
Then
'I should see files from repository for "8470d70"'
do
current_path
.
should
==
tree_project_ref
_path
(
@project
,
"8470d70"
)
current_path
.
should
==
project_tree
_path
(
@project
,
"8470d70"
)
page
.
should
have_content
"app"
page
.
should
have_content
"app"
page
.
should
have_content
"History"
page
.
should
have_content
"History"
page
.
should
have_content
"Gemfile"
page
.
should
have_content
"Gemfile"
...
...
features/steps/shared/paths.rb
View file @
79a02df9
...
@@ -51,15 +51,15 @@ module SharedPaths
...
@@ -51,15 +51,15 @@ module SharedPaths
end
end
Given
'I visit project source page'
do
Given
'I visit project source page'
do
visit
tree_project_ref
_path
(
@project
,
@project
.
root_ref
)
visit
project_tree
_path
(
@project
,
@project
.
root_ref
)
end
end
Given
'I visit blob file from repo'
do
Given
'I visit blob file from repo'
do
visit
tree_project_ref_path
(
@project
,
ValidCommit
::
ID
,
:path
=>
ValidCommit
::
BLOB_FILE_PATH
)
visit
project_tree_path
(
@project
,
File
.
join
(
ValidCommit
::
ID
,
ValidCommit
::
BLOB_FILE_PATH
)
)
end
end
Given
'I visit project source page for "8470d70"'
do
Given
'I visit project source page for "8470d70"'
do
visit
tree_project_ref
_path
(
@project
,
"8470d70"
)
visit
project_tree
_path
(
@project
,
"8470d70"
)
end
end
Given
'I visit project tags page'
do
Given
'I visit project tags page'
do
...
...
spec/requests/gitlab_flavored_markdown_spec.rb
View file @
79a02df9
...
@@ -61,7 +61,7 @@ describe "Gitlab Flavored Markdown" do
...
@@ -61,7 +61,7 @@ describe "Gitlab Flavored Markdown" do
end
end
it
"should render title in refs#tree"
,
js:
true
do
it
"should render title in refs#tree"
,
js:
true
do
visit
tree_project_ref_path
(
project
,
id:
@branch_name
)
visit
project_tree_path
(
project
,
@branch_name
)
within
(
".tree_commit"
)
do
within
(
".tree_commit"
)
do
page
.
should
have_link
(
"#
#{
issue
.
id
}
"
)
page
.
should
have_link
(
"#
#{
issue
.
id
}
"
)
...
...
spec/requests/security/project_access_spec.rb
View file @
79a02df9
...
@@ -37,7 +37,7 @@ describe "Application access" do
...
@@ -37,7 +37,7 @@ describe "Application access" do
end
end
describe
"GET /project_code/master/tree"
do
describe
"GET /project_code/master/tree"
do
subject
{
tree_project_ref
_path
(
@project
,
@project
.
root_ref
)
}
subject
{
project_tree
_path
(
@project
,
@project
.
root_ref
)
}
it
{
should
be_allowed_for
@u1
}
it
{
should
be_allowed_for
@u1
}
it
{
should
be_allowed_for
@u3
}
it
{
should
be_allowed_for
@u3
}
...
...
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