Commit 93c5033e authored by Douwe Maan's avatar Douwe Maan

Fix new offenses

parent c7581179
...@@ -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
......
...@@ -22,7 +22,7 @@ def instrument_classes(instrumentation) ...@@ -22,7 +22,7 @@ def instrument_classes(instrumentation)
paths_to_instrument = { paths_to_instrument = {
%w(app finders) => %w(app finders), %w(app finders) => %w(app finders),
%w(app mailers emails) => %w(app mailers), %w(app mailers emails) => %w(app mailers),
['app', 'services', '**'] => %w(app services), %w(app services **) => %w(app services),
%w(lib gitlab conflicts) => ['lib'], %w(lib gitlab conflicts) => ['lib'],
%w(lib gitlab diff) => ['lib'], %w(lib gitlab diff) => ['lib'],
%w(lib gitlab email message) => ['lib'], %w(lib gitlab email message) => ['lib'],
......
...@@ -15,41 +15,41 @@ describe ExpandVariables do ...@@ -15,41 +15,41 @@ describe ExpandVariables do
result: 'keyvalue', result: 'keyvalue',
variables: [ variables: [
{ key: 'variable', value: 'value' } { key: 'variable', value: 'value' }
]}, ] },
{ value: 'key${variable}', { value: 'key${variable}',
result: 'keyvalue', result: 'keyvalue',
variables: [ variables: [
{ key: 'variable', value: 'value' } { key: 'variable', value: 'value' }
]}, ] },
{ value: 'key$variable$variable2', { value: 'key$variable$variable2',
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',
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',
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',
variables: [ variables: [
{ key: 'variable', value: 'value' }, { key: 'variable', value: 'value' },
{ key: 'variable2', value: 'result' } { key: 'variable2', value: 'result' }
]}, ] },
{ value: 'review/$CI_BUILD_REF_NAME', { value: 'review/$CI_BUILD_REF_NAME',
result: 'review/feature/add-review-apps', result: 'review/feature/add-review-apps',
variables: [ variables: [
{ key: 'CI_BUILD_REF_NAME', value: 'feature/add-review-apps' } { key: 'CI_BUILD_REF_NAME', value: 'feature/add-review-apps' }
]}, ] },
] ]
tests.each do |test| tests.each do |test|
......
...@@ -23,14 +23,15 @@ describe Gitlab::ImportSources do ...@@ -23,14 +23,15 @@ describe Gitlab::ImportSources do
it 'returns an array' do it 'returns an array' do
expected = expected =
%w( %w(
github github
bitbucket bitbucket
gitlab gitlab
google_code google_code
fogbugz fogbugz
git git
gitlab_project gitlab_project
gitea) gitea
)
expect(described_class.values).to eq(expected) expect(described_class.values).to eq(expected)
end end
...@@ -40,13 +41,14 @@ gitea) ...@@ -40,13 +41,14 @@ gitea)
it 'returns an array of importer names' do it 'returns an array of importer names' do
expected = expected =
%w( %w(
github github
bitbucket bitbucket
gitlab gitlab
google_code google_code
fogbugz fogbugz
gitlab_project gitlab_project
gitea) gitea
)
expect(described_class.importer_names).to eq(expected) expect(described_class.importer_names).to eq(expected)
end end
......
...@@ -22,9 +22,10 @@ describe API::Labels, api: true do ...@@ -22,9 +22,10 @@ describe API::Labels, api: true do
create(:labeled_merge_request, labels: [priority_label], author: user, source_project: project ) create(:labeled_merge_request, labels: [priority_label], author: user, source_project: project )
expected_keys = %w( expected_keys = %w(
id name color description id name color description
open_issues_count closed_issues_count open_merge_requests_count open_issues_count closed_issues_count open_merge_requests_count
subscribed priority) subscribed priority
)
get api("/projects/#{project.id}/labels", user) get api("/projects/#{project.id}/labels", user)
......
...@@ -22,9 +22,10 @@ describe API::V3::Labels, api: true do ...@@ -22,9 +22,10 @@ describe API::V3::Labels, api: true do
create(:labeled_merge_request, labels: [priority_label], author: user, source_project: project ) create(:labeled_merge_request, labels: [priority_label], author: user, source_project: project )
expected_keys = %w( expected_keys = %w(
id name color description id name color description
open_issues_count closed_issues_count open_merge_requests_count open_issues_count closed_issues_count open_merge_requests_count
subscribed priority) subscribed priority
)
get v3_api("/projects/#{project.id}/labels", user) get v3_api("/projects/#{project.id}/labels", user)
......
...@@ -60,7 +60,7 @@ describe MergeRequests::ResolveService do ...@@ -60,7 +60,7 @@ describe MergeRequests::ResolveService do
it 'creates a commit with the correct parents' do it 'creates a commit with the correct parents' do
expect(merge_request.source_branch_head.parents.map(&:id)) expect(merge_request.source_branch_head.parents.map(&:id))
.to eq(%w(1450cd639e0bc6721eb02800169e464f212cde06 .to eq(%w(1450cd639e0bc6721eb02800169e464f212cde06
824be604a34828eb682305f0d963056cfac87b2d)) 824be604a34828eb682305f0d963056cfac87b2d))
end end
end end
...@@ -126,7 +126,7 @@ describe MergeRequests::ResolveService do ...@@ -126,7 +126,7 @@ describe MergeRequests::ResolveService do
it 'creates a commit with the correct parents' do it 'creates a commit with the correct parents' do
expect(merge_request.source_branch_head.parents.map(&:id)) expect(merge_request.source_branch_head.parents.map(&:id))
.to eq(%w(1450cd639e0bc6721eb02800169e464f212cde06 .to eq(%w(1450cd639e0bc6721eb02800169e464f212cde06
824be604a34828eb682305f0d963056cfac87b2d)) 824be604a34828eb682305f0d963056cfac87b2d))
end end
it 'sets the content to the content given' do it 'sets the content to the content given' do
......
...@@ -101,11 +101,12 @@ eos ...@@ -101,11 +101,12 @@ eos
] ]
commits = %w( commits = %w(
5937ac0a7beb003549fc5fd26fc247adbce4a52e 5937ac0a7beb003549fc5fd26fc247adbce4a52e
570e7b2abdd848b95f2f578043fc23bd6f6fd24d 570e7b2abdd848b95f2f578043fc23bd6f6fd24d
6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9
d14d6c0abdd253381df51a723d58691b2ee1ab08 d14d6c0abdd253381df51a723d58691b2ee1ab08
c1acaa58bbcbc3eafe538cb8274ba387047b69f8).reverse # last commit is recent one c1acaa58bbcbc3eafe538cb8274ba387047b69f8
).reverse # last commit is recent one
OpenStruct.new( OpenStruct.new(
source_branch: 'master', source_branch: 'master',
......
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