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
6970612b
Commit
6970612b
authored
Apr 19, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of more requires, which causes warnings when code is reloaded
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
1fbea7ce
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
12 deletions
+7
-12
app/models/commit.rb
app/models/commit.rb
+3
-3
app/models/merge_request.rb
app/models/merge_request.rb
+0
-3
app/models/merge_request_diff.rb
app/models/merge_request_diff.rb
+0
-2
lib/file_size_validator.rb
lib/file_size_validator.rb
+4
-4
No files found.
app/models/commit.rb
View file @
6970612b
...
@@ -12,11 +12,11 @@ class Commit
...
@@ -12,11 +12,11 @@ class Commit
attr_accessor
:project
attr_accessor
:project
DIFF_SAFE_LINES
||
=
Gitlab
::
Git
::
DiffCollection
::
DEFAULT_LIMITS
[
:max_lines
]
DIFF_SAFE_LINES
=
Gitlab
::
Git
::
DiffCollection
::
DEFAULT_LIMITS
[
:max_lines
]
# Commits above this size will not be rendered in HTML
# Commits above this size will not be rendered in HTML
DIFF_HARD_LIMIT_FILES
||
=
1000
DIFF_HARD_LIMIT_FILES
=
1000
DIFF_HARD_LIMIT_LINES
||
=
50000
DIFF_HARD_LIMIT_LINES
=
50000
class
<<
self
class
<<
self
def
decorate
(
commits
,
project
)
def
decorate
(
commits
,
project
)
...
...
app/models/merge_request.rb
View file @
6970612b
...
@@ -27,9 +27,6 @@
...
@@ -27,9 +27,6 @@
# merge_commit_sha :string
# merge_commit_sha :string
#
#
require
Rails
.
root
.
join
(
"app/models/commit"
)
require
Rails
.
root
.
join
(
"lib/static_model"
)
class
MergeRequest
<
ActiveRecord
::
Base
class
MergeRequest
<
ActiveRecord
::
Base
include
InternalId
include
InternalId
include
Issuable
include
Issuable
...
...
app/models/merge_request_diff.rb
View file @
6970612b
...
@@ -11,8 +11,6 @@
...
@@ -11,8 +11,6 @@
# updated_at :datetime
# updated_at :datetime
#
#
require
Rails
.
root
.
join
(
"app/models/commit"
)
class
MergeRequestDiff
<
ActiveRecord
::
Base
class
MergeRequestDiff
<
ActiveRecord
::
Base
include
Sortable
include
Sortable
...
...
lib/file_size_validator.rb
View file @
6970612b
class
FileSizeValidator
<
ActiveModel
::
EachValidator
class
FileSizeValidator
<
ActiveModel
::
EachValidator
MESSAGES
||
=
{
is: :wrong_size
,
minimum: :size_too_small
,
maximum: :size_too_big
}.
freeze
MESSAGES
=
{
is: :wrong_size
,
minimum: :size_too_small
,
maximum: :size_too_big
}.
freeze
CHECKS
||
=
{
is: :==
,
minimum:
:
>=
,
maximum: :<=
}.
freeze
CHECKS
=
{
is: :==
,
minimum:
:
>=
,
maximum: :<=
}.
freeze
DEFAULT_TOKENIZER
||
=
->
(
value
)
{
value
.
split
(
//
)
}.
freeze
DEFAULT_TOKENIZER
=
->
(
value
)
{
value
.
split
(
//
)
}.
freeze
RESERVED_OPTIONS
||
=
[
:minimum
,
:maximum
,
:within
,
:is
,
:tokenizer
,
:too_short
,
:too_long
].
freeze
RESERVED_OPTIONS
=
[
:minimum
,
:maximum
,
:within
,
:is
,
:tokenizer
,
:too_short
,
:too_long
].
freeze
def
initialize
(
options
)
def
initialize
(
options
)
if
range
=
(
options
.
delete
(
:in
)
||
options
.
delete
(
:within
))
if
range
=
(
options
.
delete
(
:in
)
||
options
.
delete
(
:within
))
...
...
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