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
61cc6a92
Commit
61cc6a92
authored
Feb 02, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rubocop: indentation fixes Yay!!!
parent
d0434437
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
33 additions
and
33 deletions
+33
-33
.rubocop.yml
.rubocop.yml
+2
-2
app/controllers/projects/wikis_controller.rb
app/controllers/projects/wikis_controller.rb
+10
-10
app/finders/snippets_finder.rb
app/finders/snippets_finder.rb
+1
-1
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+1
-1
app/helpers/tab_helper.rb
app/helpers/tab_helper.rb
+1
-1
config/initializers/acts_as_taggable_on_patch.rb
config/initializers/acts_as_taggable_on_patch.rb
+12
-12
lib/gitlab/diff/parser.rb
lib/gitlab/diff/parser.rb
+1
-1
lib/gitlab/git_access.rb
lib/gitlab/git_access.rb
+5
-5
No files found.
.rubocop.yml
View file @
61cc6a92
...
...
@@ -283,12 +283,12 @@ Style/IfWithSemicolon:
Style/IndentationConsistency
:
Description
:
'
Keep
indentation
straight.'
Enabled
:
fals
e
Enabled
:
tru
e
Style/IndentationWidth
:
Description
:
'
Use
2
spaces
for
indentation.'
StyleGuide
:
'
https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
Enabled
:
fals
e
Enabled
:
tru
e
Style/IndentArray
:
Description
:
>-
...
...
app/controllers/projects/wikis_controller.rb
View file @
61cc6a92
...
...
@@ -16,16 +16,16 @@ class Projects::WikisController < Projects::ApplicationController
if
@page
render
'show'
elsif
file
=
@project_wiki
.
find_file
(
params
[
:id
],
params
[
:version_id
])
if
file
.
on_disk?
send_file
file
.
on_disk_path
,
disposition:
'inline'
else
send_data
(
file
.
raw_data
,
type:
file
.
mime_type
,
disposition:
'inline'
,
filename:
file
.
name
)
end
if
file
.
on_disk?
send_file
file
.
on_disk_path
,
disposition:
'inline'
else
send_data
(
file
.
raw_data
,
type:
file
.
mime_type
,
disposition:
'inline'
,
filename:
file
.
name
)
end
else
return
render
(
'empty'
)
unless
can?
(
current_user
,
:write_wiki
,
@project
)
@page
=
WikiPage
.
new
(
@project_wiki
)
...
...
app/finders/snippets_finder.rb
View file @
61cc6a92
...
...
@@ -40,7 +40,7 @@ class SnippetsFinder
when
'are_public'
then
snippets
.
are_public
else
snippets
snippets
end
else
snippets
.
public_and_internal
...
...
app/helpers/application_helper.rb
View file @
61cc6a92
...
...
@@ -78,7 +78,7 @@ module ApplicationHelper
style
=
"background-color: #
#{
allowed_colors
.
values
[
bg_key
]
}
; color: #555"
content_tag
(
:div
,
class:
options
[
:class
],
style:
style
)
do
project
.
name
[
0
,
1
].
upcase
project
.
name
[
0
,
1
].
upcase
end
end
...
...
app/helpers/tab_helper.rb
View file @
61cc6a92
...
...
@@ -90,7 +90,7 @@ module TabHelper
return
"active"
if
current_page?
(
controller:
"/projects"
,
action: :edit
,
id:
@project
)
if
[
'services'
,
'hooks'
,
'deploy_keys'
,
'team_members'
,
'protected_branches'
].
include?
controller
.
controller_name
"active"
"active"
end
end
...
...
config/initializers/acts_as_taggable_on_patch.rb
View file @
61cc6a92
...
...
@@ -69,12 +69,12 @@ module ActsAsTaggableOn::Taggable
select_clause
=
"DISTINCT
#{
table_name
}
.*"
unless
context
and
tag_types
.
one?
if
owned_by
tagging_join
<<
" AND "
+
sanitize_sql
([
"
#{
taggings_alias
}
.tagger_id = ? AND
#{
taggings_alias
}
.tagger_type = ?"
,
owned_by
.
id
,
owned_by
.
class
.
base_class
.
to_s
])
tagging_join
<<
" AND "
+
sanitize_sql
([
"
#{
taggings_alias
}
.tagger_id = ? AND
#{
taggings_alias
}
.tagger_type = ?"
,
owned_by
.
id
,
owned_by
.
class
.
base_class
.
to_s
])
end
joins
<<
tagging_join
...
...
@@ -93,12 +93,12 @@ module ActsAsTaggableOn::Taggable
tagging_join
<<
" AND "
+
sanitize_sql
([
"
#{
taggings_alias
}
.context = ?"
,
context
.
to_s
])
if
context
if
owned_by
tagging_join
<<
" AND "
+
sanitize_sql
([
"
#{
taggings_alias
}
.tagger_id = ? AND
#{
taggings_alias
}
.tagger_type = ?"
,
owned_by
.
id
,
owned_by
.
class
.
base_class
.
to_s
])
tagging_join
<<
" AND "
+
sanitize_sql
([
"
#{
taggings_alias
}
.tagger_id = ? AND
#{
taggings_alias
}
.tagger_type = ?"
,
owned_by
.
id
,
owned_by
.
class
.
base_class
.
to_s
])
end
joins
<<
tagging_join
...
...
lib/gitlab/diff/parser.rb
View file @
61cc6a92
...
...
@@ -74,7 +74,7 @@ module Gitlab
def
html_escape
(
str
)
replacements
=
{
'&'
=>
'&'
,
'>'
=>
'>'
,
'<'
=>
'<'
,
'"'
=>
'"'
,
"'"
=>
'''
}
str
.
gsub
(
/[&"'><]/
,
replacements
)
str
.
gsub
(
/[&"'><]/
,
replacements
)
end
end
end
...
...
lib/gitlab/git_access.rb
View file @
61cc6a92
...
...
@@ -112,14 +112,14 @@ module Gitlab
def
protected_branch_action
(
project
,
oldrev
,
newrev
,
branch_name
)
# we dont allow force push to protected branch
if
forced_push?
(
project
,
oldrev
,
newrev
)
:force_push_code_to_protected_branches
:force_push_code_to_protected_branches
elsif
newrev
==
Gitlab
::
Git
::
BLANK_SHA
# and we dont allow remove of protected branch
:remove_protected_branches
# and we dont allow remove of protected branch
:remove_protected_branches
elsif
project
.
developers_can_push_to_protected_branch?
(
branch_name
)
:push_code
:push_code
else
:push_code_to_protected_branches
:push_code_to_protected_branches
end
end
...
...
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