Commit f93bcacb authored by Rémy Coutable's avatar Rémy Coutable

Enable the Style/TrailingCommaInLiteral cop

Use the EnforcedStyleForMultiline: no_comma option.
Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 8e7c073a
...@@ -496,7 +496,8 @@ Style/TrailingBlankLines: ...@@ -496,7 +496,8 @@ Style/TrailingBlankLines:
# This cop checks for trailing comma in array and hash literals. # This cop checks for trailing comma in array and hash literals.
Style/TrailingCommaInLiteral: Style/TrailingCommaInLiteral:
Enabled: false Enabled: true
EnforcedStyleForMultiline: no_comma
# Checks for %W when interpolation is not needed. # Checks for %W when interpolation is not needed.
Style/UnneededCapitalW: Style/UnneededCapitalW:
......
...@@ -174,7 +174,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController ...@@ -174,7 +174,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
:shared_runners_minutes, :shared_runners_minutes,
:minimum_mirror_sync_time, :minimum_mirror_sync_time,
:geo_status_timeout, :geo_status_timeout,
:elasticsearch_experimental_indexer, :elasticsearch_experimental_indexer
] ]
end end
end end
...@@ -45,7 +45,7 @@ class AutocompleteController < ApplicationController ...@@ -45,7 +45,7 @@ class AutocompleteController < ApplicationController
no_project = { no_project = {
id: 0, id: 0,
name_with_namespace: 'No project', name_with_namespace: 'No project'
} }
projects.unshift(no_project) unless params[:offset_id].present? projects.unshift(no_project) unless params[:offset_id].present?
......
...@@ -23,7 +23,7 @@ module LfsRequest ...@@ -23,7 +23,7 @@ module LfsRequest
render( render(
json: { json: {
message: 'Git LFS is not enabled on this GitLab server, contact your admin.', message: 'Git LFS is not enabled on this GitLab server, contact your admin.',
documentation_url: help_url, documentation_url: help_url
}, },
status: 501 status: 501
) )
...@@ -48,7 +48,7 @@ module LfsRequest ...@@ -48,7 +48,7 @@ module LfsRequest
render( render(
json: { json: {
message: 'Access forbidden. Check your access level.', message: 'Access forbidden. Check your access level.',
documentation_url: help_url, documentation_url: help_url
}, },
content_type: "application/vnd.git-lfs+json", content_type: "application/vnd.git-lfs+json",
status: 403 status: 403
...@@ -59,7 +59,7 @@ module LfsRequest ...@@ -59,7 +59,7 @@ module LfsRequest
render( render(
json: { json: {
message: 'Not found.', message: 'Not found.',
documentation_url: help_url, documentation_url: help_url
}, },
content_type: "application/vnd.git-lfs+json", content_type: "application/vnd.git-lfs+json",
status: 404 status: 404
...@@ -123,7 +123,7 @@ module LfsRequest ...@@ -123,7 +123,7 @@ module LfsRequest
render( render(
json: { json: {
message: Gitlab::RepositorySizeError.new(project).push_error(@exceeded_limit), message: Gitlab::RepositorySizeError.new(project).push_error(@exceeded_limit),
documentation_url: help_url, documentation_url: help_url
}, },
content_type: "application/vnd.git-lfs+json", content_type: "application/vnd.git-lfs+json",
status: 406 status: 406
......
...@@ -5,7 +5,7 @@ class HealthController < ActionController::Base ...@@ -5,7 +5,7 @@ class HealthController < ActionController::Base
CHECKS = [ CHECKS = [
Gitlab::HealthChecks::DbCheck, Gitlab::HealthChecks::DbCheck,
Gitlab::HealthChecks::RedisCheck, Gitlab::HealthChecks::RedisCheck,
Gitlab::HealthChecks::FsShardsCheck, Gitlab::HealthChecks::FsShardsCheck
].freeze ].freeze
def readiness def readiness
......
...@@ -4,7 +4,7 @@ class JwtController < ApplicationController ...@@ -4,7 +4,7 @@ class JwtController < ApplicationController
before_action :authenticate_project_or_user before_action :authenticate_project_or_user
SERVICES = { SERVICES = {
Auth::ContainerRegistryAuthenticationService::AUDIENCE => Auth::ContainerRegistryAuthenticationService, Auth::ContainerRegistryAuthenticationService::AUDIENCE => Auth::ContainerRegistryAuthenticationService
}.freeze }.freeze
def auth def auth
......
...@@ -217,7 +217,7 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -217,7 +217,7 @@ class Projects::IssuesController < Projects::ApplicationController
description_text: @issue.description, description_text: @issue.description,
task_status: @issue.task_status, task_status: @issue.task_status,
issue_number: @issue.iid, issue_number: @issue.iid,
updated_at: @issue.updated_at, updated_at: @issue.updated_at
} }
end end
......
...@@ -22,7 +22,7 @@ class Projects::LfsApiController < Projects::GitHttpClientController ...@@ -22,7 +22,7 @@ class Projects::LfsApiController < Projects::GitHttpClientController
render( render(
json: { json: {
message: 'Server supports batch API only, please update your Git LFS client to version 1.0.1 and up.', message: 'Server supports batch API only, please update your Git LFS client to version 1.0.1 and up.',
documentation_url: "#{Gitlab.config.gitlab.url}/help", documentation_url: "#{Gitlab.config.gitlab.url}/help"
}, },
status: 501 status: 501
) )
...@@ -55,7 +55,7 @@ class Projects::LfsApiController < Projects::GitHttpClientController ...@@ -55,7 +55,7 @@ class Projects::LfsApiController < Projects::GitHttpClientController
else else
object[:error] = { object[:error] = {
code: 404, code: 404,
message: "Object does not exist on the server or you don't have permissions to access it", message: "Object does not exist on the server or you don't have permissions to access it"
} }
end end
end end
......
...@@ -42,7 +42,7 @@ class Projects::PipelinesController < Projects::ApplicationController ...@@ -42,7 +42,7 @@ class Projects::PipelinesController < Projects::ApplicationController
all: @pipelines_count, all: @pipelines_count,
running: @running_count, running: @running_count,
pending: @pending_count, pending: @pending_count,
finished: @finished_count, finished: @finished_count
} }
} }
end end
......
...@@ -48,7 +48,7 @@ class Projects::TreeController < Projects::ApplicationController ...@@ -48,7 +48,7 @@ class Projects::TreeController < Projects::ApplicationController
@dir_name = File.join(@path, params[:dir_name]) @dir_name = File.join(@path, params[:dir_name])
@commit_params = { @commit_params = {
file_path: @dir_name, file_path: @dir_name,
commit_message: params[:commit_message], commit_message: params[:commit_message]
} }
end end
end end
...@@ -221,7 +221,7 @@ class ProjectsController < Projects::ApplicationController ...@@ -221,7 +221,7 @@ class ProjectsController < Projects::ApplicationController
branches = BranchesFinder.new(@repository, params).execute.map(&:name) branches = BranchesFinder.new(@repository, params).execute.map(&:name)
options = { options = {
'Branches' => branches.take(100), 'Branches' => branches.take(100)
} }
unless @repository.tag_count.zero? unless @repository.tag_count.zero?
......
...@@ -98,7 +98,7 @@ module DiffHelper ...@@ -98,7 +98,7 @@ module DiffHelper
[ [
content_tag(:span, link_to(truncate(blob.name, length: 40), tree)), content_tag(:span, link_to(truncate(blob.name, length: 40), tree)),
'@', '@',
content_tag(:span, commit_id, class: 'monospace'), content_tag(:span, commit_id, class: 'monospace')
].join(' ').html_safe ].join(' ').html_safe
end end
......
...@@ -12,7 +12,7 @@ module EmailsHelper ...@@ -12,7 +12,7 @@ module EmailsHelper
"action" => { "action" => {
"@type" => "ViewAction", "@type" => "ViewAction",
"name" => name, "name" => name,
"url" => url, "url" => url
} }
} }
......
...@@ -41,7 +41,7 @@ module EventsHelper ...@@ -41,7 +41,7 @@ module EventsHelper
link_opts = { link_opts = {
class: "event-filter-link", class: "event-filter-link",
id: "#{key}_event_filter", id: "#{key}_event_filter",
title: "Filter by #{tooltip.downcase}", title: "Filter by #{tooltip.downcase}"
} }
content_tag :li, class: active do content_tag :li, class: active do
......
...@@ -10,7 +10,7 @@ module ExploreHelper ...@@ -10,7 +10,7 @@ module ExploreHelper
personal: params[:personal], personal: params[:personal],
archived: params[:archived], archived: params[:archived],
shared: params[:shared], shared: params[:shared],
namespace_id: params[:namespace_id], namespace_id: params[:namespace_id]
} }
options = exist_opts.merge(options).delete_if { |key, value| value.blank? } options = exist_opts.merge(options).delete_if { |key, value| value.blank? }
......
...@@ -32,7 +32,7 @@ module MarkupHelper ...@@ -32,7 +32,7 @@ module MarkupHelper
context = { context = {
project: @project, project: @project,
current_user: (current_user if defined?(current_user)), current_user: (current_user if defined?(current_user)),
pipeline: :single_line, pipeline: :single_line
} }
gfm_body = Banzai.render(body, context) gfm_body = Banzai.render(body, context)
......
...@@ -54,7 +54,7 @@ module MergeRequestsHelper ...@@ -54,7 +54,7 @@ module MergeRequestsHelper
source_project_id: merge_request.source_project_id, source_project_id: merge_request.source_project_id,
target_project_id: merge_request.target_project_id, target_project_id: merge_request.target_project_id,
source_branch: merge_request.source_branch, source_branch: merge_request.source_branch,
target_branch: merge_request.target_branch, target_branch: merge_request.target_branch
}, },
change_branches: true change_branches: true
) )
......
...@@ -19,7 +19,7 @@ module NotesHelper ...@@ -19,7 +19,7 @@ module NotesHelper
id: noteable.id, id: noteable.id,
class: noteable.class.name, class: noteable.class.name,
resources: noteable.class.table_name, resources: noteable.class.table_name,
project_id: noteable.project.id, project_id: noteable.project.id
}.to_json }.to_json
end end
...@@ -34,7 +34,7 @@ module NotesHelper ...@@ -34,7 +34,7 @@ module NotesHelper
data = { data = {
line_code: line_code, line_code: line_code,
line_type: line_type, line_type: line_type
} }
if @use_legacy_diff_notes if @use_legacy_diff_notes
......
...@@ -50,7 +50,7 @@ module SearchHelper ...@@ -50,7 +50,7 @@ module SearchHelper
{ category: "Settings", label: "User settings", url: profile_path }, { category: "Settings", label: "User settings", url: profile_path },
{ category: "Settings", label: "SSH Keys", url: profile_keys_path }, { category: "Settings", label: "SSH Keys", url: profile_keys_path },
{ category: "Settings", label: "Dashboard", url: root_path }, { category: "Settings", label: "Dashboard", url: root_path },
{ category: "Settings", label: "Admin Section", url: admin_root_path }, { category: "Settings", label: "Admin Section", url: admin_root_path }
] ]
end end
...@@ -65,7 +65,7 @@ module SearchHelper ...@@ -65,7 +65,7 @@ module SearchHelper
{ category: "Help", label: "SSH Keys Help", url: help_page_path("ssh/README") }, { category: "Help", label: "SSH Keys Help", url: help_page_path("ssh/README") },
{ category: "Help", label: "System Hooks Help", url: help_page_path("system_hooks/system_hooks") }, { category: "Help", label: "System Hooks Help", url: help_page_path("system_hooks/system_hooks") },
{ category: "Help", label: "Webhooks Help", url: help_page_path("user/project/integrations/webhooks") }, { category: "Help", label: "Webhooks Help", url: help_page_path("user/project/integrations/webhooks") },
{ category: "Help", label: "Workflow Help", url: help_page_path("workflow/README") }, { category: "Help", label: "Workflow Help", url: help_page_path("workflow/README") }
] ]
end end
...@@ -84,7 +84,7 @@ module SearchHelper ...@@ -84,7 +84,7 @@ module SearchHelper
{ category: "Current Project", label: "Milestones", url: namespace_project_milestones_path(@project.namespace, @project) }, { category: "Current Project", label: "Milestones", url: namespace_project_milestones_path(@project.namespace, @project) },
{ category: "Current Project", label: "Snippets", url: namespace_project_snippets_path(@project.namespace, @project) }, { category: "Current Project", label: "Snippets", url: namespace_project_snippets_path(@project.namespace, @project) },
{ category: "Current Project", label: "Members", url: namespace_project_settings_members_path(@project.namespace, @project) }, { category: "Current Project", label: "Members", url: namespace_project_settings_members_path(@project.namespace, @project) },
{ category: "Current Project", label: "Wiki", url: namespace_project_wikis_path(@project.namespace, @project) }, { category: "Current Project", label: "Wiki", url: namespace_project_wikis_path(@project.namespace, @project) }
] ]
else else
[] []
......
...@@ -84,7 +84,7 @@ module SelectsHelper ...@@ -84,7 +84,7 @@ module SelectsHelper
current_user: opts[:current_user] || false, current_user: opts[:current_user] || false,
"push-code-to-protected-branches" => opts[:push_code_to_protected_branches], "push-code-to-protected-branches" => opts[:push_code_to_protected_branches],
author_id: opts[:author_id] || '', author_id: opts[:author_id] || '',
skip_users: opts[:skip_users] ? opts[:skip_users].map(&:id) : nil, skip_users: opts[:skip_users] ? opts[:skip_users].map(&:id) : nil
} }
end end
end end
...@@ -60,7 +60,7 @@ module SortingHelper ...@@ -60,7 +60,7 @@ module SortingHelper
sort_value_due_date_soon => sort_title_due_date_soon, sort_value_due_date_soon => sort_title_due_date_soon,
sort_value_due_date_later => sort_title_due_date_later, sort_value_due_date_later => sort_title_due_date_later,
sort_value_start_date_soon => sort_title_start_date_soon, sort_value_start_date_soon => sort_title_start_date_soon,
sort_value_start_date_later => sort_title_start_date_later, sort_value_start_date_later => sort_title_start_date_later
} }
end end
......
...@@ -63,7 +63,7 @@ module TodosHelper ...@@ -63,7 +63,7 @@ module TodosHelper
project_id: params[:project_id], project_id: params[:project_id],
author_id: params[:author_id], author_id: params[:author_id],
type: params[:type], type: params[:type],
action_id: params[:action_id], action_id: params[:action_id]
} }
end end
......
...@@ -318,7 +318,7 @@ class ApplicationSetting < ActiveRecord::Base ...@@ -318,7 +318,7 @@ class ApplicationSetting < ActiveRecord::Base
aws: elasticsearch_aws, aws: elasticsearch_aws,
aws_access_key: elasticsearch_aws_access_key, aws_access_key: elasticsearch_aws_access_key,
aws_secret_access_key: elasticsearch_aws_secret_access_key, aws_secret_access_key: elasticsearch_aws_secret_access_key,
aws_region: elasticsearch_aws_region, aws_region: elasticsearch_aws_region
} }
end end
......
...@@ -33,7 +33,7 @@ class Blob < SimpleDelegator ...@@ -33,7 +33,7 @@ class Blob < SimpleDelegator
BlobViewer::PDF, BlobViewer::PDF,
BlobViewer::BinarySTL, BlobViewer::BinarySTL,
BlobViewer::TextSTL, BlobViewer::TextSTL
].freeze ].freeze
BINARY_VIEWERS = RICH_VIEWERS.select(&:binary?).freeze BINARY_VIEWERS = RICH_VIEWERS.select(&:binary?).freeze
......
...@@ -49,7 +49,7 @@ class Commit ...@@ -49,7 +49,7 @@ class Commit
def max_diff_options def max_diff_options
{ {
max_files: DIFF_HARD_LIMIT_FILES, max_files: DIFF_HARD_LIMIT_FILES,
max_lines: DIFF_HARD_LIMIT_LINES, max_lines: DIFF_HARD_LIMIT_LINES
} }
end end
......
...@@ -62,7 +62,7 @@ class Environment < ActiveRecord::Base ...@@ -62,7 +62,7 @@ class Environment < ActiveRecord::Base
def predefined_variables def predefined_variables
[ [
{ key: 'CI_ENVIRONMENT_NAME', value: name, public: true }, { key: 'CI_ENVIRONMENT_NAME', value: name, public: true },
{ key: 'CI_ENVIRONMENT_SLUG', value: slug, public: true }, { key: 'CI_ENVIRONMENT_SLUG', value: slug, public: true }
] ]
end end
......
...@@ -31,7 +31,7 @@ class WebHook < ActiveRecord::Base ...@@ -31,7 +31,7 @@ class WebHook < ActiveRecord::Base
post_url = url.gsub("#{parsed_url.userinfo}@", '') post_url = url.gsub("#{parsed_url.userinfo}@", '')
auth = { auth = {
username: CGI.unescape(parsed_url.user), username: CGI.unescape(parsed_url.user),
password: CGI.unescape(parsed_url.password), password: CGI.unescape(parsed_url.password)
} }
response = WebHook.post(post_url, response = WebHook.post(post_url,
body: data.to_json, body: data.to_json,
......
...@@ -11,12 +11,12 @@ class License < ActiveRecord::Base ...@@ -11,12 +11,12 @@ class License < ActiveRecord::Base
{ 'GitLab_FileLocks' => 1 }, { 'GitLab_FileLocks' => 1 },
{ 'GitLab_Geo' => 1 }, { 'GitLab_Geo' => 1 },
{ 'GitLab_Auditor_User' => 1 }, { 'GitLab_Auditor_User' => 1 },
{ 'GitLab_ServiceDesk' => 1 }, { 'GitLab_ServiceDesk' => 1 }
].freeze ].freeze
FEATURES_BY_PLAN = { FEATURES_BY_PLAN = {
'starter' => EES_FEATURES, 'starter' => EES_FEATURES,
'premium' => EEP_FEATURES, 'premium' => EEP_FEATURES
}.freeze }.freeze
validate :valid_license validate :valid_license
......
...@@ -1093,7 +1093,7 @@ class Project < ActiveRecord::Base ...@@ -1093,7 +1093,7 @@ class Project < ActiveRecord::Base
namespace: namespace.name, namespace: namespace.name,
visibility_level: visibility_level, visibility_level: visibility_level,
path_with_namespace: path_with_namespace, path_with_namespace: path_with_namespace,
default_branch: default_branch, default_branch: default_branch
} }
# Backward compatibility # Backward compatibility
......
...@@ -52,7 +52,7 @@ class BambooService < CiService ...@@ -52,7 +52,7 @@ class BambooService < CiService
placeholder: 'Bamboo build plan key like KEY' }, placeholder: 'Bamboo build plan key like KEY' },
{ type: 'text', name: 'username', { type: 'text', name: 'username',
placeholder: 'A user with API access, if applicable' }, placeholder: 'A user with API access, if applicable' },
{ type: 'password', name: 'password' }, { type: 'password', name: 'password' }
] ]
end end
......
...@@ -39,7 +39,7 @@ class ChatNotificationService < Service ...@@ -39,7 +39,7 @@ class ChatNotificationService < Service
{ type: 'text', name: 'webhook', placeholder: "e.g. #{webhook_placeholder}" }, { type: 'text', name: 'webhook', placeholder: "e.g. #{webhook_placeholder}" },
{ type: 'text', name: 'username', placeholder: 'e.g. GitLab' }, { type: 'text', name: 'username', placeholder: 'e.g. GitLab' },
{ type: 'checkbox', name: 'notify_only_broken_pipelines' }, { type: 'checkbox', name: 'notify_only_broken_pipelines' },
{ type: 'checkbox', name: 'notify_only_default_branch' }, { type: 'checkbox', name: 'notify_only_default_branch' }
] ]
end end
......
...@@ -47,7 +47,7 @@ class EmailsOnPushService < Service ...@@ -47,7 +47,7 @@ class EmailsOnPushService < Service
help: "Send notifications from the committer's email address if the domain is part of the domain GitLab is running on (e.g. #{domains})." }, help: "Send notifications from the committer's email address if the domain is part of the domain GitLab is running on (e.g. #{domains})." },
{ type: 'checkbox', name: 'disable_diffs', title: "Disable code diffs", { type: 'checkbox', name: 'disable_diffs', title: "Disable code diffs",
help: "Don't include possibly sensitive code diffs in notification body." }, help: "Don't include possibly sensitive code diffs in notification body." },
{ type: 'textarea', name: 'recipients', placeholder: 'Emails separated by whitespace' }, { type: 'textarea', name: 'recipients', placeholder: 'Emails separated by whitespace' }
] ]
end end
end end
...@@ -19,7 +19,7 @@ class ExternalWikiService < Service ...@@ -19,7 +19,7 @@ class ExternalWikiService < Service
def fields def fields
[ [
{ type: 'text', name: 'external_wiki_url', placeholder: 'The URL of the external Wiki' }, { type: 'text', name: 'external_wiki_url', placeholder: 'The URL of the external Wiki' }
] ]
end end
......
...@@ -41,7 +41,7 @@ class HipchatService < Service ...@@ -41,7 +41,7 @@ class HipchatService < Service
placeholder: 'Leave blank for default (v2)' }, placeholder: 'Leave blank for default (v2)' },
{ type: 'text', name: 'server', { type: 'text', name: 'server',
placeholder: 'Leave blank for default. https://hipchat.example.com' }, placeholder: 'Leave blank for default. https://hipchat.example.com' },
{ type: 'checkbox', name: 'notify_only_broken_pipelines' }, { type: 'checkbox', name: 'notify_only_broken_pipelines' }
] ]
end end
......
...@@ -58,7 +58,7 @@ class IrkerService < Service ...@@ -58,7 +58,7 @@ class IrkerService < Service
' want to use a password, you have to omit the "#" on the channel). If you ' \ ' want to use a password, you have to omit the "#" on the channel). If you ' \
' specify a default IRC URI to prepend before each recipient, you can just ' \ ' specify a default IRC URI to prepend before each recipient, you can just ' \
' give a channel name.' }, ' give a channel name.' },
{ type: 'checkbox', name: 'colorize_messages' }, { type: 'checkbox', name: 'colorize_messages' }
] ]
end end
......
...@@ -90,7 +90,7 @@ class JenkinsDeprecatedService < CiService ...@@ -90,7 +90,7 @@ class JenkinsDeprecatedService < CiService
get_url = build_page(sha, ref).gsub("#{parsed_url.userinfo}@", "") get_url = build_page(sha, ref).gsub("#{parsed_url.userinfo}@", "")
auth = { auth = {
username: URI.decode(parsed_url.user), username: URI.decode(parsed_url.user),
password: URI.decode(parsed_url.password), password: URI.decode(parsed_url.password)
} }
response = HTTParty.get(get_url, verify: false, basic_auth: auth) response = HTTParty.get(get_url, verify: false, basic_auth: auth)
end end
......
...@@ -83,7 +83,7 @@ class JenkinsService < CiService ...@@ -83,7 +83,7 @@ class JenkinsService < CiService
help: 'The URL-friendly project name. Example: my_project_name' help: 'The URL-friendly project name. Example: my_project_name'
}, },
{ type: 'text', name: 'username' }, { type: 'text', name: 'username' },
{ type: 'password', name: 'password' }, { type: 'password', name: 'password' }
] ]
end end
end end
...@@ -149,7 +149,7 @@ class JiraService < IssueTrackerService ...@@ -149,7 +149,7 @@ class JiraService < IssueTrackerService
data = { data = {
user: { user: {
name: author.name, name: author.name,
url: resource_url(user_path(author)), url: resource_url(user_path(author))
}, },
project: { project: {
name: self.project.path_with_namespace, name: self.project.path_with_namespace,
......
...@@ -73,7 +73,7 @@ class KubernetesService < DeploymentService ...@@ -73,7 +73,7 @@ class KubernetesService < DeploymentService
{ type: 'textarea', { type: 'textarea',
name: 'ca_pem', name: 'ca_pem',
title: 'Custom CA bundle', title: 'Custom CA bundle',
placeholder: 'Certificate Authority bundle (PEM format)' }, placeholder: 'Certificate Authority bundle (PEM format)' }
] ]
end end
......
...@@ -35,7 +35,7 @@ class MicrosoftTeamsService < ChatNotificationService ...@@ -35,7 +35,7 @@ class MicrosoftTeamsService < ChatNotificationService
[ [
{ type: 'text', name: 'webhook', placeholder: "e.g. #{webhook_placeholder}" }, { type: 'text', name: 'webhook', placeholder: "e.g. #{webhook_placeholder}" },
{ type: 'checkbox', name: 'notify_only_broken_pipelines' }, { type: 'checkbox', name: 'notify_only_broken_pipelines' },
{ type: 'checkbox', name: 'notify_only_default_branch' }, { type: 'checkbox', name: 'notify_only_default_branch' }
] ]
end end
......
...@@ -21,7 +21,7 @@ class MockCiService < CiService ...@@ -21,7 +21,7 @@ class MockCiService < CiService
[ [
{ type: 'text', { type: 'text',
name: 'mock_service_url', name: 'mock_service_url',
placeholder: 'http://localhost:4004' }, placeholder: 'http://localhost:4004' }
] ]
end end
......
...@@ -55,7 +55,7 @@ class PipelinesEmailService < Service ...@@ -55,7 +55,7 @@ class PipelinesEmailService < Service
name: 'recipients', name: 'recipients',
placeholder: 'Emails separated by comma' }, placeholder: 'Emails separated by comma' },
{ type: 'checkbox', { type: 'checkbox',
name: 'notify_only_broken_pipelines' }, name: 'notify_only_broken_pipelines' }
] ]
end end
......
...@@ -55,7 +55,7 @@ class PushoverService < Service ...@@ -55,7 +55,7 @@ class PushoverService < Service
['Pushover Echo (long)', 'echo'], ['Pushover Echo (long)', 'echo'],
['Up Down (long)', 'updown'], ['Up Down (long)', 'updown'],
['None (silent)', 'none'] ['None (silent)', 'none']
] }, ] }
] ]
end end
......
...@@ -55,7 +55,7 @@ class TeamcityService < CiService ...@@ -55,7 +55,7 @@ class TeamcityService < CiService
placeholder: 'Build configuration ID' }, placeholder: 'Build configuration ID' },
{ type: 'text', name: 'username', { type: 'text', name: 'username',
placeholder: 'A user with permissions to trigger a manual build' }, placeholder: 'A user with permissions to trigger a manual build' },
{ type: 'password', name: 'password' }, { type: 'password', name: 'password' }
] ]
end end
...@@ -78,7 +78,7 @@ class TeamcityService < CiService ...@@ -78,7 +78,7 @@ class TeamcityService < CiService
auth = { auth = {
username: username, username: username,
password: password, password: password
} }
branch = Gitlab::Git.ref_name(data[:ref]) branch = Gitlab::Git.ref_name(data[:ref])
......
...@@ -16,7 +16,7 @@ class AkismetService ...@@ -16,7 +16,7 @@ class AkismetService
created_at: DateTime.now, created_at: DateTime.now,
author: owner.name, author: owner.name,
author_email: owner.email, author_email: owner.email,
referrer: options[:referrer], referrer: options[:referrer]
} }
begin begin
......
...@@ -18,7 +18,7 @@ class AuditEventService ...@@ -18,7 +18,7 @@ class AuditEventService
author_name: author_name, author_name: author_name,
target_id: user_id, target_id: user_id,
target_type: "User", target_type: "User",
target_details: user_name, target_details: user_name
} }
when :create when :create
{ {
...@@ -27,7 +27,7 @@ class AuditEventService ...@@ -27,7 +27,7 @@ class AuditEventService
author_name: author_name, author_name: author_name,
target_id: user_id, target_id: user_id,
target_type: "User", target_type: "User",
target_details: user_name, target_details: user_name
} }
when :update when :update
{ {
...@@ -37,7 +37,7 @@ class AuditEventService ...@@ -37,7 +37,7 @@ class AuditEventService
author_name: author_name, author_name: author_name,
target_id: user_id, target_id: user_id,
target_type: "User", target_type: "User",
target_details: user_name, target_details: user_name
} }
end end
...@@ -56,7 +56,7 @@ class AuditEventService ...@@ -56,7 +56,7 @@ class AuditEventService
author_name: author_name, author_name: author_name,
target_id: key_title, target_id: key_title,
target_type: "DeployKey", target_type: "DeployKey",
target_details: key_title, target_details: key_title
} }
when :create when :create
{ {
...@@ -64,7 +64,7 @@ class AuditEventService ...@@ -64,7 +64,7 @@ class AuditEventService
author_name: author_name, author_name: author_name,
target_id: key_title, target_id: key_title,
target_type: "DeployKey", target_type: "DeployKey",
target_details: key_title, target_details: key_title
} }
end end
...@@ -76,7 +76,7 @@ class AuditEventService ...@@ -76,7 +76,7 @@ class AuditEventService
with: @details[:with], with: @details[:with],
target_id: @author.id, target_id: @author.id,
target_type: 'User', target_type: 'User',
target_details: @author.name, target_details: @author.name
} }
self self
......
...@@ -27,7 +27,7 @@ module Projects ...@@ -27,7 +27,7 @@ module Projects
{ {
domain: domain.domain, domain: domain.domain,
certificate: domain.certificate, certificate: domain.certificate,
key: domain.key, key: domain.key
} }
end end
end end
......
...@@ -113,7 +113,7 @@ class SystemHooksService ...@@ -113,7 +113,7 @@ class SystemHooksService
user_name: model.user.name, user_name: model.user.name,
user_email: model.user.email, user_email: model.user.email,
user_id: model.user.id, user_id: model.user.id,
group_access: model.human_access, group_access: model.human_access
} }
end end
end end
...@@ -23,7 +23,7 @@ if app.config.serve_static_files ...@@ -23,7 +23,7 @@ if app.config.serve_static_files
host: dev_server.host, host: dev_server.host,
port: dev_server.port, port: dev_server.port,
manifest_host: dev_server.host, manifest_host: dev_server.host,
manifest_port: dev_server.port, manifest_port: dev_server.port
} }
if Rails.env.development? if Rails.env.development?
......
...@@ -69,7 +69,7 @@ class RemoveRedundantIndexes < ActiveRecord::Migration ...@@ -69,7 +69,7 @@ class RemoveRedundantIndexes < ActiveRecord::Migration
[:namespaces, 'index_namespaces_on_created_at_and_id'], [:namespaces, 'index_namespaces_on_created_at_and_id'],
[:notes, 'index_notes_on_created_at_and_id'], [:notes, 'index_notes_on_created_at_and_id'],
[:projects, 'index_projects_on_created_at_and_id'], [:projects, 'index_projects_on_created_at_and_id'],
[:users, 'index_users_on_created_at_and_id'], [:users, 'index_users_on_created_at_and_id']
] ]
transaction do transaction do
......
...@@ -25,7 +25,7 @@ class AddMarkdownCacheColumns < ActiveRecord::Migration ...@@ -25,7 +25,7 @@ class AddMarkdownCacheColumns < ActiveRecord::Migration
notes: [:note], notes: [:note],
projects: [:description], projects: [:description],
releases: [:description], releases: [:description],
snippets: [:title, :content], snippets: [:title, :content]
}.freeze }.freeze
def change def change
......
...@@ -22,7 +22,7 @@ class MigrateEESidekiqQueuesFromDefault < ActiveRecord::Migration ...@@ -22,7 +22,7 @@ class MigrateEESidekiqQueuesFromDefault < ActiveRecord::Migration
RENAMED_QUEUES = { RENAMED_QUEUES = {
default: { default: {
'LdapGroupSyncWorker' => :cronjob, 'LdapGroupSyncWorker' => :cronjob,
'LdapSyncWorker' => :cronjob, 'LdapSyncWorker' => :cronjob
} }
}.freeze }.freeze
......
...@@ -102,7 +102,7 @@ module API ...@@ -102,7 +102,7 @@ module API
{ {
api_version: API.version, api_version: API.version,
gitlab_version: Gitlab::VERSION, gitlab_version: Gitlab::VERSION,
gitlab_rev: Gitlab::REVISION, gitlab_rev: Gitlab::REVISION
} }
end end
......
...@@ -232,7 +232,7 @@ module API ...@@ -232,7 +232,7 @@ module API
:shared_runners_enabled, :shared_runners_enabled,
:snippets_enabled, :snippets_enabled,
:visibility, :visibility,
:wiki_enabled, :wiki_enabled
] ]
optional :name, type: String, desc: 'The name of the project' optional :name, type: String, desc: 'The name of the project'
optional :default_branch, type: String, desc: 'The default branch of the project' optional :default_branch, type: String, desc: 'The default branch of the project'
......
...@@ -355,7 +355,7 @@ module API ...@@ -355,7 +355,7 @@ module API
name: :ca_pem, name: :ca_pem,
type: String, type: String,
desc: 'A custom certificate authority bundle to verify the Kubernetes cluster with (PEM format)' desc: 'A custom certificate authority bundle to verify the Kubernetes cluster with (PEM format)'
}, }
], ],
'mattermost-slash-commands' => [ 'mattermost-slash-commands' => [
{ {
...@@ -561,13 +561,13 @@ module API ...@@ -561,13 +561,13 @@ module API
required: true, required: true,
name: :project_url, name: :project_url,
type: String, type: String,
desc: 'Jenkins project URL like http://jenkins.example.com/job/my-project/', desc: 'Jenkins project URL like http://jenkins.example.com/job/my-project/'
}, },
{ {
required: false, required: false,
name: :pass_unstable, name: :pass_unstable,
type: Boolean, type: Boolean,
desc: 'Multi-project setup enabled?', desc: 'Multi-project setup enabled?'
}, },
{ {
required: false, required: false,
...@@ -625,7 +625,7 @@ module API ...@@ -625,7 +625,7 @@ module API
service_classes += [ service_classes += [
MockCiService, MockCiService,
MockDeploymentService, MockDeploymentService,
MockMonitoringService, MockMonitoringService
] ]
end end
......
...@@ -5,7 +5,7 @@ module API ...@@ -5,7 +5,7 @@ module API
subscribable_types = { subscribable_types = {
'merge_requests' => proc { |id| find_merge_request_with_access(id, :update_merge_request) }, 'merge_requests' => proc { |id| find_merge_request_with_access(id, :update_merge_request) },
'issues' => proc { |id| find_project_issue(id) }, 'issues' => proc { |id| find_project_issue(id) },
'labels' => proc { |id| find_project_label(id) }, 'labels' => proc { |id| find_project_label(id) }
} }
params do params do
......
...@@ -376,7 +376,7 @@ module API ...@@ -376,7 +376,7 @@ module API
name: :ca_pem, name: :ca_pem,
type: String, type: String,
desc: 'A custom certificate authority bundle to verify the Kubernetes cluster with (PEM format)' desc: 'A custom certificate authority bundle to verify the Kubernetes cluster with (PEM format)'
}, }
], ],
'mattermost-slash-commands' => [ 'mattermost-slash-commands' => [
{ {
...@@ -572,13 +572,13 @@ module API ...@@ -572,13 +572,13 @@ module API
required: true, required: true,
name: :project_url, name: :project_url,
type: String, type: String,
desc: 'Jenkins project URL like http://jenkins.example.com/job/my-project/', desc: 'Jenkins project URL like http://jenkins.example.com/job/my-project/'
}, },
{ {
required: false, required: false,
name: :pass_unstable, name: :pass_unstable,
type: Boolean, type: Boolean,
desc: 'Multi-project setup enabled?', desc: 'Multi-project setup enabled?'
}, },
{ {
required: false, required: false,
......
...@@ -7,7 +7,7 @@ module API ...@@ -7,7 +7,7 @@ module API
'merge_request' => proc { |id| find_merge_request_with_access(id, :update_merge_request) }, 'merge_request' => proc { |id| find_merge_request_with_access(id, :update_merge_request) },
'merge_requests' => proc { |id| find_merge_request_with_access(id, :update_merge_request) }, 'merge_requests' => proc { |id| find_merge_request_with_access(id, :update_merge_request) },
'issues' => proc { |id| find_project_issue(id) }, 'issues' => proc { |id| find_project_issue(id) },
'labels' => proc { |id| find_project_label(id) }, 'labels' => proc { |id| find_project_label(id) }
} }
params do params do
......
...@@ -20,7 +20,7 @@ module Ci ...@@ -20,7 +20,7 @@ module Ci
italic: 0x02, italic: 0x02,
underline: 0x04, underline: 0x04,
conceal: 0x08, conceal: 0x08,
cross: 0x10, cross: 0x10
}.freeze }.freeze
def self.convert(ansi, state = nil) def self.convert(ansi, state = nil)
......
...@@ -70,7 +70,7 @@ module Ci ...@@ -70,7 +70,7 @@ module Ci
cache: job[:cache], cache: job[:cache],
dependencies: job[:dependencies], dependencies: job[:dependencies],
after_script: job[:after_script], after_script: job[:after_script],
environment: job[:environment], environment: job[:environment]
}.compact }.compact
} }
end end
......
...@@ -53,7 +53,7 @@ module Elasticsearch ...@@ -53,7 +53,7 @@ module Elasticsearch
path_tokenizer: { path_tokenizer: {
type: 'path_hierarchy', type: 'path_hierarchy',
reverse: true reverse: true
}, }
}, },
filter: { filter: {
code: { code: {
...@@ -72,7 +72,7 @@ module Elasticsearch ...@@ -72,7 +72,7 @@ module Elasticsearch
". => ' '" ". => ' '"
] ]
} }
}, }
} }
} }
end end
......
...@@ -222,12 +222,12 @@ module Elasticsearch ...@@ -222,12 +222,12 @@ module Elasticsearch
author: { author: {
name: encode!(author[:name]), name: encode!(author[:name]),
email: encode!(author[:email]), email: encode!(author[:email]),
time: author[:time].strftime('%Y%m%dT%H%M%S%z'), time: author[:time].strftime('%Y%m%dT%H%M%S%z')
}, },
committer: { committer: {
name: encode!(committer[:name]), name: encode!(committer[:name]),
email: encode!(committer[:email]), email: encode!(committer[:email]),
time: committer[:time].strftime('%Y%m%dT%H%M%S%z'), time: committer[:time].strftime('%Y%m%dT%H%M%S%z')
}, },
message: encode!(commit.message) message: encode!(commit.message)
} }
...@@ -515,7 +515,7 @@ module Elasticsearch ...@@ -515,7 +515,7 @@ module Elasticsearch
order: "score", order: "score",
fields: { fields: {
"blob.content" => {}, "blob.content" => {},
"blob.file_name" => {}, "blob.file_name" => {}
} }
} }
end end
...@@ -534,7 +534,7 @@ module Elasticsearch ...@@ -534,7 +534,7 @@ module Elasticsearch
query: { query: {
fuzzy: { fuzzy: {
'repository.blob.path' => { value: query } 'repository.blob.path' => { value: query }
}, }
}, },
filter: { filter: {
term: { term: {
......
...@@ -32,7 +32,7 @@ module Gitlab ...@@ -32,7 +32,7 @@ module Gitlab
"Guest" => GUEST, "Guest" => GUEST,
"Reporter" => REPORTER, "Reporter" => REPORTER,
"Developer" => DEVELOPER, "Developer" => DEVELOPER,
"Master" => MASTER, "Master" => MASTER
} }
end end
...@@ -47,7 +47,7 @@ module Gitlab ...@@ -47,7 +47,7 @@ module Gitlab
guest: GUEST, guest: GUEST,
reporter: REPORTER, reporter: REPORTER,
developer: DEVELOPER, developer: DEVELOPER,
master: MASTER, master: MASTER
} }
end end
...@@ -60,7 +60,7 @@ module Gitlab ...@@ -60,7 +60,7 @@ module Gitlab
"Not protected: Both developers and masters can push new commits, force push, or delete the branch." => PROTECTION_NONE, "Not protected: Both developers and masters can push new commits, force push, or delete the branch." => PROTECTION_NONE,
"Protected against pushes: Developers cannot push new commits, but are allowed to accept merge requests to the branch." => PROTECTION_DEV_CAN_MERGE, "Protected against pushes: Developers cannot push new commits, but are allowed to accept merge requests to the branch." => PROTECTION_DEV_CAN_MERGE,
"Partially protected: Developers can push new commits, but cannot force push or delete the branch. Masters can do all of those." => PROTECTION_DEV_CAN_PUSH, "Partially protected: Developers can push new commits, but cannot force push or delete the branch. Masters can do all of those." => PROTECTION_DEV_CAN_PUSH,
"Fully protected: Developers cannot push new commits, force push, or delete the branch. Only masters can do any of those." => PROTECTION_FULL, "Fully protected: Developers cannot push new commits, force push, or delete the branch. Only masters can do any of those." => PROTECTION_FULL
} }
end end
......
...@@ -5,7 +5,7 @@ module Gitlab ...@@ -5,7 +5,7 @@ module Gitlab
Gitlab::ChatCommands::IssueShow, Gitlab::ChatCommands::IssueShow,
Gitlab::ChatCommands::IssueNew, Gitlab::ChatCommands::IssueNew,
Gitlab::ChatCommands::IssueSearch, Gitlab::ChatCommands::IssueSearch,
Gitlab::ChatCommands::Deploy, Gitlab::ChatCommands::Deploy
].freeze ].freeze
def execute def execute
......
...@@ -7,7 +7,7 @@ module Gitlab ...@@ -7,7 +7,7 @@ module Gitlab
test: :read_build, test: :read_build,
review: :read_merge_request, review: :read_merge_request,
staging: :read_build, staging: :read_build,
production: :read_issue, production: :read_issue
}.freeze }.freeze
def self.get(*args) def self.get(*args)
......
...@@ -36,7 +36,7 @@ module Gitlab ...@@ -36,7 +36,7 @@ module Gitlab
user: { user: {
id: user.try(:id), id: user.try(:id),
name: user.try(:name), name: user.try(:name),
email: user.try(:email), email: user.try(:email)
}, },
commit: { commit: {
...@@ -49,7 +49,7 @@ module Gitlab ...@@ -49,7 +49,7 @@ module Gitlab
status: commit.status, status: commit.status,
duration: commit.duration, duration: commit.duration,
started_at: commit.started_at, started_at: commit.started_at,
finished_at: commit.finished_at, finished_at: commit.finished_at
}, },
repository: { repository: {
...@@ -60,7 +60,7 @@ module Gitlab ...@@ -60,7 +60,7 @@ module Gitlab
git_http_url: project.http_url_to_repo, git_http_url: project.http_url_to_repo,
git_ssh_url: project.ssh_url_to_repo, git_ssh_url: project.ssh_url_to_repo,
visibility_level: project.visibility_level visibility_level: project.visibility_level
}, }
} }
data data
......
...@@ -11,7 +11,7 @@ module Gitlab ...@@ -11,7 +11,7 @@ module Gitlab
EE::ServiceDeskHandler, EE::ServiceDeskHandler,
UnsubscribeHandler, UnsubscribeHandler,
CreateNoteHandler, CreateNoteHandler,
CreateIssueHandler, CreateIssueHandler
].freeze ].freeze
def self.for(mail, mail_key) def self.for(mail, mail_key)
......
...@@ -258,7 +258,7 @@ module Gitlab ...@@ -258,7 +258,7 @@ module Gitlab
'RepoPath' => path, 'RepoPath' => path,
'ArchivePrefix' => prefix, 'ArchivePrefix' => prefix,
'ArchivePath' => archive_file_path(prefix, storage_path, format), 'ArchivePath' => archive_file_path(prefix, storage_path, format),
'CommitId' => commit.id, 'CommitId' => commit.id
} }
end end
......
...@@ -38,7 +38,7 @@ module Gitlab ...@@ -38,7 +38,7 @@ module Gitlab
url: container_exec_url(api_url, namespace, pod_name, container["name"]), url: container_exec_url(api_url, namespace, pod_name, container["name"]),
subprotocols: ['channel.k8s.io'], subprotocols: ['channel.k8s.io'],
headers: Hash.new { |h, k| h[k] = [] }, headers: Hash.new { |h, k| h[k] = [] },
created_at: created_at, created_at: created_at
} }
end end
end end
...@@ -64,7 +64,7 @@ module Gitlab ...@@ -64,7 +64,7 @@ module Gitlab
tty: true, tty: true,
stdin: true, stdin: true,
stdout: true, stdout: true,
stderr: true, stderr: true
}.to_query + '&' + EXEC_COMMAND }.to_query + '&' + EXEC_COMMAND
case url.scheme case url.scheme
......
...@@ -17,7 +17,7 @@ module Gitlab ...@@ -17,7 +17,7 @@ module Gitlab
THREE => "0 */3 * * *", THREE => "0 */3 * * *",
SIX => "0 */6 * * *", SIX => "0 */6 * * *",
TWELVE => "0 */12 * * *", TWELVE => "0 */12 * * *",
DAILY => "0 0 * * *", DAILY => "0 0 * * *"
}.freeze }.freeze
SYNC_TIME_OPTIONS = { SYNC_TIME_OPTIONS = {
...@@ -26,7 +26,7 @@ module Gitlab ...@@ -26,7 +26,7 @@ module Gitlab
"Update every three hours" => THREE, "Update every three hours" => THREE,
"Update every six hours" => SIX, "Update every six hours" => SIX,
"Update every twelve hours" => TWELVE, "Update every twelve hours" => TWELVE,
"Update every day" => DAILY, "Update every day" => DAILY
}.freeze }.freeze
class << self class << self
......
...@@ -22,7 +22,7 @@ module Gitlab ...@@ -22,7 +22,7 @@ module Gitlab
params = { params = {
GL_ID: Gitlab::GlId.gl_id(user), GL_ID: Gitlab::GlId.gl_id(user),
GL_REPOSITORY: Gitlab::GlRepository.gl_repository(project, is_wiki), GL_REPOSITORY: Gitlab::GlRepository.gl_repository(project, is_wiki),
RepoPath: repo_path, RepoPath: repo_path
} }
if Gitlab.config.gitaly.enabled if Gitlab.config.gitaly.enabled
...@@ -51,7 +51,7 @@ module Gitlab ...@@ -51,7 +51,7 @@ module Gitlab
{ {
StoreLFSPath: "#{Gitlab.config.lfs.storage_path}/tmp/upload", StoreLFSPath: "#{Gitlab.config.lfs.storage_path}/tmp/upload",
LfsOid: oid, LfsOid: oid,
LfsSize: size, LfsSize: size
} }
end end
...@@ -62,7 +62,7 @@ module Gitlab ...@@ -62,7 +62,7 @@ module Gitlab
def send_git_blob(repository, blob) def send_git_blob(repository, blob)
params = { params = {
'RepoPath' => repository.path_to_repo, 'RepoPath' => repository.path_to_repo,
'BlobId' => blob.id, 'BlobId' => blob.id
} }
[ [
...@@ -127,7 +127,7 @@ module Gitlab ...@@ -127,7 +127,7 @@ module Gitlab
'Subprotocols' => terminal[:subprotocols], 'Subprotocols' => terminal[:subprotocols],
'Url' => terminal[:url], 'Url' => terminal[:url],
'Header' => terminal[:headers], 'Header' => terminal[:headers],
'MaxSessionTime' => terminal[:max_session_time], 'MaxSessionTime' => terminal[:max_session_time]
} }
} }
details['Terminal']['CAPem'] = terminal[:ca_pem] if terminal.has_key?(:ca_pem) details['Terminal']['CAPem'] = terminal[:ca_pem] if terminal.has_key?(:ca_pem)
......
...@@ -21,7 +21,7 @@ namespace :gemojione do ...@@ -21,7 +21,7 @@ namespace :gemojione do
moji: emoji_hash['moji'], moji: emoji_hash['moji'],
description: emoji_hash['description'], description: emoji_hash['description'],
unicodeVersion: Gitlab::Emoji.emoji_unicode_version(name), unicodeVersion: Gitlab::Emoji.emoji_unicode_version(name),
digest: hash_digest, digest: hash_digest
} }
resultant_emoji_map[name] = entry resultant_emoji_map[name] = entry
......
...@@ -64,7 +64,7 @@ namespace :gitlab do ...@@ -64,7 +64,7 @@ namespace :gitlab do
"MergeRequest" => "index_merge_requests", "MergeRequest" => "index_merge_requests",
"Snippet" => "index_snippets", "Snippet" => "index_snippets",
"Note" => "index_notes", "Note" => "index_notes",
"Milestone" => "index_milestones", "Milestone" => "index_milestones"
}.freeze }.freeze
INDEXABLE_CLASSES.each do |klass_name, task_name| INDEXABLE_CLASSES.each do |klass_name, task_name|
......
...@@ -49,7 +49,7 @@ namespace :gitlab do ...@@ -49,7 +49,7 @@ namespace :gitlab do
Template.new( Template.new(
"https://gitlab.com/gitlab-org/Dockerfile.git", "https://gitlab.com/gitlab-org/Dockerfile.git",
/(\.{1,2}|LICENSE|CONTRIBUTING.md|\.Dockerfile)\z/ /(\.{1,2}|LICENSE|CONTRIBUTING.md|\.Dockerfile)\z/
), )
].freeze ].freeze
def vendor_directory def vendor_directory
......
...@@ -60,7 +60,7 @@ desc "GitLab | Run specs" ...@@ -60,7 +60,7 @@ desc "GitLab | Run specs"
task :spec do task :spec do
cmds = [ cmds = [
%w(rake gitlab:setup), %w(rake gitlab:setup),
%w(rspec spec), %w(rspec spec)
] ]
run_commands(cmds) run_commands(cmds)
end end
......
...@@ -23,7 +23,7 @@ describe Groups::HooksController do ...@@ -23,7 +23,7 @@ describe Groups::HooksController do
tag_push_events: true, tag_push_events: true,
token: "TEST TOKEN", token: "TEST TOKEN",
url: "http://example.com", url: "http://example.com",
wiki_page_events: true, wiki_page_events: true
} }
post :create, group_id: group.to_param, hook: hook_params post :create, group_id: group.to_param, hook: hook_params
......
...@@ -22,7 +22,7 @@ FactoryGirl.define do ...@@ -22,7 +22,7 @@ FactoryGirl.define do
properties({ properties({
namespace: 'somepath', namespace: 'somepath',
api_url: 'https://kubernetes.example.com', api_url: 'https://kubernetes.example.com',
token: 'a' * 40, token: 'a' * 40
}) })
end end
......
...@@ -10,7 +10,7 @@ describe 'Auto deploy' do ...@@ -10,7 +10,7 @@ describe 'Auto deploy' do
properties: { properties: {
namespace: project.path, namespace: project.path,
api_url: 'https://kubernetes.example.com', api_url: 'https://kubernetes.example.com',
token: 'a' * 40, token: 'a' * 40
} }
) )
project.team << [user, :master] project.team << [user, :master]
......
...@@ -151,7 +151,7 @@ feature 'Merge request conflict resolution', js: true, feature: true do ...@@ -151,7 +151,7 @@ feature 'Merge request conflict resolution', js: true, feature: true do
'conflict-too-large' => 'when the conflicts contain a large file', 'conflict-too-large' => 'when the conflicts contain a large file',
'conflict-binary-file' => 'when the conflicts contain a binary file', 'conflict-binary-file' => 'when the conflicts contain a binary file',
'conflict-missing-side' => 'when the conflicts contain a file edited in one branch and deleted in another', 'conflict-missing-side' => 'when the conflicts contain a file edited in one branch and deleted in another',
'conflict-non-utf8' => 'when the conflicts contain a non-UTF-8 file', 'conflict-non-utf8' => 'when the conflicts contain a non-UTF-8 file'
}.freeze }.freeze
UNRESOLVABLE_CONFLICTS.each do |source_branch, description| UNRESOLVABLE_CONFLICTS.each do |source_branch, description|
......
...@@ -74,7 +74,7 @@ describe 'Edit Project Settings', feature: true do ...@@ -74,7 +74,7 @@ describe 'Edit Project Settings', feature: true do
issues: namespace_project_issues_path(project.namespace, project), issues: namespace_project_issues_path(project.namespace, project),
wiki: namespace_project_wiki_path(project.namespace, project, :home), wiki: namespace_project_wiki_path(project.namespace, project, :home),
snippets: namespace_project_snippets_path(project.namespace, project), snippets: namespace_project_snippets_path(project.namespace, project),
merge_requests: namespace_project_merge_requests_path(project.namespace, project), merge_requests: namespace_project_merge_requests_path(project.namespace, project)
} }
end end
......
...@@ -225,7 +225,7 @@ module Ci ...@@ -225,7 +225,7 @@ module Ci
before_script: ["pwd"], before_script: ["pwd"],
rspec: { script: "rspec", type: "test", only: %w(master deploy) }, rspec: { script: "rspec", type: "test", only: %w(master deploy) },
staging: { script: "deploy", type: "deploy", only: %w(master deploy) }, staging: { script: "deploy", type: "deploy", only: %w(master deploy) },
production: { script: "deploy", type: "deploy", only: ["master@path", "deploy"] }, production: { script: "deploy", type: "deploy", only: ["master@path", "deploy"] }
}) })
config_processor = GitlabCiYamlProcessor.new(config, 'fork') config_processor = GitlabCiYamlProcessor.new(config, 'fork')
...@@ -381,7 +381,7 @@ module Ci ...@@ -381,7 +381,7 @@ module Ci
before_script: ["pwd"], before_script: ["pwd"],
rspec: { script: "rspec", type: "test", except: ["master", "deploy", "test@fork"] }, rspec: { script: "rspec", type: "test", except: ["master", "deploy", "test@fork"] },
staging: { script: "deploy", type: "deploy", except: ["master"] }, staging: { script: "deploy", type: "deploy", except: ["master"] },
production: { script: "deploy", type: "deploy", except: ["master@fork"] }, production: { script: "deploy", type: "deploy", except: ["master@fork"] }
}) })
config_processor = GitlabCiYamlProcessor.new(config, 'fork') config_processor = GitlabCiYamlProcessor.new(config, 'fork')
...@@ -743,7 +743,7 @@ module Ci ...@@ -743,7 +743,7 @@ module Ci
cache: { paths: ["logs/", "binaries/"], untracked: true, key: 'global' }, cache: { paths: ["logs/", "binaries/"], untracked: true, key: 'global' },
rspec: { rspec: {
script: "rspec", script: "rspec",
cache: { paths: ["test/"], untracked: false, key: 'local' }, cache: { paths: ["test/"], untracked: false, key: 'local' }
} }
}) })
......
...@@ -25,7 +25,7 @@ describe ExpandVariables do ...@@ -25,7 +25,7 @@ describe ExpandVariables do
result: 'keyvalueresult', result: 'keyvalueresult',
variables: [ variables: [
{ key: 'variable', value: 'value' }, { key: 'variable', value: 'value' },
{ key: 'variable2', value: 'result' }, { key: 'variable2', value: 'result' }
] }, ] },
{ value: 'key${variable}${variable2}', { value: 'key${variable}${variable2}',
result: 'keyvalueresult', result: 'keyvalueresult',
...@@ -37,7 +37,7 @@ describe ExpandVariables do ...@@ -37,7 +37,7 @@ describe ExpandVariables do
result: 'keyresultvalue', result: 'keyresultvalue',
variables: [ variables: [
{ key: 'variable', value: 'value' }, { key: 'variable', value: 'value' },
{ key: 'variable2', value: 'result' }, { key: 'variable2', value: 'result' }
] }, ] },
{ value: 'key${variable2}${variable}', { value: 'key${variable2}${variable}',
result: 'keyresultvalue', result: 'keyresultvalue',
...@@ -49,7 +49,7 @@ describe ExpandVariables do ...@@ -49,7 +49,7 @@ describe ExpandVariables do
result: 'review/feature/add-review-apps', result: 'review/feature/add-review-apps',
variables: [ variables: [
{ key: 'CI_COMMIT_REF_NAME', value: 'feature/add-review-apps' } { key: 'CI_COMMIT_REF_NAME', value: 'feature/add-review-apps' }
] }, ] }
] ]
tests.each do |test| tests.each do |test|
......
...@@ -151,7 +151,7 @@ describe Backup::Manager, lib: true do ...@@ -151,7 +151,7 @@ describe Backup::Manager, lib: true do
allow(Dir).to receive(:glob).and_return( allow(Dir).to receive(:glob).and_return(
[ [
'1451606400_2016_01_01_gitlab_backup.tar', '1451606400_2016_01_01_gitlab_backup.tar',
'1451520000_2015_12_31_gitlab_backup.tar', '1451520000_2015_12_31_gitlab_backup.tar'
] ]
) )
end end
......
...@@ -1372,7 +1372,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do ...@@ -1372,7 +1372,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do
nil, nil,
{ old_path: file_name, new_path: file_name, old_line: 5, new_line: 5 }, { old_path: file_name, new_path: file_name, old_line: 5, new_line: 5 },
{ old_path: file_name, old_line: 6 }, { old_path: file_name, old_line: 6 },
{ new_path: file_name, new_line: 7 }, { new_path: file_name, new_line: 7 }
] ]
expect_positions(old_position_attrs, new_position_attrs) expect_positions(old_position_attrs, new_position_attrs)
...@@ -1444,7 +1444,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do ...@@ -1444,7 +1444,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do
nil, nil,
{ old_path: file_name, new_path: file_name, old_line: 5, new_line: 5 }, { old_path: file_name, new_path: file_name, old_line: 5, new_line: 5 },
{ old_path: file_name, old_line: 6 }, { old_path: file_name, old_line: 6 },
{ new_path: file_name, new_line: 7 }, { new_path: file_name, new_line: 7 }
] ]
expect_positions(old_position_attrs, new_position_attrs) expect_positions(old_position_attrs, new_position_attrs)
...@@ -1498,7 +1498,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do ...@@ -1498,7 +1498,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do
{ old_path: file_name, new_path: file_name, old_line: 5, new_line: 4 }, { old_path: file_name, new_path: file_name, old_line: 5, new_line: 4 },
{ old_path: file_name, new_path: file_name, old_line: 6, new_line: 5 }, { old_path: file_name, new_path: file_name, old_line: 6, new_line: 5 },
nil, nil,
{ new_path: file_name, new_line: 6 }, { new_path: file_name, new_line: 6 }
] ]
expect_positions(old_position_attrs, new_position_attrs) expect_positions(old_position_attrs, new_position_attrs)
...@@ -1746,7 +1746,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do ...@@ -1746,7 +1746,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do
{ old_path: file_name, new_path: file_name, old_line: 4, new_line: 5 }, { old_path: file_name, new_path: file_name, old_line: 4, new_line: 5 },
{ old_path: file_name, old_line: 5 }, { old_path: file_name, old_line: 5 },
{ new_path: file_name, new_line: 6 }, { new_path: file_name, new_line: 6 },
{ new_path: file_name, new_line: 7 }, { new_path: file_name, new_line: 7 }
] ]
expect_positions(old_position_attrs, new_position_attrs) expect_positions(old_position_attrs, new_position_attrs)
......
...@@ -23,7 +23,7 @@ describe Gitlab::Elastic::Client do ...@@ -23,7 +23,7 @@ describe Gitlab::Elastic::Client do
aws: true, aws: true,
aws_region: 'us-east-1', aws_region: 'us-east-1',
aws_access_key: '0', aws_access_key: '0',
aws_secret_access_key: '0', aws_secret_access_key: '0'
} }
end end
...@@ -35,7 +35,7 @@ describe Gitlab::Elastic::Client do ...@@ -35,7 +35,7 @@ describe Gitlab::Elastic::Client do
'Authorization' => 'AWS4-HMAC-SHA256 Credential=0/20170303/us-east-1/es/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=4ba2aae19a476152dacf5a2191da67b0cf81b9d7152dab5c42b1bba701da19f1', 'Authorization' => 'AWS4-HMAC-SHA256 Credential=0/20170303/us-east-1/es/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=4ba2aae19a476152dacf5a2191da67b0cf81b9d7152dab5c42b1bba701da19f1',
'Content-Type' => 'application/json', 'Content-Type' => 'application/json',
'X-Amz-Content-Sha256' => 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'X-Amz-Content-Sha256' => 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
'X-Amz-Date' => '20170303T133952Z', 'X-Amz-Date' => '20170303T133952Z'
}) })
.to_return(status: 200, body: [:fake_response]) .to_return(status: 200, body: [:fake_response])
......
...@@ -19,8 +19,8 @@ describe Gitlab::Git::EncodingHelper do ...@@ -19,8 +19,8 @@ describe Gitlab::Git::EncodingHelper do
[ [
'removes invalid bytes from ASCII-8bit encoded multibyte string. This can occur when a git diff match line truncates in the middle of a multibyte character. This occurs after the second word in this example. The test string is as short as we can get while still triggering the error condition when not looking at `detect[:confidence]`.', 'removes invalid bytes from ASCII-8bit encoded multibyte string. This can occur when a git diff match line truncates in the middle of a multibyte character. This occurs after the second word in this example. The test string is as short as we can get while still triggering the error condition when not looking at `detect[:confidence]`.',
"mu ns\xC3\n Lorem ipsum dolor sit amet, consectetur adipisicing ut\xC3\xA0y\xC3\xB9abcd\xC3\xB9efg kia elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non p\n {: .normal_pn}\n \n-Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in\n# *Lorem ipsum\xC3\xB9l\xC3\xB9l\xC3\xA0 dolor\xC3\xB9k\xC3\xB9 sit\xC3\xA8b\xC3\xA8 N\xC3\xA8 amet b\xC3\xA0d\xC3\xAC*\n+# *consectetur\xC3\xB9l\xC3\xB9l\xC3\xA0 adipisicing\xC3\xB9k\xC3\xB9 elit\xC3\xA8b\xC3\xA8 N\xC3\xA8 sed do\xC3\xA0d\xC3\xAC*{: .italic .smcaps}\n \n \xEF\x9B\xA1 eiusmod tempor incididunt, ut\xC3\xAAn\xC3\xB9 labore et dolore. Tw\xC4\x83nj\xC3\xAC magna aliqua. Ut enim ad minim veniam\n {: .normal}\n@@ -9,5 +9,5 @@ quis nostrud\xC3\xAAt\xC3\xB9 exercitiation ullamco laboris m\xC3\xB9s\xC3\xB9k\xC3\xB9abc\xC3\xB9 nisi ".force_encoding('ASCII-8BIT'), "mu ns\xC3\n Lorem ipsum dolor sit amet, consectetur adipisicing ut\xC3\xA0y\xC3\xB9abcd\xC3\xB9efg kia elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non p\n {: .normal_pn}\n \n-Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in\n# *Lorem ipsum\xC3\xB9l\xC3\xB9l\xC3\xA0 dolor\xC3\xB9k\xC3\xB9 sit\xC3\xA8b\xC3\xA8 N\xC3\xA8 amet b\xC3\xA0d\xC3\xAC*\n+# *consectetur\xC3\xB9l\xC3\xB9l\xC3\xA0 adipisicing\xC3\xB9k\xC3\xB9 elit\xC3\xA8b\xC3\xA8 N\xC3\xA8 sed do\xC3\xA0d\xC3\xAC*{: .italic .smcaps}\n \n \xEF\x9B\xA1 eiusmod tempor incididunt, ut\xC3\xAAn\xC3\xB9 labore et dolore. Tw\xC4\x83nj\xC3\xAC magna aliqua. Ut enim ad minim veniam\n {: .normal}\n@@ -9,5 +9,5 @@ quis nostrud\xC3\xAAt\xC3\xB9 exercitiation ullamco laboris m\xC3\xB9s\xC3\xB9k\xC3\xB9abc\xC3\xB9 nisi ".force_encoding('ASCII-8BIT'),
"mu ns\n Lorem ipsum dolor sit amet, consectetur adipisicing ut\xC3\xA0y\xC3\xB9abcd\xC3\xB9efg kia elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non p\n {: .normal_pn}\n \n-Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in\n# *Lorem ipsum\xC3\xB9l\xC3\xB9l\xC3\xA0 dolor\xC3\xB9k\xC3\xB9 sit\xC3\xA8b\xC3\xA8 N\xC3\xA8 amet b\xC3\xA0d\xC3\xAC*\n+# *consectetur\xC3\xB9l\xC3\xB9l\xC3\xA0 adipisicing\xC3\xB9k\xC3\xB9 elit\xC3\xA8b\xC3\xA8 N\xC3\xA8 sed do\xC3\xA0d\xC3\xAC*{: .italic .smcaps}\n \n \xEF\x9B\xA1 eiusmod tempor incididunt, ut\xC3\xAAn\xC3\xB9 labore et dolore. Tw\xC4\x83nj\xC3\xAC magna aliqua. Ut enim ad minim veniam\n {: .normal}\n@@ -9,5 +9,5 @@ quis nostrud\xC3\xAAt\xC3\xB9 exercitiation ullamco laboris m\xC3\xB9s\xC3\xB9k\xC3\xB9abc\xC3\xB9 nisi ", "mu ns\n Lorem ipsum dolor sit amet, consectetur adipisicing ut\xC3\xA0y\xC3\xB9abcd\xC3\xB9efg kia elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non p\n {: .normal_pn}\n \n-Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in\n# *Lorem ipsum\xC3\xB9l\xC3\xB9l\xC3\xA0 dolor\xC3\xB9k\xC3\xB9 sit\xC3\xA8b\xC3\xA8 N\xC3\xA8 amet b\xC3\xA0d\xC3\xAC*\n+# *consectetur\xC3\xB9l\xC3\xB9l\xC3\xA0 adipisicing\xC3\xB9k\xC3\xB9 elit\xC3\xA8b\xC3\xA8 N\xC3\xA8 sed do\xC3\xA0d\xC3\xAC*{: .italic .smcaps}\n \n \xEF\x9B\xA1 eiusmod tempor incididunt, ut\xC3\xAAn\xC3\xB9 labore et dolore. Tw\xC4\x83nj\xC3\xAC magna aliqua. Ut enim ad minim veniam\n {: .normal}\n@@ -9,5 +9,5 @@ quis nostrud\xC3\xAAt\xC3\xB9 exercitiation ullamco laboris m\xC3\xB9s\xC3\xB9k\xC3\xB9abc\xC3\xB9 nisi "
], ]
].each do |description, test_string, xpect| ].each do |description, test_string, xpect|
it description do it description do
expect(ext_class.encode!(test_string)).to eq(xpect) expect(ext_class.encode!(test_string)).to eq(xpect)
...@@ -37,18 +37,18 @@ describe Gitlab::Git::EncodingHelper do ...@@ -37,18 +37,18 @@ describe Gitlab::Git::EncodingHelper do
[ [
"encodes valid utf8 encoded string to utf8", "encodes valid utf8 encoded string to utf8",
"λ, λ, λ".encode("UTF-8"), "λ, λ, λ".encode("UTF-8"),
"λ, λ, λ".encode("UTF-8"), "λ, λ, λ".encode("UTF-8")
], ],
[ [
"encodes valid ASCII-8BIT encoded string to utf8", "encodes valid ASCII-8BIT encoded string to utf8",
"ascii only".encode("ASCII-8BIT"), "ascii only".encode("ASCII-8BIT"),
"ascii only".encode("UTF-8"), "ascii only".encode("UTF-8")
], ],
[ [
"encodes valid ISO-8859-1 encoded string to utf8", "encodes valid ISO-8859-1 encoded string to utf8",
"Rüby ist eine Programmiersprache. Wir verlängern den text damit ICU die Sprache erkennen kann.".encode("ISO-8859-1", "UTF-8"), "Rüby ist eine Programmiersprache. Wir verlängern den text damit ICU die Sprache erkennen kann.".encode("ISO-8859-1", "UTF-8"),
"Rüby ist eine Programmiersprache. Wir verlängern den text damit ICU die Sprache erkennen kann.".encode("UTF-8"), "Rüby ist eine Programmiersprache. Wir verlängern den text damit ICU die Sprache erkennen kann.".encode("UTF-8")
], ]
].each do |description, test_string, xpect| ].each do |description, test_string, xpect|
it description do it description do
r = ext_class.encode_utf8(test_string.force_encoding('UTF-8')) r = ext_class.encode_utf8(test_string.force_encoding('UTF-8'))
...@@ -77,8 +77,8 @@ describe Gitlab::Git::EncodingHelper do ...@@ -77,8 +77,8 @@ describe Gitlab::Git::EncodingHelper do
[ [
'removes invalid bytes from ASCII-8bit encoded multibyte string.', 'removes invalid bytes from ASCII-8bit encoded multibyte string.',
"Lorem ipsum\xC3\n dolor sit amet, xy\xC3\xA0y\xC3\xB9abcd\xC3\xB9efg".force_encoding('ASCII-8BIT'), "Lorem ipsum\xC3\n dolor sit amet, xy\xC3\xA0y\xC3\xB9abcd\xC3\xB9efg".force_encoding('ASCII-8BIT'),
"Lorem ipsum\n dolor sit amet, xyàyùabcdùefg", "Lorem ipsum\n dolor sit amet, xyàyùabcdùefg"
], ]
].each do |description, test_string, xpect| ].each do |description, test_string, xpect|
it description do it description do
expect(ext_class.encode!(test_string)).to eq(xpect) expect(ext_class.encode!(test_string)).to eq(xpect)
......
...@@ -6,7 +6,7 @@ describe Gitlab::Git::Util do ...@@ -6,7 +6,7 @@ describe Gitlab::Git::Util do
["", 0], ["", 0],
["foo", 1], ["foo", 1],
["foo\n", 1], ["foo\n", 1],
["foo\n\n", 2], ["foo\n\n", 2]
].each do |string, line_count| ].each do |string, line_count|
it "counts #{line_count} lines in #{string.inspect}" do it "counts #{line_count} lines in #{string.inspect}" do
expect(described_class.count_lines(string)).to eq(line_count) expect(described_class.count_lines(string)).to eq(line_count)
......
...@@ -95,7 +95,7 @@ describe Gitlab::ImportExport::RelationFactory, lib: true do ...@@ -95,7 +95,7 @@ describe Gitlab::ImportExport::RelationFactory, lib: true do
'random_id' => 99, 'random_id' => 99,
'milestone_id' => 99, 'milestone_id' => 99,
'project_id' => 99, 'project_id' => 99,
'user_id' => 99, 'user_id' => 99
} }
end end
......
...@@ -68,7 +68,7 @@ describe Gitlab::Kubernetes::Deployment do ...@@ -68,7 +68,7 @@ describe Gitlab::Kubernetes::Deployment do
{ status: 'waiting', tooltip: 'unknown (pod 0) Waiting', track: 'stable', stable: true }, { status: 'waiting', tooltip: 'unknown (pod 0) Waiting', track: 'stable', stable: true },
{ status: 'waiting', tooltip: 'unknown (pod 1) Waiting', track: 'stable', stable: true }, { status: 'waiting', tooltip: 'unknown (pod 1) Waiting', track: 'stable', stable: true },
{ status: 'waiting', tooltip: 'unknown (pod 2) Waiting', track: 'stable', stable: true }, { status: 'waiting', tooltip: 'unknown (pod 2) Waiting', track: 'stable', stable: true },
{ status: 'waiting', tooltip: 'unknown (pod 3) Waiting', track: 'stable', stable: true }, { status: 'waiting', tooltip: 'unknown (pod 3) Waiting', track: 'stable', stable: true }
] ]
expect(deployment.instances).to eq(expected) expect(deployment.instances).to eq(expected)
...@@ -83,7 +83,7 @@ describe Gitlab::Kubernetes::Deployment do ...@@ -83,7 +83,7 @@ describe Gitlab::Kubernetes::Deployment do
{ status: 'waiting', tooltip: 'foo (pod 0) Waiting', track: 'stable', stable: true }, { status: 'waiting', tooltip: 'foo (pod 0) Waiting', track: 'stable', stable: true },
{ status: 'waiting', tooltip: 'foo (pod 1) Waiting', track: 'stable', stable: true }, { status: 'waiting', tooltip: 'foo (pod 1) Waiting', track: 'stable', stable: true },
{ status: 'waiting', tooltip: 'foo (pod 2) Waiting', track: 'stable', stable: true }, { status: 'waiting', tooltip: 'foo (pod 2) Waiting', track: 'stable', stable: true },
{ status: 'waiting', tooltip: 'foo (pod 3) Waiting', track: 'stable', stable: true }, { status: 'waiting', tooltip: 'foo (pod 3) Waiting', track: 'stable', stable: true }
] ]
expect(deployment.instances).to eq(expected) expect(deployment.instances).to eq(expected)
...@@ -98,7 +98,7 @@ describe Gitlab::Kubernetes::Deployment do ...@@ -98,7 +98,7 @@ describe Gitlab::Kubernetes::Deployment do
{ status: 'finished', tooltip: 'foo (pod 0) Finished', track: 'stable', stable: true }, { status: 'finished', tooltip: 'foo (pod 0) Finished', track: 'stable', stable: true },
{ status: 'deploying', tooltip: 'foo (pod 1) Deploying', track: 'stable', stable: true }, { status: 'deploying', tooltip: 'foo (pod 1) Deploying', track: 'stable', stable: true },
{ status: 'waiting', tooltip: 'foo (pod 2) Waiting', track: 'stable', stable: true }, { status: 'waiting', tooltip: 'foo (pod 2) Waiting', track: 'stable', stable: true },
{ status: 'waiting', tooltip: 'foo (pod 3) Waiting', track: 'stable', stable: true }, { status: 'waiting', tooltip: 'foo (pod 3) Waiting', track: 'stable', stable: true }
] ]
expect(deployment.instances).to eq(expected) expect(deployment.instances).to eq(expected)
...@@ -114,7 +114,7 @@ describe Gitlab::Kubernetes::Deployment do ...@@ -114,7 +114,7 @@ describe Gitlab::Kubernetes::Deployment do
it 'returns all instances' do it 'returns all instances' do
expected = [ expected = [
{ status: 'waiting', tooltip: 'foo (pod 0) Waiting', track: 'stable', stable: true }, { status: 'waiting', tooltip: 'foo (pod 0) Waiting', track: 'stable', stable: true }
] ]
expect(deployment.instances).to eq(expected) expect(deployment.instances).to eq(expected)
...@@ -126,7 +126,7 @@ describe Gitlab::Kubernetes::Deployment do ...@@ -126,7 +126,7 @@ describe Gitlab::Kubernetes::Deployment do
it 'returns all instances' do it 'returns all instances' do
expected = [ expected = [
{ status: 'waiting', tooltip: 'foo (pod 0) Waiting', track: 'canary', stable: false }, { status: 'waiting', tooltip: 'foo (pod 0) Waiting', track: 'canary', stable: false }
] ]
expect(deployment.instances).to eq(expected) expect(deployment.instances).to eq(expected)
......
...@@ -41,7 +41,7 @@ describe Gitlab::Kubernetes::RolloutStatus do ...@@ -41,7 +41,7 @@ describe Gitlab::Kubernetes::RolloutStatus do
{ status: 'finished', tooltip: 'one (pod 2) Finished', track: 'stable', stable: true }, { status: 'finished', tooltip: 'one (pod 2) Finished', track: 'stable', stable: true },
{ status: 'finished', tooltip: 'two (pod 0) Finished', track: 'stable', stable: true }, { status: 'finished', tooltip: 'two (pod 0) Finished', track: 'stable', stable: true },
{ status: 'finished', tooltip: 'two (pod 1) Finished', track: 'stable', stable: true }, { status: 'finished', tooltip: 'two (pod 1) Finished', track: 'stable', stable: true },
{ status: 'finished', tooltip: 'two (pod 2) Finished', track: 'stable', stable: true }, { status: 'finished', tooltip: 'two (pod 2) Finished', track: 'stable', stable: true }
] ]
expect(rollout_status.instances).to eq(expected) expect(rollout_status.instances).to eq(expected)
...@@ -58,7 +58,7 @@ describe Gitlab::Kubernetes::RolloutStatus do ...@@ -58,7 +58,7 @@ describe Gitlab::Kubernetes::RolloutStatus do
{ status: 'finished', tooltip: 'two (pod 2) Finished', track: 'canary', stable: false }, { status: 'finished', tooltip: 'two (pod 2) Finished', track: 'canary', stable: false },
{ status: 'finished', tooltip: 'one (pod 0) Finished', track: 'stable', stable: true }, { status: 'finished', tooltip: 'one (pod 0) Finished', track: 'stable', stable: true },
{ status: 'finished', tooltip: 'one (pod 1) Finished', track: 'stable', stable: true }, { status: 'finished', tooltip: 'one (pod 1) Finished', track: 'stable', stable: true },
{ status: 'finished', tooltip: 'one (pod 2) Finished', track: 'stable', stable: true }, { status: 'finished', tooltip: 'one (pod 2) Finished', track: 'stable', stable: true }
] ]
expect(rollout_status.instances).to eq(expected) expect(rollout_status.instances).to eq(expected)
......
...@@ -29,7 +29,7 @@ describe ::Gitlab::RepoPath do ...@@ -29,7 +29,7 @@ describe ::Gitlab::RepoPath do
before do before do
allow(Gitlab.config.repositories).to receive(:storages).and_return({ allow(Gitlab.config.repositories).to receive(:storages).and_return({
'storage1' => { 'path' => '/foo' }, 'storage1' => { 'path' => '/foo' },
'storage2' => { 'path' => '/bar' }, 'storage2' => { 'path' => '/bar' }
}) })
end end
......
...@@ -202,7 +202,7 @@ describe Gitlab::Workhorse, lib: true do ...@@ -202,7 +202,7 @@ describe Gitlab::Workhorse, lib: true do
context 'when Gitaly is enabled' do context 'when Gitaly is enabled' do
let(:gitaly_params) do let(:gitaly_params) do
{ {
GitalyAddress: Gitlab::GitalyClient.get_address('default'), GitalyAddress: Gitlab::GitalyClient.get_address('default')
} }
end end
...@@ -214,7 +214,7 @@ describe Gitlab::Workhorse, lib: true do ...@@ -214,7 +214,7 @@ describe Gitlab::Workhorse, lib: true do
repo_param = { Repository: { repo_param = { Repository: {
path: repo_path, path: repo_path,
storage_name: 'default', storage_name: 'default',
relative_path: project.full_path + '.git', relative_path: project.full_path + '.git'
} } } }
expect(subject).to include(repo_param) expect(subject).to include(repo_param)
......
...@@ -140,7 +140,7 @@ describe ApplicationSetting, models: true do ...@@ -140,7 +140,7 @@ describe ApplicationSetting, models: true do
storages = { storages = {
'custom1' => 'tmp/tests/custom_repositories_1', 'custom1' => 'tmp/tests/custom_repositories_1',
'custom2' => 'tmp/tests/custom_repositories_2', 'custom2' => 'tmp/tests/custom_repositories_2',
'custom3' => 'tmp/tests/custom_repositories_3', 'custom3' => 'tmp/tests/custom_repositories_3'
} }
allow(Gitlab.config.repositories).to receive(:storages).and_return(storages) allow(Gitlab.config.repositories).to receive(:storages).and_return(storages)
......
...@@ -986,7 +986,7 @@ describe Ci::Build, :models do ...@@ -986,7 +986,7 @@ describe Ci::Build, :models do
'fix-1-foo' => 'fix-1-foo', 'fix-1-foo' => 'fix-1-foo',
'a' * 63 => 'a' * 63, 'a' * 63 => 'a' * 63,
'a' * 64 => 'a' * 63, 'a' * 64 => 'a' * 63,
'FOO' => 'foo', 'FOO' => 'foo'
}.each do |ref, slug| }.each do |ref, slug|
it "transforms #{ref} to #{slug}" do it "transforms #{ref} to #{slug}" do
build.ref = ref build.ref = ref
...@@ -1158,7 +1158,7 @@ describe Ci::Build, :models do ...@@ -1158,7 +1158,7 @@ describe Ci::Build, :models do
{ key: 'CI_PIPELINE_ID', value: pipeline.id.to_s, public: true }, { key: 'CI_PIPELINE_ID', value: pipeline.id.to_s, public: true },
{ key: 'CI_REGISTRY_USER', value: 'gitlab-ci-token', public: true }, { key: 'CI_REGISTRY_USER', value: 'gitlab-ci-token', public: true },
{ key: 'CI_REGISTRY_PASSWORD', value: build.token, public: false }, { key: 'CI_REGISTRY_PASSWORD', value: build.token, public: false },
{ key: 'CI_REPOSITORY_URL', value: build.repo_url, public: false }, { key: 'CI_REPOSITORY_URL', value: build.repo_url, public: false }
] ]
end end
......
...@@ -493,7 +493,7 @@ describe Environment, models: true do ...@@ -493,7 +493,7 @@ describe Environment, models: true do
"foo**bar" => "foo-bar" + SUFFIX, "foo**bar" => "foo-bar" + SUFFIX,
"*-foo" => "env-foo" + SUFFIX, "*-foo" => "env-foo" + SUFFIX,
"staging-12345678-" => "staging-12345678" + SUFFIX, "staging-12345678-" => "staging-12345678" + SUFFIX,
"staging-12345678-01234567" => "staging-12345678" + SUFFIX, "staging-12345678-01234567" => "staging-12345678" + SUFFIX
}.each do |name, matcher| }.each do |name, matcher|
it "returns a slug matching #{matcher}, given #{name}" do it "returns a slug matching #{matcher}, given #{name}" do
slug = described_class.new(name: name).generate_slug slug = described_class.new(name: name).generate_slug
......
...@@ -137,7 +137,7 @@ describe GlobalMilestone, models: true do ...@@ -137,7 +137,7 @@ describe GlobalMilestone, models: true do
[ [
milestone1_project1, milestone1_project1,
milestone1_project2, milestone1_project2,
milestone1_project3, milestone1_project3
] ]
milestones_relation = Milestone.where(id: milestones.map(&:id)) milestones_relation = Milestone.where(id: milestones.map(&:id))
......
...@@ -16,7 +16,7 @@ describe ProjectAuthorization do ...@@ -16,7 +16,7 @@ describe ProjectAuthorization do
it 'inserts rows in batches' do it 'inserts rows in batches' do
described_class.insert_authorizations([ described_class.insert_authorizations([
[user.id, project1.id, Gitlab::Access::MASTER], [user.id, project1.id, Gitlab::Access::MASTER],
[user.id, project2.id, Gitlab::Access::MASTER], [user.id, project2.id, Gitlab::Access::MASTER]
], 1) ], 1)
expect(user.project_authorizations.count).to eq(2) expect(user.project_authorizations.count).to eq(2)
......
...@@ -28,7 +28,7 @@ describe AsanaService, models: true do ...@@ -28,7 +28,7 @@ describe AsanaService, models: true do
commits: messages.map do |m| commits: messages.map do |m|
{ {
message: m, message: m,
url: 'https://gitlab.com/', url: 'https://gitlab.com/'
} }
end end
} }
......
...@@ -48,7 +48,7 @@ describe ChatMessage::IssueMessage, models: true do ...@@ -48,7 +48,7 @@ describe ChatMessage::IssueMessage, models: true do
title: "#100 Issue title", title: "#100 Issue title",
title_link: "http://url.com", title_link: "http://url.com",
text: "issue description", text: "issue description",
color: color, color: color
} }
]) ])
end end
......
...@@ -22,7 +22,7 @@ describe ChatMessage::MergeMessage, models: true do ...@@ -22,7 +22,7 @@ describe ChatMessage::MergeMessage, models: true do
state: 'opened', state: 'opened',
description: 'merge request description', description: 'merge request description',
source_branch: 'source_branch', source_branch: 'source_branch',
target_branch: 'target_branch', target_branch: 'target_branch'
} }
} }
end end
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment