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
0617d613
Commit
0617d613
authored
Nov 21, 2019
by
Utkarsh Gupta
Committed by
Thong Kuah
Nov 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable frozen string for spec/lib/gitlab/git
parent
f4ffffff
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
66 additions
and
8 deletions
+66
-8
spec/lib/gitlab/git/attributes_at_ref_parser_spec.rb
spec/lib/gitlab/git/attributes_at_ref_parser_spec.rb
+2
-0
spec/lib/gitlab/git/attributes_parser_spec.rb
spec/lib/gitlab/git/attributes_parser_spec.rb
+2
-0
spec/lib/gitlab/git/blame_spec.rb
spec/lib/gitlab/git/blame_spec.rb
+2
-0
spec/lib/gitlab/git/blob_spec.rb
spec/lib/gitlab/git/blob_spec.rb
+2
-0
spec/lib/gitlab/git/branch_spec.rb
spec/lib/gitlab/git/branch_spec.rb
+4
-2
spec/lib/gitlab/git/bundle_file_spec.rb
spec/lib/gitlab/git/bundle_file_spec.rb
+2
-0
spec/lib/gitlab/git/commit_spec.rb
spec/lib/gitlab/git/commit_spec.rb
+5
-3
spec/lib/gitlab/git/compare_spec.rb
spec/lib/gitlab/git/compare_spec.rb
+2
-0
spec/lib/gitlab/git/conflict/file_spec.rb
spec/lib/gitlab/git/conflict/file_spec.rb
+4
-2
spec/lib/gitlab/git/conflict/parser_spec.rb
spec/lib/gitlab/git/conflict/parser_spec.rb
+3
-1
spec/lib/gitlab/git/diff_collection_spec.rb
spec/lib/gitlab/git/diff_collection_spec.rb
+2
-0
spec/lib/gitlab/git/diff_spec.rb
spec/lib/gitlab/git/diff_spec.rb
+2
-0
spec/lib/gitlab/git/gitmodules_parser_spec.rb
spec/lib/gitlab/git/gitmodules_parser_spec.rb
+2
-0
spec/lib/gitlab/git/hook_env_spec.rb
spec/lib/gitlab/git/hook_env_spec.rb
+2
-0
spec/lib/gitlab/git/lfs_changes_spec.rb
spec/lib/gitlab/git/lfs_changes_spec.rb
+2
-0
spec/lib/gitlab/git/lfs_pointer_file_spec.rb
spec/lib/gitlab/git/lfs_pointer_file_spec.rb
+2
-0
spec/lib/gitlab/git/pre_receive_error_spec.rb
spec/lib/gitlab/git/pre_receive_error_spec.rb
+2
-0
spec/lib/gitlab/git/push_spec.rb
spec/lib/gitlab/git/push_spec.rb
+2
-0
spec/lib/gitlab/git/raw_diff_change_spec.rb
spec/lib/gitlab/git/raw_diff_change_spec.rb
+2
-0
spec/lib/gitlab/git/remote_mirror_spec.rb
spec/lib/gitlab/git/remote_mirror_spec.rb
+2
-0
spec/lib/gitlab/git/remote_repository_spec.rb
spec/lib/gitlab/git/remote_repository_spec.rb
+2
-0
spec/lib/gitlab/git/repository_cleaner_spec.rb
spec/lib/gitlab/git/repository_cleaner_spec.rb
+2
-0
spec/lib/gitlab/git/repository_spec.rb
spec/lib/gitlab/git/repository_spec.rb
+2
-0
spec/lib/gitlab/git/tag_spec.rb
spec/lib/gitlab/git/tag_spec.rb
+2
-0
spec/lib/gitlab/git/tree_spec.rb
spec/lib/gitlab/git/tree_spec.rb
+2
-0
spec/lib/gitlab/git/user_spec.rb
spec/lib/gitlab/git/user_spec.rb
+2
-0
spec/lib/gitlab/git/util_spec.rb
spec/lib/gitlab/git/util_spec.rb
+2
-0
spec/lib/gitlab/git/wiki_spec.rb
spec/lib/gitlab/git/wiki_spec.rb
+2
-0
spec/lib/gitlab/git/wraps_gitaly_errors_spec.rb
spec/lib/gitlab/git/wraps_gitaly_errors_spec.rb
+2
-0
No files found.
spec/lib/gitlab/git/attributes_at_ref_parser_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Git
::
AttributesAtRefParser
,
:seed_helper
do
describe
Gitlab
::
Git
::
AttributesAtRefParser
,
:seed_helper
do
...
...
spec/lib/gitlab/git/attributes_parser_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Git
::
AttributesParser
,
:seed_helper
do
describe
Gitlab
::
Git
::
AttributesParser
,
:seed_helper
do
...
...
spec/lib/gitlab/git/blame_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
"spec_helper"
require
"spec_helper"
describe
Gitlab
::
Git
::
Blame
,
:seed_helper
do
describe
Gitlab
::
Git
::
Blame
,
:seed_helper
do
...
...
spec/lib/gitlab/git/blob_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
"spec_helper"
require
"spec_helper"
describe
Gitlab
::
Git
::
Blob
,
:seed_helper
do
describe
Gitlab
::
Git
::
Blob
,
:seed_helper
do
...
...
spec/lib/gitlab/git/branch_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
"spec_helper"
require
"spec_helper"
describe
Gitlab
::
Git
::
Branch
,
:seed_helper
do
describe
Gitlab
::
Git
::
Branch
,
:seed_helper
do
...
@@ -77,7 +79,7 @@ describe Gitlab::Git::Branch, :seed_helper do
...
@@ -77,7 +79,7 @@ describe Gitlab::Git::Branch, :seed_helper do
tree
=
parents
.
first
.
tree
tree
=
parents
.
first
.
tree
{
{
message:
'commit message'
,
message:
+
'commit message'
,
author:
committer
,
author:
committer
,
committer:
committer
,
committer:
committer
,
tree:
tree
,
tree:
tree
,
...
@@ -126,7 +128,7 @@ describe Gitlab::Git::Branch, :seed_helper do
...
@@ -126,7 +128,7 @@ describe Gitlab::Git::Branch, :seed_helper do
it
{
expect
(
repository
.
branches
.
size
).
to
eq
(
SeedRepo
::
Repo
::
BRANCHES
.
size
)
}
it
{
expect
(
repository
.
branches
.
size
).
to
eq
(
SeedRepo
::
Repo
::
BRANCHES
.
size
)
}
def
create_commit
def
create_commit
params
[
:message
].
delete!
(
"
\r
"
)
params
[
:message
].
delete!
(
+
"
\r
"
)
Rugged
::
Commit
.
create
(
rugged
,
params
.
merge
(
committer:
committer
.
merge
(
time:
Time
.
now
)))
Rugged
::
Commit
.
create
(
rugged
,
params
.
merge
(
committer:
committer
.
merge
(
time:
Time
.
now
)))
end
end
end
end
spec/lib/gitlab/git/bundle_file_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Git
::
BundleFile
do
describe
Gitlab
::
Git
::
BundleFile
do
...
...
spec/lib/gitlab/git/commit_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
"spec_helper"
require
"spec_helper"
describe
Gitlab
::
Git
::
Commit
,
:seed_helper
do
describe
Gitlab
::
Git
::
Commit
,
:seed_helper
do
...
@@ -64,8 +66,8 @@ describe Gitlab::Git::Commit, :seed_helper do
...
@@ -64,8 +66,8 @@ describe Gitlab::Git::Commit, :seed_helper do
end
end
describe
"Commit info from gitaly commit"
do
describe
"Commit info from gitaly commit"
do
let
(
:subject
)
{
"My commit"
.
force_encoding
(
'ASCII-8BIT'
)
}
let
(
:subject
)
{
(
+
"My commit"
)
.
force_encoding
(
'ASCII-8BIT'
)
}
let
(
:body
)
{
subject
+
"My body"
.
force_encoding
(
'ASCII-8BIT'
)
}
let
(
:body
)
{
subject
+
(
+
"My body"
)
.
force_encoding
(
'ASCII-8BIT'
)
}
let
(
:body_size
)
{
body
.
length
}
let
(
:body_size
)
{
body
.
length
}
let
(
:gitaly_commit
)
{
build
(
:gitaly_commit
,
subject:
subject
,
body:
body
,
body_size:
body_size
)
}
let
(
:gitaly_commit
)
{
build
(
:gitaly_commit
,
subject:
subject
,
body:
body
,
body_size:
body_size
)
}
let
(
:id
)
{
gitaly_commit
.
id
}
let
(
:id
)
{
gitaly_commit
.
id
}
...
@@ -85,7 +87,7 @@ describe Gitlab::Git::Commit, :seed_helper do
...
@@ -85,7 +87,7 @@ describe Gitlab::Git::Commit, :seed_helper do
it
{
expect
(
commit
.
parent_ids
).
to
eq
(
gitaly_commit
.
parent_ids
)
}
it
{
expect
(
commit
.
parent_ids
).
to
eq
(
gitaly_commit
.
parent_ids
)
}
context
'body_size != body.size'
do
context
'body_size != body.size'
do
let
(
:body
)
{
""
.
force_encoding
(
'ASCII-8BIT'
)
}
let
(
:body
)
{
(
+
""
)
.
force_encoding
(
'ASCII-8BIT'
)
}
context
'zero body_size'
do
context
'zero body_size'
do
it
{
expect
(
commit
.
safe_message
).
to
eq
(
subject
)
}
it
{
expect
(
commit
.
safe_message
).
to
eq
(
subject
)
}
...
...
spec/lib/gitlab/git/compare_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
"spec_helper"
require
"spec_helper"
describe
Gitlab
::
Git
::
Compare
,
:seed_helper
do
describe
Gitlab
::
Git
::
Compare
,
:seed_helper
do
...
...
spec/lib/gitlab/git/conflict/file_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Git
::
Conflict
::
File
do
describe
Gitlab
::
Git
::
Conflict
::
File
do
let
(
:conflict
)
{
{
theirs:
{
path:
'foo'
,
mode:
33188
},
ours:
{
path:
'foo'
,
mode:
33188
}
}
}
let
(
:conflict
)
{
{
theirs:
{
path:
'foo'
,
mode:
33188
},
ours:
{
path:
'foo'
,
mode:
33188
}
}
}
let
(
:invalid_content
)
{
described_class
.
new
(
nil
,
nil
,
conflict
,
"a
\xC4\xFC
"
.
force_encoding
(
Encoding
::
ASCII_8BIT
))
}
let
(
:invalid_content
)
{
described_class
.
new
(
nil
,
nil
,
conflict
,
(
+
"a
\xC4\xFC
"
)
.
force_encoding
(
Encoding
::
ASCII_8BIT
))
}
let
(
:valid_content
)
{
described_class
.
new
(
nil
,
nil
,
conflict
,
"Espa
\xC3\xB1
a"
.
force_encoding
(
Encoding
::
ASCII_8BIT
))
}
let
(
:valid_content
)
{
described_class
.
new
(
nil
,
nil
,
conflict
,
(
+
"Espa
\xC3\xB1
a"
)
.
force_encoding
(
Encoding
::
ASCII_8BIT
))
}
describe
'#lines'
do
describe
'#lines'
do
context
'when the content contains non-UTF-8 characters'
do
context
'when the content contains non-UTF-8 characters'
do
...
...
spec/lib/gitlab/git/conflict/parser_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Git
::
Conflict
::
Parser
do
describe
Gitlab
::
Git
::
Conflict
::
Parser
do
...
@@ -208,7 +210,7 @@ CONFLICT
...
@@ -208,7 +210,7 @@ CONFLICT
# these strings.
# these strings.
context
'when the file contains UTF-8 characters'
do
context
'when the file contains UTF-8 characters'
do
it
'does not raise'
do
it
'does not raise'
do
expect
{
parse_text
(
"Espa
\xC3\xB1
a"
.
force_encoding
(
Encoding
::
ASCII_8BIT
))
}
expect
{
parse_text
(
(
+
"Espa
\xC3\xB1
a"
)
.
force_encoding
(
Encoding
::
ASCII_8BIT
))
}
.
not_to
raise_error
.
not_to
raise_error
end
end
end
end
...
...
spec/lib/gitlab/git/diff_collection_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Git
::
DiffCollection
,
:seed_helper
do
describe
Gitlab
::
Git
::
DiffCollection
,
:seed_helper
do
...
...
spec/lib/gitlab/git/diff_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
"spec_helper"
require
"spec_helper"
describe
Gitlab
::
Git
::
Diff
,
:seed_helper
do
describe
Gitlab
::
Git
::
Diff
,
:seed_helper
do
...
...
spec/lib/gitlab/git/gitmodules_parser_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Git
::
GitmodulesParser
do
describe
Gitlab
::
Git
::
GitmodulesParser
do
...
...
spec/lib/gitlab/git/hook_env_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Git
::
HookEnv
do
describe
Gitlab
::
Git
::
HookEnv
do
...
...
spec/lib/gitlab/git/lfs_changes_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Git
::
LfsChanges
do
describe
Gitlab
::
Git
::
LfsChanges
do
...
...
spec/lib/gitlab/git/lfs_pointer_file_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Git
::
LfsPointerFile
do
describe
Gitlab
::
Git
::
LfsPointerFile
do
...
...
spec/lib/gitlab/git/pre_receive_error_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Git
::
PreReceiveError
do
describe
Gitlab
::
Git
::
PreReceiveError
do
...
...
spec/lib/gitlab/git/push_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Git
::
Push
do
describe
Gitlab
::
Git
::
Push
do
...
...
spec/lib/gitlab/git/raw_diff_change_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Git
::
RawDiffChange
do
describe
Gitlab
::
Git
::
RawDiffChange
do
...
...
spec/lib/gitlab/git/remote_mirror_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Git
::
RemoteMirror
do
describe
Gitlab
::
Git
::
RemoteMirror
do
...
...
spec/lib/gitlab/git/remote_repository_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Git
::
RemoteRepository
,
:seed_helper
do
describe
Gitlab
::
Git
::
RemoteRepository
,
:seed_helper
do
...
...
spec/lib/gitlab/git/repository_cleaner_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Git
::
RepositoryCleaner
do
describe
Gitlab
::
Git
::
RepositoryCleaner
do
...
...
spec/lib/gitlab/git/repository_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
"spec_helper"
require
"spec_helper"
describe
Gitlab
::
Git
::
Repository
,
:seed_helper
do
describe
Gitlab
::
Git
::
Repository
,
:seed_helper
do
...
...
spec/lib/gitlab/git/tag_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
"spec_helper"
require
"spec_helper"
describe
Gitlab
::
Git
::
Tag
,
:seed_helper
do
describe
Gitlab
::
Git
::
Tag
,
:seed_helper
do
...
...
spec/lib/gitlab/git/tree_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
"spec_helper"
require
"spec_helper"
describe
Gitlab
::
Git
::
Tree
,
:seed_helper
do
describe
Gitlab
::
Git
::
Tree
,
:seed_helper
do
...
...
spec/lib/gitlab/git/user_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Git
::
User
do
describe
Gitlab
::
Git
::
User
do
...
...
spec/lib/gitlab/git/util_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Git
::
Util
do
describe
Gitlab
::
Git
::
Util
do
...
...
spec/lib/gitlab/git/wiki_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Git
::
Wiki
do
describe
Gitlab
::
Git
::
Wiki
do
...
...
spec/lib/gitlab/git/wraps_gitaly_errors_spec.rb
View file @
0617d613
# frozen_string_literal: true
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Git
::
WrapsGitalyErrors
do
describe
Gitlab
::
Git
::
WrapsGitalyErrors
do
...
...
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