Fix rubocop spec.

And `scss_lint`
This commit is contained in:
Timothy Andrew 2016-09-20 18:21:59 +05:30
parent 71d4bf721b
commit 231a9f5b87
5 changed files with 14 additions and 12 deletions

View File

@ -62,7 +62,7 @@
font-weight: 600;
}
&:text {
color: #8C8C8C;
color: #8c8c8c;
}
}
}
@ -103,7 +103,7 @@
}
p {
color: #8C8C8C;
color: #8c8c8c;
margin-bottom: $gl-padding;
}
}

View File

@ -43,7 +43,6 @@ class Deployment < ActiveRecord::Base
project.repository.is_ancestor?(commit.id, sha)
end
def update_merge_request_metrics
if environment.update_merge_request_metrics?
merge_requests = project.merge_requests.

View File

@ -27,12 +27,11 @@ module Gitlab
from(arel_table.project(Arel.sql('*')).order(arel_table[column_sym]).as(arel_table.table_name)).
project(average([arel_table[column_sym]], 'median')).
where(Arel::Nodes::Between.new(
Arel.sql("(select @row_id := @row_id + 1)"),
Arel::Nodes::And.new(
[Arel.sql('@ct/2.0'),
Arel.sql('@ct/2.0 + 1')]
)
)).
Arel.sql("(select @row_id := @row_id + 1)"),
Arel::Nodes::And.new(
[Arel.sql('@ct/2.0'),
Arel.sql('@ct/2.0 + 1')]
))).
# Disallow negative values
where(arel_table[column_sym].gteq(0))

View File

@ -7,8 +7,12 @@ describe 'CycleAnalytics#plan', feature: true do
subject { CycleAnalytics.new(project, from: from_date) }
generate_cycle_analytics_spec(phase: :plan,
data_fn: -> (context) { { issue: context.create(:issue, project: context.project),
branch_name: context.random_git_name } },
data_fn: -> (context) do
{
issue: context.create(:issue, project: context.project),
branch_name: context.random_git_name
}
end,
start_time_conditions: [["issue associated with a milestone", -> (context, data) { data[:issue].update(milestone: context.create(:milestone, project: context.project)) }],
["list label added to issue", -> (context, data) { data[:issue].update(label_ids: [context.create(:label, lists: [context.create(:list)]).id]) }]],
end_time_conditions: [["issue mentioned in a commit", -> (context, data) { context.create_commit_referencing_issue(data[:issue], branch_name: data[:branch_name]) }]],

View File

@ -276,7 +276,6 @@ describe MergeRequests::UpdateService, services: true do
expect(merge_request.reload.issues_closed).to match_array([first_issue, second_issue])
end
end
it 'removes `MergeRequestsClosingIssues` records when issues are not closed anymore' do
opts = {
@ -297,5 +296,6 @@ describe MergeRequests::UpdateService, services: true do
expect(merge_request.reload.issues_closed).to be_empty
end
end
end
end