Skip to content
Snippets Groups Projects
Commit a1d114d8 authored by Thiago Figueiró's avatar Thiago Figueiró :red_circle:
Browse files

Fix Layout/FirstArrayElementIndentation offenses

parent 2761f389
No related branches found
No related tags found
1 merge request!98149Fix Layout/FirstArrayElementIndentation offenses 10
Showing
with 103 additions and 191 deletions
......@@ -40,25 +40,6 @@ Layout/FirstArrayElementIndentation:
- 'qa/qa/specs/features/api/3_create/repository/commit_to_templated_project_spec.rb'
- 'qa/qa/specs/features/browser_ui/1_manage/group/transfer_project_spec.rb'
- 'qa/qa/specs/features/browser_ui/2_plan/issue/custom_issue_template_spec.rb'
- 'qa/qa/specs/features/browser_ui/3_create/merge_request/cherry_pick/cherry_pick_commit_spec.rb'
- 'qa/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_via_template_spec.rb'
- 'qa/qa/specs/features/browser_ui/3_create/merge_request/revert/revert_commit_spec.rb'
- 'qa/qa/specs/features/browser_ui/3_create/repository/branch_with_unusual_name_spec.rb'
- 'qa/qa/specs/features/browser_ui/3_create/web_ide/add_new_directory_in_web_ide_spec.rb'
- 'qa/qa/specs/features/browser_ui/3_create/web_ide/open_web_ide_from_diff_tab_spec.rb'
- 'qa/qa/specs/features/browser_ui/5_package/package_registry/helm_registry_spec.rb'
- 'qa/qa/specs/features/browser_ui/5_package/package_registry/maven/maven_group_level_spec.rb'
- 'qa/qa/specs/features/browser_ui/5_package/package_registry/maven/maven_project_level_spec.rb'
- 'qa/qa/specs/features/browser_ui/5_package/package_registry/maven_gradle_repository_spec.rb'
- 'qa/qa/specs/features/browser_ui/5_package/package_registry/nuget/nuget_group_level_spec.rb'
- 'qa/qa/specs/features/browser_ui/5_package/package_registry/nuget/nuget_project_level_spec.rb'
- 'qa/qa/specs/features/ee/api/1_manage/user/minimal_access_user_spec.rb'
- 'qa/qa/specs/features/ee/api/9_enablement/elasticsearch/advanced_global_advanced_syntax_search_spec.rb'
- 'qa/qa/specs/features/ee/api/9_enablement/elasticsearch/elasticsearch_api_spec.rb'
- 'qa/qa/specs/features/ee/api/9_enablement/elasticsearch/index_tests/main_index/blob_index_spec.rb'
- 'qa/qa/specs/features/ee/api/9_enablement/elasticsearch/nightly_elasticsearch_test_spec.rb'
- 'qa/qa/specs/features/ee/browser_ui/3_create/repository/code_owners_with_protected_branch_and_squashed_commits_spec.rb'
- 'qa/qa/specs/features/ee/browser_ui/4_verify/new_discussion_not_dropping_merge_trains_mr_spec.rb'
- 'spec/controllers/concerns/send_file_upload_spec.rb'
- 'spec/controllers/graphql_controller_spec.rb'
- 'spec/controllers/projects/ci/daily_build_group_report_results_controller_spec.rb'
......
......@@ -18,9 +18,7 @@ module QA
commit.branch = "development"
commit.start_branch = project.default_branch
commit.commit_message = 'Add new file'
commit.add_files([
{ file_path: file_name, content: 'pssst!' }
])
commit.add_files([{ file_path: file_name, content: 'pssst!' }])
end
end
......
......@@ -20,12 +20,13 @@ module QA
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = template_project
commit.commit_message = 'Add custom merge request template'
commit.add_files([
{
file_path: ".gitlab/merge_request_templates/#{template_name}.md",
content: template_content
}
])
commit.add_files(
[
{
file_path: ".gitlab/merge_request_templates/#{template_name}.md",
content: template_content
}
])
end
end
......
......@@ -16,9 +16,7 @@ module QA
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = project
commit.commit_message = 'Add new file'
commit.add_files([
{ file_path: file_name, content: 'pssst!' }
])
commit.add_files([{ file_path: file_name, content: 'pssst!' }])
end
end
......
......@@ -22,9 +22,7 @@ module QA
commit.branch = branch_name
commit.start_branch = project.default_branch
commit.commit_message = 'Add new file'
commit.add_files([
{ file_path: 'test-folder/test-file.md', content: 'new content' }
])
commit.add_files([{ file_path: 'test-folder/test-file.md', content: 'new content' }])
end
project.visit!
......
......@@ -22,12 +22,13 @@ module QA
before do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = project
commit.add_files([
{
file_path: 'first_directory/test_file.txt',
content: "Test file content"
}
])
commit.add_files(
[
{
file_path: 'first_directory/test_file.txt',
content: "Test file content"
}
])
end
project.visit!
......
......@@ -4,18 +4,18 @@ module QA
RSpec.describe 'Create' do
describe 'Open Web IDE from Diff Tab' do
files = [
{
file_path: 'file1',
content: 'test1'
},
{
file_path: 'file2',
content: 'test2'
},
{
file_path: 'file3',
content: 'test3'
}
{
file_path: 'file1',
content: 'test1'
},
{
file_path: 'file2',
content: 'test2'
},
{
file_path: 'file3',
content: 'test3'
}
]
let(:project) do
......
......@@ -51,16 +51,11 @@ module QA
commit.project = package_project
commit.commit_message = 'Add .gitlab-ci.yml'
commit.add_files([
{
file_path: '.gitlab-ci.yml',
content: helm_upload_yaml
},
{
file_path: 'Chart.yaml',
content: helm_chart_yaml
}
])
commit.add_files(
[
{ file_path: '.gitlab-ci.yml', content: helm_upload_yaml },
{ file_path: 'Chart.yaml', content: helm_chart_yaml }
])
end
end
......@@ -94,12 +89,7 @@ module QA
commit.project = client_project
commit.commit_message = 'Add .gitlab-ci.yml'
commit.add_files([
{
file_path: '.gitlab-ci.yml',
content: helm_install_yaml
}
])
commit.add_files([{ file_path: '.gitlab-ci.yml', content: helm_install_yaml }])
end
end
......
......@@ -54,20 +54,12 @@ module QA
commit.project = package_project
commit.commit_message = 'Add files'
commit.add_files([
{
file_path: '.gitlab-ci.yml',
content: maven_upload_package_yaml
},
{
file_path: 'pom.xml',
content: package_pom_xml
},
{
file_path: 'settings.xml',
content: settings_xml
}
])
commit.add_files(
[
{ file_path: '.gitlab-ci.yml', content: maven_upload_package_yaml },
{ file_path: 'pom.xml', content: package_pom_xml },
{ file_path: 'settings.xml', content: settings_xml }
])
end
end
......@@ -103,20 +95,12 @@ module QA
commit.project = client_project
commit.commit_message = 'Add files'
commit.add_files([
{
file_path: '.gitlab-ci.yml',
content: maven_install_package_yaml
},
{
file_path: 'pom.xml',
content: client_pom_xml
},
{
file_path: 'settings.xml',
content: settings_xml
}
])
commit.add_files(
[
{ file_path: '.gitlab-ci.yml', content: maven_install_package_yaml },
{ file_path: 'pom.xml', content: client_pom_xml },
{ file_path: 'settings.xml', content: settings_xml }
])
end
end
......@@ -251,15 +235,15 @@ def create_duplicated_package
package_pom_xml = ERB.new(read_fixture('package_managers/maven', 'package_pom.xml.erb')).result(binding)
with_fixtures([
{
file_path: 'pom.xml',
content: package_pom_xml
},
{
file_path: 'settings.xml',
content: settings_xml_with_pat
}
]) do |dir|
{
file_path: 'pom.xml',
content: package_pom_xml
},
{
file_path: 'settings.xml',
content: settings_xml_with_pat
}
]) do |dir|
Service::DockerRun::Maven.new(dir).publish!
end
......@@ -281,20 +265,12 @@ def push_duplicated_package
commit.project = client_project
commit.commit_message = 'Add .gitlab-ci.yml'
commit.add_files([
{
file_path: '.gitlab-ci.yml',
content: maven_upload_package_yaml
},
{
file_path: 'pom.xml',
content: package_pom_xml
},
{
file_path: 'settings.xml',
content: settings_xml
}
])
commit.add_files(
[
{ file_path: '.gitlab-ci.yml', content: maven_upload_package_yaml },
{ file_path: 'pom.xml', content: package_pom_xml },
{ file_path: 'settings.xml', content: settings_xml }
])
end
end
end
......
......@@ -171,11 +171,12 @@ module QA
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = package_project
commit.commit_message = 'Add .gitlab-ci.yml'
commit.add_files([
gitlab_ci_file,
pom_file,
settings_xml
])
commit.add_files(
[
gitlab_ci_file,
pom_file,
settings_xml
])
end
end
......
......@@ -39,15 +39,10 @@ module QA
commit.project = package_project
commit.commit_message = 'Add .gitlab-ci.yml'
commit.add_files([
{
file_path: '.gitlab-ci.yml',
content: gradle_upload_yaml
},
{
file_path: 'build.gradle',
content: build_upload_gradle
}
commit.add_files(
[
{ file_path: '.gitlab-ci.yml', content: gradle_upload_yaml },
{ file_path: 'build.gradle', content: build_upload_gradle }
])
end
end
......@@ -83,16 +78,11 @@ module QA
commit.project = client_project
commit.commit_message = 'Add files'
commit.add_files([
{
file_path: '.gitlab-ci.yml',
content: gradle_install_yaml
},
{
file_path: 'build.gradle',
content: build_install_gradle
}
])
commit.add_files(
[
{ file_path: '.gitlab-ci.yml', content: gradle_install_yaml },
{ file_path: 'build.gradle', content: build_install_gradle }
])
end
end
......
......@@ -105,14 +105,7 @@ module QA
nuget_upload_yaml = ERB.new(read_fixture('package_managers/nuget', 'nuget_upload_package.yaml.erb')).result(binding)
commit.project = project
commit.commit_message = 'Add .gitlab-ci.yml'
commit.update_files(
[
{
file_path: '.gitlab-ci.yml',
content: nuget_upload_yaml
}
]
)
commit.update_files([{ file_path: '.gitlab-ci.yml', content: nuget_upload_yaml }])
end
end
......@@ -137,9 +130,9 @@ module QA
commit.commit_message = 'Add new csproj file'
commit.add_files(
[
{
file_path: 'otherdotnet.csproj',
content: <<~EOF
{
file_path: 'otherdotnet.csproj',
content: <<~EOF
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
......@@ -148,18 +141,11 @@ module QA
</PropertyGroup>
</Project>
EOF
}
]
)
commit.update_files(
[
{
file_path: '.gitlab-ci.yml',
content: nuget_install_yaml
}
EOF
}
]
)
commit.update_files([{ file_path: '.gitlab-ci.yml', content: nuget_install_yaml }])
end
end
......
......@@ -101,9 +101,9 @@ module QA
commit.commit_message = 'Add files'
commit.update_files(
[
{
file_path: '.gitlab-ci.yml',
content: <<~YAML
{
file_path: '.gitlab-ci.yml',
content: <<~YAML
stages:
- deploy
- install
......@@ -132,11 +132,11 @@ module QA
- if: '$CI_COMMIT_BRANCH == "#{project.default_branch}"'
tags:
- "runner-for-#{project.name}"
YAML
},
{
file_path: 'dotnetcore.csproj',
content: <<~EOF
YAML
},
{
file_path: 'dotnetcore.csproj',
content: <<~EOF
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
......@@ -145,8 +145,8 @@ module QA
</PropertyGroup>
</Project>
EOF
}
EOF
}
]
)
end
......
......@@ -59,9 +59,7 @@ module QA
commit.branch = 'new_branch'
commit.start_branch = @project.default_branch
commit.commit_message = 'Add new file'
commit.add_files([
{ file_path: 'test.txt', content: 'new file' }
])
commit.add_files([{ file_path: 'test.txt', content: 'new file' }])
end
end.to raise_error(Resource::ApiFabricator::ResourceFabricationFailedError, /403 Forbidden - You are not allowed to push into this branch/)
end
......
......@@ -13,9 +13,7 @@ module QA
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = project
commit.branch = project.default_branch
commit.add_files([
{ file_path: '.gitlab/CODEOWNERS', content: '* @root' }
])
commit.add_files([{ file_path: '.gitlab/CODEOWNERS', content: '* @root' }])
end
end
......@@ -24,17 +22,13 @@ module QA
commit.project = project
commit.branch = 'codeowners_test'
commit.start_branch = project.default_branch
commit.add_files([
{ file_path: 'test1.txt', content: '1' }
])
commit.add_files([{ file_path: 'test1.txt', content: '1' }])
end
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = project
commit.branch = 'codeowners_test'
commit.add_files([
{ file_path: 'test2.txt', content: '2' }
])
commit.add_files([{ file_path: 'test2.txt', content: '2' }])
end
end
......
......@@ -67,9 +67,9 @@ def commit_ci_file
commit.commit_message = 'Add .gitlab-ci.yml'
commit.add_files(
[
{
file_path: '.gitlab-ci.yml',
content: <<~YAML
{
file_path: '.gitlab-ci.yml',
content: <<~YAML
test_merge_train:
tags:
- #{executor}
......@@ -78,8 +78,8 @@ def commit_ci_file
- echo 'OK!'
only:
- merge_requests
YAML
}
YAML
}
]
)
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment