GitLab wurde erfolgreich aktualisiert. Dank regelmäßiger Updates bleibt das THM GitLab sicher und Sie profitieren von den neuesten Funktionen. Danke für Ihre Geduld.

Commit a224f7b1 authored by Daniel Gerhardt's avatar Daniel Gerhardt

Restore Ruby 2.3 compatibility

* Use match instead match?
parent 7b9988c5
......@@ -30,7 +30,7 @@ def create_master_deployments!(name)
def create_merge_request_review_deployments!
@project
.merge_requests
.select { |mr| mr.source_branch.match?(/[a-zA-Z0-9]+/) }
.select { |mr| mr.source_branch.match(/[a-zA-Z0-9]+/) }
.sample(4)
.each do |merge_request|
next unless merge_request.diff_head_sha
......
......@@ -96,7 +96,7 @@ def lfs_route?
# Calling route_hash may be expensive. Only do it if we think there's a possible match
unless request.path.end_with?('/info/lfs/objects/batch',
'/info/lfs/locks', '/info/lfs/locks/verify') ||
%r{/info/lfs/locks/\d+/unlock\z}.match?(request.path)
%r{/info/lfs/locks/\d+/unlock\z}.match(request.path)
return false
end
......
......@@ -753,7 +753,7 @@
it "executes UPDATE query" do
recorded = ActiveRecord::QueryRecorder.new { subject }
expect(recorded.log.select { |l| l.match?(/UPDATE.*ci_builds/) }.count).to eq(1)
expect(recorded.log.select { |l| l.match(/UPDATE.*ci_builds/) }.count).to eq(1)
end
end
......@@ -761,7 +761,7 @@
it 'does not execute UPDATE query' do
recorded = ActiveRecord::QueryRecorder.new { subject }
expect(recorded.log.select { |l| l.match?(/UPDATE.*ci_builds/) }.count).to eq(0)
expect(recorded.log.select { |l| l.match(/UPDATE.*ci_builds/) }.count).to eq(0)
end
end
end
......
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