BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
a3331eee
Commit
a3331eee
authored
Nov 21, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated code based on feedback
parent
7a63021a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
cycle_analytics_controller.rb
app/controllers/projects/cycle_analytics_controller.rb
+1
-5
cycle_analytics_controller_spec.rb
spec/controllers/projects/cycle_analytics_controller_spec.rb
+2
-2
No files found.
app/controllers/projects/cycle_analytics_controller.rb
View file @
a3331eee
...
@@ -10,7 +10,7 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController
...
@@ -10,7 +10,7 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController
stats_values
,
cycle_analytics_json
=
generate_cycle_analytics_data
stats_values
,
cycle_analytics_json
=
generate_cycle_analytics_data
@cycle_analytics_no
t_set_up
=
stats_with_no_data?
(
stats_values
)
@cycle_analytics_no
_data
=
stats_values
.
blank?
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
format
.
html
...
@@ -68,8 +68,4 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController
...
@@ -68,8 +68,4 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController
[
stats_values
,
cycle_analytics_hash
]
[
stats_values
,
cycle_analytics_hash
]
end
end
def
stats_with_no_data?
(
stats_values
)
stats_values
.
blank?
||
stats_values
.
inject
(:
+
).
zero?
end
end
end
spec/controllers/projects/cycle_analytics_controller_spec.rb
View file @
a3331eee
...
@@ -17,7 +17,7 @@ describe Projects::CycleAnalyticsController do
...
@@ -17,7 +17,7 @@ describe Projects::CycleAnalyticsController do
project_id:
project
.
to_param
)
project_id:
project
.
to_param
)
expect
(
response
).
to
be_success
expect
(
response
).
to
be_success
expect
(
assigns
(
:cycle_analytics_no
t_set_up
)).
to
eq
(
true
)
expect
(
assigns
(
:cycle_analytics_no
_data
)).
to
eq
(
true
)
end
end
end
end
...
@@ -36,7 +36,7 @@ describe Projects::CycleAnalyticsController do
...
@@ -36,7 +36,7 @@ describe Projects::CycleAnalyticsController do
project_id:
project
.
to_param
)
project_id:
project
.
to_param
)
expect
(
response
).
to
be_success
expect
(
response
).
to
be_success
expect
(
assigns
(
:cycle_analytics_no
t_set_up
)).
to
eq
(
false
)
expect
(
assigns
(
:cycle_analytics_no
_data
)).
to
eq
(
false
)
end
end
end
end
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