Commit b58c01e2 authored by Valery Sizov's avatar Valery Sizov

rubocop fix

parent e05fd55e
...@@ -7,7 +7,6 @@ class Projects::MirrorsController < Projects::ApplicationController ...@@ -7,7 +7,6 @@ class Projects::MirrorsController < Projects::ApplicationController
layout "project_settings" layout "project_settings"
def show def show
end end
def update def update
......
...@@ -34,7 +34,6 @@ class ProjectTeam ...@@ -34,7 +34,6 @@ class ProjectTeam
end end
def add_users(users, access, current_user = nil) def add_users(users, access, current_user = nil)
return false if group_member_lock return false if group_member_lock
ProjectMember.add_users_to_projects( ProjectMember.add_users_to_projects(
......
...@@ -3,7 +3,6 @@ module Ci ...@@ -3,7 +3,6 @@ module Ci
attr_reader :pipeline attr_reader :pipeline
def execute(ignore_skip_ci: false, save_on_errors: true, trigger_request: nil, mirror_update: false) def execute(ignore_skip_ci: false, save_on_errors: true, trigger_request: nil, mirror_update: false)
@pipeline = Ci::Pipeline.new( @pipeline = Ci::Pipeline.new(
project: project, project: project,
ref: ref, ref: ref,
......
...@@ -33,7 +33,6 @@ module Oauth2 ...@@ -33,7 +33,6 @@ module Oauth2
Doorkeeper::AccessToken.by_token(logout_token) Doorkeeper::AccessToken.by_token(logout_token)
end end
end end
end end
end end
...@@ -8,7 +8,6 @@ class Spinach::Features::GroupsManagement < Spinach::FeatureSteps ...@@ -8,7 +8,6 @@ class Spinach::Features::GroupsManagement < Spinach::FeatureSteps
step '"Open" is in group "Sourcing"' do step '"Open" is in group "Sourcing"' do
@group = Group.find_by(name: "Sourcing") @group = Group.find_by(name: "Sourcing")
@project ||= create(:project, name: "Open", namespace: @group) @project ||= create(:project, name: "Open", namespace: @group)
end end
step '"Mary Jane" has master access for project "Open"' do step '"Mary Jane" has master access for project "Open"' do
......
...@@ -3,7 +3,6 @@ module API ...@@ -3,7 +3,6 @@ module API
before { authenticated_as_admin! } before { authenticated_as_admin! }
resource :license do resource :license do
# Get information on the currently active license # Get information on the currently active license
# #
# Example request: # Example request:
......
...@@ -13,6 +13,7 @@ feature 'Edit Merge Request', feature: true do ...@@ -13,6 +13,7 @@ feature 'Edit Merge Request', feature: true do
visit edit_namespace_project_merge_request_path(project.namespace, project, merge_request) visit edit_namespace_project_merge_request_path(project.namespace, project, merge_request)
end end
end
context 'editing a MR' do context 'editing a MR' do
it 'has class js-quick-submit in form' do it 'has class js-quick-submit in form' do
......
...@@ -34,5 +34,4 @@ feature 'Global elastic search', feature: true do ...@@ -34,5 +34,4 @@ feature 'Global elastic search', feature: true do
expect(page).to have_selector('.gl-pagination .page', count: 2) expect(page).to have_selector('.gl-pagination .page', count: 2)
end end
end end
end end
...@@ -45,6 +45,5 @@ describe EE::Gitlab::LDAP::Group, lib: true do ...@@ -45,6 +45,5 @@ describe EE::Gitlab::LDAP::Group, lib: true do
) )
) )
end end
end end
end end
...@@ -33,7 +33,6 @@ describe EE::Gitlab::LDAP::Sync::Groups, lib: true do ...@@ -33,7 +33,6 @@ describe EE::Gitlab::LDAP::Sync::Groups, lib: true do
end end
context 'when group_base is present' do context 'when group_base is present' do
context 'and admin_group and external_groups are not present' do context 'and admin_group and external_groups are not present' do
before { stub_ldap_config(group_base: 'dc=example,dc=com') } before { stub_ldap_config(group_base: 'dc=example,dc=com') }
......
...@@ -26,6 +26,5 @@ describe Gitlab::GitAccessWiki, lib: true do ...@@ -26,6 +26,5 @@ describe Gitlab::GitAccessWiki, lib: true do
it { expect(subject.allowed?).to be_falsey } it { expect(subject.allowed?).to be_falsey }
end end
end end
end end
end end
require "spec_helper" require "spec_helper"
describe Gitlab::LDAP::Person do describe Gitlab::LDAP::Person do
describe "#kerberos_principal" do describe "#kerberos_principal" do
let(:entry) do let(:entry) do
ldif = "dn: cn=foo, dc=bar, dc=com\n" ldif = "dn: cn=foo, dc=bar, dc=com\n"
ldif += "sAMAccountName: #{sam_account_name}\n" if sam_account_name ldif += "sAMAccountName: #{sam_account_name}\n" if sam_account_name
...@@ -13,7 +11,6 @@ describe Gitlab::LDAP::Person do ...@@ -13,7 +11,6 @@ describe Gitlab::LDAP::Person do
subject { Gitlab::LDAP::Person.new(entry, 'ldapmain') } subject { Gitlab::LDAP::Person.new(entry, 'ldapmain') }
context "when sAMAccountName is not defined (non-AD LDAP server)" do context "when sAMAccountName is not defined (non-AD LDAP server)" do
let(:sam_account_name) { nil } let(:sam_account_name) { nil }
it "returns nil" do it "returns nil" do
...@@ -22,7 +19,6 @@ describe Gitlab::LDAP::Person do ...@@ -22,7 +19,6 @@ describe Gitlab::LDAP::Person do
end end
context "when sAMAccountName is defined (AD server)" do context "when sAMAccountName is defined (AD server)" do
let(:sam_account_name) { "mylogin" } let(:sam_account_name) { "mylogin" }
it "returns the principal combining sAMAccountName and DC components of the distinguishedName" do it "returns the principal combining sAMAccountName and DC components of the distinguishedName" do
...@@ -32,7 +28,6 @@ describe Gitlab::LDAP::Person do ...@@ -32,7 +28,6 @@ describe Gitlab::LDAP::Person do
end end
describe "#ssh_keys" do describe "#ssh_keys" do
let(:ssh_key) { "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCrSQHff6a1rMqBdHFt+FwIbytMZ+hJKN3KLkTtOWtSvNIriGhnTdn4rs+tjD/w+z+revytyWnMDM9dS7J8vQi006B16+hc9Xf82crqRoPRDnBytgAFFQY1G/55ql2zdfsC5yvpDOFzuwIJq5dNGsojS82t6HNmmKPq130fzsenFnj5v1pl3OJvk513oduUyKiZBGTroWTn7H/eOPtu7s9MD7pAdEjqYKFLeaKmyidiLmLqQlCRj3Tl2U9oyFg4PYNc0bL5FZJ/Z6t0Ds3i/a2RanQiKxrvgu3GSnUKMx7WIX373baL4jeM7cprRGiOY/1NcS+1cAjfJ8oaxQF/1dYj" } let(:ssh_key) { "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCrSQHff6a1rMqBdHFt+FwIbytMZ+hJKN3KLkTtOWtSvNIriGhnTdn4rs+tjD/w+z+revytyWnMDM9dS7J8vQi006B16+hc9Xf82crqRoPRDnBytgAFFQY1G/55ql2zdfsC5yvpDOFzuwIJq5dNGsojS82t6HNmmKPq130fzsenFnj5v1pl3OJvk513oduUyKiZBGTroWTn7H/eOPtu7s9MD7pAdEjqYKFLeaKmyidiLmLqQlCRj3Tl2U9oyFg4PYNc0bL5FZJ/Z6t0Ds3i/a2RanQiKxrvgu3GSnUKMx7WIX373baL4jeM7cprRGiOY/1NcS+1cAjfJ8oaxQF/1dYj" }
let(:ssh_key_attribute_name) { 'altSecurityIdentities' } let(:ssh_key_attribute_name) { 'altSecurityIdentities' }
let(:entry) do let(:entry) do
...@@ -46,7 +41,6 @@ describe Gitlab::LDAP::Person do ...@@ -46,7 +41,6 @@ describe Gitlab::LDAP::Person do
end end
context "when the SSH key is literal" do context "when the SSH key is literal" do
let(:keys) { "#{ssh_key_attribute_name}: #{ssh_key}" } let(:keys) { "#{ssh_key_attribute_name}: #{ssh_key}" }
it "includes the SSH key" do it "includes the SSH key" do
...@@ -55,7 +49,6 @@ describe Gitlab::LDAP::Person do ...@@ -55,7 +49,6 @@ describe Gitlab::LDAP::Person do
end end
context "when the SSH key is prefixed" do context "when the SSH key is prefixed" do
let(:keys) { "#{ssh_key_attribute_name}: SSHKey:#{ssh_key}" } let(:keys) { "#{ssh_key_attribute_name}: SSHKey:#{ssh_key}" }
it "includes the SSH key" do it "includes the SSH key" do
...@@ -64,7 +57,6 @@ describe Gitlab::LDAP::Person do ...@@ -64,7 +57,6 @@ describe Gitlab::LDAP::Person do
end end
context "when the SSH key is suffixed" do context "when the SSH key is suffixed" do
let(:keys) { "#{ssh_key_attribute_name}: #{ssh_key} (SSH key)" } let(:keys) { "#{ssh_key_attribute_name}: #{ssh_key} (SSH key)" }
it "includes the SSH key" do it "includes the SSH key" do
...@@ -73,7 +65,6 @@ describe Gitlab::LDAP::Person do ...@@ -73,7 +65,6 @@ describe Gitlab::LDAP::Person do
end end
context "when the SSH key is followed by a newline" do context "when the SSH key is followed by a newline" do
let(:keys) { "#{ssh_key_attribute_name}: #{ssh_key}\n" } let(:keys) { "#{ssh_key_attribute_name}: #{ssh_key}\n" }
it "includes the SSH key" do it "includes the SSH key" do
...@@ -82,7 +73,6 @@ describe Gitlab::LDAP::Person do ...@@ -82,7 +73,6 @@ describe Gitlab::LDAP::Person do
end end
context "when the key is not an SSH key" do context "when the key is not an SSH key" do
let(:keys) { "#{ssh_key_attribute_name}: KerberosKey:bogus" } let(:keys) { "#{ssh_key_attribute_name}: KerberosKey:bogus" }
it "is empty" do it "is empty" do
...@@ -91,7 +81,6 @@ describe Gitlab::LDAP::Person do ...@@ -91,7 +81,6 @@ describe Gitlab::LDAP::Person do
end end
context "when there are multiple keys" do context "when there are multiple keys" do
let(:keys) { "#{ssh_key_attribute_name}: #{ssh_key}\n#{ssh_key_attribute_name}: KerberosKey:bogus\n#{ssh_key_attribute_name}: ssh-rsa keykeykey" } let(:keys) { "#{ssh_key_attribute_name}: #{ssh_key}\n#{ssh_key_attribute_name}: KerberosKey:bogus\n#{ssh_key_attribute_name}: ssh-rsa keykeykey" }
it "includes both SSH keys" do it "includes both SSH keys" do
......
...@@ -150,7 +150,7 @@ describe Ci::Pipeline, models: true do ...@@ -150,7 +150,7 @@ describe Ci::Pipeline, models: true do
commit_status.success commit_status.success
end end
ends end
context 'updates' do context 'updates' do
let(:current) { Time.now.change(usec: 0) } let(:current) { Time.now.change(usec: 0) }
......
...@@ -105,7 +105,6 @@ describe License do ...@@ -105,7 +105,6 @@ describe License do
it "is valid" do it "is valid" do
expect(license).not_to be_valid expect(license).not_to be_valid
end end
end end
context "when the license has yet to expire" do context "when the license has yet to expire" do
...@@ -261,5 +260,4 @@ describe License do ...@@ -261,5 +260,4 @@ describe License do
build(:license, data: gl_license.export) build(:license, data: gl_license.export)
end end
end end
end end
...@@ -176,7 +176,6 @@ describe JenkinsService do ...@@ -176,7 +176,6 @@ describe JenkinsService do
expect(@jenkins_service.password).to eq('password') expect(@jenkins_service.password).to eq('password')
expect(@jenkins_service.jenkins_url).to eq('http://jenkins_edited.example.com/') expect(@jenkins_service.jenkins_url).to eq('http://jenkins_edited.example.com/')
end end
end end
end end
end end
...@@ -1187,7 +1187,6 @@ describe Project, models: true do ...@@ -1187,7 +1187,6 @@ describe Project, models: true do
expect(project.reload.import_url).to eq('http://test.com') expect(project.reload.import_url).to eq('http://test.com')
end end
end end
end end
describe '#protected_branch?' do describe '#protected_branch?' do
...@@ -1362,7 +1361,6 @@ describe Project, models: true do ...@@ -1362,7 +1361,6 @@ describe Project, models: true do
end end
describe 'Project import job' do describe 'Project import job' do
let(:project) { create(:empty_project) } let(:project) { create(:empty_project) }
let(:mirror) { false } let(:mirror) { false }
......
...@@ -1370,5 +1370,4 @@ describe Repository, models: true do ...@@ -1370,5 +1370,4 @@ describe Repository, models: true do
rugged = repository.rugged rugged = repository.rugged
rugged.references.create("refs/remotes/#{remote_name}/#{branch_name}", target.id) rugged.references.create("refs/remotes/#{remote_name}/#{branch_name}", target.id)
end end
end end
...@@ -159,5 +159,4 @@ describe API::API, api: true do ...@@ -159,5 +159,4 @@ describe API::API, api: true do
end end
end end
end end
end end
...@@ -17,5 +17,4 @@ describe PathLocks::LockService, services: true do ...@@ -17,5 +17,4 @@ describe PathLocks::LockService, services: true do
described_class.new(project, current_user).execute(path) described_class.new(project, current_user).execute(path)
end.to raise_exception(PathLocks::LockService::AccessDenied) end.to raise_exception(PathLocks::LockService::AccessDenied)
end end
end end
...@@ -20,5 +20,4 @@ describe PathLocks::UnlockService, services: true do ...@@ -20,5 +20,4 @@ describe PathLocks::UnlockService, services: true do
described_class.new(project, user).execute(path_lock) described_class.new(project, user).execute(path_lock)
end.to raise_exception(PathLocks::UnlockService::AccessDenied) end.to raise_exception(PathLocks::UnlockService::AccessDenied)
end end
end end
...@@ -122,7 +122,6 @@ describe Projects::UpdateRemoteMirrorService do ...@@ -122,7 +122,6 @@ describe Projects::UpdateRemoteMirrorService do
end end
end end
end end
end end
def create_branch(repository, branch_name) def create_branch(repository, branch_name)
......
require 'spec_helper' require 'spec_helper'
describe Projects::UpdateRepositoryStorageService, services: true do describe Projects::UpdateRepositoryStorageService, services: true do
subject { described_class.new(project) } subject { described_class.new(project) }
describe "#execute" do describe "#execute" do
......
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