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
9e211091
Commit
9e211091
authored
Jul 01, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable Style/EmptyLines cop, remove redundant ones
parent
b2273559
Changes
162
Hide whitespace changes
Inline
Side-by-side
Showing
162 changed files
with
1 addition
and
238 deletions
+1
-238
.rubocop.yml
.rubocop.yml
+1
-1
app/controllers/admin/hooks_controller.rb
app/controllers/admin/hooks_controller.rb
+0
-1
app/controllers/confirmations_controller.rb
app/controllers/confirmations_controller.rb
+0
-1
app/controllers/import/base_controller.rb
app/controllers/import/base_controller.rb
+0
-1
app/controllers/import/fogbugz_controller.rb
app/controllers/import/fogbugz_controller.rb
+0
-2
app/controllers/import/gitorious_controller.rb
app/controllers/import/gitorious_controller.rb
+0
-1
app/controllers/import/google_code_controller.rb
app/controllers/import/google_code_controller.rb
+0
-2
app/controllers/invites_controller.rb
app/controllers/invites_controller.rb
+0
-1
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+0
-1
app/controllers/projects/network_controller.rb
app/controllers/projects/network_controller.rb
+0
-1
app/controllers/projects/wikis_controller.rb
app/controllers/projects/wikis_controller.rb
+0
-1
app/helpers/emails_helper.rb
app/helpers/emails_helper.rb
+0
-1
app/helpers/issuables_helper.rb
app/helpers/issuables_helper.rb
+0
-1
app/helpers/search_helper.rb
app/helpers/search_helper.rb
+0
-1
app/models/concerns/issuable.rb
app/models/concerns/issuable.rb
+0
-1
app/models/members/project_member.rb
app/models/members/project_member.rb
+0
-1
app/models/project_services/bugzilla_service.rb
app/models/project_services/bugzilla_service.rb
+0
-2
app/models/project_services/custom_issue_tracker_service.rb
app/models/project_services/custom_issue_tracker_service.rb
+0
-2
app/models/project_services/drone_ci_service.rb
app/models/project_services/drone_ci_service.rb
+0
-1
app/models/project_services/issue_tracker_service.rb
app/models/project_services/issue_tracker_service.rb
+0
-1
app/models/project_services/jira_service.rb
app/models/project_services/jira_service.rb
+0
-1
app/models/project_services/redmine_service.rb
app/models/project_services/redmine_service.rb
+0
-1
app/models/repository.rb
app/models/repository.rb
+0
-1
app/models/user.rb
app/models/user.rb
+0
-1
app/services/create_release_service.rb
app/services/create_release_service.rb
+0
-1
app/services/issues/base_service.rb
app/services/issues/base_service.rb
+0
-1
app/services/merge_requests/base_service.rb
app/services/merge_requests/base_service.rb
+0
-1
app/services/merge_requests/merge_when_build_succeeds_service.rb
...vices/merge_requests/merge_when_build_succeeds_service.rb
+0
-1
app/services/milestones/destroy_service.rb
app/services/milestones/destroy_service.rb
+0
-1
app/services/projects/download_service.rb
app/services/projects/download_service.rb
+0
-1
app/services/projects/import_export/export_service.rb
app/services/projects/import_export/export_service.rb
+0
-1
app/services/system_note_service.rb
app/services/system_note_service.rb
+0
-1
app/services/update_release_service.rb
app/services/update_release_service.rb
+0
-1
app/services/wiki_pages/base_service.rb
app/services/wiki_pages/base_service.rb
+0
-1
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+0
-4
config/routes.rb
config/routes.rb
+0
-2
features/steps/dashboard/new_project.rb
features/steps/dashboard/new_project.rb
+0
-1
features/steps/explore/projects.rb
features/steps/explore/projects.rb
+0
-3
features/steps/project/archived.rb
features/steps/project/archived.rb
+0
-1
features/steps/project/issues/issues.rb
features/steps/project/issues/issues.rb
+0
-5
features/steps/project/project_find_file.rb
features/steps/project/project_find_file.rb
+0
-1
features/steps/shared/issuable.rb
features/steps/shared/issuable.rb
+0
-1
features/steps/snippet_search.rb
features/steps/snippet_search.rb
+0
-1
lib/api/award_emoji.rb
lib/api/award_emoji.rb
+0
-1
lib/api/branches.rb
lib/api/branches.rb
+0
-2
lib/api/builds.rb
lib/api/builds.rb
+0
-1
lib/api/milestones.rb
lib/api/milestones.rb
+0
-1
lib/api/project_hooks.rb
lib/api/project_hooks.rb
+0
-1
lib/api/project_members.rb
lib/api/project_members.rb
+0
-1
lib/api/projects.rb
lib/api/projects.rb
+0
-2
lib/api/services.rb
lib/api/services.rb
+0
-1
lib/banzai/filter/image_link_filter.rb
lib/banzai/filter/image_link_filter.rb
+0
-1
lib/banzai/filter/wiki_link_filter.rb
lib/banzai/filter/wiki_link_filter.rb
+0
-1
lib/banzai/pipeline/full_pipeline.rb
lib/banzai/pipeline/full_pipeline.rb
+0
-1
lib/ci/charts.rb
lib/ci/charts.rb
+0
-1
lib/disable_email_interceptor.rb
lib/disable_email_interceptor.rb
+0
-1
lib/gitlab/asciidoc.rb
lib/gitlab/asciidoc.rb
+0
-1
lib/gitlab/backend/grack_auth.rb
lib/gitlab/backend/grack_auth.rb
+0
-1
lib/gitlab/diff/parser.rb
lib/gitlab/diff/parser.rb
+0
-1
lib/gitlab/import_export/importer.rb
lib/gitlab/import_export/importer.rb
+0
-1
lib/gitlab/import_export/members_mapper.rb
lib/gitlab/import_export/members_mapper.rb
+0
-1
lib/gitlab/import_export/project_creator.rb
lib/gitlab/import_export/project_creator.rb
+0
-1
lib/gitlab/import_export/project_tree_restorer.rb
lib/gitlab/import_export/project_tree_restorer.rb
+0
-1
lib/gitlab/import_export/reader.rb
lib/gitlab/import_export/reader.rb
+0
-2
lib/gitlab/import_export/relation_factory.rb
lib/gitlab/import_export/relation_factory.rb
+0
-1
lib/gitlab/import_export/shared.rb
lib/gitlab/import_export/shared.rb
+0
-1
lib/gitlab/import_export/uploads_saver.rb
lib/gitlab/import_export/uploads_saver.rb
+0
-1
lib/gitlab/import_export/version_checker.rb
lib/gitlab/import_export/version_checker.rb
+0
-1
lib/gitlab/import_export/version_saver.rb
lib/gitlab/import_export/version_saver.rb
+0
-1
lib/gitlab/import_sources.rb
lib/gitlab/import_sources.rb
+0
-2
lib/gitlab/lfs/response.rb
lib/gitlab/lfs/response.rb
+0
-1
lib/gitlab/other_markup.rb
lib/gitlab/other_markup.rb
+0
-1
lib/gitlab/regex.rb
lib/gitlab/regex.rb
+0
-6
lib/gitlab/saml/auth_hash.rb
lib/gitlab/saml/auth_hash.rb
+0
-2
lib/gitlab/saml/config.rb
lib/gitlab/saml/config.rb
+0
-2
lib/gitlab/saml/user.rb
lib/gitlab/saml/user.rb
+0
-1
lib/uploaded_file.rb
lib/uploaded_file.rb
+0
-1
spec/controllers/application_controller_spec.rb
spec/controllers/application_controller_spec.rb
+0
-1
spec/controllers/profiles/accounts_controller_spec.rb
spec/controllers/profiles/accounts_controller_spec.rb
+0
-1
spec/controllers/projects/branches_controller_spec.rb
spec/controllers/projects/branches_controller_spec.rb
+0
-2
spec/controllers/projects/forks_controller_spec.rb
spec/controllers/projects/forks_controller_spec.rb
+0
-2
spec/controllers/projects/labels_controller_spec.rb
spec/controllers/projects/labels_controller_spec.rb
+0
-1
spec/controllers/projects/merge_requests_controller_spec.rb
spec/controllers/projects/merge_requests_controller_spec.rb
+0
-2
spec/controllers/projects/repositories_controller_spec.rb
spec/controllers/projects/repositories_controller_spec.rb
+0
-1
spec/controllers/projects/tree_controller_spec.rb
spec/controllers/projects/tree_controller_spec.rb
+0
-1
spec/controllers/projects_controller_spec.rb
spec/controllers/projects_controller_spec.rb
+0
-3
spec/controllers/users_controller_spec.rb
spec/controllers/users_controller_spec.rb
+0
-1
spec/features/admin/admin_hooks_spec.rb
spec/features/admin/admin_hooks_spec.rb
+0
-2
spec/features/dashboard/user_filters_projects_spec.rb
spec/features/dashboard/user_filters_projects_spec.rb
+0
-1
spec/features/gitlab_flavored_markdown_spec.rb
spec/features/gitlab_flavored_markdown_spec.rb
+0
-2
spec/features/groups/members/owner_manages_access_requests_spec.rb
...ures/groups/members/owner_manages_access_requests_spec.rb
+0
-1
spec/features/issues/filter_issues_spec.rb
spec/features/issues/filter_issues_spec.rb
+0
-6
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+0
-4
spec/features/projects/commit/builds_spec.rb
spec/features/projects/commit/builds_spec.rb
+0
-1
spec/features/projects/commits/cherry_pick_spec.rb
spec/features/projects/commits/cherry_pick_spec.rb
+0
-1
spec/features/projects/labels/issues_sorted_by_priority_spec.rb
...eatures/projects/labels/issues_sorted_by_priority_spec.rb
+0
-3
spec/features/search_spec.rb
spec/features/search_spec.rb
+0
-5
spec/features/security/group/internal_access_spec.rb
spec/features/security/group/internal_access_spec.rb
+0
-1
spec/features/security/group/private_access_spec.rb
spec/features/security/group/private_access_spec.rb
+0
-1
spec/features/security/group/public_access_spec.rb
spec/features/security/group/public_access_spec.rb
+0
-1
spec/features/signup_spec.rb
spec/features/signup_spec.rb
+0
-2
spec/features/tags/master_deletes_tag_spec.rb
spec/features/tags/master_deletes_tag_spec.rb
+0
-1
spec/features/users_spec.rb
spec/features/users_spec.rb
+0
-1
spec/finders/group_projects_finder_spec.rb
spec/finders/group_projects_finder_spec.rb
+0
-2
spec/finders/snippets_finder_spec.rb
spec/finders/snippets_finder_spec.rb
+0
-1
spec/helpers/visibility_level_helper_spec.rb
spec/helpers/visibility_level_helper_spec.rb
+0
-2
spec/initializers/settings_spec.rb
spec/initializers/settings_spec.rb
+0
-2
spec/lib/banzai/pipeline/wiki_pipeline_spec.rb
spec/lib/banzai/pipeline/wiki_pipeline_spec.rb
+0
-1
spec/lib/ci/charts_spec.rb
spec/lib/ci/charts_spec.rb
+0
-1
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
+0
-1
spec/lib/gitlab/asciidoc_spec.rb
spec/lib/gitlab/asciidoc_spec.rb
+0
-3
spec/lib/gitlab/ci/build/artifacts/metadata/entry_spec.rb
spec/lib/gitlab/ci/build/artifacts/metadata/entry_spec.rb
+0
-1
spec/lib/gitlab/diff/inline_diff_marker_spec.rb
spec/lib/gitlab/diff/inline_diff_marker_spec.rb
+0
-1
spec/lib/gitlab/fogbugz_import/client_spec.rb
spec/lib/gitlab/fogbugz_import/client_spec.rb
+0
-1
spec/lib/gitlab/git_access_spec.rb
spec/lib/gitlab/git_access_spec.rb
+0
-1
spec/lib/gitlab/github_import/label_formatter_spec.rb
spec/lib/gitlab/github_import/label_formatter_spec.rb
+0
-1
spec/lib/gitlab/google_code_import/importer_spec.rb
spec/lib/gitlab/google_code_import/importer_spec.rb
+0
-1
spec/lib/gitlab/import_export/members_mapper_spec.rb
spec/lib/gitlab/import_export/members_mapper_spec.rb
+0
-1
spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
+0
-1
spec/lib/gitlab/import_export/project_tree_saver_spec.rb
spec/lib/gitlab/import_export/project_tree_saver_spec.rb
+0
-2
spec/lib/gitlab/import_export/reader_spec.rb
spec/lib/gitlab/import_export/reader_spec.rb
+0
-1
spec/lib/gitlab/import_export/repo_bundler_spec.rb
spec/lib/gitlab/import_export/repo_bundler_spec.rb
+0
-1
spec/lib/gitlab/import_export/wiki_repo_bundler_spec.rb
spec/lib/gitlab/import_export/wiki_repo_bundler_spec.rb
+0
-1
spec/lib/gitlab/ldap/auth_hash_spec.rb
spec/lib/gitlab/ldap/auth_hash_spec.rb
+0
-1
spec/lib/gitlab/o_auth/user_spec.rb
spec/lib/gitlab/o_auth/user_spec.rb
+0
-3
spec/lib/gitlab/push_data_builder_spec.rb
spec/lib/gitlab/push_data_builder_spec.rb
+0
-1
spec/lib/gitlab/saml/user_spec.rb
spec/lib/gitlab/saml/user_spec.rb
+0
-1
spec/lib/gitlab/url_sanitizer_spec.rb
spec/lib/gitlab/url_sanitizer_spec.rb
+0
-1
spec/mailers/notify_spec.rb
spec/mailers/notify_spec.rb
+0
-5
spec/models/build_spec.rb
spec/models/build_spec.rb
+0
-1
spec/models/concerns/issuable_spec.rb
spec/models/concerns/issuable_spec.rb
+0
-1
spec/models/concerns/strip_attribute_spec.rb
spec/models/concerns/strip_attribute_spec.rb
+0
-1
spec/models/email_spec.rb
spec/models/email_spec.rb
+0
-2
spec/models/forked_project_link_spec.rb
spec/models/forked_project_link_spec.rb
+0
-3
spec/models/identity_spec.rb
spec/models/identity_spec.rb
+0
-1
spec/models/members/project_member_spec.rb
spec/models/members/project_member_spec.rb
+0
-1
spec/models/namespace_spec.rb
spec/models/namespace_spec.rb
+0
-1
spec/models/project_services/jira_service_spec.rb
spec/models/project_services/jira_service_spec.rb
+0
-2
spec/models/project_services/slack_service/wiki_page_message_spec.rb
.../project_services/slack_service/wiki_page_message_spec.rb
+0
-1
spec/models/repository_spec.rb
spec/models/repository_spec.rb
+0
-1
spec/models/service_spec.rb
spec/models/service_spec.rb
+0
-2
spec/requests/api/api_helpers_spec.rb
spec/requests/api/api_helpers_spec.rb
+0
-1
spec/requests/api/award_emoji_spec.rb
spec/requests/api/award_emoji_spec.rb
+0
-1
spec/requests/api/commit_statuses_spec.rb
spec/requests/api/commit_statuses_spec.rb
+0
-1
spec/requests/api/doorkeeper_access_spec.rb
spec/requests/api/doorkeeper_access_spec.rb
+0
-1
spec/requests/api/labels_spec.rb
spec/requests/api/labels_spec.rb
+0
-1
spec/requests/api/notes_spec.rb
spec/requests/api/notes_spec.rb
+0
-3
spec/requests/api/projects_spec.rb
spec/requests/api/projects_spec.rb
+0
-1
spec/requests/api/services_spec.rb
spec/requests/api/services_spec.rb
+0
-1
spec/requests/api/settings_spec.rb
spec/requests/api/settings_spec.rb
+0
-1
spec/requests/api/users_spec.rb
spec/requests/api/users_spec.rb
+0
-1
spec/routing/admin_routing_spec.rb
spec/routing/admin_routing_spec.rb
+0
-1
spec/routing/project_routing_spec.rb
spec/routing/project_routing_spec.rb
+0
-1
spec/routing/routing_spec.rb
spec/routing/routing_spec.rb
+0
-1
spec/services/git_hooks_service_spec.rb
spec/services/git_hooks_service_spec.rb
+0
-2
spec/services/git_push_service_spec.rb
spec/services/git_push_service_spec.rb
+0
-6
spec/services/merge_requests/refresh_service_spec.rb
spec/services/merge_requests/refresh_service_spec.rb
+0
-1
spec/services/notification_service_spec.rb
spec/services/notification_service_spec.rb
+0
-5
spec/services/projects/transfer_service_spec.rb
spec/services/projects/transfer_service_spec.rb
+0
-1
spec/support/jira_service_helper.rb
spec/support/jira_service_helper.rb
+0
-1
spec/tasks/gitlab/backup_rake_spec.rb
spec/tasks/gitlab/backup_rake_spec.rb
+0
-1
spec/workers/project_cache_worker_spec.rb
spec/workers/project_cache_worker_spec.rb
+0
-1
No files found.
.rubocop.yml
View file @
9e211091
...
@@ -193,7 +193,7 @@ Style/EmptyLineBetweenDefs:
...
@@ -193,7 +193,7 @@ Style/EmptyLineBetweenDefs:
# Don't use several empty lines in a row.
# Don't use several empty lines in a row.
Style/EmptyLines
:
Style/EmptyLines
:
Enabled
:
fals
e
Enabled
:
tru
e
# Keep blank lines around access modifiers.
# Keep blank lines around access modifiers.
Style/EmptyLinesAroundAccessModifier
:
Style/EmptyLinesAroundAccessModifier
:
...
...
app/controllers/admin/hooks_controller.rb
View file @
9e211091
...
@@ -22,7 +22,6 @@ class Admin::HooksController < Admin::ApplicationController
...
@@ -22,7 +22,6 @@ class Admin::HooksController < Admin::ApplicationController
redirect_to
admin_hooks_path
redirect_to
admin_hooks_path
end
end
def
test
def
test
@hook
=
SystemHook
.
find
(
params
[
:hook_id
])
@hook
=
SystemHook
.
find
(
params
[
:hook_id
])
data
=
{
data
=
{
...
...
app/controllers/confirmations_controller.rb
View file @
9e211091
class
ConfirmationsController
<
Devise
::
ConfirmationsController
class
ConfirmationsController
<
Devise
::
ConfirmationsController
def
almost_there
def
almost_there
flash
[
:notice
]
=
nil
flash
[
:notice
]
=
nil
render
layout:
"devise_empty"
render
layout:
"devise_empty"
...
...
app/controllers/import/base_controller.rb
View file @
9e211091
class
Import::BaseController
<
ApplicationController
class
Import::BaseController
<
ApplicationController
private
private
def
get_or_create_namespace
def
get_or_create_namespace
...
...
app/controllers/import/fogbugz_controller.rb
View file @
9e211091
...
@@ -5,7 +5,6 @@ class Import::FogbugzController < Import::BaseController
...
@@ -5,7 +5,6 @@ class Import::FogbugzController < Import::BaseController
rescue_from
Fogbugz
::
AuthenticationException
,
with: :fogbugz_unauthorized
rescue_from
Fogbugz
::
AuthenticationException
,
with: :fogbugz_unauthorized
def
new
def
new
end
end
def
callback
def
callback
...
@@ -22,7 +21,6 @@ class Import::FogbugzController < Import::BaseController
...
@@ -22,7 +21,6 @@ class Import::FogbugzController < Import::BaseController
end
end
def
new_user_map
def
new_user_map
end
end
def
create_user_map
def
create_user_map
...
...
app/controllers/import/gitorious_controller.rb
View file @
9e211091
...
@@ -44,5 +44,4 @@ class Import::GitoriousController < Import::BaseController
...
@@ -44,5 +44,4 @@ class Import::GitoriousController < Import::BaseController
def
verify_gitorious_import_enabled
def
verify_gitorious_import_enabled
render_404
unless
gitorious_import_enabled?
render_404
unless
gitorious_import_enabled?
end
end
end
end
app/controllers/import/google_code_controller.rb
View file @
9e211091
...
@@ -3,7 +3,6 @@ class Import::GoogleCodeController < Import::BaseController
...
@@ -3,7 +3,6 @@ class Import::GoogleCodeController < Import::BaseController
before_action
:user_map
,
only:
[
:new_user_map
,
:create_user_map
]
before_action
:user_map
,
only:
[
:new_user_map
,
:create_user_map
]
def
new
def
new
end
end
def
callback
def
callback
...
@@ -34,7 +33,6 @@ class Import::GoogleCodeController < Import::BaseController
...
@@ -34,7 +33,6 @@ class Import::GoogleCodeController < Import::BaseController
end
end
def
new_user_map
def
new_user_map
end
end
def
create_user_map
def
create_user_map
...
...
app/controllers/invites_controller.rb
View file @
9e211091
...
@@ -5,7 +5,6 @@ class InvitesController < ApplicationController
...
@@ -5,7 +5,6 @@ class InvitesController < ApplicationController
respond_to
:html
respond_to
:html
def
show
def
show
end
end
def
accept
def
accept
...
...
app/controllers/projects/issues_controller.rb
View file @
9e211091
...
@@ -76,7 +76,6 @@ class Projects::IssuesController < Projects::ApplicationController
...
@@ -76,7 +76,6 @@ class Projects::IssuesController < Projects::ApplicationController
render
json:
@issue
.
to_json
(
include:
[
:milestone
,
:labels
])
render
json:
@issue
.
to_json
(
include:
[
:milestone
,
:labels
])
end
end
end
end
end
end
def
create
def
create
...
...
app/controllers/projects/network_controller.rb
View file @
9e211091
...
@@ -7,7 +7,6 @@ class Projects::NetworkController < Projects::ApplicationController
...
@@ -7,7 +7,6 @@ class Projects::NetworkController < Projects::ApplicationController
before_action
:authorize_download_code!
before_action
:authorize_download_code!
def
show
def
show
@url
=
namespace_project_network_path
(
@project
.
namespace
,
@project
,
@ref
,
@options
.
merge
(
format: :json
))
@url
=
namespace_project_network_path
(
@project
.
namespace
,
@project
,
@ref
,
@options
.
merge
(
format: :json
))
@commit_url
=
namespace_project_commit_path
(
@project
.
namespace
,
@project
,
'ae45ca32'
).
gsub
(
"ae45ca32"
,
"%s"
)
@commit_url
=
namespace_project_commit_path
(
@project
.
namespace
,
@project
,
'ae45ca32'
).
gsub
(
"ae45ca32"
,
"%s"
)
...
...
app/controllers/projects/wikis_controller.rb
View file @
9e211091
...
@@ -124,5 +124,4 @@ class Projects::WikisController < Projects::ApplicationController
...
@@ -124,5 +124,4 @@ class Projects::WikisController < Projects::ApplicationController
def
wiki_params
def
wiki_params
params
[
:wiki
].
slice
(
:title
,
:content
,
:format
,
:message
)
params
[
:wiki
].
slice
(
:title
,
:content
,
:format
,
:message
)
end
end
end
end
app/helpers/emails_helper.rb
View file @
9e211091
module
EmailsHelper
module
EmailsHelper
# Google Actions
# Google Actions
# https://developers.google.com/gmail/markup/reference/go-to-action
# https://developers.google.com/gmail/markup/reference/go-to-action
def
email_action
(
url
)
def
email_action
(
url
)
...
...
app/helpers/issuables_helper.rb
View file @
9e211091
module
IssuablesHelper
module
IssuablesHelper
def
sidebar_gutter_toggle_icon
def
sidebar_gutter_toggle_icon
sidebar_gutter_collapsed?
?
icon
(
'angle-double-left'
)
:
icon
(
'angle-double-right'
)
sidebar_gutter_collapsed?
?
icon
(
'angle-double-left'
)
:
icon
(
'angle-double-right'
)
end
end
...
...
app/helpers/search_helper.rb
View file @
9e211091
module
SearchHelper
module
SearchHelper
def
search_autocomplete_opts
(
term
)
def
search_autocomplete_opts
(
term
)
return
unless
current_user
return
unless
current_user
...
...
app/models/concerns/issuable.rb
View file @
9e211091
...
@@ -58,7 +58,6 @@ module Issuable
...
@@ -58,7 +58,6 @@ module Issuable
scope
:references_project
,
->
{
references
(
:project
)
}
scope
:references_project
,
->
{
references
(
:project
)
}
scope
:non_archived
,
->
{
join_project
.
where
(
projects:
{
archived:
false
})
}
scope
:non_archived
,
->
{
join_project
.
where
(
projects:
{
archived:
false
})
}
delegate
:name
,
delegate
:name
,
:email
,
:email
,
to: :author
,
to: :author
,
...
...
app/models/members/project_member.rb
View file @
9e211091
...
@@ -15,7 +15,6 @@ class ProjectMember < Member
...
@@ -15,7 +15,6 @@ class ProjectMember < Member
before_destroy
:delete_member_todos
before_destroy
:delete_member_todos
class
<<
self
class
<<
self
# Add users to project teams with passed access option
# Add users to project teams with passed access option
#
#
# access can be an integer representing a access code
# access can be an integer representing a access code
...
...
app/models/project_services/bugzilla_service.rb
View file @
9e211091
class
BugzillaService
<
IssueTrackerService
class
BugzillaService
<
IssueTrackerService
prop_accessor
:title
,
:description
,
:project_url
,
:issues_url
,
:new_issue_url
prop_accessor
:title
,
:description
,
:project_url
,
:issues_url
,
:new_issue_url
def
title
def
title
...
@@ -21,5 +20,4 @@ class BugzillaService < IssueTrackerService
...
@@ -21,5 +20,4 @@ class BugzillaService < IssueTrackerService
def
to_param
def
to_param
'bugzilla'
'bugzilla'
end
end
end
end
app/models/project_services/custom_issue_tracker_service.rb
View file @
9e211091
class
CustomIssueTrackerService
<
IssueTrackerService
class
CustomIssueTrackerService
<
IssueTrackerService
prop_accessor
:title
,
:description
,
:project_url
,
:issues_url
,
:new_issue_url
prop_accessor
:title
,
:description
,
:project_url
,
:issues_url
,
:new_issue_url
def
title
def
title
...
@@ -31,5 +30,4 @@ class CustomIssueTrackerService < IssueTrackerService
...
@@ -31,5 +30,4 @@ class CustomIssueTrackerService < IssueTrackerService
{
type:
'text'
,
name:
'new_issue_url'
,
placeholder:
'New Issue url'
}
{
type:
'text'
,
name:
'new_issue_url'
,
placeholder:
'New Issue url'
}
]
]
end
end
end
end
app/models/project_services/drone_ci_service.rb
View file @
9e211091
class
DroneCiService
<
CiService
class
DroneCiService
<
CiService
prop_accessor
:drone_url
,
:token
,
:enable_ssl_verification
prop_accessor
:drone_url
,
:token
,
:enable_ssl_verification
validates
:drone_url
,
presence:
true
,
url:
true
,
if: :activated?
validates
:drone_url
,
presence:
true
,
url:
true
,
if: :activated?
...
...
app/models/project_services/issue_tracker_service.rb
View file @
9e211091
class
IssueTrackerService
<
Service
class
IssueTrackerService
<
Service
validates
:project_url
,
:issues_url
,
:new_issue_url
,
presence:
true
,
url:
true
,
if: :activated?
validates
:project_url
,
:issues_url
,
:new_issue_url
,
presence:
true
,
url:
true
,
if: :activated?
default_value_for
:category
,
'issue_tracker'
default_value_for
:category
,
'issue_tracker'
...
...
app/models/project_services/jira_service.rb
View file @
9e211091
...
@@ -190,7 +190,6 @@ class JiraService < IssueTrackerService
...
@@ -190,7 +190,6 @@ class JiraService < IssueTrackerService
end
end
end
end
def
auth
def
auth
require
'base64'
require
'base64'
Base64
.
urlsafe_encode64
(
"
#{
self
.
username
}
:
#{
self
.
password
}
"
)
Base64
.
urlsafe_encode64
(
"
#{
self
.
username
}
:
#{
self
.
password
}
"
)
...
...
app/models/project_services/redmine_service.rb
View file @
9e211091
class
RedmineService
<
IssueTrackerService
class
RedmineService
<
IssueTrackerService
prop_accessor
:title
,
:description
,
:project_url
,
:issues_url
,
:new_issue_url
prop_accessor
:title
,
:description
,
:project_url
,
:issues_url
,
:new_issue_url
def
title
def
title
...
...
app/models/repository.rb
View file @
9e211091
...
@@ -875,7 +875,6 @@ class Repository
...
@@ -875,7 +875,6 @@ class Repository
merge_base
(
ancestor_id
,
descendant_id
)
==
ancestor_id
merge_base
(
ancestor_id
,
descendant_id
)
==
ancestor_id
end
end
def
search_files
(
query
,
ref
)
def
search_files
(
query
,
ref
)
offset
=
2
offset
=
2
args
=
%W(
#{
Gitlab
.
config
.
git
.
bin_path
}
grep -i -I -n --before-context
#{
offset
}
--after-context
#{
offset
}
-E -e
#{
Regexp
.
escape
(
query
)
}
#{
ref
||
root_ref
}
)
args
=
%W(
#{
Gitlab
.
config
.
git
.
bin_path
}
grep -i -I -n --before-context
#{
offset
}
--after-context
#{
offset
}
-E -e
#{
Regexp
.
escape
(
query
)
}
#{
ref
||
root_ref
}
)
...
...
app/models/user.rb
View file @
9e211091
...
@@ -852,7 +852,6 @@ class User < ActiveRecord::Base
...
@@ -852,7 +852,6 @@ class User < ActiveRecord::Base
projects
.
select
(
:id
),
projects
.
select
(
:id
),
groups
.
joins
(
:shared_projects
).
select
(
:project_id
)]
groups
.
joins
(
:shared_projects
).
select
(
:project_id
)]
if
min_access_level
if
min_access_level
scope
=
{
access_level:
Gitlab
::
Access
.
values
.
select
{
|
access
|
access
>=
min_access_level
}
}
scope
=
{
access_level:
Gitlab
::
Access
.
values
.
select
{
|
access
|
access
>=
min_access_level
}
}
relations
=
[
relations
.
shift
]
+
relations
.
map
{
|
relation
|
relation
.
where
(
members:
scope
)
}
relations
=
[
relations
.
shift
]
+
relations
.
map
{
|
relation
|
relation
.
where
(
members:
scope
)
}
...
...
app/services/create_release_service.rb
View file @
9e211091
...
@@ -2,7 +2,6 @@ require_relative 'base_service'
...
@@ -2,7 +2,6 @@ require_relative 'base_service'
class
CreateReleaseService
<
BaseService
class
CreateReleaseService
<
BaseService
def
execute
(
tag_name
,
release_description
)
def
execute
(
tag_name
,
release_description
)
repository
=
project
.
repository
repository
=
project
.
repository
existing_tag
=
repository
.
find_tag
(
tag_name
)
existing_tag
=
repository
.
find_tag
(
tag_name
)
...
...
app/services/issues/base_service.rb
View file @
9e211091
module
Issues
module
Issues
class
BaseService
<
::
IssuableBaseService
class
BaseService
<
::
IssuableBaseService
def
hook_data
(
issue
,
action
)
def
hook_data
(
issue
,
action
)
issue_data
=
issue
.
to_hook_data
(
current_user
)
issue_data
=
issue
.
to_hook_data
(
current_user
)
issue_url
=
Gitlab
::
UrlBuilder
.
build
(
issue
)
issue_url
=
Gitlab
::
UrlBuilder
.
build
(
issue
)
...
...
app/services/merge_requests/base_service.rb
View file @
9e211091
module
MergeRequests
module
MergeRequests
class
BaseService
<
::
IssuableBaseService
class
BaseService
<
::
IssuableBaseService
def
create_note
(
merge_request
)
def
create_note
(
merge_request
)
SystemNoteService
.
change_status
(
merge_request
,
merge_request
.
target_project
,
current_user
,
merge_request
.
state
,
nil
)
SystemNoteService
.
change_status
(
merge_request
,
merge_request
.
target_project
,
current_user
,
merge_request
.
state
,
nil
)
end
end
...
...
app/services/merge_requests/merge_when_build_succeeds_service.rb
View file @
9e211091
...
@@ -40,6 +40,5 @@ module MergeRequests
...
@@ -40,6 +40,5 @@ module MergeRequests
error
(
"Can't cancel the automatic merge"
,
406
)
error
(
"Can't cancel the automatic merge"
,
406
)
end
end
end
end
end
end
end
end
app/services/milestones/destroy_service.rb
View file @
9e211091
module
Milestones
module
Milestones
class
DestroyService
<
Milestones
::
BaseService
class
DestroyService
<
Milestones
::
BaseService
def
execute
(
milestone
)
def
execute
(
milestone
)
Milestone
.
transaction
do
Milestone
.
transaction
do
update_params
=
{
milestone:
nil
}
update_params
=
{
milestone:
nil
}
...
...
app/services/projects/download_service.rb
View file @
9e211091
module
Projects
module
Projects
class
DownloadService
<
BaseService
class
DownloadService
<
BaseService
WHITELIST
=
[
WHITELIST
=
[
/^[^.]+\.fogbugz.com$/
/^[^.]+\.fogbugz.com$/
]
]
...
...
app/services/projects/import_export/export_service.rb
View file @
9e211091
module
Projects
module
Projects
module
ImportExport
module
ImportExport
class
ExportService
<
BaseService
class
ExportService
<
BaseService
def
execute
(
_options
=
{})
def
execute
(
_options
=
{})
@shared
=
Gitlab
::
ImportExport
::
Shared
.
new
(
relative_path:
File
.
join
(
project
.
path_with_namespace
,
'work'
))
@shared
=
Gitlab
::
ImportExport
::
Shared
.
new
(
relative_path:
File
.
join
(
project
.
path_with_namespace
,
'work'
))
save_all
save_all
...
...
app/services/system_note_service.rb
View file @
9e211091
...
@@ -293,7 +293,6 @@ class SystemNoteService
...
@@ -293,7 +293,6 @@ class SystemNoteService
end
end
end
end
def
self
.
cross_reference?
(
note_text
)
def
self
.
cross_reference?
(
note_text
)
note_text
.
start_with?
(
cross_reference_note_prefix
)
note_text
.
start_with?
(
cross_reference_note_prefix
)
end
end
...
...
app/services/update_release_service.rb
View file @
9e211091
...
@@ -2,7 +2,6 @@ require_relative 'base_service'
...
@@ -2,7 +2,6 @@ require_relative 'base_service'
class
UpdateReleaseService
<
BaseService
class
UpdateReleaseService
<
BaseService
def
execute
(
tag_name
,
release_description
)
def
execute
(
tag_name
,
release_description
)
repository
=
project
.
repository
repository
=
project
.
repository
existing_tag
=
repository
.
find_tag
(
tag_name
)
existing_tag
=
repository
.
find_tag
(
tag_name
)
...
...
app/services/wiki_pages/base_service.rb
View file @
9e211091
module
WikiPages
module
WikiPages
class
BaseService
<
::
BaseService
class
BaseService
<
::
BaseService
def
hook_data
(
page
,
action
)
def
hook_data
(
page
,
action
)
hook_data
=
{
hook_data
=
{
object_kind:
page
.
class
.
name
.
underscore
,
object_kind:
page
.
class
.
name
.
underscore
,
...
...
config/initializers/1_settings.rb
View file @
9e211091
...
@@ -96,7 +96,6 @@ class Settings < Settingslogic
...
@@ -96,7 +96,6 @@ class Settings < Settingslogic
end
end
end
end
# Default settings
# Default settings
Settings
[
'ldap'
]
||=
Settingslogic
.
new
({})
Settings
[
'ldap'
]
||=
Settingslogic
.
new
({})
Settings
.
ldap
[
'enabled'
]
=
false
if
Settings
.
ldap
[
'enabled'
].
nil?
Settings
.
ldap
[
'enabled'
]
=
false
if
Settings
.
ldap
[
'enabled'
].
nil?
...
@@ -124,7 +123,6 @@ if Settings.ldap['enabled'] || Rails.env.test?
...
@@ -124,7 +123,6 @@ if Settings.ldap['enabled'] || Rails.env.test?
end
end
end
end
Settings
[
'omniauth'
]
||=
Settingslogic
.
new
({})
Settings
[
'omniauth'
]
||=
Settingslogic
.
new
({})
Settings
.
omniauth
[
'enabled'
]
=
false
if
Settings
.
omniauth
[
'enabled'
].
nil?
Settings
.
omniauth
[
'enabled'
]
=
false
if
Settings
.
omniauth
[
'enabled'
].
nil?
Settings
.
omniauth
[
'auto_sign_in_with_provider'
]
=
false
if
Settings
.
omniauth
[
'auto_sign_in_with_provider'
].
nil?
Settings
.
omniauth
[
'auto_sign_in_with_provider'
]
=
false
if
Settings
.
omniauth
[
'auto_sign_in_with_provider'
].
nil?
...
@@ -218,7 +216,6 @@ Settings.gitlab['restricted_signup_domains'] ||= []
...
@@ -218,7 +216,6 @@ Settings.gitlab['restricted_signup_domains'] ||= []
Settings
.
gitlab
[
'import_sources'
]
||=
%w[github bitbucket gitlab gitorious google_code fogbugz git gitlab_project]
Settings
.
gitlab
[
'import_sources'
]
||=
%w[github bitbucket gitlab gitorious google_code fogbugz git gitlab_project]
Settings
.
gitlab
[
'trusted_proxies'
]
||=
[]
Settings
.
gitlab
[
'trusted_proxies'
]
||=
[]
#
#
# CI
# CI
#
#
...
@@ -348,7 +345,6 @@ Settings.git['timeout'] ||= 10
...
@@ -348,7 +345,6 @@ Settings.git['timeout'] ||= 10
Settings
[
'satellites'
]
||=
Settingslogic
.
new
({})
Settings
[
'satellites'
]
||=
Settingslogic
.
new
({})
Settings
.
satellites
[
'path'
]
=
File
.
expand_path
(
Settings
.
satellites
[
'path'
]
||
"tmp/repo_satellites/"
,
Rails
.
root
)
Settings
.
satellites
[
'path'
]
=
File
.
expand_path
(
Settings
.
satellites
[
'path'
]
||
"tmp/repo_satellites/"
,
Rails
.
root
)
#
#
# Extra customization
# Extra customization
#
#
...
...
config/routes.rb
View file @
9e211091
...
@@ -133,7 +133,6 @@ Rails.application.routes.draw do
...
@@ -133,7 +133,6 @@ Rails.application.routes.draw do
#
#
resources
:notification_settings
,
only:
[
:create
,
:update
]
resources
:notification_settings
,
only:
[
:create
,
:update
]
#
#
# Import
# Import
#
#
...
@@ -466,7 +465,6 @@ Rails.application.routes.draw do
...
@@ -466,7 +465,6 @@ Rails.application.routes.draw do
resources
:namespaces
,
path:
'/'
,
constraints:
{
id:
/[a-zA-Z.0-9_\-]+/
},
only:
[]
do
resources
:namespaces
,
path:
'/'
,
constraints:
{
id:
/[a-zA-Z.0-9_\-]+/
},
only:
[]
do
resources
(
:projects
,
constraints:
{
id:
/[a-zA-Z.0-9_\-]+(?<!\.atom)/
},
except:
resources
(
:projects
,
constraints:
{
id:
/[a-zA-Z.0-9_\-]+(?<!\.atom)/
},
except:
[
:new
,
:create
,
:index
],
path:
"/"
)
do
[
:new
,
:create
,
:index
],
path:
"/"
)
do
member
do
member
do
put
:transfer
put
:transfer
delete
:remove_fork
delete
:remove_fork
...
...
features/steps/dashboard/new_project.rb
View file @
9e211091
...
@@ -49,5 +49,4 @@ class Spinach::Features::NewProject < Spinach::FeatureSteps
...
@@ -49,5 +49,4 @@ class Spinach::Features::NewProject < Spinach::FeatureSteps
step
'I redirected to Google Code import page'
do
step
'I redirected to Google Code import page'
do
expect
(
current_path
).
to
eq
new_import_google_code_path
expect
(
current_path
).
to
eq
new_import_google_code_path
end
end
end
end
features/steps/explore/projects.rb
View file @
9e211091
...
@@ -69,7 +69,6 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
...
@@ -69,7 +69,6 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
visit
namespace_project_issues_path
(
public_project
.
namespace
,
public_project
)
visit
namespace_project_issues_path
(
public_project
.
namespace
,
public_project
)
end
end
step
'I should see list of issues for "Community" project'
do
step
'I should see list of issues for "Community" project'
do
expect
(
page
).
to
have_content
"Bug"
expect
(
page
).
to
have_content
"Bug"
expect
(
page
).
to
have_content
public_project
.
name
expect
(
page
).
to
have_content
public_project
.
name
...
@@ -88,7 +87,6 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
...
@@ -88,7 +87,6 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
visit
namespace_project_issues_path
(
internal_project
.
namespace
,
internal_project
)
visit
namespace_project_issues_path
(
internal_project
.
namespace
,
internal_project
)
end
end
step
'I should see list of issues for "Internal" project'
do
step
'I should see list of issues for "Internal" project'
do
expect
(
page
).
to
have_content
"Internal Bug"
expect
(
page
).
to
have_content
"Internal Bug"
expect
(
page
).
to
have_content
internal_project
.
name
expect
(
page
).
to
have_content
internal_project
.
name
...
@@ -137,7 +135,6 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
...
@@ -137,7 +135,6 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
@public_project
||=
Project
.
find_by!
(
name:
'Community'
)
@public_project
||=
Project
.
find_by!
(
name:
'Community'
)
end
end
def
internal_merge_request
def
internal_merge_request
@internal_merge_request
||=
MergeRequest
.
find_by!
(
title:
'Feature implemented'
)
@internal_merge_request
||=
MergeRequest
.
find_by!
(
title:
'Feature implemented'
)
end
end
...
...
features/steps/project/archived.rb
View file @
9e211091
...
@@ -33,5 +33,4 @@ class Spinach::Features::ProjectArchived < Spinach::FeatureSteps
...
@@ -33,5 +33,4 @@ class Spinach::Features::ProjectArchived < Spinach::FeatureSteps
When
'I set project unarchived'
do
When
'I set project unarchived'
do
click_link
"Unarchive"
click_link
"Unarchive"
end
end
end
end
features/steps/project/issues/issues.rb
View file @
9e211091
...
@@ -124,14 +124,12 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
...
@@ -124,14 +124,12 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
end
end
step
'project "Shop" has milestone "v2.2"'
do
step
'project "Shop" has milestone "v2.2"'
do
milestone
=
create
(
:milestone
,
title:
"v2.2"
,
project:
project
)
milestone
=
create
(
:milestone
,
title:
"v2.2"
,
project:
project
)
3
.
times
{
create
(
:issue
,
project:
project
,
milestone:
milestone
)
}
3
.
times
{
create
(
:issue
,
project:
project
,
milestone:
milestone
)
}
end
end
step
'project "Shop" has milestone "v3.0"'
do
step
'project "Shop" has milestone "v3.0"'
do
milestone
=
create
(
:milestone
,
title:
"v3.0"
,
project:
project
)
milestone
=
create
(
:milestone
,
title:
"v3.0"
,
project:
project
)
3
.
times
{
create
(
:issue
,
project:
project
,
milestone:
milestone
)
}
3
.
times
{
create
(
:issue
,
project:
project
,
milestone:
milestone
)
}
...
@@ -147,7 +145,6 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
...
@@ -147,7 +145,6 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
end
end
When
'I select first assignee from "Shop" project'
do
When
'I select first assignee from "Shop" project'
do
first_assignee
=
project
.
users
.
first
first_assignee
=
project
.
users
.
first
select
first_assignee
.
name
,
from:
"assignee_id"
select
first_assignee
.
name
,
from:
"assignee_id"
end
end
...
@@ -160,7 +157,6 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
...
@@ -160,7 +157,6 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
end
end
step
'project "Shop" have "Release 0.4" open issue'
do
step
'project "Shop" have "Release 0.4" open issue'
do
create
(
:issue
,
create
(
:issue
,
title:
"Release 0.4"
,
title:
"Release 0.4"
,
project:
project
,
project:
project
,
...
@@ -360,5 +356,4 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
...
@@ -360,5 +356,4 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
def
filter_issue
(
text
)
def
filter_issue
(
text
)
fill_in
'issue_search'
,
with:
text
fill_in
'issue_search'
,
with:
text
end
end
end
end
features/steps/project/project_find_file.rb
View file @
9e211091
...
@@ -66,7 +66,6 @@ class Spinach::Features::ProjectFindFile < Spinach::FeatureSteps
...
@@ -66,7 +66,6 @@ class Spinach::Features::ProjectFindFile < Spinach::FeatureSteps
expect
(
page
).
not_to
have_content
(
".gitignore"
)
expect
(
page
).
not_to
have_content
(
".gitignore"
)
end
end
def
find_file
(
text
)
def
find_file
(
text
)
fill_in
'file_find'
,
with:
text
fill_in
'file_find'
,
with:
text
end
end
...
...
features/steps/shared/issuable.rb
View file @
9e211091
...
@@ -189,5 +189,4 @@ module SharedIssuable
...
@@ -189,5 +189,4 @@ module SharedIssuable
expect
(
page
).
to
have_content
content
expect
(
page
).
to
have_content
content
end
end
end
end
end
end
features/steps/snippet_search.rb
View file @
9e211091
...
@@ -52,5 +52,4 @@ class Spinach::Features::SnippetSearch < Spinach::FeatureSteps
...
@@ -52,5 +52,4 @@ class Spinach::Features::SnippetSearch < Spinach::FeatureSteps
step
'I should not see "Personal snippet private" in results'
do
step
'I should not see "Personal snippet private" in results'
do
expect
(
page
).
not_to
have_content
'Personal snippet private'
expect
(
page
).
not_to
have_content
'Personal snippet private'
end
end
end
end
lib/api/award_emoji.rb
View file @
9e211091
...
@@ -11,7 +11,6 @@ module API
...
@@ -11,7 +11,6 @@ module API
[
":id/
#{
awardable_string
}
/:
#{
awardable_id_string
}
/award_emoji"
,
[
":id/
#{
awardable_string
}
/:
#{
awardable_id_string
}
/award_emoji"
,
":id/
#{
awardable_string
}
/:
#{
awardable_id_string
}
/notes/:note_id/award_emoji"
":id/
#{
awardable_string
}
/:
#{
awardable_id_string
}
/notes/:note_id/award_emoji"
].
each
do
|
endpoint
|
].
each
do
|
endpoint
|
# Get a list of project +awardable+ award emoji
# Get a list of project +awardable+ award emoji
#
#
# Parameters:
# Parameters:
...
...
lib/api/branches.rb
View file @
9e211091
...
@@ -40,7 +40,6 @@ module API
...
@@ -40,7 +40,6 @@ module API
# PUT /projects/:id/repository/branches/:branch/protect
# PUT /projects/:id/repository/branches/:branch/protect
put
':id/repository/branches/:branch/protect'
,
put
':id/repository/branches/:branch/protect'
,
requirements:
{
branch:
/.+/
}
do
requirements:
{
branch:
/.+/
}
do
authorize_admin_project
authorize_admin_project
@branch
=
user_project
.
repository
.
find_branch
(
params
[
:branch
])
@branch
=
user_project
.
repository
.
find_branch
(
params
[
:branch
])
...
@@ -60,7 +59,6 @@ module API
...
@@ -60,7 +59,6 @@ module API
# PUT /projects/:id/repository/branches/:branch/unprotect
# PUT /projects/:id/repository/branches/:branch/unprotect
put
':id/repository/branches/:branch/unprotect'
,
put
':id/repository/branches/:branch/unprotect'
,
requirements:
{
branch:
/.+/
}
do
requirements:
{
branch:
/.+/
}
do
authorize_admin_project
authorize_admin_project
@branch
=
user_project
.
repository
.
find_branch
(
params
[
:branch
])
@branch
=
user_project
.
repository
.
find_branch
(
params
[
:branch
])
...
...
lib/api/builds.rb
View file @
9e211091
...
@@ -13,7 +13,6 @@ module API
...
@@ -13,7 +13,6 @@ module API
# Example Request:
# Example Request:
# GET /projects/:id/builds
# GET /projects/:id/builds
get
':id/builds'
do
get
':id/builds'
do
builds
=
user_project
.
builds
.
order
(
'id DESC'
)
builds
=
user_project
.
builds
.
order
(
'id DESC'
)
builds
=
filter_builds
(
builds
,
params
[
:scope
])
builds
=
filter_builds
(
builds
,
params
[
:scope
])
...
...
lib/api/milestones.rb
View file @
9e211091
...
@@ -115,7 +115,6 @@ module API
...
@@ -115,7 +115,6 @@ module API
issues
=
IssuesFinder
.
new
(
current_user
,
finder_params
).
execute
issues
=
IssuesFinder
.
new
(
current_user
,
finder_params
).
execute
present
paginate
(
issues
),
with:
Entities
::
Issue
,
current_user:
current_user
present
paginate
(
issues
),
with:
Entities
::
Issue
,
current_user:
current_user
end
end
end
end
end
end
end
end
lib/api/project_hooks.rb
View file @
9e211091
...
@@ -28,7 +28,6 @@ module API
...
@@ -28,7 +28,6 @@ module API
present
@hook
,
with:
Entities
::
ProjectHook
present
@hook
,
with:
Entities
::
ProjectHook
end
end
# Add hook to project
# Add hook to project
#
#
# Parameters:
# Parameters:
...
...
lib/api/project_members.rb
View file @
9e211091
...
@@ -4,7 +4,6 @@ module API
...
@@ -4,7 +4,6 @@ module API
before
{
authenticate!
}
before
{
authenticate!
}
resource
:projects
do
resource
:projects
do
# Get a project team members
# Get a project team members
#
#
# Parameters:
# Parameters:
...
...
lib/api/projects.rb
View file @
9e211091
...
@@ -341,7 +341,6 @@ module API
...
@@ -341,7 +341,6 @@ module API
else
else
not_found!
(
"Source Project"
)
not_found!
(
"Source Project"
)
end
end
end
end
# Remove a forked_from relationship
# Remove a forked_from relationship
...
@@ -418,7 +417,6 @@ module API
...
@@ -418,7 +417,6 @@ module API
present
paginate
(
projects
),
with:
Entities
::
Project
present
paginate
(
projects
),
with:
Entities
::
Project
end
end
# Get a users list
# Get a users list
#
#
# Example Request:
# Example Request:
...
...
lib/api/services.rb
View file @
9e211091
...
@@ -4,7 +4,6 @@ module API
...
@@ -4,7 +4,6 @@ module API
before
{
authenticate!
}
before
{
authenticate!
}
before
{
authorize_admin_project
}
before
{
authorize_admin_project
}
resource
:projects
do
resource
:projects
do
# Set <service_slug> service for project
# Set <service_slug> service for project
#
#
...
...
lib/banzai/filter/image_link_filter.rb
View file @
9e211091
...
@@ -8,7 +8,6 @@ module Banzai
...
@@ -8,7 +8,6 @@ module Banzai
# of the anchor, and then replace the img with the link-wrapped version.
# of the anchor, and then replace the img with the link-wrapped version.
def
call
def
call
doc
.
xpath
(
'descendant-or-self::img[not(ancestor::a)]'
).
each
do
|
img
|
doc
.
xpath
(
'descendant-or-self::img[not(ancestor::a)]'
).
each
do
|
img
|
div
=
doc
.
document
.
create_element
(
div
=
doc
.
document
.
create_element
(
'div'
,
'div'
,
class:
'image-container'
class:
'image-container'
...
...
lib/banzai/filter/wiki_link_filter.rb
View file @
9e211091
...
@@ -8,7 +8,6 @@ module Banzai
...
@@ -8,7 +8,6 @@ module Banzai
# Context options:
# Context options:
# :project_wiki
# :project_wiki
class
WikiLinkFilter
<
HTML
::
Pipeline
::
Filter
class
WikiLinkFilter
<
HTML
::
Pipeline
::
Filter
def
call
def
call
return
doc
unless
project_wiki?
return
doc
unless
project_wiki?
...
...
lib/banzai/pipeline/full_pipeline.rb
View file @
9e211091
module
Banzai
module
Banzai
module
Pipeline
module
Pipeline
class
FullPipeline
<
CombinedPipeline
.
new
(
PlainMarkdownPipeline
,
GfmPipeline
)
class
FullPipeline
<
CombinedPipeline
.
new
(
PlainMarkdownPipeline
,
GfmPipeline
)
end
end
end
end
end
end
lib/ci/charts.rb
View file @
9e211091
...
@@ -13,7 +13,6 @@ module Ci
...
@@ -13,7 +13,6 @@ module Ci
collect
collect
end
end
def
push
(
from
,
to
,
format
)
def
push
(
from
,
to
,
format
)
@labels
<<
from
.
strftime
(
format
)
@labels
<<
from
.
strftime
(
format
)
@total
<<
project
.
builds
.
@total
<<
project
.
builds
.
...
...
lib/disable_email_interceptor.rb
View file @
9e211091
# Read about interceptors in http://guides.rubyonrails.org/action_mailer_basics.html#intercepting-emails
# Read about interceptors in http://guides.rubyonrails.org/action_mailer_basics.html#intercepting-emails
class
DisableEmailInterceptor
class
DisableEmailInterceptor
def
self
.
delivering_email
(
message
)
def
self
.
delivering_email
(
message
)
message
.
perform_deliveries
=
false
message
.
perform_deliveries
=
false
Rails
.
logger
.
info
"Emails disabled! Interceptor prevented sending mail
#{
message
.
subject
}
"
Rails
.
logger
.
info
"Emails disabled! Interceptor prevented sending mail
#{
message
.
subject
}
"
...
...
lib/gitlab/asciidoc.rb
View file @
9e211091
...
@@ -4,7 +4,6 @@ module Gitlab
...
@@ -4,7 +4,6 @@ module Gitlab
# Parser/renderer for the AsciiDoc format that uses Asciidoctor and filters
# Parser/renderer for the AsciiDoc format that uses Asciidoctor and filters
# the resulting HTML through HTML pipeline filters.
# the resulting HTML through HTML pipeline filters.
module
Asciidoc
module
Asciidoc
DEFAULT_ADOC_ATTRS
=
[
DEFAULT_ADOC_ATTRS
=
[
'showtitle'
,
'idprefix=user-content-'
,
'idseparator=-'
,
'env=gitlab'
,
'showtitle'
,
'idprefix=user-content-'
,
'idseparator=-'
,
'env=gitlab'
,
'env-gitlab'
,
'source-highlighter=html-pipeline'
'env-gitlab'
,
'source-highlighter=html-pipeline'
...
...
lib/gitlab/backend/grack_auth.rb
View file @
9e211091
...
@@ -8,7 +8,6 @@ module Grack
...
@@ -8,7 +8,6 @@ module Grack
end
end
class
Auth
<
Rack
::
Auth
::
Basic
class
Auth
<
Rack
::
Auth
::
Basic
attr_accessor
:user
,
:project
,
:env
attr_accessor
:user
,
:project
,
:env
def
call
(
env
)
def
call
(
env
)
...
...
lib/gitlab/diff/parser.rb
View file @
9e211091
...
@@ -40,7 +40,6 @@ module Gitlab
...
@@ -40,7 +40,6 @@ module Gitlab
line_obj_index
+=
1
line_obj_index
+=
1
end
end
case
line
[
0
]
case
line
[
0
]
when
"+"
when
"+"
line_new
+=
1
line_new
+=
1
...
...
lib/gitlab/import_export/importer.rb
View file @
9e211091
module
Gitlab
module
Gitlab
module
ImportExport
module
ImportExport
class
Importer
class
Importer
def
initialize
(
project
)
def
initialize
(
project
)
@archive_file
=
project
.
import_source
@archive_file
=
project
.
import_source
@current_user
=
project
.
creator
@current_user
=
project
.
creator
...
...
lib/gitlab/import_export/members_mapper.rb
View file @
9e211091
module
Gitlab
module
Gitlab
module
ImportExport
module
ImportExport
class
MembersMapper
class
MembersMapper
attr_reader
:missing_author_ids
attr_reader
:missing_author_ids
def
initialize
(
exported_members
:,
user
:,
project
:)
def
initialize
(
exported_members
:,
user
:,
project
:)
...
...
lib/gitlab/import_export/project_creator.rb
View file @
9e211091
module
Gitlab
module
Gitlab
module
ImportExport
module
ImportExport
class
ProjectCreator
class
ProjectCreator
def
initialize
(
namespace_id
,
current_user
,
file
,
project_path
)
def
initialize
(
namespace_id
,
current_user
,
file
,
project_path
)
@namespace_id
=
namespace_id
@namespace_id
=
namespace_id
@current_user
=
current_user
@current_user
=
current_user
...
...
lib/gitlab/import_export/project_tree_restorer.rb
View file @
9e211091
module
Gitlab
module
Gitlab
module
ImportExport
module
ImportExport
class
ProjectTreeRestorer
class
ProjectTreeRestorer
def
initialize
(
user
:,
shared
:,
project
:)
def
initialize
(
user
:,
shared
:,
project
:)
@path
=
File
.
join
(
shared
.
export_path
,
'project.json'
)
@path
=
File
.
join
(
shared
.
export_path
,
'project.json'
)
@user
=
user
@user
=
user
...
...
lib/gitlab/import_export/reader.rb
View file @
9e211091
module
Gitlab
module
Gitlab
module
ImportExport
module
ImportExport
class
Reader
class
Reader
attr_reader
:tree
attr_reader
:tree
def
initialize
(
shared
:)
def
initialize
(
shared
:)
...
@@ -55,7 +54,6 @@ module Gitlab
...
@@ -55,7 +54,6 @@ module Gitlab
@json_config_hash
@json_config_hash
end
end
# If the model is a hash, process the sub_models, which could also be hashes
# If the model is a hash, process the sub_models, which could also be hashes
# If there is a list, add to an existing array, otherwise use hash syntax
# If there is a list, add to an existing array, otherwise use hash syntax
# +current_key+ main model that will be a key in the hash
# +current_key+ main model that will be a key in the hash
...
...
lib/gitlab/import_export/relation_factory.rb
View file @
9e211091
module
Gitlab
module
Gitlab
module
ImportExport
module
ImportExport
class
RelationFactory
class
RelationFactory
OVERRIDES
=
{
snippets: :project_snippets
,
OVERRIDES
=
{
snippets: :project_snippets
,
pipelines:
'Ci::Pipeline'
,
pipelines:
'Ci::Pipeline'
,
statuses:
'commit_status'
,
statuses:
'commit_status'
,
...
...
lib/gitlab/import_export/shared.rb
View file @
9e211091
module
Gitlab
module
Gitlab
module
ImportExport
module
ImportExport
class
Shared
class
Shared
attr_reader
:errors
,
:opts
attr_reader
:errors
,
:opts
def
initialize
(
opts
)
def
initialize
(
opts
)
...
...
lib/gitlab/import_export/uploads_saver.rb
View file @
9e211091
module
Gitlab
module
Gitlab
module
ImportExport
module
ImportExport
class
UploadsSaver
class
UploadsSaver
def
initialize
(
project
:,
shared
:)
def
initialize
(
project
:,
shared
:)
@project
=
project
@project
=
project
@shared
=
shared
@shared
=
shared
...
...
lib/gitlab/import_export/version_checker.rb
View file @
9e211091
module
Gitlab
module
Gitlab
module
ImportExport
module
ImportExport
class
VersionChecker
class
VersionChecker
def
self
.
check!
(
*
args
)
def
self
.
check!
(
*
args
)
new
(
*
args
).
check!
new
(
*
args
).
check!
end
end
...
...
lib/gitlab/import_export/version_saver.rb
View file @
9e211091
module
Gitlab
module
Gitlab
module
ImportExport
module
ImportExport
class
VersionSaver
class
VersionSaver
def
initialize
(
shared
:)
def
initialize
(
shared
:)
@shared
=
shared
@shared
=
shared
end
end
...
...
lib/gitlab/import_sources.rb
View file @
9e211091
...
@@ -24,8 +24,6 @@ module Gitlab
...
@@ -24,8 +24,6 @@ module Gitlab
'GitLab export'
=>
'gitlab_project'
'GitLab export'
=>
'gitlab_project'
}
}
end
end
end
end
end
end
end
end
lib/gitlab/lfs/response.rb
View file @
9e211091
module
Gitlab
module
Gitlab
module
Lfs
module
Lfs
class
Response
class
Response
def
initialize
(
project
,
user
,
ci
,
request
)
def
initialize
(
project
,
user
,
ci
,
request
)
@origin_project
=
project
@origin_project
=
project
@project
=
storage_project
(
project
)
@project
=
storage_project
(
project
)
...
...
lib/gitlab/other_markup.rb
View file @
9e211091
module
Gitlab
module
Gitlab
# Parser/renderer for markups without other special support code.
# Parser/renderer for markups without other special support code.
module
OtherMarkup
module
OtherMarkup
# Public: Converts the provided markup into HTML.
# Public: Converts the provided markup into HTML.
#
#
# input - the source text in a markup format
# input - the source text in a markup format
...
...
lib/gitlab/regex.rb
View file @
9e211091
...
@@ -13,7 +13,6 @@ module Gitlab
...
@@ -13,7 +13,6 @@ module Gitlab
"Cannot start with '-' or end in '.'."
\
"Cannot start with '-' or end in '.'."
\
end
end
def
namespace_name_regex
def
namespace_name_regex
@namespace_name_regex
||=
/\A[\p{Alnum}\p{Pd}_\. ]*\z/
.
freeze
@namespace_name_regex
||=
/\A[\p{Alnum}\p{Pd}_\. ]*\z/
.
freeze
end
end
...
@@ -22,7 +21,6 @@ module Gitlab
...
@@ -22,7 +21,6 @@ module Gitlab
"can contain only letters, digits, '_', '.', dash and space."
"can contain only letters, digits, '_', '.', dash and space."
end
end
def
project_name_regex
def
project_name_regex
@project_name_regex
||=
/\A[\p{Alnum}_][\p{Alnum}\p{Pd}_\. ]*\z/
.
freeze
@project_name_regex
||=
/\A[\p{Alnum}_][\p{Alnum}\p{Pd}_\. ]*\z/
.
freeze
end
end
...
@@ -32,7 +30,6 @@ module Gitlab
...
@@ -32,7 +30,6 @@ module Gitlab
"It must start with letter, digit or '_'."
"It must start with letter, digit or '_'."
end
end
def
project_path_regex
def
project_path_regex
@project_path_regex
||=
/\A[a-zA-Z0-9_.][a-zA-Z0-9_\-\.]*(?<!\.git|\.atom)\z/
.
freeze
@project_path_regex
||=
/\A[a-zA-Z0-9_.][a-zA-Z0-9_\-\.]*(?<!\.git|\.atom)\z/
.
freeze
end
end
...
@@ -42,7 +39,6 @@ module Gitlab
...
@@ -42,7 +39,6 @@ module Gitlab
"Cannot start with '-', end in '.git' or end in '.atom'"
\
"Cannot start with '-', end in '.git' or end in '.atom'"
\
end
end
def
file_name_regex
def
file_name_regex
@file_name_regex
||=
/\A[a-zA-Z0-9_\-\.\@]*\z/
.
freeze
@file_name_regex
||=
/\A[a-zA-Z0-9_\-\.\@]*\z/
.
freeze
end
end
...
@@ -59,7 +55,6 @@ module Gitlab
...
@@ -59,7 +55,6 @@ module Gitlab
"can contain only letters, digits, '_', '-', '@' and '.'. Separate directories with a '/'. "
"can contain only letters, digits, '_', '-', '@' and '.'. Separate directories with a '/'. "
end
end
def
directory_traversal_regex
def
directory_traversal_regex
@directory_traversal_regex
||=
/\.{2}/
.
freeze
@directory_traversal_regex
||=
/\.{2}/
.
freeze
end
end
...
@@ -68,7 +63,6 @@ module Gitlab
...
@@ -68,7 +63,6 @@ module Gitlab
"cannot include directory traversal. "
"cannot include directory traversal. "
end
end
def
archive_formats_regex
def
archive_formats_regex
# |zip|tar| tar.gz | tar.bz2 |
# |zip|tar| tar.gz | tar.bz2 |
@archive_formats_regex
||=
/(zip|tar|tar\.gz|tgz|gz|tar\.bz2|tbz|tbz2|tb2|bz2)/
.
freeze
@archive_formats_regex
||=
/(zip|tar|tar\.gz|tgz|gz|tar\.bz2|tbz|tbz2|tb2|bz2)/
.
freeze
...
...
lib/gitlab/saml/auth_hash.rb
View file @
9e211091
module
Gitlab
module
Gitlab
module
Saml
module
Saml
class
AuthHash
<
Gitlab
::
OAuth
::
AuthHash
class
AuthHash
<
Gitlab
::
OAuth
::
AuthHash
def
groups
def
groups
get_raw
(
Gitlab
::
Saml
::
Config
.
groups
)
get_raw
(
Gitlab
::
Saml
::
Config
.
groups
)
end
end
...
@@ -13,7 +12,6 @@ module Gitlab
...
@@ -13,7 +12,6 @@ module Gitlab
# otherwise just the first value is returned
# otherwise just the first value is returned
auth_hash
.
extra
[
:raw_info
].
all
[
key
]
auth_hash
.
extra
[
:raw_info
].
all
[
key
]
end
end
end
end
end
end
end
end
lib/gitlab/saml/config.rb
View file @
9e211091
module
Gitlab
module
Gitlab
module
Saml
module
Saml
class
Config
class
Config
class
<<
self
class
<<
self
def
options
def
options
Gitlab
.
config
.
omniauth
.
providers
.
find
{
|
provider
|
provider
.
name
==
'saml'
}
Gitlab
.
config
.
omniauth
.
providers
.
find
{
|
provider
|
provider
.
name
==
'saml'
}
...
@@ -15,7 +14,6 @@ module Gitlab
...
@@ -15,7 +14,6 @@ module Gitlab
options
[
:external_groups
]
options
[
:external_groups
]
end
end
end
end
end
end
end
end
end
end
lib/gitlab/saml/user.rb
View file @
9e211091
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
module
Gitlab
module
Gitlab
module
Saml
module
Saml
class
User
<
Gitlab
::
OAuth
::
User
class
User
<
Gitlab
::
OAuth
::
User
def
save
def
save
super
(
'SAML'
)
super
(
'SAML'
)
end
end
...
...
lib/uploaded_file.rb
View file @
9e211091
...
@@ -3,7 +3,6 @@ require "fileutils"
...
@@ -3,7 +3,6 @@ require "fileutils"
# Taken from: Rack::Test::UploadedFile
# Taken from: Rack::Test::UploadedFile
class
UploadedFile
class
UploadedFile
# The filename, *not* including the path, of the "uploaded" file
# The filename, *not* including the path, of the "uploaded" file
attr_reader
:original_filename
attr_reader
:original_filename
...
...
spec/controllers/application_controller_spec.rb
View file @
9e211091
...
@@ -49,7 +49,6 @@ describe ApplicationController do
...
@@ -49,7 +49,6 @@ describe ApplicationController do
end
end
end
end
context
"when the 'PRIVATE-TOKEN' header is populated with the private token"
do
context
"when the 'PRIVATE-TOKEN' header is populated with the private token"
do
it
"logs the user in"
do
it
"logs the user in"
do
@request
.
headers
[
'PRIVATE-TOKEN'
]
=
user
.
private_token
@request
.
headers
[
'PRIVATE-TOKEN'
]
=
user
.
private_token
...
...
spec/controllers/profiles/accounts_controller_spec.rb
View file @
9e211091
require
'spec_helper'
require
'spec_helper'
describe
Profiles
::
AccountsController
do
describe
Profiles
::
AccountsController
do
let
(
:user
)
{
create
(
:omniauth_user
,
provider:
'saml'
)
}
let
(
:user
)
{
create
(
:omniauth_user
,
provider:
'saml'
)
}
before
do
before
do
...
...
spec/controllers/projects/branches_controller_spec.rb
View file @
9e211091
...
@@ -68,7 +68,6 @@ describe Projects::BranchesController do
...
@@ -68,7 +68,6 @@ describe Projects::BranchesController do
let
(
:branch
)
{
"1-feature-branch"
}
let
(
:branch
)
{
"1-feature-branch"
}
let!
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let!
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
it
'redirects'
do
it
'redirects'
do
post
:create
,
post
:create
,
namespace_id:
project
.
namespace
.
to_param
,
namespace_id:
project
.
namespace
.
to_param
,
...
@@ -89,7 +88,6 @@ describe Projects::BranchesController do
...
@@ -89,7 +88,6 @@ describe Projects::BranchesController do
branch_name:
branch
,
branch_name:
branch
,
issue_iid:
issue
.
iid
issue_iid:
issue
.
iid
end
end
end
end
end
end
...
...
spec/controllers/projects/forks_controller_spec.rb
View file @
9e211091
...
@@ -64,9 +64,7 @@ describe Projects::ForksController do
...
@@ -64,9 +64,7 @@ describe Projects::ForksController do
expect
(
assigns
[
:forks
]).
to
be_present
expect
(
assigns
[
:forks
]).
to
be_present
end
end
end
end
end
end
end
end
end
end
end
end
spec/controllers/projects/labels_controller_spec.rb
View file @
9e211091
...
@@ -18,7 +18,6 @@ describe Projects::LabelsController do
...
@@ -18,7 +18,6 @@ describe Projects::LabelsController do
15
.
times
{
|
i
|
create_label
(
priority:
(
i
%
3
)
+
1
,
title:
"label
#{
15
-
i
}
"
)
}
15
.
times
{
|
i
|
create_label
(
priority:
(
i
%
3
)
+
1
,
title:
"label
#{
15
-
i
}
"
)
}
5
.
times
{
|
i
|
create_label
(
title:
"label
#{
100
-
i
}
"
)
}
5
.
times
{
|
i
|
create_label
(
title:
"label
#{
100
-
i
}
"
)
}
get
:index
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
get
:index
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
end
end
...
...
spec/controllers/projects/merge_requests_controller_spec.rb
View file @
9e211091
...
@@ -117,7 +117,6 @@ describe Projects::MergeRequestsController do
...
@@ -117,7 +117,6 @@ describe Projects::MergeRequestsController do
end
end
context
'when filtering by opened state'
do
context
'when filtering by opened state'
do
context
'with opened merge requests'
do
context
'with opened merge requests'
do
it
'should list those merge requests'
do
it
'should list those merge requests'
do
get_merge_requests
get_merge_requests
...
@@ -138,7 +137,6 @@ describe Projects::MergeRequestsController do
...
@@ -138,7 +137,6 @@ describe Projects::MergeRequestsController do
expect
(
assigns
(
:merge_requests
)).
to
include
(
merge_request
)
expect
(
assigns
(
:merge_requests
)).
to
include
(
merge_request
)
end
end
end
end
end
end
end
end
...
...
spec/controllers/projects/repositories_controller_spec.rb
View file @
9e211091
...
@@ -28,7 +28,6 @@ describe Projects::RepositoriesController do
...
@@ -28,7 +28,6 @@ describe Projects::RepositoriesController do
end
end
context
"when the service raises an error"
do
context
"when the service raises an error"
do
before
do
before
do
allow
(
Gitlab
::
Workhorse
).
to
receive
(
:send_git_archive
).
and_raise
(
"Archive failed"
)
allow
(
Gitlab
::
Workhorse
).
to
receive
(
:send_git_archive
).
and_raise
(
"Archive failed"
)
end
end
...
...
spec/controllers/projects/tree_controller_spec.rb
View file @
9e211091
...
@@ -66,7 +66,6 @@ describe Projects::TreeController do
...
@@ -66,7 +66,6 @@ describe Projects::TreeController do
let
(
:id
)
{
'6d39438/.gitignore'
}
let
(
:id
)
{
'6d39438/.gitignore'
}
it
{
expect
(
response
).
to
have_http_status
(
302
)
}
it
{
expect
(
response
).
to
have_http_status
(
302
)
}
end
end
end
end
describe
'GET show with blob path'
do
describe
'GET show with blob path'
do
...
...
spec/controllers/projects_controller_spec.rb
View file @
9e211091
...
@@ -89,15 +89,12 @@ describe ProjectsController do
...
@@ -89,15 +89,12 @@ describe ProjectsController do
expect
(
response
).
to
redirect_to
(
"/
#{
public_project
.
path_with_namespace
}
"
)
expect
(
response
).
to
redirect_to
(
"/
#{
public_project
.
path_with_namespace
}
"
)
end
end
# MySQL queries are case insensitive by default, so this spec would fail.
# MySQL queries are case insensitive by default, so this spec would fail.
if
Gitlab
::
Database
.
postgresql?
if
Gitlab
::
Database
.
postgresql?
context
"when there is also a match with the same casing"
do
context
"when there is also a match with the same casing"
do
let!
(
:other_project
)
{
create
(
:project
,
:public
,
namespace:
public_project
.
namespace
,
path:
public_project
.
path
.
upcase
)
}
let!
(
:other_project
)
{
create
(
:project
,
:public
,
namespace:
public_project
.
namespace
,
path:
public_project
.
path
.
upcase
)
}
it
"loads the exactly matched project"
do
it
"loads the exactly matched project"
do
get
:show
,
namespace_id:
public_project
.
namespace
.
path
,
id:
public_project
.
path
.
upcase
get
:show
,
namespace_id:
public_project
.
namespace
.
path
,
id:
public_project
.
path
.
upcase
expect
(
assigns
(
:project
)).
to
eq
(
other_project
)
expect
(
assigns
(
:project
)).
to
eq
(
other_project
)
...
...
spec/controllers/users_controller_spec.rb
View file @
9e211091
...
@@ -64,7 +64,6 @@ describe UsersController do
...
@@ -64,7 +64,6 @@ describe UsersController do
end
end
describe
'GET #calendar'
do
describe
'GET #calendar'
do
it
'renders calendar'
do
it
'renders calendar'
do
sign_in
(
user
)
sign_in
(
user
)
...
...
spec/features/admin/admin_hooks_spec.rb
View file @
9e211091
...
@@ -6,7 +6,6 @@ describe "Admin::Hooks", feature: true do
...
@@ -6,7 +6,6 @@ describe "Admin::Hooks", feature: true do
login_as
:admin
login_as
:admin
@system_hook
=
create
(
:system_hook
)
@system_hook
=
create
(
:system_hook
)
end
end
describe
"GET /admin/hooks"
do
describe
"GET /admin/hooks"
do
...
@@ -49,5 +48,4 @@ describe "Admin::Hooks", feature: true do
...
@@ -49,5 +48,4 @@ describe "Admin::Hooks", feature: true do
it
{
expect
(
current_path
).
to
eq
(
admin_hooks_path
)
}
it
{
expect
(
current_path
).
to
eq
(
admin_hooks_path
)
}
end
end
end
end
spec/features/dashboard/user_filters_projects_spec.rb
View file @
9e211091
require
'spec_helper'
require
'spec_helper'
describe
"Dashboard > User filters projects"
,
feature:
true
do
describe
"Dashboard > User filters projects"
,
feature:
true
do
describe
'filtering personal projects'
do
describe
'filtering personal projects'
do
before
do
before
do
user
=
create
(
:user
)
user
=
create
(
:user
)
...
...
spec/features/gitlab_flavored_markdown_spec.rb
View file @
9e211091
...
@@ -81,7 +81,6 @@ describe "GitLab Flavored Markdown", feature: true do
...
@@ -81,7 +81,6 @@ describe "GitLab Flavored Markdown", feature: true do
end
end
end
end
describe
"for merge requests"
do
describe
"for merge requests"
do
before
do
before
do
@merge_request
=
create
(
:merge_request
,
source_project:
project
,
target_project:
project
,
title:
"fix
#{
issue
.
to_reference
}
"
)
@merge_request
=
create
(
:merge_request
,
source_project:
project
,
target_project:
project
,
title:
"fix
#{
issue
.
to_reference
}
"
)
...
@@ -100,7 +99,6 @@ describe "GitLab Flavored Markdown", feature: true do
...
@@ -100,7 +99,6 @@ describe "GitLab Flavored Markdown", feature: true do
end
end
end
end
describe
"for milestones"
do
describe
"for milestones"
do
before
do
before
do
@milestone
=
create
(
:milestone
,
@milestone
=
create
(
:milestone
,
...
...
spec/features/groups/members/owner_manages_access_requests_spec.rb
View file @
9e211091
...
@@ -39,7 +39,6 @@ feature 'Groups > Members > Owner manages access requests', feature: true do
...
@@ -39,7 +39,6 @@ feature 'Groups > Members > Owner manages access requests', feature: true do
expect
(
ActionMailer
::
Base
.
deliveries
.
last
.
subject
).
to
match
"Access to the
#{
group
.
name
}
group was denied"
expect
(
ActionMailer
::
Base
.
deliveries
.
last
.
subject
).
to
match
"Access to the
#{
group
.
name
}
group was denied"
end
end
def
expect_visible_access_request
(
group
,
user
)
def
expect_visible_access_request
(
group
,
user
)
expect
(
group
.
members
.
request
.
exists?
(
user_id:
user
)).
to
be_truthy
expect
(
group
.
members
.
request
.
exists?
(
user_id:
user
)).
to
be_truthy
expect
(
page
).
to
have_content
"
#{
group
.
name
}
access requests 1"
expect
(
page
).
to
have_content
"
#{
group
.
name
}
access requests 1"
...
...
spec/features/issues/filter_issues_spec.rb
View file @
9e211091
...
@@ -14,7 +14,6 @@ describe 'Filter issues', feature: true do
...
@@ -14,7 +14,6 @@ describe 'Filter issues', feature: true do
end
end
describe
'Filter issues for assignee from issues#index'
do
describe
'Filter issues for assignee from issues#index'
do
before
do
before
do
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
...
@@ -36,7 +35,6 @@ describe 'Filter issues', feature: true do
...
@@ -36,7 +35,6 @@ describe 'Filter issues', feature: true do
expect
(
find
(
'.js-assignee-search .dropdown-toggle-text'
)).
to
have_content
(
user
.
name
)
expect
(
find
(
'.js-assignee-search .dropdown-toggle-text'
)).
to
have_content
(
user
.
name
)
end
end
it
'should not change when all link is clicked'
do
it
'should not change when all link is clicked'
do
find
(
'.issues-state-filters a'
,
text:
"All"
).
click
find
(
'.issues-state-filters a'
,
text:
"All"
).
click
...
@@ -46,7 +44,6 @@ describe 'Filter issues', feature: true do
...
@@ -46,7 +44,6 @@ describe 'Filter issues', feature: true do
end
end
describe
'Filter issues for milestone from issues#index'
do
describe
'Filter issues for milestone from issues#index'
do
before
do
before
do
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
...
@@ -68,7 +65,6 @@ describe 'Filter issues', feature: true do
...
@@ -68,7 +65,6 @@ describe 'Filter issues', feature: true do
expect
(
find
(
'.js-milestone-select .dropdown-toggle-text'
)).
to
have_content
(
milestone
.
title
)
expect
(
find
(
'.js-milestone-select .dropdown-toggle-text'
)).
to
have_content
(
milestone
.
title
)
end
end
it
'should not change when all link is clicked'
do
it
'should not change when all link is clicked'
do
find
(
'.issues-state-filters a'
,
text:
"All"
).
click
find
(
'.issues-state-filters a'
,
text:
"All"
).
click
...
@@ -113,7 +109,6 @@ describe 'Filter issues', feature: true do
...
@@ -113,7 +109,6 @@ describe 'Filter issues', feature: true do
end
end
describe
'Filter issues for assignee and label from issues#index'
do
describe
'Filter issues for assignee and label from issues#index'
do
before
do
before
do
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
...
@@ -144,7 +139,6 @@ describe 'Filter issues', feature: true do
...
@@ -144,7 +139,6 @@ describe 'Filter issues', feature: true do
expect
(
find
(
'.js-label-select .dropdown-toggle-text'
)).
to
have_content
(
label
.
title
)
expect
(
find
(
'.js-label-select .dropdown-toggle-text'
)).
to
have_content
(
label
.
title
)
end
end
it
'should not change when all link is clicked'
do
it
'should not change when all link is clicked'
do
find
(
'.issues-state-filters a'
,
text:
"All"
).
click
find
(
'.issues-state-filters a'
,
text:
"All"
).
click
...
...
spec/features/issues_spec.rb
View file @
9e211091
...
@@ -361,7 +361,6 @@ describe 'Issues', feature: true do
...
@@ -361,7 +361,6 @@ describe 'Issues', feature: true do
let
(
:issue
)
{
create
(
:issue
,
project:
project
,
author:
@user
,
assignee:
@user
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
,
author:
@user
,
assignee:
@user
)
}
context
'by authorized user'
do
context
'by authorized user'
do
it
'allows user to select unassigned'
,
js:
true
do
it
'allows user to select unassigned'
,
js:
true
do
visit
namespace_project_issue_path
(
project
.
namespace
,
project
,
issue
)
visit
namespace_project_issue_path
(
project
.
namespace
,
project
,
issue
)
...
@@ -420,7 +419,6 @@ describe 'Issues', feature: true do
...
@@ -420,7 +419,6 @@ describe 'Issues', feature: true do
end
end
context
'by unauthorized user'
do
context
'by unauthorized user'
do
let
(
:guest
)
{
create
(
:user
)
}
let
(
:guest
)
{
create
(
:user
)
}
before
do
before
do
...
@@ -442,8 +440,6 @@ describe 'Issues', feature: true do
...
@@ -442,8 +440,6 @@ describe 'Issues', feature: true do
let!
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
let!
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
context
'by authorized user'
do
context
'by authorized user'
do
it
'allows user to select unassigned'
,
js:
true
do
it
'allows user to select unassigned'
,
js:
true
do
visit
namespace_project_issue_path
(
project
.
namespace
,
project
,
issue
)
visit
namespace_project_issue_path
(
project
.
namespace
,
project
,
issue
)
...
...
spec/features/projects/commit/builds_spec.rb
View file @
9e211091
...
@@ -20,7 +20,6 @@ feature 'project commit builds' do
...
@@ -20,7 +20,6 @@ feature 'project commit builds' do
visit
builds_namespace_project_commit_path
(
project
.
namespace
,
visit
builds_namespace_project_commit_path
(
project
.
namespace
,
project
,
project
.
commit
.
sha
)
project
,
project
.
commit
.
sha
)
expect
(
page
).
to
have_content
(
'Builds'
)
expect
(
page
).
to
have_content
(
'Builds'
)
end
end
end
end
...
...
spec/features/projects/commits/cherry_pick_spec.rb
View file @
9e211091
...
@@ -5,7 +5,6 @@ describe 'Cherry-pick Commits' do
...
@@ -5,7 +5,6 @@ describe 'Cherry-pick Commits' do
let
(
:master_pickable_commit
)
{
project
.
commit
(
'7d3b0f7cff5f37573aea97cebfd5692ea1689924'
)
}
let
(
:master_pickable_commit
)
{
project
.
commit
(
'7d3b0f7cff5f37573aea97cebfd5692ea1689924'
)
}
let
(
:master_pickable_merge
)
{
project
.
commit
(
'e56497bb5f03a90a51293fc6d516788730953899'
)
}
let
(
:master_pickable_merge
)
{
project
.
commit
(
'e56497bb5f03a90a51293fc6d516788730953899'
)
}
before
do
before
do
login_as
:user
login_as
:user
project
.
team
<<
[
@user
,
:master
]
project
.
team
<<
[
@user
,
:master
]
...
...
spec/features/projects/labels/issues_sorted_by_priority_spec.rb
View file @
9e211091
require
'spec_helper'
require
'spec_helper'
feature
'Issue prioritization'
,
feature:
true
do
feature
'Issue prioritization'
,
feature:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
name:
'test'
,
namespace:
user
.
namespace
)
}
let
(
:project
)
{
create
(
:project
,
name:
'test'
,
namespace:
user
.
namespace
)
}
...
@@ -15,7 +14,6 @@ feature 'Issue prioritization', feature: true do
...
@@ -15,7 +14,6 @@ feature 'Issue prioritization', feature: true do
# According to https://gitlab.com/gitlab-org/gitlab-ce/issues/14189#note_4360653
# According to https://gitlab.com/gitlab-org/gitlab-ce/issues/14189#note_4360653
context
'when issues have one label'
do
context
'when issues have one label'
do
scenario
'Are sorted properly'
do
scenario
'Are sorted properly'
do
# Issues
# Issues
issue_1
=
create
(
:issue
,
title:
'issue_1'
,
project:
project
)
issue_1
=
create
(
:issue
,
title:
'issue_1'
,
project:
project
)
issue_2
=
create
(
:issue
,
title:
'issue_2'
,
project:
project
)
issue_2
=
create
(
:issue
,
title:
'issue_2'
,
project:
project
)
...
@@ -46,7 +44,6 @@ feature 'Issue prioritization', feature: true do
...
@@ -46,7 +44,6 @@ feature 'Issue prioritization', feature: true do
context
'when issues have multiple labels'
do
context
'when issues have multiple labels'
do
scenario
'Are sorted properly'
do
scenario
'Are sorted properly'
do
# Issues
# Issues
issue_1
=
create
(
:issue
,
title:
'issue_1'
,
project:
project
)
issue_1
=
create
(
:issue
,
title:
'issue_1'
,
project:
project
)
issue_2
=
create
(
:issue
,
title:
'issue_2'
,
project:
project
)
issue_2
=
create
(
:issue
,
title:
'issue_2'
,
project:
project
)
...
...
spec/features/search_spec.rb
View file @
9e211091
...
@@ -48,9 +48,7 @@ describe "Search", feature: true do
...
@@ -48,9 +48,7 @@ describe "Search", feature: true do
end
end
end
end
describe
'Right header search field'
,
feature:
true
do
describe
'Right header search field'
,
feature:
true
do
describe
'Search in project page'
do
describe
'Search in project page'
do
before
do
before
do
visit
namespace_project_path
(
project
.
namespace
,
project
)
visit
namespace_project_path
(
project
.
namespace
,
project
)
...
@@ -73,7 +71,6 @@ describe "Search", feature: true do
...
@@ -73,7 +71,6 @@ describe "Search", feature: true do
end
end
context
'click the links in the category search dropdown'
,
js:
true
do
context
'click the links in the category search dropdown'
,
js:
true
do
before
do
before
do
page
.
find
(
'#search'
).
click
page
.
find
(
'#search'
).
click
end
end
...
@@ -124,6 +121,4 @@ describe "Search", feature: true do
...
@@ -124,6 +121,4 @@ describe "Search", feature: true do
end
end
end
end
end
end
end
end
spec/features/security/group/internal_access_spec.rb
View file @
9e211091
...
@@ -76,7 +76,6 @@ describe 'Internal Group access', feature: true do
...
@@ -76,7 +76,6 @@ describe 'Internal Group access', feature: true do
it
{
is_expected
.
to
be_denied_for
:visitor
}
it
{
is_expected
.
to
be_denied_for
:visitor
}
end
end
describe
'GET /groups/:path/group_members'
do
describe
'GET /groups/:path/group_members'
do
subject
{
group_group_members_path
(
group
)
}
subject
{
group_group_members_path
(
group
)
}
...
...
spec/features/security/group/private_access_spec.rb
View file @
9e211091
...
@@ -76,7 +76,6 @@ describe 'Private Group access', feature: true do
...
@@ -76,7 +76,6 @@ describe 'Private Group access', feature: true do
it
{
is_expected
.
to
be_denied_for
:visitor
}
it
{
is_expected
.
to
be_denied_for
:visitor
}
end
end
describe
'GET /groups/:path/group_members'
do
describe
'GET /groups/:path/group_members'
do
subject
{
group_group_members_path
(
group
)
}
subject
{
group_group_members_path
(
group
)
}
...
...
spec/features/security/group/public_access_spec.rb
View file @
9e211091
...
@@ -76,7 +76,6 @@ describe 'Public Group access', feature: true do
...
@@ -76,7 +76,6 @@ describe 'Public Group access', feature: true do
it
{
is_expected
.
to
be_allowed_for
:visitor
}
it
{
is_expected
.
to
be_allowed_for
:visitor
}
end
end
describe
'GET /groups/:path/group_members'
do
describe
'GET /groups/:path/group_members'
do
subject
{
group_group_members_path
(
group
)
}
subject
{
group_group_members_path
(
group
)
}
...
...
spec/features/signup_spec.rb
View file @
9e211091
...
@@ -2,7 +2,6 @@ require 'spec_helper'
...
@@ -2,7 +2,6 @@ require 'spec_helper'
feature
'Signup'
,
feature:
true
do
feature
'Signup'
,
feature:
true
do
describe
'signup with no errors'
do
describe
'signup with no errors'
do
context
"when sending confirmation email"
do
context
"when sending confirmation email"
do
before
{
allow_any_instance_of
(
ApplicationSetting
).
to
receive
(
:send_user_confirmation_email
).
and_return
(
true
)
}
before
{
allow_any_instance_of
(
ApplicationSetting
).
to
receive
(
:send_user_confirmation_email
).
and_return
(
true
)
}
...
@@ -40,7 +39,6 @@ feature 'Signup', feature: true do
...
@@ -40,7 +39,6 @@ feature 'Signup', feature: true do
expect
(
page
).
to
have_content
(
"Welcome! You have signed up successfully."
)
expect
(
page
).
to
have_content
(
"Welcome! You have signed up successfully."
)
end
end
end
end
end
end
describe
'signup with errors'
do
describe
'signup with errors'
do
...
...
spec/features/tags/master_deletes_tag_spec.rb
View file @
9e211091
...
@@ -22,7 +22,6 @@ feature 'Master deletes tag', feature: true do
...
@@ -22,7 +22,6 @@ feature 'Master deletes tag', feature: true do
namespace_project_tags_path
(
project
.
namespace
,
project
))
namespace_project_tags_path
(
project
.
namespace
,
project
))
expect
(
page
).
not_to
have_content
'v1.1.0'
expect
(
page
).
not_to
have_content
'v1.1.0'
end
end
end
end
context
'from a specific tag page'
do
context
'from a specific tag page'
do
...
...
spec/features/users_spec.rb
View file @
9e211091
...
@@ -47,5 +47,4 @@ feature 'Users', feature: true do
...
@@ -47,5 +47,4 @@ feature 'Users', feature: true do
def
number_of_errors_on_page
(
page
)
def
number_of_errors_on_page
(
page
)
page
.
find
(
'#error_explanation'
).
find
(
'ul'
).
all
(
'li'
).
count
page
.
find
(
'#error_explanation'
).
find
(
'ul'
).
all
(
'li'
).
count
end
end
end
end
spec/finders/group_projects_finder_spec.rb
View file @
9e211091
...
@@ -12,14 +12,12 @@ describe GroupProjectsFinder do
...
@@ -12,14 +12,12 @@ describe GroupProjectsFinder do
let!
(
:shared_project_2
)
{
create
(
:project
,
:private
,
path:
'4'
)
}
let!
(
:shared_project_2
)
{
create
(
:project
,
:private
,
path:
'4'
)
}
let!
(
:shared_project_3
)
{
create
(
:project
,
:internal
,
path:
'5'
)
}
let!
(
:shared_project_3
)
{
create
(
:project
,
:internal
,
path:
'5'
)
}
before
do
before
do
shared_project_1
.
project_group_links
.
create
(
group_access:
Gitlab
::
Access
::
MASTER
,
group:
group
)
shared_project_1
.
project_group_links
.
create
(
group_access:
Gitlab
::
Access
::
MASTER
,
group:
group
)
shared_project_2
.
project_group_links
.
create
(
group_access:
Gitlab
::
Access
::
MASTER
,
group:
group
)
shared_project_2
.
project_group_links
.
create
(
group_access:
Gitlab
::
Access
::
MASTER
,
group:
group
)
shared_project_3
.
project_group_links
.
create
(
group_access:
Gitlab
::
Access
::
MASTER
,
group:
group
)
shared_project_3
.
project_group_links
.
create
(
group_access:
Gitlab
::
Access
::
MASTER
,
group:
group
)
end
end
describe
'with a group member current user'
do
describe
'with a group member current user'
do
before
{
group
.
add_user
(
current_user
,
Gitlab
::
Access
::
MASTER
)
}
before
{
group
.
add_user
(
current_user
,
Gitlab
::
Access
::
MASTER
)
}
...
...
spec/finders/snippets_finder_spec.rb
View file @
9e211091
...
@@ -69,7 +69,6 @@ describe SnippetsFinder do
...
@@ -69,7 +69,6 @@ describe SnippetsFinder do
expect
(
snippets
).
to
include
(
@snippet3
)
expect
(
snippets
).
to
include
(
@snippet3
)
expect
(
snippets
).
not_to
include
(
@snippet2
,
@snippet1
)
expect
(
snippets
).
not_to
include
(
@snippet2
,
@snippet1
)
end
end
end
end
context
'by_project filter'
do
context
'by_project filter'
do
...
...
spec/helpers/visibility_level_helper_spec.rb
View file @
9e211091
require
'spec_helper'
require
'spec_helper'
describe
VisibilityLevelHelper
do
describe
VisibilityLevelHelper
do
let
(
:project
)
{
build
(
:project
)
}
let
(
:project
)
{
build
(
:project
)
}
let
(
:group
)
{
build
(
:group
)
}
let
(
:group
)
{
build
(
:group
)
}
let
(
:personal_snippet
)
{
build
(
:personal_snippet
)
}
let
(
:personal_snippet
)
{
build
(
:personal_snippet
)
}
...
@@ -90,6 +89,5 @@ describe VisibilityLevelHelper do
...
@@ -90,6 +89,5 @@ describe VisibilityLevelHelper do
expect
(
skip_level?
(
snippet
,
Gitlab
::
VisibilityLevel
::
PRIVATE
)).
to
be_falsey
expect
(
skip_level?
(
snippet
,
Gitlab
::
VisibilityLevel
::
PRIVATE
)).
to
be_falsey
end
end
end
end
end
end
end
end
spec/initializers/settings_spec.rb
View file @
9e211091
...
@@ -2,7 +2,6 @@ require 'spec_helper'
...
@@ -2,7 +2,6 @@ require 'spec_helper'
require_relative
'../../config/initializers/1_settings'
require_relative
'../../config/initializers/1_settings'
describe
Settings
,
lib:
true
do
describe
Settings
,
lib:
true
do
describe
'#host_without_www'
do
describe
'#host_without_www'
do
context
'URL with protocol'
do
context
'URL with protocol'
do
it
'returns the host'
do
it
'returns the host'
do
...
@@ -41,5 +40,4 @@ describe Settings, lib: true do
...
@@ -41,5 +40,4 @@ describe Settings, lib: true do
end
end
end
end
end
end
end
end
spec/lib/banzai/pipeline/wiki_pipeline_spec.rb
View file @
9e211091
...
@@ -59,7 +59,6 @@ describe Banzai::Pipeline::WikiPipeline do
...
@@ -59,7 +59,6 @@ describe Banzai::Pipeline::WikiPipeline do
{
"when GitLab is hosted at a root URL"
=>
'/'
,
{
"when GitLab is hosted at a root URL"
=>
'/'
,
"when GitLab is hosted at a relative URL"
=>
'/nested/relative/gitlab'
}.
each
do
|
test_name
,
relative_url_root
|
"when GitLab is hosted at a relative URL"
=>
'/nested/relative/gitlab'
}.
each
do
|
test_name
,
relative_url_root
|
context
test_name
do
context
test_name
do
before
do
before
do
allow
(
Gitlab
.
config
.
gitlab
).
to
receive
(
:relative_url_root
).
and_return
(
relative_url_root
)
allow
(
Gitlab
.
config
.
gitlab
).
to
receive
(
:relative_url_root
).
and_return
(
relative_url_root
)
...
...
spec/lib/ci/charts_spec.rb
View file @
9e211091
require
'spec_helper'
require
'spec_helper'
describe
Ci
::
Charts
,
lib:
true
do
describe
Ci
::
Charts
,
lib:
true
do
context
"build_times"
do
context
"build_times"
do
before
do
before
do
@pipeline
=
FactoryGirl
.
create
(
:ci_pipeline
)
@pipeline
=
FactoryGirl
.
create
(
:ci_pipeline
)
...
...
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
View file @
9e211091
...
@@ -143,7 +143,6 @@ module Ci
...
@@ -143,7 +143,6 @@ module Ci
end
end
it
"returns build only for specified type"
do
it
"returns build only for specified type"
do
config
=
YAML
.
dump
({
config
=
YAML
.
dump
({
before_script:
[
"pwd"
],
before_script:
[
"pwd"
],
rspec:
{
script:
"rspec"
,
type:
"test"
,
only:
[
"master"
,
"deploy"
]
},
rspec:
{
script:
"rspec"
,
type:
"test"
,
only:
[
"master"
,
"deploy"
]
},
...
...
spec/lib/gitlab/asciidoc_spec.rb
View file @
9e211091
...
@@ -3,13 +3,11 @@ require 'nokogiri'
...
@@ -3,13 +3,11 @@ require 'nokogiri'
module
Gitlab
module
Gitlab
describe
Asciidoc
,
lib:
true
do
describe
Asciidoc
,
lib:
true
do
let
(
:input
)
{
'<b>ascii</b>'
}
let
(
:input
)
{
'<b>ascii</b>'
}
let
(
:context
)
{
{}
}
let
(
:context
)
{
{}
}
let
(
:html
)
{
'H<sub>2</sub>O'
}
let
(
:html
)
{
'H<sub>2</sub>O'
}
context
"without project"
do
context
"without project"
do
it
"should convert the input using Asciidoctor and default options"
do
it
"should convert the input using Asciidoctor and default options"
do
expected_asciidoc_opts
=
{
expected_asciidoc_opts
=
{
safe: :secure
,
safe: :secure
,
...
@@ -24,7 +22,6 @@ module Gitlab
...
@@ -24,7 +22,6 @@ module Gitlab
end
end
context
"with asciidoc_opts"
do
context
"with asciidoc_opts"
do
let
(
:asciidoc_opts
)
{
{
safe: :safe
,
attributes:
[
'foo'
]
}
}
let
(
:asciidoc_opts
)
{
{
safe: :safe
,
attributes:
[
'foo'
]
}
}
it
"should merge the options with default ones"
do
it
"should merge the options with default ones"
do
...
...
spec/lib/gitlab/ci/build/artifacts/metadata/entry_spec.rb
View file @
9e211091
...
@@ -128,7 +128,6 @@ describe Gitlab::Ci::Build::Artifacts::Metadata::Entry do
...
@@ -128,7 +128,6 @@ describe Gitlab::Ci::Build::Artifacts::Metadata::Entry do
subject
{
|
example
|
path
(
example
).
children
}
subject
{
|
example
|
path
(
example
).
children
}
it
{
expect
(
subject
.
count
).
to
eq
3
}
it
{
expect
(
subject
.
count
).
to
eq
3
}
end
end
end
end
describe
'path/dir_1/subdir/subfile'
,
path:
'path/dir_1/subdir/subfile'
do
describe
'path/dir_1/subdir/subfile'
,
path:
'path/dir_1/subdir/subfile'
do
...
...
spec/lib/gitlab/diff/inline_diff_marker_spec.rb
View file @
9e211091
...
@@ -2,7 +2,6 @@ require 'spec_helper'
...
@@ -2,7 +2,6 @@ require 'spec_helper'
describe
Gitlab
::
Diff
::
InlineDiffMarker
,
lib:
true
do
describe
Gitlab
::
Diff
::
InlineDiffMarker
,
lib:
true
do
describe
'#inline_diffs'
do
describe
'#inline_diffs'
do
context
"when the rich text is html safe"
do
context
"when the rich text is html safe"
do
let
(
:raw
)
{
"abc 'def'"
}
let
(
:raw
)
{
"abc 'def'"
}
let
(
:rich
)
{
%{<span class="abc">abc</span><span class="space"> </span><span class="def">'def'</span>}
.
html_safe
}
let
(
:rich
)
{
%{<span class="abc">abc</span><span class="space"> </span><span class="def">'def'</span>}
.
html_safe
}
...
...
spec/lib/gitlab/fogbugz_import/client_spec.rb
View file @
9e211091
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
FogbugzImport
::
Client
,
lib:
true
do
describe
Gitlab
::
FogbugzImport
::
Client
,
lib:
true
do
let
(
:client
)
{
described_class
.
new
(
uri:
''
,
token:
''
)
}
let
(
:client
)
{
described_class
.
new
(
uri:
''
,
token:
''
)
}
let
(
:one_user
)
{
{
'people'
=>
{
'person'
=>
{
"ixPerson"
=>
"2"
,
"sFullName"
=>
"James"
}
}
}
}
let
(
:one_user
)
{
{
'people'
=>
{
'person'
=>
{
"ixPerson"
=>
"2"
,
"sFullName"
=>
"James"
}
}
}
}
let
(
:two_users
)
{
{
'people'
=>
{
'person'
=>
[
one_user
,
{
"ixPerson"
=>
"3"
}]
}
}
}
let
(
:two_users
)
{
{
'people'
=>
{
'person'
=>
[
one_user
,
{
"ixPerson"
=>
"3"
}]
}
}
}
...
...
spec/lib/gitlab/git_access_spec.rb
View file @
9e211091
...
@@ -65,7 +65,6 @@ describe Gitlab::GitAccess, lib: true do
...
@@ -65,7 +65,6 @@ describe Gitlab::GitAccess, lib: true do
expect
(
access
.
can_push_to_branch?
(
@branch
.
name
)).
to
be_falsey
expect
(
access
.
can_push_to_branch?
(
@branch
.
name
)).
to
be_falsey
end
end
end
end
end
end
describe
'download_access_check'
do
describe
'download_access_check'
do
...
...
spec/lib/gitlab/github_import/label_formatter_spec.rb
View file @
9e211091
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
GithubImport
::
LabelFormatter
,
lib:
true
do
describe
Gitlab
::
GithubImport
::
LabelFormatter
,
lib:
true
do
describe
'#attributes'
do
describe
'#attributes'
do
it
'returns formatted attributes'
do
it
'returns formatted attributes'
do
project
=
create
(
:project
)
project
=
create
(
:project
)
...
...
spec/lib/gitlab/google_code_import/importer_spec.rb
View file @
9e211091
...
@@ -19,7 +19,6 @@ describe Gitlab::GoogleCodeImport::Importer, lib: true do
...
@@ -19,7 +19,6 @@ describe Gitlab::GoogleCodeImport::Importer, lib: true do
end
end
describe
"#execute"
do
describe
"#execute"
do
it
"imports status labels"
do
it
"imports status labels"
do
subject
.
execute
subject
.
execute
...
...
spec/lib/gitlab/import_export/members_mapper_spec.rb
View file @
9e211091
...
@@ -2,7 +2,6 @@ require 'spec_helper'
...
@@ -2,7 +2,6 @@ require 'spec_helper'
describe
Gitlab
::
ImportExport
::
MembersMapper
,
services:
true
do
describe
Gitlab
::
ImportExport
::
MembersMapper
,
services:
true
do
describe
'map members'
do
describe
'map members'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
name:
'searchable_project'
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
name:
'searchable_project'
)
}
let
(
:user2
)
{
create
(
:user
)
}
let
(
:user2
)
{
create
(
:user
)
}
...
...
spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
View file @
9e211091
...
@@ -2,7 +2,6 @@ require 'spec_helper'
...
@@ -2,7 +2,6 @@ require 'spec_helper'
describe
Gitlab
::
ImportExport
::
ProjectTreeRestorer
,
services:
true
do
describe
Gitlab
::
ImportExport
::
ProjectTreeRestorer
,
services:
true
do
describe
'restore project tree'
do
describe
'restore project tree'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:namespace
)
{
create
(
:namespace
,
owner:
user
)
}
let
(
:namespace
)
{
create
(
:namespace
,
owner:
user
)
}
let
(
:shared
)
{
Gitlab
::
ImportExport
::
Shared
.
new
(
relative_path:
""
,
project_path:
'path'
)
}
let
(
:shared
)
{
Gitlab
::
ImportExport
::
Shared
.
new
(
relative_path:
""
,
project_path:
'path'
)
}
...
...
spec/lib/gitlab/import_export/project_tree_saver_spec.rb
View file @
9e211091
...
@@ -2,7 +2,6 @@ require 'spec_helper'
...
@@ -2,7 +2,6 @@ require 'spec_helper'
describe
Gitlab
::
ImportExport
::
ProjectTreeSaver
,
services:
true
do
describe
Gitlab
::
ImportExport
::
ProjectTreeSaver
,
services:
true
do
describe
'saves the project tree into a json object'
do
describe
'saves the project tree into a json object'
do
let
(
:shared
)
{
Gitlab
::
ImportExport
::
Shared
.
new
(
relative_path:
project
.
path_with_namespace
)
}
let
(
:shared
)
{
Gitlab
::
ImportExport
::
Shared
.
new
(
relative_path:
project
.
path_with_namespace
)
}
let
(
:project_tree_saver
)
{
described_class
.
new
(
project:
project
,
shared:
shared
)
}
let
(
:project_tree_saver
)
{
described_class
.
new
(
project:
project
,
shared:
shared
)
}
let
(
:export_path
)
{
"
#{
Dir
::
tmpdir
}
/project_tree_saver_spec"
}
let
(
:export_path
)
{
"
#{
Dir
::
tmpdir
}
/project_tree_saver_spec"
}
...
@@ -23,7 +22,6 @@ describe Gitlab::ImportExport::ProjectTreeSaver, services: true do
...
@@ -23,7 +22,6 @@ describe Gitlab::ImportExport::ProjectTreeSaver, services: true do
end
end
context
'JSON'
do
context
'JSON'
do
let
(
:saved_project_json
)
do
let
(
:saved_project_json
)
do
project_tree_saver
.
save
project_tree_saver
.
save
project_json
(
project_tree_saver
.
full_path
)
project_json
(
project_tree_saver
.
full_path
)
...
...
spec/lib/gitlab/import_export/reader_spec.rb
View file @
9e211091
...
@@ -25,7 +25,6 @@ describe Gitlab::ImportExport::Reader, lib: true do
...
@@ -25,7 +25,6 @@ describe Gitlab::ImportExport::Reader, lib: true do
end
end
context
'individual scenarios'
do
context
'individual scenarios'
do
it
'generates the correct hash for a single project relation'
do
it
'generates the correct hash for a single project relation'
do
setup_yaml
(
project_tree:
[
:issues
])
setup_yaml
(
project_tree:
[
:issues
])
...
...
spec/lib/gitlab/import_export/repo_bundler_spec.rb
View file @
9e211091
...
@@ -2,7 +2,6 @@ require 'spec_helper'
...
@@ -2,7 +2,6 @@ require 'spec_helper'
describe
Gitlab
::
ImportExport
::
RepoSaver
,
services:
true
do
describe
Gitlab
::
ImportExport
::
RepoSaver
,
services:
true
do
describe
'bundle a project Git repo'
do
describe
'bundle a project Git repo'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let!
(
:project
)
{
create
(
:project
,
:public
,
name:
'searchable_project'
)
}
let!
(
:project
)
{
create
(
:project
,
:public
,
name:
'searchable_project'
)
}
let
(
:export_path
)
{
"
#{
Dir
::
tmpdir
}
/project_tree_saver_spec"
}
let
(
:export_path
)
{
"
#{
Dir
::
tmpdir
}
/project_tree_saver_spec"
}
...
...
spec/lib/gitlab/import_export/wiki_repo_bundler_spec.rb
View file @
9e211091
...
@@ -2,7 +2,6 @@ require 'spec_helper'
...
@@ -2,7 +2,6 @@ require 'spec_helper'
describe
Gitlab
::
ImportExport
::
WikiRepoSaver
,
services:
true
do
describe
Gitlab
::
ImportExport
::
WikiRepoSaver
,
services:
true
do
describe
'bundle a wiki Git repo'
do
describe
'bundle a wiki Git repo'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let!
(
:project
)
{
create
(
:project
,
:public
,
name:
'searchable_project'
)
}
let!
(
:project
)
{
create
(
:project
,
:public
,
name:
'searchable_project'
)
}
let
(
:export_path
)
{
"
#{
Dir
::
tmpdir
}
/project_tree_saver_spec"
}
let
(
:export_path
)
{
"
#{
Dir
::
tmpdir
}
/project_tree_saver_spec"
}
...
...
spec/lib/gitlab/ldap/auth_hash_spec.rb
View file @
9e211091
...
@@ -32,7 +32,6 @@ describe Gitlab::LDAP::AuthHash, lib: true do
...
@@ -32,7 +32,6 @@ describe Gitlab::LDAP::AuthHash, lib: true do
end
end
context
"without overridden attributes"
do
context
"without overridden attributes"
do
it
"has the correct username"
do
it
"has the correct username"
do
expect
(
auth_hash
.
username
).
to
eq
(
"123456"
)
expect
(
auth_hash
.
username
).
to
eq
(
"123456"
)
end
end
...
...
spec/lib/gitlab/o_auth/user_spec.rb
View file @
9e211091
...
@@ -128,7 +128,6 @@ describe Gitlab::OAuth::User, lib: true do
...
@@ -128,7 +128,6 @@ describe Gitlab::OAuth::User, lib: true do
end
end
context
"and no account for the LDAP user"
do
context
"and no account for the LDAP user"
do
it
"creates a user with dual LDAP and omniauth identities"
do
it
"creates a user with dual LDAP and omniauth identities"
do
oauth_user
.
save
oauth_user
.
save
...
@@ -169,7 +168,6 @@ describe Gitlab::OAuth::User, lib: true do
...
@@ -169,7 +168,6 @@ describe Gitlab::OAuth::User, lib: true do
end
end
end
end
end
end
end
end
describe
'blocking'
do
describe
'blocking'
do
...
@@ -255,7 +253,6 @@ describe Gitlab::OAuth::User, lib: true do
...
@@ -255,7 +253,6 @@ describe Gitlab::OAuth::User, lib: true do
end
end
end
end
context
'sign-in'
do
context
'sign-in'
do
before
do
before
do
oauth_user
.
save
oauth_user
.
save
...
...
spec/lib/gitlab/push_data_builder_spec.rb
View file @
9e211091
...
@@ -4,7 +4,6 @@ describe Gitlab::PushDataBuilder, lib: true do
...
@@ -4,7 +4,6 @@ describe Gitlab::PushDataBuilder, lib: true do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
describe
'.build_sample'
do
describe
'.build_sample'
do
let
(
:data
)
{
described_class
.
build_sample
(
project
,
user
)
}
let
(
:data
)
{
described_class
.
build_sample
(
project
,
user
)
}
...
...
spec/lib/gitlab/saml/user_spec.rb
View file @
9e211091
...
@@ -214,7 +214,6 @@ describe Gitlab::Saml::User, lib: true do
...
@@ -214,7 +214,6 @@ describe Gitlab::Saml::User, lib: true do
end
end
end
end
end
end
end
end
describe
'blocking'
do
describe
'blocking'
do
...
...
spec/lib/gitlab/url_sanitizer_spec.rb
View file @
9e211091
...
@@ -64,5 +64,4 @@ describe Gitlab::UrlSanitizer, lib: true do
...
@@ -64,5 +64,4 @@ describe Gitlab::UrlSanitizer, lib: true do
expect
(
sanitizer
.
full_url
).
to
eq
(
'user@server:project.git'
)
expect
(
sanitizer
.
full_url
).
to
eq
(
'user@server:project.git'
)
end
end
end
end
end
end
spec/mailers/notify_spec.rb
View file @
9e211091
...
@@ -984,7 +984,6 @@ describe Notify do
...
@@ -984,7 +984,6 @@ describe Notify do
end
end
context
"when set to send from committer email if domain matches"
do
context
"when set to send from committer email if domain matches"
do
let
(
:send_from_committer_email
)
{
true
}
let
(
:send_from_committer_email
)
{
true
}
before
do
before
do
...
@@ -992,7 +991,6 @@ describe Notify do
...
@@ -992,7 +991,6 @@ describe Notify do
end
end
context
"when the committer email domain is within the GitLab domain"
do
context
"when the committer email domain is within the GitLab domain"
do
before
do
before
do
user
.
update_attribute
(
:email
,
"user@company.com"
)
user
.
update_attribute
(
:email
,
"user@company.com"
)
user
.
confirm
user
.
confirm
...
@@ -1010,7 +1008,6 @@ describe Notify do
...
@@ -1010,7 +1008,6 @@ describe Notify do
end
end
context
"when the committer email domain is not completely within the GitLab domain"
do
context
"when the committer email domain is not completely within the GitLab domain"
do
before
do
before
do
user
.
update_attribute
(
:email
,
"user@something.company.com"
)
user
.
update_attribute
(
:email
,
"user@something.company.com"
)
user
.
confirm
user
.
confirm
...
@@ -1028,7 +1025,6 @@ describe Notify do
...
@@ -1028,7 +1025,6 @@ describe Notify do
end
end
context
"when the committer email domain is outside the GitLab domain"
do
context
"when the committer email domain is outside the GitLab domain"
do
before
do
before
do
user
.
update_attribute
(
:email
,
"user@mpany.com"
)
user
.
update_attribute
(
:email
,
"user@mpany.com"
)
user
.
confirm
user
.
confirm
...
@@ -1084,5 +1080,4 @@ describe Notify do
...
@@ -1084,5 +1080,4 @@ describe Notify do
is_expected
.
to
have_body_text
/
#{
diff_path
}
/
is_expected
.
to
have_body_text
/
#{
diff_path
}
/
end
end
end
end
end
end
spec/models/build_spec.rb
View file @
9e211091
...
@@ -323,7 +323,6 @@ describe Ci::Build, models: true do
...
@@ -323,7 +323,6 @@ describe Ci::Build, models: true do
expect_any_instance_of
(
Ci
::
Runner
).
to
receive
(
:can_pick?
).
and_return
(
false
)
expect_any_instance_of
(
Ci
::
Runner
).
to
receive
(
:can_pick?
).
and_return
(
false
)
is_expected
.
to
be_falsey
is_expected
.
to
be_falsey
end
end
end
end
end
end
...
...
spec/models/concerns/issuable_spec.rb
View file @
9e211091
...
@@ -170,7 +170,6 @@ describe Issue, "Issuable" do
...
@@ -170,7 +170,6 @@ describe Issue, "Issuable" do
end
end
end
end
describe
'#subscribed?'
do
describe
'#subscribed?'
do
context
'user is not a participant in the issue'
do
context
'user is not a participant in the issue'
do
before
{
allow
(
issue
).
to
receive
(
:participants
).
with
(
user
).
and_return
([])
}
before
{
allow
(
issue
).
to
receive
(
:participants
).
with
(
user
).
and_return
([])
}
...
...
spec/models/concerns/strip_attribute_spec.rb
View file @
9e211091
...
@@ -16,5 +16,4 @@ describe Milestone, "StripAttribute" do
...
@@ -16,5 +16,4 @@ describe Milestone, "StripAttribute" do
it
{
expect
(
milestone
.
title
).
to
eq
(
'8.3'
)
}
it
{
expect
(
milestone
.
title
).
to
eq
(
'8.3'
)
}
end
end
end
end
spec/models/email_spec.rb
View file @
9e211091
require
'spec_helper'
require
'spec_helper'
describe
Email
,
models:
true
do
describe
Email
,
models:
true
do
describe
'validations'
do
describe
'validations'
do
it_behaves_like
'an object with email-formated attributes'
,
:email
do
it_behaves_like
'an object with email-formated attributes'
,
:email
do
subject
{
build
(
:email
)
}
subject
{
build
(
:email
)
}
end
end
end
end
end
end
spec/models/forked_project_link_spec.rb
View file @
9e211091
...
@@ -23,14 +23,12 @@ describe :forked_from_project do
...
@@ -23,14 +23,12 @@ describe :forked_from_project do
let
(
:project_from
)
{
create
(
:project
)
}
let
(
:project_from
)
{
create
(
:project
)
}
let
(
:project_to
)
{
create
(
:project
,
forked_project_link:
forked_project_link
)
}
let
(
:project_to
)
{
create
(
:project
,
forked_project_link:
forked_project_link
)
}
before
:each
do
before
:each
do
forked_project_link
.
forked_from_project
=
project_from
forked_project_link
.
forked_from_project
=
project_from
forked_project_link
.
forked_to_project
=
project_to
forked_project_link
.
forked_to_project
=
project_to
forked_project_link
.
save!
forked_project_link
.
save!
end
end
it
"project_to should know it is forked"
do
it
"project_to should know it is forked"
do
expect
(
project_to
.
forked?
).
to
be_truthy
expect
(
project_to
.
forked?
).
to
be_truthy
end
end
...
@@ -43,7 +41,6 @@ describe :forked_from_project do
...
@@ -43,7 +41,6 @@ describe :forked_from_project do
expect
(
forked_project_link
).
to
receive
(
:destroy
)
expect
(
forked_project_link
).
to
receive
(
:destroy
)
project_to
.
destroy
project_to
.
destroy
end
end
end
end
def
fork_project
(
from_project
,
user
)
def
fork_project
(
from_project
,
user
)
...
...
spec/models/identity_spec.rb
View file @
9e211091
require
'spec_helper'
require
'spec_helper'
RSpec
.
describe
Identity
,
models:
true
do
RSpec
.
describe
Identity
,
models:
true
do
describe
'relations'
do
describe
'relations'
do
it
{
is_expected
.
to
belong_to
(
:user
)
}
it
{
is_expected
.
to
belong_to
(
:user
)
}
end
end
...
...
spec/models/members/project_member_spec.rb
View file @
9e211091
...
@@ -119,7 +119,6 @@ describe ProjectMember, models: true do
...
@@ -119,7 +119,6 @@ describe ProjectMember, models: true do
it
{
expect
(
@project_1
.
users
).
to
include
(
@user_1
)
}
it
{
expect
(
@project_1
.
users
).
to
include
(
@user_1
)
}
it
{
expect
(
@project_1
.
users
).
to
include
(
@user_2
)
}
it
{
expect
(
@project_1
.
users
).
to
include
(
@user_2
)
}
it
{
expect
(
@project_2
.
users
).
to
include
(
@user_1
)
}
it
{
expect
(
@project_2
.
users
).
to
include
(
@user_1
)
}
it
{
expect
(
@project_2
.
users
).
to
include
(
@user_2
)
}
it
{
expect
(
@project_2
.
users
).
to
include
(
@user_2
)
}
end
end
...
...
spec/models/namespace_spec.rb
View file @
9e211091
...
@@ -109,7 +109,6 @@ describe Namespace, models: true do
...
@@ -109,7 +109,6 @@ describe Namespace, models: true do
end
end
describe
".clean_path"
do
describe
".clean_path"
do
let!
(
:user
)
{
create
(
:user
,
username:
"johngitlab-etc"
)
}
let!
(
:user
)
{
create
(
:user
,
username:
"johngitlab-etc"
)
}
let!
(
:namespace
)
{
create
(
:namespace
,
path:
"JohnGitLab-etc1"
)
}
let!
(
:namespace
)
{
create
(
:namespace
,
path:
"JohnGitLab-etc1"
)
}
...
...
spec/models/project_services/jira_service_spec.rb
View file @
9e211091
...
@@ -154,11 +154,9 @@ describe JiraService, models: true do
...
@@ -154,11 +154,9 @@ describe JiraService, models: true do
expect
(
@jira_service
.
password
).
to
eq
(
"password"
)
expect
(
@jira_service
.
password
).
to
eq
(
"password"
)
expect
(
@jira_service
.
api_url
).
to
eq
(
"http://jira_edited.example.com/rest/api/2"
)
expect
(
@jira_service
.
api_url
).
to
eq
(
"http://jira_edited.example.com/rest/api/2"
)
end
end
end
end
end
end
describe
"Validations"
do
describe
"Validations"
do
context
"active"
do
context
"active"
do
before
do
before
do
...
...
spec/models/project_services/slack_service/wiki_page_message_spec.rb
View file @
9e211091
...
@@ -47,7 +47,6 @@ describe SlackService::WikiPageMessage, models: true do
...
@@ -47,7 +47,6 @@ describe SlackService::WikiPageMessage, models: true do
context
'when :action == "create"'
do
context
'when :action == "create"'
do
before
{
args
[
:object_attributes
][
:action
]
=
'create'
}
before
{
args
[
:object_attributes
][
:action
]
=
'create'
}
it
'it returns the attachment for a new wiki page'
do
it
'it returns the attachment for a new wiki page'
do
expect
(
subject
.
attachments
).
to
eq
([
expect
(
subject
.
attachments
).
to
eq
([
{
{
...
...
spec/models/repository_spec.rb
View file @
9e211091
...
@@ -855,7 +855,6 @@ describe Repository, models: true do
...
@@ -855,7 +855,6 @@ describe Repository, models: true do
repository
.
after_create
repository
.
after_create
end
end
end
end
describe
"#copy_gitattributes"
do
describe
"#copy_gitattributes"
do
...
...
spec/models/service_spec.rb
View file @
9e211091
require
'spec_helper'
require
'spec_helper'
describe
Service
,
models:
true
do
describe
Service
,
models:
true
do
describe
"Associations"
do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
:project
}
it
{
is_expected
.
to
belong_to
:project
}
it
{
is_expected
.
to
have_one
:service_hook
}
it
{
is_expected
.
to
have_one
:service_hook
}
...
@@ -176,7 +175,6 @@ describe Service, models: true do
...
@@ -176,7 +175,6 @@ describe Service, models: true do
)
)
end
end
it
"returns nil when the property has not been assigned a new value"
do
it
"returns nil when the property has not been assigned a new value"
do
service
.
username
=
"key_changed"
service
.
username
=
"key_changed"
expect
(
service
.
bamboo_url_was
).
to
be_nil
expect
(
service
.
bamboo_url_was
).
to
be_nil
...
...
spec/requests/api/api_helpers_spec.rb
View file @
9e211091
require
'spec_helper'
require
'spec_helper'
describe
API
::
Helpers
,
api:
true
do
describe
API
::
Helpers
,
api:
true
do
include
API
::
Helpers
include
API
::
Helpers
include
ApiHelpers
include
ApiHelpers
...
...
spec/requests/api/award_emoji_spec.rb
View file @
9e211091
...
@@ -62,7 +62,6 @@ describe API::API, api: true do
...
@@ -62,7 +62,6 @@ describe API::API, api: true do
end
end
end
end
describe
"GET /projects/:id/awardable/:awardable_id/award_emoji/:award_id"
do
describe
"GET /projects/:id/awardable/:awardable_id/award_emoji/:award_id"
do
context
'on an issue'
do
context
'on an issue'
do
it
"returns the award emoji"
do
it
"returns the award emoji"
do
...
...
spec/requests/api/commit_statuses_spec.rb
View file @
9e211091
...
@@ -11,7 +11,6 @@ describe API::CommitStatuses, api: true do
...
@@ -11,7 +11,6 @@ describe API::CommitStatuses, api: true do
let
(
:developer
)
{
create_user
(
:developer
)
}
let
(
:developer
)
{
create_user
(
:developer
)
}
let
(
:sha
)
{
commit
.
id
}
let
(
:sha
)
{
commit
.
id
}
describe
"GET /projects/:id/repository/commits/:sha/statuses"
do
describe
"GET /projects/:id/repository/commits/:sha/statuses"
do
let
(
:get_url
)
{
"/projects/
#{
project
.
id
}
/repository/commits/
#{
sha
}
/statuses"
}
let
(
:get_url
)
{
"/projects/
#{
project
.
id
}
/repository/commits/
#{
sha
}
/statuses"
}
...
...
spec/requests/api/doorkeeper_access_spec.rb
View file @
9e211091
...
@@ -7,7 +7,6 @@ describe API::API, api: true do
...
@@ -7,7 +7,6 @@ describe API::API, api: true do
let!
(
:application
)
{
Doorkeeper
::
Application
.
create!
(
name:
"MyApp"
,
redirect_uri:
"https://app.com"
,
owner:
user
)
}
let!
(
:application
)
{
Doorkeeper
::
Application
.
create!
(
name:
"MyApp"
,
redirect_uri:
"https://app.com"
,
owner:
user
)
}
let!
(
:token
)
{
Doorkeeper
::
AccessToken
.
create!
application_id:
application
.
id
,
resource_owner_id:
user
.
id
}
let!
(
:token
)
{
Doorkeeper
::
AccessToken
.
create!
application_id:
application
.
id
,
resource_owner_id:
user
.
id
}
describe
"when unauthenticated"
do
describe
"when unauthenticated"
do
it
"returns authentication success"
do
it
"returns authentication success"
do
get
api
(
"/user"
),
access_token:
token
.
token
get
api
(
"/user"
),
access_token:
token
.
token
...
...
spec/requests/api/labels_spec.rb
View file @
9e211091
...
@@ -11,7 +11,6 @@ describe API::API, api: true do
...
@@ -11,7 +11,6 @@ describe API::API, api: true do
project
.
team
<<
[
user
,
:master
]
project
.
team
<<
[
user
,
:master
]
end
end
describe
'GET /projects/:id/labels'
do
describe
'GET /projects/:id/labels'
do
it
'should return project labels'
do
it
'should return project labels'
do
get
api
(
"/projects/
#{
project
.
id
}
/labels"
,
user
)
get
api
(
"/projects/
#{
project
.
id
}
/labels"
,
user
)
...
...
spec/requests/api/notes_spec.rb
View file @
9e211091
...
@@ -159,7 +159,6 @@ describe API::API, api: true do
...
@@ -159,7 +159,6 @@ describe API::API, api: true do
end
end
end
end
context
"and current user can view the note"
do
context
"and current user can view the note"
do
it
"should return an issue note by id"
do
it
"should return an issue note by id"
do
get
api
(
"/projects/
#{
ext_proj
.
id
}
/issues/
#{
ext_issue
.
id
}
/notes/
#{
cross_reference_note
.
id
}
"
,
private_user
)
get
api
(
"/projects/
#{
ext_proj
.
id
}
/issues/
#{
ext_issue
.
id
}
/notes/
#{
cross_reference_note
.
id
}
"
,
private_user
)
...
@@ -221,7 +220,6 @@ describe API::API, api: true do
...
@@ -221,7 +220,6 @@ describe API::API, api: true do
expect
(
Time
.
parse
(
json_response
[
'created_at'
])).
to
be_within
(
1
.
second
).
of
(
creation_time
)
expect
(
Time
.
parse
(
json_response
[
'created_at'
])).
to
be_within
(
1
.
second
).
of
(
creation_time
)
end
end
end
end
end
end
context
"when noteable is a Snippet"
do
context
"when noteable is a Snippet"
do
...
@@ -396,5 +394,4 @@ describe API::API, api: true do
...
@@ -396,5 +394,4 @@ describe API::API, api: true do
end
end
end
end
end
end
end
end
spec/requests/api/projects_spec.rb
View file @
9e211091
...
@@ -707,7 +707,6 @@ describe API::API, api: true do
...
@@ -707,7 +707,6 @@ describe API::API, api: true do
end
end
describe
'DELETE /projects/:id/fork'
do
describe
'DELETE /projects/:id/fork'
do
it
"shouldn't be visible to users outside group"
do
it
"shouldn't be visible to users outside group"
do
delete
api
(
"/projects/
#{
project_fork_target
.
id
}
/fork"
,
user
)
delete
api
(
"/projects/
#{
project_fork_target
.
id
}
/fork"
,
user
)
expect
(
response
).
to
have_http_status
(
404
)
expect
(
response
).
to
have_http_status
(
404
)
...
...
spec/requests/api/services_spec.rb
View file @
9e211091
...
@@ -87,7 +87,6 @@ describe API::API, api: true do
...
@@ -87,7 +87,6 @@ describe API::API, api: true do
expect
(
response
).
to
have_http_status
(
403
)
expect
(
response
).
to
have_http_status
(
403
)
end
end
end
end
end
end
end
end
spec/requests/api/settings_spec.rb
View file @
9e211091
...
@@ -6,7 +6,6 @@ describe API::API, 'Settings', api: true do
...
@@ -6,7 +6,6 @@ describe API::API, 'Settings', api: true do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:admin
)
{
create
(
:admin
)
}
let
(
:admin
)
{
create
(
:admin
)
}
describe
"GET /application/settings"
do
describe
"GET /application/settings"
do
it
"should return application settings"
do
it
"should return application settings"
do
get
api
(
"/application/settings"
,
admin
)
get
api
(
"/application/settings"
,
admin
)
...
...
spec/requests/api/users_spec.rb
View file @
9e211091
...
@@ -246,7 +246,6 @@ describe API::API, api: true do
...
@@ -246,7 +246,6 @@ describe API::API, api: true do
end
end
describe
"GET /users/sign_up"
do
describe
"GET /users/sign_up"
do
it
"should redirect to sign in page"
do
it
"should redirect to sign in page"
do
get
"/users/sign_up"
get
"/users/sign_up"
expect
(
response
).
to
have_http_status
(
302
)
expect
(
response
).
to
have_http_status
(
302
)
...
...
spec/routing/admin_routing_spec.rb
View file @
9e211091
...
@@ -95,7 +95,6 @@ describe Admin::HooksController, "routing" do
...
@@ -95,7 +95,6 @@ describe Admin::HooksController, "routing" do
it
"to #destroy"
do
it
"to #destroy"
do
expect
(
delete
(
"/admin/hooks/1"
)).
to
route_to
(
'admin/hooks#destroy'
,
id:
'1'
)
expect
(
delete
(
"/admin/hooks/1"
)).
to
route_to
(
'admin/hooks#destroy'
,
id:
'1'
)
end
end
end
end
# admin_logs GET /admin/logs(.:format) admin/logs#show
# admin_logs GET /admin/logs(.:format) admin/logs#show
...
...
spec/routing/project_routing_spec.rb
View file @
9e211091
...
@@ -165,7 +165,6 @@ describe Projects::TagsController, 'routing' do
...
@@ -165,7 +165,6 @@ describe Projects::TagsController, 'routing' do
end
end
end
end
# project_deploy_keys GET /:project_id/deploy_keys(.:format) deploy_keys#index
# project_deploy_keys GET /:project_id/deploy_keys(.:format) deploy_keys#index
# POST /:project_id/deploy_keys(.:format) deploy_keys#create
# POST /:project_id/deploy_keys(.:format) deploy_keys#create
# new_project_deploy_key GET /:project_id/deploy_keys/new(.:format) deploy_keys#new
# new_project_deploy_key GET /:project_id/deploy_keys/new(.:format) deploy_keys#new
...
...
spec/routing/routing_spec.rb
View file @
9e211091
...
@@ -253,7 +253,6 @@ describe RootController, 'routing' do
...
@@ -253,7 +253,6 @@ describe RootController, 'routing' do
end
end
end
end
# new_user_session GET /users/sign_in(.:format) devise/sessions#new
# new_user_session GET /users/sign_in(.:format) devise/sessions#new
# user_session POST /users/sign_in(.:format) devise/sessions#create
# user_session POST /users/sign_in(.:format) devise/sessions#create
# destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
# destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
...
...
spec/services/git_hooks_service_spec.rb
View file @
9e211091
...
@@ -16,7 +16,6 @@ describe GitHooksService, services: true do
...
@@ -16,7 +16,6 @@ describe GitHooksService, services: true do
end
end
describe
'#execute'
do
describe
'#execute'
do
context
'when receive hooks were successful'
do
context
'when receive hooks were successful'
do
it
'should call post-receive hook'
do
it
'should call post-receive hook'
do
hook
=
double
(
trigger:
true
)
hook
=
double
(
trigger:
true
)
...
@@ -48,6 +47,5 @@ describe GitHooksService, services: true do
...
@@ -48,6 +47,5 @@ describe GitHooksService, services: true do
end
.
to
raise_error
(
GitHooksService
::
PreReceiveError
)
end
.
to
raise_error
(
GitHooksService
::
PreReceiveError
)
end
end
end
end
end
end
end
end
spec/services/git_push_service_spec.rb
View file @
9e211091
...
@@ -14,7 +14,6 @@ describe GitPushService, services: true do
...
@@ -14,7 +14,6 @@ describe GitPushService, services: true do
end
end
describe
'Push branches'
do
describe
'Push branches'
do
let
(
:oldrev
)
{
@oldrev
}
let
(
:oldrev
)
{
@oldrev
}
let
(
:newrev
)
{
@newrev
}
let
(
:newrev
)
{
@newrev
}
...
@@ -23,7 +22,6 @@ describe GitPushService, services: true do
...
@@ -23,7 +22,6 @@ describe GitPushService, services: true do
end
end
context
'new branch'
do
context
'new branch'
do
let
(
:oldrev
)
{
@blankrev
}
let
(
:oldrev
)
{
@blankrev
}
it
{
is_expected
.
to
be_truthy
}
it
{
is_expected
.
to
be_truthy
}
...
@@ -55,7 +53,6 @@ describe GitPushService, services: true do
...
@@ -55,7 +53,6 @@ describe GitPushService, services: true do
end
end
context
'existing branch'
do
context
'existing branch'
do
it
{
is_expected
.
to
be_truthy
}
it
{
is_expected
.
to
be_truthy
}
it
'flushes general cached data'
do
it
'flushes general cached data'
do
...
@@ -79,7 +76,6 @@ describe GitPushService, services: true do
...
@@ -79,7 +76,6 @@ describe GitPushService, services: true do
end
end
context
'rm branch'
do
context
'rm branch'
do
let
(
:newrev
)
{
@blankrev
}
let
(
:newrev
)
{
@blankrev
}
it
{
is_expected
.
to
be_truthy
}
it
{
is_expected
.
to
be_truthy
}
...
@@ -223,7 +219,6 @@ describe GitPushService, services: true do
...
@@ -223,7 +219,6 @@ describe GitPushService, services: true do
end
end
end
end
describe
"Webhooks"
do
describe
"Webhooks"
do
context
"execute webhooks"
do
context
"execute webhooks"
do
it
"when pushing a branch for the first time"
do
it
"when pushing a branch for the first time"
do
...
@@ -491,7 +486,6 @@ describe GitPushService, services: true do
...
@@ -491,7 +486,6 @@ describe GitPushService, services: true do
end
end
end
end
it
'increments the push counter'
do
it
'increments the push counter'
do
expect
(
housekeeping
).
to
receive
(
:increment!
)
expect
(
housekeeping
).
to
receive
(
:increment!
)
...
...
spec/services/merge_requests/refresh_service_spec.rb
View file @
9e211091
...
@@ -175,7 +175,6 @@ describe MergeRequests::RefreshService, services: true do
...
@@ -175,7 +175,6 @@ describe MergeRequests::RefreshService, services: true do
end
end
end
end
def
reload_mrs
def
reload_mrs
@merge_request
.
reload
@merge_request
.
reload
@fork_merge_request
.
reload
@fork_merge_request
.
reload
...
...
spec/services/notification_service_spec.rb
View file @
9e211091
...
@@ -95,7 +95,6 @@ describe NotificationService, services: true do
...
@@ -95,7 +95,6 @@ describe NotificationService, services: true do
notification
.
new_note
(
note
)
notification
.
new_note
(
note
)
end
end
it
{
should_not_email
(
@u_lazy_participant
)
}
it
{
should_not_email
(
@u_lazy_participant
)
}
end
end
end
end
...
@@ -377,7 +376,6 @@ describe NotificationService, services: true do
...
@@ -377,7 +376,6 @@ describe NotificationService, services: true do
end
end
describe
'#reassigned_issue'
do
describe
'#reassigned_issue'
do
before
do
before
do
update_custom_notification
(
:reassign_issue
,
@u_guest_custom
,
project
)
update_custom_notification
(
:reassign_issue
,
@u_guest_custom
,
project
)
update_custom_notification
(
:reassign_issue
,
@u_custom_global
)
update_custom_notification
(
:reassign_issue
,
@u_custom_global
)
...
@@ -566,7 +564,6 @@ describe NotificationService, services: true do
...
@@ -566,7 +564,6 @@ describe NotificationService, services: true do
end
end
describe
'#close_issue'
do
describe
'#close_issue'
do
before
do
before
do
update_custom_notification
(
:close_issue
,
@u_guest_custom
,
project
)
update_custom_notification
(
:close_issue
,
@u_guest_custom
,
project
)
update_custom_notification
(
:close_issue
,
@u_custom_global
)
update_custom_notification
(
:close_issue
,
@u_custom_global
)
...
@@ -712,7 +709,6 @@ describe NotificationService, services: true do
...
@@ -712,7 +709,6 @@ describe NotificationService, services: true do
should_email
(
subscriber
)
should_email
(
subscriber
)
end
end
context
'participating'
do
context
'participating'
do
context
'by assignee'
do
context
'by assignee'
do
before
do
before
do
...
@@ -880,7 +876,6 @@ describe NotificationService, services: true do
...
@@ -880,7 +876,6 @@ describe NotificationService, services: true do
end
end
describe
'#merged_merge_request'
do
describe
'#merged_merge_request'
do
before
do
before
do
update_custom_notification
(
:merge_merge_request
,
@u_guest_custom
,
project
)
update_custom_notification
(
:merge_merge_request
,
@u_guest_custom
,
project
)
update_custom_notification
(
:merge_merge_request
,
@u_custom_global
)
update_custom_notification
(
:merge_merge_request
,
@u_custom_global
)
...
...
spec/services/projects/transfer_service_spec.rb
View file @
9e211091
...
@@ -71,5 +71,4 @@ describe Projects::TransferService, services: true do
...
@@ -71,5 +71,4 @@ describe Projects::TransferService, services: true do
it
{
expect
(
private_project
.
visibility_level
).
to
eq
(
Gitlab
::
VisibilityLevel
::
PRIVATE
)
}
it
{
expect
(
private_project
.
visibility_level
).
to
eq
(
Gitlab
::
VisibilityLevel
::
PRIVATE
)
}
end
end
end
end
end
end
spec/support/jira_service_helper.rb
View file @
9e211091
module
JiraServiceHelper
module
JiraServiceHelper
def
jira_service_settings
def
jira_service_settings
properties
=
{
properties
=
{
"title"
=>
"JIRA tracker"
,
"title"
=>
"JIRA tracker"
,
...
...
spec/tasks/gitlab/backup_rake_spec.rb
View file @
9e211091
...
@@ -76,7 +76,6 @@ describe 'gitlab:app namespace rake task' do
...
@@ -76,7 +76,6 @@ describe 'gitlab:app namespace rake task' do
expect
{
run_rake_task
(
'gitlab:backup:restore'
)
}.
not_to
raise_error
expect
{
run_rake_task
(
'gitlab:backup:restore'
)
}.
not_to
raise_error
end
end
end
end
end
# backup_restore task
end
# backup_restore task
describe
'backup_create'
do
describe
'backup_create'
do
...
...
spec/workers/project_cache_worker_spec.rb
View file @
9e211091
...
@@ -7,7 +7,6 @@ describe ProjectCacheWorker do
...
@@ -7,7 +7,6 @@ describe ProjectCacheWorker do
describe
'#perform'
do
describe
'#perform'
do
it
'updates project cache data'
do
it
'updates project cache data'
do
expect_any_instance_of
(
Repository
).
to
receive
(
:size
)
expect_any_instance_of
(
Repository
).
to
receive
(
:size
)
expect_any_instance_of
(
Repository
).
to
receive
(
:commit_count
)
expect_any_instance_of
(
Repository
).
to
receive
(
:commit_count
)
...
...
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