Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-01-07 18:10:38 +00:00
parent 73d39cc50e
commit dec7332357
157 changed files with 760 additions and 168 deletions

View File

@ -2,6 +2,19 @@
documentation](doc/development/changelog.md) for instructions on adding your own
entry.
## 13.7.2 (2021-01-07)
### Security (7 changes)
- Forbid public cache for private repos.
- Deny implicit flow for confidential apps.
- Update NuGet regular expression to protect against ReDoS.
- Fix regular expression backtracking issue in package name validation.
- Fix stealing API token from GitLab Pages and DoS Prometheus through GitLab Pages.
- Update trusted OAuth applications to set them as confidential.
- Upgrade Workhorse to 8.58.2.
## 13.7.1 (2020-12-23)
### Fixed (1 change)
@ -471,6 +484,19 @@ entry.
- Update GitLab Workhorse to v8.57.0.
## 13.6.4 (2021-01-07)
### Security (7 changes)
- Forbid public cache for private repos.
- Deny implicit flow for confidential apps.
- Update NuGet regular expression to protect against ReDoS.
- Fix regular expression backtracking issue in package name validation.
- Upgrade GitLab Pages to 1.30.2.
- Update trusted OAuth applications to set them as confidential.
- Upgrade Workhorse to 8.54.2.
## 13.6.3 (2020-12-10)
### Fixed (5 changes)
@ -1029,6 +1055,19 @@ entry.
- Change wording on the project remove fork page. !47878
## 13.5.6 (2021-01-07)
### Security (7 changes)
- Forbid public cache for private repos.
- Deny implicit flow for confidential apps.
- Update NuGet regular expression to protect against ReDoS.
- Fix regular expression backtracking issue in package name validation.
- Upgrade GitLab Pages to 1.28.2.
- Update trusted OAuth applications to set them as confidential.
- Upgrade Workhorse to 8.51.2.
## 13.5.5 (2020-12-07)
### Security (10 changes)

View File

@ -1 +1 @@
1.32.0
1.34.0

View File

@ -1 +1 @@
8.58.0
8.58.2

View File

@ -48,7 +48,10 @@ export default {
<ci-icon :status="pipeline.details.status" class="vertical-align-middle" />
<span class="font-weight-bold">{{ s__('Job|Pipeline') }}</span>
<gl-link :href="pipeline.path" class="js-pipeline-path link-commit qa-pipeline-path"
<gl-link
:href="pipeline.path"
class="js-pipeline-path link-commit"
data-qa-selector="pipeline_path"
>#{{ pipeline.id }}</gl-link
>
<template v-if="hasRef">

View File

@ -4,7 +4,7 @@ import { __ } from '~/locale';
import { DEFAULT, LOAD_FAILURE } from '../../constants';
import getPipelineDetails from '../../graphql/queries/get_pipeline_details.query.graphql';
import PipelineGraph from './graph_component.vue';
import { unwrapPipelineData, toggleQueryPollingByVisibility } from './utils';
import { unwrapPipelineData, toggleQueryPollingByVisibility, reportToSentry } from './utils';
export default {
name: 'PipelineGraphWrapper',
@ -86,6 +86,7 @@ export default {
reportFailure(type) {
this.showAlert = true;
this.failureType = type;
reportToSentry(this.$options.name, this.failureType);
},
},
};

View File

@ -3,7 +3,7 @@ import getPipelineDetails from '../../graphql/queries/get_pipeline_details.query
import LinkedPipeline from './linked_pipeline.vue';
import { LOAD_FAILURE } from '../../constants';
import { UPSTREAM } from './constants';
import { unwrapPipelineData, toggleQueryPollingByVisibility } from './utils';
import { unwrapPipelineData, toggleQueryPollingByVisibility, reportToSentry } from './utils';
export default {
components: {
@ -80,8 +80,13 @@ export default {
result() {
this.loadingPipelineId = null;
},
error() {
error(err, _vm, _key, type) {
this.$emit('error', LOAD_FAILURE);
reportToSentry(
'linked_pipelines_column',
`error type: ${LOAD_FAILURE}, error: ${err}, apollo error type: ${type}`,
);
},
});

View File

@ -1,5 +1,6 @@
import Visibility from 'visibilityjs';
import { getIdFromGraphQLId } from '~/graphql_shared/utils';
import * as Sentry from '~/sentry/wrapper';
import { unwrapStagesWithNeeds } from '../unwrapping_utils';
const addMulti = (mainPipelineProjectPath, linkedPipeline) => {
@ -55,3 +56,10 @@ const toggleQueryPollingByVisibility = (queryRef, interval = 10000) => {
};
export { unwrapPipelineData, toggleQueryPollingByVisibility };
export const reportToSentry = (component, failureType) => {
Sentry.withScope((scope) => {
scope.setTag('component', component);
Sentry.captureException(failureType);
});
};

View File

@ -24,6 +24,17 @@ class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController
end
end
def create
# Confidential apps require the client_secret to be sent with the request.
# Doorkeeper allows implicit grant flow requests (response_type=token) to
# work without client_secret regardless of the confidential setting.
if pre_auth.authorizable? && pre_auth.response_type == 'token' && pre_auth.client.application.confidential
render "doorkeeper/authorizations/error"
else
super
end
end
private
def verify_confirmed_email!

View File

@ -21,7 +21,7 @@ class Projects::RawController < Projects::ApplicationController
def show
@blob = @repository.blob_at(@ref, @path)
send_blob(@repository, @blob, inline: (params[:inline] != 'false'), allow_caching: @project.public?)
send_blob(@repository, @blob, inline: (params[:inline] != 'false'), allow_caching: Guest.can?(:download_code, @project))
end
private

View File

@ -53,7 +53,7 @@ class Projects::RepositoriesController < Projects::ApplicationController
end
def set_cache_headers
expires_in cache_max_age(archive_metadata['CommitId']), public: project.public?
expires_in cache_max_age(archive_metadata['CommitId']), public: Guest.can?(:download_code, project)
fresh_when(etag: archive_metadata['ArchivePath'])
end

View File

@ -4,6 +4,7 @@ module MergeRequests
class AfterCreateService < MergeRequests::BaseService
def execute(merge_request)
event_service.open_mr(merge_request, current_user)
merge_request_activity_counter.track_create_mr_action(user: current_user)
notification_service.new_merge_request(merge_request, current_user)
create_pipeline_for(merge_request, current_user)

View File

@ -52,6 +52,10 @@ module MergeRequests
"#<#{self.class} #{merge_request.to_reference(full: true)}>"
end
def merge_request_activity_counter
Gitlab::UsageDataCounters::MergeRequestActivityUniqueCounter
end
private
def enqueue_jira_connect_messages_for(merge_request)

View File

@ -13,6 +13,7 @@ module MergeRequests
if merge_request.close
create_event(merge_request)
merge_request_activity_counter.track_close_mr_action(user: current_user)
create_note(merge_request)
notification_service.async.close_mr(merge_request, current_user)
todo_service.close_merge_request(merge_request, current_user)

View File

@ -88,7 +88,13 @@ module MergeRequests
end
def try_merge
repository.merge(current_user, source, merge_request, commit_message)
merge = repository.merge(current_user, source, merge_request, commit_message)
if merge_request.squash_on_merge? && Feature.enabled?(:persist_squash_commit_sha_for_squashes, project)
merge_request.update_column(:squash_commit_sha, source)
end
merge
rescue Gitlab::Git::PreReceiveError => e
raise MergeError,
"Something went wrong during merge pre-receive hook. #{e.message}".strip

View File

@ -15,6 +15,7 @@ module MergeRequests
todo_service.merge_merge_request(merge_request, current_user)
create_event(merge_request)
create_note(merge_request)
merge_request_activity_counter.track_merge_mr_action(user: current_user)
notification_service.merge_mr(merge_request, current_user)
execute_hooks(merge_request, 'merge')
invalidate_cache_counts(merge_request, users: merge_request.assignees)

View File

@ -8,6 +8,7 @@ module MergeRequests
if merge_request.reopen
create_event(merge_request)
create_note(merge_request, 'reopened')
merge_request_activity_counter.track_reopen_mr_action(user: current_user)
notification_service.async.reopen_mr(merge_request, current_user)
execute_hooks(merge_request, 'reopen')
merge_request.reload_diff(current_user)

View File

@ -9,6 +9,8 @@ module Projects
return unless fork_network
log_info(message: "UnlinkForkService: Unlinking fork network", fork_network_id: fork_network.id)
merge_requests = fork_network
.merge_requests
.opened
@ -16,6 +18,7 @@ module Projects
merge_requests.find_each do |mr|
::MergeRequests::CloseService.new(@project, @current_user).execute(mr)
log_info(message: "UnlinkForkService: Closed merge request", merge_request_id: mr.id)
end
Project.transaction do
@ -31,6 +34,16 @@ module Projects
end
end
# rubocop: disable Cop/InBatches
Project.uncached do
@project.forked_to_members.in_batches do |fork_relation|
fork_relation.pluck(:id).each do |fork_id| # rubocop: disable CodeReuse/ActiveRecord
log_info(message: "UnlinkForkService: Unlinked fork of root_project", project_id: @project.id, forked_project_id: fork_id)
end
end
end
# rubocop: enable Cop/InBatches
# When the project getting out of the network is a node with parent
# and children, both the parent and the node needs a cache refresh.
[forked_from, @project].compact.each do |project|

View File

@ -0,0 +1,5 @@
---
title: Add metrics to creating, closing, reopening and merging merge requests
merge_request: 50654
author:
type: other

View File

@ -0,0 +1,5 @@
---
title: Spread monthly CI minutes reset from 8 to 24 hours
merge_request: 51084
author:
type: performance

View File

@ -0,0 +1,5 @@
---
title: Upgrade Workhorse to 8.58.2
merge_request:
author:
type: security

View File

@ -0,0 +1,5 @@
---
title: Fix large S3 uploads failing to finalize
merge_request: 50922
author:
type: fixed

View File

@ -0,0 +1,8 @@
---
name: persist_squash_commit_sha_for_squashes
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/50178
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/294243
milestone: '13.8'
type: development
group: group::source code
default_enabled: false

View File

@ -0,0 +1,8 @@
---
name: s3_multithreaded_uploads
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/50922
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/296772
milestone: '13.8'
type: development
group: group::continuous integration
default_enabled: true

View File

@ -0,0 +1,8 @@
---
name: usage_data_i_code_review_user_close_mr
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/50654
rollout_issue_url:
milestone: '13.8'
type: development
group: group::code review
default_enabled: true

View File

@ -0,0 +1,8 @@
---
name: usage_data_i_code_review_user_create_mr
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/50654
rollout_issue_url:
milestone: '13.8'
type: development
group: group::code review
default_enabled: true

View File

@ -0,0 +1,8 @@
---
name: usage_data_i_code_review_user_merge_mr
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/50654
rollout_issue_url:
milestone: '13.8'
type: development
group: group::code review
default_enabled: true

View File

@ -0,0 +1,8 @@
---
name: usage_data_i_code_review_user_reopen_mr
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/50654
rollout_issue_url:
milestone: '13.8'
type: development
group: group::code review
default_enabled: true

View File

@ -17,7 +17,22 @@ module CarrierWave
class Fog < Abstract
class File
def copy_to(new_path)
connection.copy_object(@uploader.fog_directory, file.key, @uploader.fog_directory, new_path, copy_to_options)
# fog-aws needs multipart uploads to copy files above 5 GB,
# and it is currently the only Fog provider that supports
# multithreaded uploads (https://github.com/fog/fog-aws/pull/579).
# Multithreaded uploads are essential for copying large amounts of data
# within the request timeout.
if ::Feature.enabled?(:s3_multithreaded_uploads, default_enabled: true) && fog_provider == 'AWS'
file.concurrency = 10 # AWS SDK uses 10 threads by default
file.copy(@uploader.fog_directory, new_path, copy_to_options)
else
# Some Fog providers may issue a GET request (https://github.com/fog/fog-google/issues/512)
# instead of a HEAD request after the transfer completes,
# which might cause the file to be downloaded locally.
# We fallback to the original copy_object for non-AWS providers.
connection.copy_object(@uploader.fog_directory, file.key, @uploader.fog_directory, new_path, copy_to_options)
end
CarrierWave::Storage::Fog::File.new(@uploader, @base, new_path)
end

View File

@ -0,0 +1,23 @@
# frozen_string_literal: true
class UpdateTrustedAppsToConfidential < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
INDEX_NAME = 'tmp_index_oauth_applications_on_id_where_trusted'
disable_ddl_transaction!
def up
add_concurrent_index :oauth_applications, :id, where: 'trusted = true', name: INDEX_NAME
execute('UPDATE oauth_applications SET confidential = true WHERE trusted = true')
end
def down
# We won't be able to tell which trusted applications weren't confidential before the migration
# and setting all trusted applications are not confidential would introduce security issues
remove_concurrent_index_by_name :oauth_applications, INDEX_NAME
end
end

View File

@ -0,0 +1 @@
d3af120a74b4c55345ac7fb524395251cd3c1b3cd9685f711196a134f427845c

View File

@ -23105,6 +23105,10 @@ CREATE INDEX temporary_index_vulnerabilities_on_id ON vulnerabilities USING btre
CREATE UNIQUE INDEX term_agreements_unique_index ON term_agreements USING btree (user_id, term_id);
CREATE INDEX tmp_index_for_email_unconfirmation_migration ON emails USING btree (id) WHERE (confirmed_at IS NOT NULL);
CREATE INDEX tmp_index_oauth_applications_on_id_where_trusted ON oauth_applications USING btree (id) WHERE (trusted = true);
CREATE INDEX tmp_index_on_vulnerabilities_non_dismissed ON vulnerabilities USING btree (id) WHERE (state <> 2);
CREATE UNIQUE INDEX unique_merge_request_metrics_by_merge_request_id ON merge_request_metrics USING btree (merge_request_id);

View File

@ -23,7 +23,7 @@ relevant compliance standards.
|**[Lock project membership to group](../user/group/index.md#member-lock)**<br>Group owners can prevent new members from being added to projects within a group.|Starter+|✓|Group|
|**[LDAP group sync](auth/ldap/index.md#group-sync)**<br>GitLab Enterprise Edition gives admins the ability to automatically sync groups and manage SSH keys, permissions, and authentication, so you can focus on building your product, not configuring your tools.|Starter+||Instance|
|**[LDAP group sync filters](auth/ldap/index.md#group-sync)**<br>GitLab Enterprise Edition Premium gives more flexibility to synchronize with LDAP based on filters, meaning you can leverage LDAP attributes to map GitLab permissions.|Premium+||Instance|
|**[Audit events](audit_events.md)**<br>To maintain the integrity of your code, GitLab Enterprise Edition Premium gives admins the ability to view any modifications made within the GitLab server in an advanced audit events system, so you can control, analyze, and track every change.|Premium+||Instance, Group, Project|
|**[Audit events](audit_events.md)**<br>To maintain the integrity of your code, GitLab Enterprise Edition Premium gives admins the ability to view any modifications made within the GitLab server in an advanced audit events system, so you can control, analyze, and track every change.|Premium+||Instance, Group, Project|
|**[Auditor users](auditor_users.md)**<br>Auditor users are users who are given read-only access to all projects, groups, and other resources on the GitLab instance.|Premium+||Instance|
|**[Credentials inventory](../user/admin_area/credentials_inventory.md)**<br>With a credentials inventory, GitLab administrators can keep track of the credentials used by all of the users in their GitLab instance. |Ultimate||Instance|
|**Separation of Duties using [Protected branches](../user/project/protected_branches.md#protected-branches-approval-by-code-owners) and [custom CI Configuration Paths](../ci/pipelines/settings.md#custom-ci-configuration-path)**<br> GitLab Silver and Premium users can leverage the GitLab cross-project YAML configurations to define deployers of code and developers of code. View the [Separation of Duties Deploy Project](https://gitlab.com/guided-explorations/separation-of-duties-deploy/blob/master/README.md) and [Separation of Duties Project](https://gitlab.com/guided-explorations/separation-of-duties/blob/master/README.md) to see how to use this set up to define these roles.|Premium+||Project|
|**Separation of Duties using [Protected branches](../user/project/protected_branches.md#protected-branches-approval-by-code-owners) and [custom CI Configuration Paths](../ci/pipelines/settings.md#custom-ci-configuration-path)**<br> GitLab Silver and Premium users can leverage the GitLab cross-project YAML configurations to define deployers of code and developers of code. View the [Separation of Duties Deploy Project](https://gitlab.com/guided-explorations/separation-of-duties-deploy/blob/master/README.md) and [Separation of Duties Project](https://gitlab.com/guided-explorations/separation-of-duties/blob/master/README.md) to see how to use this set up to define these roles.|Premium+||Project|

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

View File

@ -28,32 +28,15 @@ notify bug tracking systems.
Webhooks can be used to update an external issue tracker, trigger CI jobs,
update a backup mirror, or even deploy to your production server.
They are available **per project** for GitLab Community Edition,
and **per project and per group** for **GitLab Enterprise Edition**.
Navigate to the webhooks page at your project's **Settings > Webhooks**.
Webhooks are available:
- Per project, at a project's **Settings > Webhooks** menu. **(CORE)**
- Additionally per group, at a group's **Settings > Webhooks** menu. **(PREMIUM)**
NOTE:
On GitLab.com, the [maximum number of webhooks and their size](../../../user/gitlab_com/index.md#webhooks) per project, and per group, is limited.
## Version history
Starting from GitLab 8.5:
- the `repository` key is deprecated in favor of the `project` key
- the `project.ssh_url` key is deprecated in favor of the `project.git_ssh_url` key
- the `project.http_url` key is deprecated in favor of the `project.git_http_url` key
Starting from GitLab 11.1, the logs of webhooks are automatically removed after
one month.
Starting from GitLab 11.2:
- The `description` field for issues, merge requests, comments, and wiki pages
is rewritten so that simple Markdown image references (like
`![](/uploads/...)`) have their target URL changed to an absolute URL. See
[image URL rewriting](#image-url-rewriting) for more details.
## Possible uses for webhooks
- You can set up a webhook in GitLab to send a notification to
@ -91,8 +74,6 @@ be self-signed.
You can turn this off in the webhook settings in your GitLab projects.
![SSL Verification](img/webhooks_ssl.png)
## Branch filtering
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/20338) in GitLab 11.3.
@ -1362,7 +1343,7 @@ X-Gitlab-Event: Deployment Hook
Note that `deployable_id` is the ID of the CI job.
### Member events **(PREMIUM)**
### Group member events **(PREMIUM)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/260347) in GitLab 13.7.
@ -1554,7 +1535,7 @@ Markdown features, like link labels.
## Testing webhooks
You can trigger the webhook manually. Sample data from the project is used.
> For example: for triggering `Push Events` your project should have at least one commit.
For example, for triggering `Push Events` your project should have at least one commit.
![Webhook testing](img/webhook_testing.png)

View File

@ -53,7 +53,7 @@ Exported issues are always sorted by `Issue ID`.
>
> **Weight** and **Locked** columns were [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/5300) in GitLab Starter 10.8.
Data wis encoded with a comma as the column delimiter, with `"` used to quote fields if needed, and newlines to separate rows. The first row contains the headers, which are listed in the following table along with a description of the values:
Data is encoded with a comma as the column delimiter, with `"` used to quote fields if needed, and newlines to separate rows. The first row contains the headers, which are listed in the following table along with a description of the values:
| Column | Description |
|---------|-------------|

View File

@ -15,7 +15,7 @@ module API
extend ActiveSupport::Concern
POSITIVE_INTEGER_REGEX = %r{\A[1-9]\d*\z}.freeze
NON_NEGATIVE_INTEGER_REGEX = %r{\A0|[1-9]\d*\z}.freeze
NON_NEGATIVE_INTEGER_REGEX = %r{\A(0|[1-9]\d*)\z}.freeze
included do
helpers do

View File

@ -186,14 +186,6 @@ module Gitlab
def inject_context_for_exception(event, ex)
case ex
when ActiveModel::MissingAttributeError # Debugging for https://gitlab.com/gitlab-org/gitlab/-/issues/26751
columns_hash = ActiveRecord::Base
.connection
.schema_cache
.instance_variable_get(:@columns_hash)
.transform_values { |v| v.map(&:first) }
event.extra.merge!(columns_hash)
when ActiveRecord::StatementInvalid
event.extra[:sql] = PgQuery.normalize(ex.sql.to_s)
else

View File

@ -27,7 +27,18 @@ module Gitlab
end
def package_name_regex
@package_name_regex ||= %r{\A\@?(([\w\-\.\+]*)\/)*([\w\-\.]+)@?(([\w\-\.\+]*)\/)*([\w\-\.]*)\z}.freeze
@package_name_regex ||=
%r{
\A\@?
(?> # atomic group to prevent backtracking
(([\w\-\.\+]*)\/)*([\w\-\.]+)
)
@?
(?> # atomic group to prevent backtracking
(([\w\-\.\+]*)\/)*([\w\-\.]*)
)
\z
}x.freeze
end
def maven_file_name_regex

View File

@ -425,6 +425,7 @@
redis_slot: snippets
aggregation: weekly
feature_flag: usage_data_i_snippets_show
# Merge request counters
- name: i_code_review_mr_diffs
redis_slot: code_review
category: code_review
@ -440,6 +441,26 @@
category: code_review
aggregation: weekly
feature_flag: usage_data_i_code_review_mr_single_file_diffs
- name: i_code_review_user_create_mr
redis_slot: code_review
category: code_review
aggregation: weekly
feature_flag: usage_data_i_code_review_user_create_mr
- name: i_code_review_user_close_mr
redis_slot: code_review
category: code_review
aggregation: weekly
feature_flag: usage_data_i_code_review_user_close_mr
- name: i_code_review_user_reopen_mr
redis_slot: code_review
category: code_review
aggregation: weekly
feature_flag: usage_data_i_code_review_user_reopen_mr
- name: i_code_review_user_merge_mr
redis_slot: code_review
category: code_review
aggregation: weekly
feature_flag: usage_data_i_code_review_user_merge_mr
# Terraform
- name: p_terraform_state_api_unique_users
category: terraform

View File

@ -6,6 +6,10 @@ module Gitlab
MR_DIFFS_ACTION = 'i_code_review_mr_diffs'
MR_DIFFS_SINGLE_FILE_ACTION = 'i_code_review_mr_single_file_diffs'
MR_DIFFS_USER_SINGLE_FILE_ACTION = 'i_code_review_user_single_file_diffs'
MR_CREATE_ACTION = 'i_code_review_user_create_mr'
MR_CLOSE_ACTION = 'i_code_review_user_close_mr'
MR_REOPEN_ACTION = 'i_code_review_user_reopen_mr'
MR_MERGE_ACTION = 'i_code_review_user_merge_mr'
class << self
def track_mr_diffs_action(merge_request:)
@ -17,6 +21,22 @@ module Gitlab
track_unique_action_by_user(MR_DIFFS_USER_SINGLE_FILE_ACTION, user)
end
def track_create_mr_action(user:)
track_unique_action_by_user(MR_CREATE_ACTION, user)
end
def track_close_mr_action(user:)
track_unique_action_by_user(MR_CLOSE_ACTION, user)
end
def track_merge_mr_action(user:)
track_unique_action_by_user(MR_MERGE_ACTION, user)
end
def track_reopen_mr_action(user:)
track_unique_action_by_user(MR_REOPEN_ACTION, user)
end
private
def track_unique_action_by_merge_request(action, merge_request)

View File

@ -12,7 +12,7 @@ module QA
end
view 'app/assets/javascripts/jobs/components/stages_dropdown.vue' do
element :pipeline_path
element :pipeline_path, required: true
end
view 'app/assets/javascripts/jobs/components/sidebar.vue' do

View File

@ -77,7 +77,7 @@ module QA
end
def click_job(job_name)
click_element(:job_link, text: job_name)
click_element(:job_link, Project::Job::Show, text: job_name)
end
def expand_child_pipeline

View File

@ -0,0 +1,45 @@
# frozen_string_literal: true
module QA
RSpec.describe 'Release', :smoke, :runner do
describe 'Pages' do
let!(:project) do
Resource::Project.fabricate_via_api! do |project|
project.name = 'jekyll-pages-project'
project.template_name = :jekyll
end
end
let(:pipeline) do
Resource::Pipeline.fabricate_via_api! do |pipeline|
pipeline.project = project
pipeline.variables =
{ key: :CI_PAGES_DOMAIN, value: 'nip.io', variable_type: :env_var },
{ key: :CI_PAGES_URL, value: 'http://127.0.0.1.nip.io', variable_type: :env_var }
end
end
before do
Flow::Login.sign_in
Resource::Runner.fabricate_via_api! do |runner|
runner.project = project
runner.executor = :docker
end
pipeline.visit!
end
it 'runs a Pages-specific pipeline' do
Page::Project::Pipeline::Show.perform do |show|
expect(show).to have_job(:pages)
show.click_job(:pages)
end
Page::Project::Job::Show.perform do |show|
expect(show).to have_passed
end
end
end
end
end

View File

@ -95,6 +95,20 @@ RSpec.describe Oauth::AuthorizationsController do
subject { post :create, params: params }
include_examples 'OAuth Authorizations require confirmed user'
context 'when application is confidential' do
before do
application.update(confidential: true)
params[:response_type] = 'token'
end
it 'does not allow the implicit flow' do
subject
expect(response).to have_gitlab_http_status(:ok)
expect(response).to render_template('doorkeeper/authorizations/error')
end
end
end
describe 'DELETE #destroy' do

View File

@ -250,6 +250,18 @@ RSpec.describe Projects::RawController do
expect(response.cache_control[:no_store]).to be_nil
end
context 'when a public project has private repo' do
let(:project) { create(:project, :public, :repository, :repository_private) }
let(:user) { create(:user, maintainer_projects: [project]) }
it 'does not set public caching header' do
sign_in user
request_file
expect(response.header['Cache-Control']).to include('max-age=60, private')
end
end
context 'when If-None-Match header is set' do
it 'returns a 304 status' do
request_file

View File

@ -137,6 +137,18 @@ RSpec.describe Projects::RepositoriesController do
expect(response.header['ETag']).to be_present
expect(response.header['Cache-Control']).to include('max-age=60, public')
end
context 'and repo is private' do
let(:project) { create(:project, :repository, :public, :repository_private) }
it 'sets appropriate caching headers' do
get_archive
expect(response).to have_gitlab_http_status(:ok)
expect(response.header['ETag']).to be_present
expect(response.header['Cache-Control']).to include('max-age=60, private')
end
end
end
context 'when ref is a commit SHA' do

View File

@ -6,38 +6,87 @@ RSpec.describe 'CarrierWave::Storage::Fog::File' do
let(:uploader_class) { Class.new(CarrierWave::Uploader::Base) }
let(:uploader) { uploader_class.new }
let(:storage) { CarrierWave::Storage::Fog.new(uploader) }
let(:azure_options) do
{
azure_storage_account_name: 'AZURE_ACCOUNT_NAME',
azure_storage_access_key: 'AZURE_ACCESS_KEY',
provider: 'AzureRM'
}
end
let(:bucket_name) { 'some-bucket' }
let(:connection) { ::Fog::Storage.new(connection_options) }
let(:bucket) { connection.directories.new(key: bucket_name )}
let(:test_filename) { 'test' }
let(:test_data) { File.read(Rails.root.join('spec/support/gitlab_stubs/gitlab_ci.yml')) }
subject { CarrierWave::Storage::Fog::File.new(uploader, storage, 'test') }
subject { CarrierWave::Storage::Fog::File.new(uploader, storage, test_filename) }
before do
require 'fog/azurerm'
allow(uploader).to receive(:fog_credentials).and_return(azure_options)
Fog.mock!
require 'fog/aws'
stub_object_storage(connection_params: connection_options, remote_directory: bucket_name)
allow(uploader).to receive(:fog_directory).and_return(bucket_name)
allow(uploader).to receive(:fog_credentials).and_return(connection_options)
bucket.files.create(key: test_filename, body: test_data) # rubocop:disable Rails/SaveBang
end
describe '#authenticated_url' do
context 'with Azure' do
it 'has an authenticated URL' do
expect(subject.authenticated_url).to eq("https://sa.blob.core.windows.net/test_container/test_blob?token")
context 'AWS' do
let(:connection_options) do
{
provider: 'AWS',
aws_access_key_id: 'AWS_ACCESS_KEY',
aws_secret_access_key: 'AWS_SECRET_KEY'
}
end
describe '#copy_to' do
let(:dest_filename) { 'copied.txt'}
it 'copies the file' do
result = subject.copy_to(dest_filename)
expect(result.exists?).to be true
expect(result.read).to eq(test_data)
# Sanity check that the file actually is there
copied = bucket.files.get(dest_filename)
expect(copied).to be_present
expect(copied.body).to eq(test_data)
end
end
end
context 'Azure' do
let(:connection_options) do
{
provider: 'AzureRM',
azure_storage_account_name: 'AZURE_ACCOUNT_NAME',
azure_storage_access_key: 'AZURE_ACCESS_KEY'
}
end
describe '#copy_to' do
let(:dest_filename) { 'copied.txt'}
it 'copies the file' do
result = subject.copy_to(dest_filename)
# Fog Azure provider doesn't mock the actual copied data
expect(result.exists?).to be true
end
end
context 'with custom expire_at' do
it 'properly sets expires param' do
expire_at = 24.hours.from_now
describe '#authenticated_url' do
it 'has an authenticated URL' do
expect(subject.authenticated_url).to eq("https://sa.blob.core.windows.net/test_container/test_blob?token")
end
expect_next_instance_of(Fog::Storage::AzureRM::File) do |file|
expect(file).to receive(:url).with(expire_at).and_call_original
context 'with custom expire_at' do
it 'properly sets expires param' do
expire_at = 24.hours.from_now
expect_next_instance_of(Fog::Storage::AzureRM::File) do |file|
expect(file).to receive(:url).with(expire_at).and_call_original
end
expect(subject.authenticated_url(expire_at: expire_at)).to eq("https://sa.blob.core.windows.net/test_container/test_blob?token")
end
expect(subject.authenticated_url(expire_at: expire_at)).to eq("https://sa.blob.core.windows.net/test_container/test_blob?token")
end
end
end

View File

@ -292,6 +292,12 @@ RSpec.describe Gitlab::Regex do
it { is_expected.not_to match('my package name') }
it { is_expected.not_to match('!!()()') }
it { is_expected.not_to match("..\n..\foo") }
it 'has no backtracking issue' do
Timeout.timeout(1) do
expect(subject).not_to match("-" * 50000 + ";")
end
end
end
describe '.maven_file_name_regex' do

View File

@ -100,7 +100,7 @@ RSpec.describe Gitlab::SidekiqMiddleware do
"subject",
"body"
],
"_aj_symbol_keys" => ["args"]
ActiveJob::Arguments.const_get('RUBY2_KEYWORDS_KEY', false) => ["args"]
}
],
"executions" => 0,

View File

@ -39,4 +39,36 @@ RSpec.describe Gitlab::UsageDataCounters::MergeRequestActivityUniqueCounter, :cl
let(:action) { described_class::MR_DIFFS_USER_SINGLE_FILE_ACTION }
end
end
describe '.track_create_mr_action' do
subject { described_class.track_create_mr_action(user: user) }
it_behaves_like 'a tracked merge request unique event' do
let(:action) { described_class::MR_CREATE_ACTION }
end
end
describe '.track_close_mr_action' do
subject { described_class.track_close_mr_action(user: user) }
it_behaves_like 'a tracked merge request unique event' do
let(:action) { described_class::MR_CLOSE_ACTION }
end
end
describe '.track_merge_mr_action' do
subject { described_class.track_merge_mr_action(user: user) }
it_behaves_like 'a tracked merge request unique event' do
let(:action) { described_class::MR_MERGE_ACTION }
end
end
describe '.track_reopen_mr_action' do
subject { described_class.track_reopen_mr_action(user: user) }
it_behaves_like 'a tracked merge request unique event' do
let(:action) { described_class::MR_REOPEN_ACTION }
end
end
end

View File

@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop'
require_relative '../../../rubocop/cop/active_record_association_reload'
RSpec.describe RuboCop::Cop::ActiveRecordAssociationReload, type: :rubocop do
RSpec.describe RuboCop::Cop::ActiveRecordAssociationReload do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/api/base'
RSpec.describe RuboCop::Cop::API::Base, type: :rubocop do
RSpec.describe RuboCop::Cop::API::Base do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/avoid_becomes'
RSpec.describe RuboCop::Cop::AvoidBecomes, type: :rubocop do
RSpec.describe RuboCop::Cop::AvoidBecomes do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop'
require_relative '../../../rubocop/cop/avoid_break_from_strong_memoize'
RSpec.describe RuboCop::Cop::AvoidBreakFromStrongMemoize, type: :rubocop do
RSpec.describe RuboCop::Cop::AvoidBreakFromStrongMemoize do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/avoid_keyword_arguments_in_sidekiq_workers'
RSpec.describe RuboCop::Cop::AvoidKeywordArgumentsInSidekiqWorkers, type: :rubocop do
RSpec.describe RuboCop::Cop::AvoidKeywordArgumentsInSidekiqWorkers do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop'
require_relative '../../../rubocop/cop/avoid_return_from_blocks'
RSpec.describe RuboCop::Cop::AvoidReturnFromBlocks, type: :rubocop do
RSpec.describe RuboCop::Cop::AvoidReturnFromBlocks do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop'
require_relative '../../../rubocop/cop/avoid_route_redirect_leading_slash'
RSpec.describe RuboCop::Cop::AvoidRouteRedirectLeadingSlash, type: :rubocop do
RSpec.describe RuboCop::Cop::AvoidRouteRedirectLeadingSlash do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -7,7 +7,7 @@ require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/ban_catch_throw'
RSpec.describe RuboCop::Cop::BanCatchThrow, type: :rubocop do
RSpec.describe RuboCop::Cop::BanCatchThrow do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/code_reuse/finder'
RSpec.describe RuboCop::Cop::CodeReuse::Finder, type: :rubocop do
RSpec.describe RuboCop::Cop::CodeReuse::Finder do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/code_reuse/presenter'
RSpec.describe RuboCop::Cop::CodeReuse::Presenter, type: :rubocop do
RSpec.describe RuboCop::Cop::CodeReuse::Presenter do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/code_reuse/serializer'
RSpec.describe RuboCop::Cop::CodeReuse::Serializer, type: :rubocop do
RSpec.describe RuboCop::Cop::CodeReuse::Serializer do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/code_reuse/service_class'
RSpec.describe RuboCop::Cop::CodeReuse::ServiceClass, type: :rubocop do
RSpec.describe RuboCop::Cop::CodeReuse::ServiceClass do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/code_reuse/worker'
RSpec.describe RuboCop::Cop::CodeReuse::Worker, type: :rubocop do
RSpec.describe RuboCop::Cop::CodeReuse::Worker do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/default_scope'
RSpec.describe RuboCop::Cop::DefaultScope, type: :rubocop do
RSpec.describe RuboCop::Cop::DefaultScope do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/destroy_all'
RSpec.describe RuboCop::Cop::DestroyAll, type: :rubocop do
RSpec.describe RuboCop::Cop::DestroyAll do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/filename_length'
RSpec.describe RuboCop::Cop::FilenameLength, type: :rubocop do
RSpec.describe RuboCop::Cop::FilenameLength do
subject(:cop) { described_class.new }
it 'does not flag files with names 100 characters long' do

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/avoid_uploaded_file_from_params'
RSpec.describe RuboCop::Cop::Gitlab::AvoidUploadedFileFromParams, type: :rubocop do
RSpec.describe RuboCop::Cop::Gitlab::AvoidUploadedFileFromParams do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/bulk_insert'
RSpec.describe RuboCop::Cop::Gitlab::BulkInsert, type: :rubocop do
RSpec.describe RuboCop::Cop::Gitlab::BulkInsert do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/change_timzone'
RSpec.describe RuboCop::Cop::Gitlab::ChangeTimezone, type: :rubocop do
RSpec.describe RuboCop::Cop::Gitlab::ChangeTimezone do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/const_get_inherit_false'
RSpec.describe RuboCop::Cop::Gitlab::ConstGetInheritFalse, type: :rubocop do
RSpec.describe RuboCop::Cop::Gitlab::ConstGetInheritFalse do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require_relative '../../../../rubocop/cop/gitlab/duplicate_spec_location'
RSpec.describe RuboCop::Cop::Gitlab::DuplicateSpecLocation, type: :rubocop do
RSpec.describe RuboCop::Cop::Gitlab::DuplicateSpecLocation do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/except'
RSpec.describe RuboCop::Cop::Gitlab::Except, type: :rubocop do
RSpec.describe RuboCop::Cop::Gitlab::Except do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -7,7 +7,7 @@ require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/finder_with_find_by'
RSpec.describe RuboCop::Cop::Gitlab::FinderWithFindBy, type: :rubocop do
RSpec.describe RuboCop::Cop::Gitlab::FinderWithFindBy do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/httparty'
RSpec.describe RuboCop::Cop::Gitlab::HTTParty, type: :rubocop do # rubocop:disable RSpec/FilePath
RSpec.describe RuboCop::Cop::Gitlab::HTTParty do # rubocop:disable RSpec/FilePath
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/intersect'
RSpec.describe RuboCop::Cop::Gitlab::Intersect, type: :rubocop do
RSpec.describe RuboCop::Cop::Gitlab::Intersect do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/json'
RSpec.describe RuboCop::Cop::Gitlab::Json, type: :rubocop do
RSpec.describe RuboCop::Cop::Gitlab::Json do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/module_with_instance_variables'
RSpec.describe RuboCop::Cop::Gitlab::ModuleWithInstanceVariables, type: :rubocop do
RSpec.describe RuboCop::Cop::Gitlab::ModuleWithInstanceVariables do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/policy_rule_boolean'
RSpec.describe RuboCop::Cop::Gitlab::PolicyRuleBoolean, type: :rubocop do
RSpec.describe RuboCop::Cop::Gitlab::PolicyRuleBoolean do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/predicate_memoization'
RSpec.describe RuboCop::Cop::Gitlab::PredicateMemoization, type: :rubocop do
RSpec.describe RuboCop::Cop::Gitlab::PredicateMemoization do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/rails_logger'
RSpec.describe RuboCop::Cop::Gitlab::RailsLogger, type: :rubocop do
RSpec.describe RuboCop::Cop::Gitlab::RailsLogger do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/union'
RSpec.describe RuboCop::Cop::Gitlab::Union, type: :rubocop do
RSpec.describe RuboCop::Cop::Gitlab::Union do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require_relative '../../../../rubocop/cop/graphql/authorize_types'
RSpec.describe RuboCop::Cop::Graphql::AuthorizeTypes, type: :rubocop do
RSpec.describe RuboCop::Cop::Graphql::AuthorizeTypes do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop'
require_relative '../../../../rubocop/cop/graphql/descriptions'
RSpec.describe RuboCop::Cop::Graphql::Descriptions, type: :rubocop do
RSpec.describe RuboCop::Cop::Graphql::Descriptions do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require_relative '../../../../rubocop/cop/graphql/gid_expected_type'
RSpec.describe RuboCop::Cop::Graphql::GIDExpectedType, type: :rubocop do
RSpec.describe RuboCop::Cop::Graphql::GIDExpectedType do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require_relative '../../../../rubocop/cop/graphql/id_type'
RSpec.describe RuboCop::Cop::Graphql::IDType, type: :rubocop do
RSpec.describe RuboCop::Cop::Graphql::IDType do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop'
require_relative '../../../../rubocop/cop/graphql/json_type'
RSpec.describe RuboCop::Cop::Graphql::JSONType, type: :rubocop do
RSpec.describe RuboCop::Cop::Graphql::JSONType do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require_relative '../../../../rubocop/cop/graphql/resolver_type'
RSpec.describe RuboCop::Cop::Graphql::ResolverType, type: :rubocop do
RSpec.describe RuboCop::Cop::Graphql::ResolverType do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/group_public_or_visible_to_user'
RSpec.describe RuboCop::Cop::GroupPublicOrVisibleToUser, type: :rubocop do
RSpec.describe RuboCop::Cop::GroupPublicOrVisibleToUser do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/ignored_columns'
RSpec.describe RuboCop::Cop::IgnoredColumns, type: :rubocop do
RSpec.describe RuboCop::Cop::IgnoredColumns do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -7,7 +7,7 @@ require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/include_sidekiq_worker'
RSpec.describe RuboCop::Cop::IncludeSidekiqWorker, type: :rubocop do
RSpec.describe RuboCop::Cop::IncludeSidekiqWorker do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/inject_enterprise_edition_module'
RSpec.describe RuboCop::Cop::InjectEnterpriseEditionModule, type: :rubocop do
RSpec.describe RuboCop::Cop::InjectEnterpriseEditionModule do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop'
require_relative '../../../../rubocop/cop/lint/last_keyword_argument'
RSpec.describe RuboCop::Cop::Lint::LastKeywordArgument, type: :rubocop do
RSpec.describe RuboCop::Cop::Lint::LastKeywordArgument do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop'
require_relative '../../../../rubocop/cop/migration/add_column_with_default'
RSpec.describe RuboCop::Cop::Migration::AddColumnWithDefault, type: :rubocop do
RSpec.describe RuboCop::Cop::Migration::AddColumnWithDefault do
include CopHelper
let(:cop) { described_class.new }

View File

@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop'
require_relative '../../../../rubocop/cop/migration/add_columns_to_wide_tables'
RSpec.describe RuboCop::Cop::Migration::AddColumnsToWideTables, type: :rubocop do
RSpec.describe RuboCop::Cop::Migration::AddColumnsToWideTables do
include CopHelper
let(:cop) { described_class.new }

View File

@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop'
require_relative '../../../../rubocop/cop/migration/add_concurrent_foreign_key'
RSpec.describe RuboCop::Cop::Migration::AddConcurrentForeignKey, type: :rubocop do
RSpec.describe RuboCop::Cop::Migration::AddConcurrentForeignKey do
include CopHelper
let(:cop) { described_class.new }

View File

@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop'
require_relative '../../../../rubocop/cop/migration/add_concurrent_index'
RSpec.describe RuboCop::Cop::Migration::AddConcurrentIndex, type: :rubocop do
RSpec.describe RuboCop::Cop::Migration::AddConcurrentIndex do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop'
require_relative '../../../../rubocop/cop/migration/add_index'
RSpec.describe RuboCop::Cop::Migration::AddIndex, type: :rubocop do
RSpec.describe RuboCop::Cop::Migration::AddIndex do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop'
require_relative '../../../../rubocop/cop/migration/add_limit_to_text_columns'
RSpec.describe RuboCop::Cop::Migration::AddLimitToTextColumns, type: :rubocop do
RSpec.describe RuboCop::Cop::Migration::AddLimitToTextColumns do
include CopHelper
subject(:cop) { described_class.new }

View File

@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop'
require_relative '../../../../rubocop/cop/migration/add_reference'
RSpec.describe RuboCop::Cop::Migration::AddReference, type: :rubocop do
RSpec.describe RuboCop::Cop::Migration::AddReference do
include CopHelper
let(:cop) { described_class.new }

View File

@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop'
require_relative '../../../../rubocop/cop/migration/add_timestamps'
RSpec.describe RuboCop::Cop::Migration::AddTimestamps, type: :rubocop do
RSpec.describe RuboCop::Cop::Migration::AddTimestamps do
include CopHelper
subject(:cop) { described_class.new }

Some files were not shown because too many files have changed in this diff Show More