Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b7fb1805
Commit
b7fb1805
authored
Nov 26, 2019
by
Aakriti Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename ConvDev model and presenter to DevOpsScore
The routes and controller stay unchanged.
parent
973c75d7
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
17 additions
and
17 deletions
+17
-17
app/controllers/instance_statistics/conversational_development_index_controller.rb
...statistics/conversational_development_index_controller.rb
+1
-1
app/helpers/dev_ops_score_helper.rb
app/helpers/dev_ops_score_helper.rb
+1
-1
app/models/dev_ops_score/card.rb
app/models/dev_ops_score/card.rb
+1
-1
app/models/dev_ops_score/idea_to_production_step.rb
app/models/dev_ops_score/idea_to_production_step.rb
+1
-1
app/models/dev_ops_score/metric.rb
app/models/dev_ops_score/metric.rb
+1
-1
app/presenters/dev_ops_score/metric_presenter.rb
app/presenters/dev_ops_score/metric_presenter.rb
+1
-1
app/services/submit_usage_ping_service.rb
app/services/submit_usage_ping_service.rb
+1
-1
db/fixtures/development/21_dev_ops_score_metrics.rb
db/fixtures/development/21_dev_ops_score_metrics.rb
+3
-3
spec/factories/dev_ops_score_metrics.rb
spec/factories/dev_ops_score_metrics.rb
+1
-1
spec/models/dev_ops_score/metric_spec.rb
spec/models/dev_ops_score/metric_spec.rb
+1
-1
spec/presenters/dev_ops_score/metric_presenter_spec.rb
spec/presenters/dev_ops_score/metric_presenter_spec.rb
+1
-1
spec/services/submit_usage_ping_service_spec.rb
spec/services/submit_usage_ping_service_spec.rb
+4
-4
No files found.
app/controllers/instance_statistics/conversational_development_index_controller.rb
View file @
b7fb1805
...
...
@@ -3,7 +3,7 @@
class
InstanceStatistics::ConversationalDevelopmentIndexController
<
InstanceStatistics
::
ApplicationController
# rubocop: disable CodeReuse/ActiveRecord
def
index
@metric
=
ConversationalDevelopmentIndex
::
Metric
.
order
(
:created_at
).
last
&
.
present
@metric
=
DevOpsScore
::
Metric
.
order
(
:created_at
).
last
&
.
present
end
# rubocop: enable CodeReuse/ActiveRecord
end
app/helpers/
conversational_development_index
_helper.rb
→
app/helpers/
dev_ops_score
_helper.rb
View file @
b7fb1805
# frozen_string_literal: true
module
ConversationalDevelopmentIndex
Helper
module
DevOpsScore
Helper
def
score_level
(
score
)
if
score
<
33.33
'low'
...
...
app/models/
conversational_development_index
/card.rb
→
app/models/
dev_ops_score
/card.rb
View file @
b7fb1805
# frozen_string_literal: true
module
ConversationalDevelopmentIndex
module
DevOpsScore
class
Card
attr_accessor
:metric
,
:title
,
:description
,
:feature
,
:blog
,
:docs
...
...
app/models/
conversational_development_index
/idea_to_production_step.rb
→
app/models/
dev_ops_score
/idea_to_production_step.rb
View file @
b7fb1805
# frozen_string_literal: true
module
ConversationalDevelopmentIndex
module
DevOpsScore
class
IdeaToProductionStep
attr_accessor
:metric
,
:title
,
:features
...
...
app/models/
conversational_development_index
/metric.rb
→
app/models/
dev_ops_score
/metric.rb
View file @
b7fb1805
# frozen_string_literal: true
module
ConversationalDevelopmentIndex
module
DevOpsScore
class
Metric
<
ApplicationRecord
include
Presentable
...
...
app/presenters/
conversational_development_index
/metric_presenter.rb
→
app/presenters/
dev_ops_score
/metric_presenter.rb
View file @
b7fb1805
# frozen_string_literal: true
module
ConversationalDevelopmentIndex
module
DevOpsScore
class
MetricPresenter
<
Gitlab
::
View
::
Presenter
::
Simple
def
cards
[
...
...
app/services/submit_usage_ping_service.rb
View file @
b7fb1805
...
...
@@ -38,7 +38,7 @@ class SubmitUsagePingService
def
store_metrics
(
response
)
return
unless
response
[
'conv_index'
].
present?
ConversationalDevelopmentIndex
::
Metric
.
create!
(
DevOpsScore
::
Metric
.
create!
(
response
[
'conv_index'
].
slice
(
*
METRICS
)
)
end
...
...
db/fixtures/development/21_
conversational_development_index
_metrics.rb
→
db/fixtures/development/21_
dev_ops_score
_metrics.rb
View file @
b7fb1805
Gitlab
::
Seeder
.
quiet
do
conversational_development_index_metric
=
ConversationalDevelopmentIndex
::
Metric
.
new
(
dev_ops_score_metric
=
DevOpsScore
::
Metric
.
new
(
leader_issues:
10.2
,
instance_issues:
3.2
,
...
...
@@ -31,10 +31,10 @@ Gitlab::Seeder.quiet do
instance_service_desk_issues:
15.1
)
if
conversational_development_index
_metric
.
save
if
dev_ops_score
_metric
.
save
print
'.'
else
puts
conversational_development_index
_metric
.
errors
.
full_messages
puts
dev_ops_score
_metric
.
errors
.
full_messages
print
'F'
end
end
spec/factories/dev_ops_score_metrics.rb
View file @
b7fb1805
# frozen_string_literal: true
FactoryBot
.
define
do
factory
:dev_ops_score_metric
,
class:
ConversationalDevelopmentIndex
::
Metric
do
factory
:dev_ops_score_metric
,
class:
DevOpsScore
::
Metric
do
leader_issues
{
9.256
}
instance_issues
{
1.234
}
percentage_issues
{
13.331
}
...
...
spec/models/
conversational_development_index
/metric_spec.rb
→
spec/models/
dev_ops_score
/metric_spec.rb
View file @
b7fb1805
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
ConversationalDevelopmentIndex
::
Metric
do
describe
DevOpsScore
::
Metric
do
let
(
:conv_dev_index
)
{
create
(
:dev_ops_score_metric
)
}
describe
'#percentage_score'
do
...
...
spec/presenters/
conversational_development_index
/metric_presenter_spec.rb
→
spec/presenters/
dev_ops_score
/metric_presenter_spec.rb
View file @
b7fb1805
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
ConversationalDevelopmentIndex
::
MetricPresenter
do
describe
DevOpsScore
::
MetricPresenter
do
subject
{
described_class
.
new
(
metric
)
}
let
(
:metric
)
{
build
(
:dev_ops_score_metric
)
}
...
...
spec/services/submit_usage_ping_service_spec.rb
View file @
b7fb1805
...
...
@@ -46,12 +46,12 @@ describe SubmitUsagePingService do
stub_response
(
with_conv_index_params
)
expect
{
subject
.
execute
}
.
to
change
{
ConversationalDevelopmentIndex
::
Metric
.
count
}
.
to
change
{
DevOpsScore
::
Metric
.
count
}
.
by
(
1
)
expect
(
ConversationalDevelopmentIndex
::
Metric
.
last
.
leader_issues
).
to
eq
10.2
expect
(
ConversationalDevelopmentIndex
::
Metric
.
last
.
instance_issues
).
to
eq
3.2
expect
(
ConversationalDevelopmentIndex
::
Metric
.
last
.
percentage_issues
).
to
eq
31.37
expect
(
DevOpsScore
::
Metric
.
last
.
leader_issues
).
to
eq
10.2
expect
(
DevOpsScore
::
Metric
.
last
.
instance_issues
).
to
eq
3.2
expect
(
DevOpsScore
::
Metric
.
last
.
percentage_issues
).
to
eq
31.37
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment