hubstats 0.5.4 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.markdown +9 -0
  3. data/app/controllers/hubstats/deploys_controller.rb +2 -2
  4. data/app/controllers/hubstats/pull_requests_controller.rb +1 -1
  5. data/app/controllers/hubstats/repos_controller.rb +11 -34
  6. data/app/controllers/hubstats/teams_controller.rb +7 -6
  7. data/app/controllers/hubstats/users_controller.rb +1 -7
  8. data/app/helpers/hubstats/metrics_helper.rb +105 -0
  9. data/app/models/hubstats/comment.rb +2 -0
  10. data/app/models/hubstats/deploy.rb +15 -1
  11. data/app/models/hubstats/label.rb +2 -0
  12. data/app/models/hubstats/pull_request.rb +3 -1
  13. data/app/models/hubstats/repo.rb +2 -0
  14. data/app/models/hubstats/team.rb +2 -0
  15. data/app/models/hubstats/user.rb +3 -1
  16. data/app/views/hubstats/deploys/index.html.erb +4 -0
  17. data/app/views/hubstats/deploys/show.html.erb +1 -1
  18. data/app/views/hubstats/partials/_dashboard.html.erb +14 -0
  19. data/app/views/hubstats/partials/_header.html.erb +5 -5
  20. data/app/views/hubstats/partials/_quick_stats_one.html.erb +93 -0
  21. data/app/views/hubstats/partials/_quick_stats_two.html.erb +93 -0
  22. data/app/views/hubstats/pull_requests/show.html.erb +1 -1
  23. data/app/views/hubstats/repos/index.html.erb +14 -0
  24. data/app/views/hubstats/repos/show.html.erb +2 -2
  25. data/app/views/hubstats/teams/index.html.erb +3 -0
  26. data/app/views/hubstats/teams/show.html.erb +2 -2
  27. data/app/views/hubstats/users/index.html.erb +4 -14
  28. data/app/views/hubstats/users/show.html.erb +1 -1
  29. data/config/routes.rb +1 -2
  30. data/lib/hubstats/engine.rb +1 -0
  31. data/lib/hubstats/version.rb +1 -1
  32. data/spec/controllers/hubstats/deploys_controller_spec.rb +18 -15
  33. data/spec/controllers/hubstats/pull_requests_controller_spec.rb +17 -12
  34. data/spec/controllers/hubstats/repos_controller_spec.rb +21 -14
  35. data/spec/controllers/hubstats/teams_controller_spec.rb +5 -4
  36. data/spec/controllers/hubstats/users_controller_spec.rb +10 -9
  37. data/spec/factories/comment.rb +3 -1
  38. data/spec/factories/pull_requests.rb +5 -3
  39. data/spec/factories/repo.rb +1 -1
  40. data/spec/factories/users.rb +1 -1
  41. data/spec/lib/hubstats/events_handler_spec.rb +10 -3
  42. data/spec/lib/hubstats/github_api_spec.rb +2 -0
  43. data/spec/models/hubstats/comment_spec.rb +7 -15
  44. data/spec/models/hubstats/pull_request_spec.rb +22 -4
  45. data/spec/models/hubstats/team_spec.rb +1 -1
  46. data/spec/models/hubstats/user_spec.rb +6 -6
  47. metadata +7 -5
  48. data/app/views/hubstats/partials/_quick_addition_stats.html.erb +0 -33
  49. data/app/views/hubstats/partials/_quick_stats.html.erb +0 -69
  50. data/app/views/hubstats/repos/dashboard.html.erb +0 -24
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hubstats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elliot Hursh
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-07-21 00:00:00.000000000 Z
12
+ date: 2015-07-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -203,6 +203,7 @@ files:
203
203
  - app/controllers/hubstats/users_controller.rb
204
204
  - app/helpers/hubstats/application_helper.rb
205
205
  - app/helpers/hubstats/events_helper.rb
206
+ - app/helpers/hubstats/metrics_helper.rb
206
207
  - app/helpers/hubstats/pull_requests_helper.rb
207
208
  - app/helpers/hubstats/repos_helper.rb
208
209
  - app/helpers/hubstats/users_helper.rb
@@ -217,21 +218,22 @@ files:
217
218
  - app/views/hubstats/deploys/show.html.erb
218
219
  - app/views/hubstats/partials/_comment-condensed.html.erb
219
220
  - app/views/hubstats/partials/_comment.html.erb
221
+ - app/views/hubstats/partials/_dashboard.html.erb
220
222
  - app/views/hubstats/partials/_deploy-condensed.html.erb
221
223
  - app/views/hubstats/partials/_deploy.html.erb
222
224
  - app/views/hubstats/partials/_footer.html.erb
223
225
  - app/views/hubstats/partials/_header.html.erb
224
226
  - app/views/hubstats/partials/_pull-condensed.html.erb
225
227
  - app/views/hubstats/partials/_pull.html.erb
226
- - app/views/hubstats/partials/_quick_addition_stats.html.erb
227
- - app/views/hubstats/partials/_quick_stats.html.erb
228
+ - app/views/hubstats/partials/_quick_stats_one.html.erb
229
+ - app/views/hubstats/partials/_quick_stats_two.html.erb
228
230
  - app/views/hubstats/partials/_repo.html.erb
229
231
  - app/views/hubstats/partials/_team.html.erb
230
232
  - app/views/hubstats/partials/_user-condensed.html.erb
231
233
  - app/views/hubstats/partials/_user.html.erb
232
234
  - app/views/hubstats/pull_requests/index.html.erb
233
235
  - app/views/hubstats/pull_requests/show.html.erb
234
- - app/views/hubstats/repos/dashboard.html.erb
236
+ - app/views/hubstats/repos/index.html.erb
235
237
  - app/views/hubstats/repos/show.html.erb
236
238
  - app/views/hubstats/tables/_comments-condensed.html.erb
237
239
  - app/views/hubstats/tables/_comments.html.erb
@@ -1,33 +0,0 @@
1
- <!-- All of the options for showing any stats that have to do with additions -->
2
- <div class="col-lg-<%= (12-(@stats_additions.length)*2)/2 %>"></div>
3
-
4
- <% if @stats_additions.has_key? :net_additions %>
5
- <div class="col col-lg-2 col-md-4 col-sm-4 col-xs-4 text-center">
6
- <h1> <%= @stats_additions[:net_additions] %> </h1>
7
- <h4> Net Additions </h4>
8
- </div>
9
- <% end %>
10
- <% if @stats_additions.has_key? :avg_additions %>
11
- <div class="col col-lg-2 col-md-4 col-sm-4 col-xs-4 text-center">
12
- <h1> <%= @stats_additions[:avg_additions] %> </h1>
13
- <h4> Average Additions per Pull Request </h4>
14
- </div>
15
- <% end %>
16
- <% if @stats_additions.has_key? :avg_deletions%>
17
- <div class="col col-lg-2 col-md-4 col-sm-4 col-xs-4 text-center">
18
- <h1><%= @stats_additions[:avg_deletions] %> </h1>
19
- <h4> Average Deletions per Pull Request </h4>
20
- </div>
21
- <% end %>
22
- <% if @stats_additions.has_key? :additions %>
23
- <div class="col col-lg-2 col-md-4 col-sm-4 col-xs-4 text-center">
24
- <h1> <%= @stats_additions[:additions] %> </h1>
25
- <h4> Additions </h4>
26
- </div>
27
- <% end %>
28
- <% if @stats_additions.has_key? :deletions%>
29
- <div class="col col-lg-2 col-md-4 col-sm-4 col-xs-4 text-center">
30
- <h1><%= @stats_additions[:deletions] %> </h1>
31
- <h4> Deletions </h4>
32
- </div>
33
- <% end %>
@@ -1,69 +0,0 @@
1
- <!-- All of the options for showing any stats -->
2
- <div class="col-lg-<%= (12-(@stats_basics.length)*2)/2 %>"></div>
3
-
4
- <% if @stats_basics.has_key? :user_count %>
5
- <div class="col col-lg-2 col-md-3 col-sm-3 col-xs-3 text-center">
6
- <h1> <%= @stats_basics[:user_count] %> </h1>
7
- <h4> Active Users </h4>
8
- </div>
9
- <% end %>
10
- <% if @stats_basics.has_key? :deploy_count %>
11
- <div class="col col-lg-2 col-md-3 col-sm-3 col-xs-3 text-center">
12
- <h1> <%= @stats_basics[:deploy_count] %> </h1>
13
- <h4> Deployments </h4>
14
- </div>
15
- <% end %>
16
- <% if @stats_basics.has_key? :pull_count %>
17
- <div class="col col-lg-2 col-md-3 col-sm-3 col-xs-3 text-center">
18
- <h1> <%= @stats_basics[:pull_count] %> </h1>
19
- <h4> Merged Pull Requests </h4>
20
- </div>
21
- <% end %>
22
- <% if @stats_basics.has_key? :comment_count %>
23
- <div class="col col-lg-2 col-md-3 col-sm-3 col-xs-3 text-center">
24
- <h1><%= @stats_basics[:comment_count] %> </h1>
25
- <h4> Comments </h4>
26
- </div>
27
- <% end %>
28
- <% if @stats_basics.has_key? :review_count %>
29
- <div class="col col-lg-2 col-md-3 col-sm-3 col-xs-3 text-center">
30
- <h1> <%= @stats_basics[:review_count] %> </h1>
31
- <h4> Code Reviews </h4>
32
- </div>
33
- <% end %>
34
- <% if @stats_basics.has_key? :repo_count %>
35
- <div class="col col-lg-2 col-md-3 col-sm-3 col-xs-3 text-center">
36
- <h1> <%= @stats_basics[:repo_count] %> </h1>
37
- <h4> Repositories with Pull Requests or Comments </h4>
38
- </div>
39
- <% end %>
40
- <% if @stats_basics.has_key? :net_additions %>
41
- <div class="col col-lg-2 col-md-3 col-sm-3 col-xs-3 text-center">
42
- <h1> <%= @stats_basics[:net_additions] %> </h1>
43
- <h4> Net Additions </h4>
44
- </div>
45
- <% end %>
46
- <% if @stats_basics.has_key? :avg_additions %>
47
- <div class="col col-lg-2 col-md-3 col-sm-3 col-xs-3 text-center">
48
- <h1> <%= @stats_basics[:avg_additions] %> </h1>
49
- <h4> Average Additions per Pull Request </h4>
50
- </div>
51
- <% end %>
52
- <% if @stats_basics.has_key? :avg_deletions%>
53
- <div class="col col-lg-2 col-md-3 col-sm-3 col-xs-3 text-center">
54
- <h1><%= @stats_basics[:avg_deletions] %> </h1>
55
- <h4> Average Deletions per Pull Request </h4>
56
- </div>
57
- <% end %>
58
- <% if @stats_basics.has_key? :additions %>
59
- <div class="col col-lg-2 col-md-3 col-sm-3 col-xs-3 text-center">
60
- <h1> <%= @stats_basics[:additions] %> </h1>
61
- <h4> Additions </h4>
62
- </div>
63
- <% end %>
64
- <% if @stats_basics.has_key? :deletions%>
65
- <div class="col col-lg-2 col-md-3 col-sm-3 col-xs-3 text-center">
66
- <h1><%= @stats_basics[:deletions] %> </h1>
67
- <h4> Deletions </h4>
68
- </div>
69
- <% end %>
@@ -1,24 +0,0 @@
1
- <div class="container" id="splash">
2
- <div class="row text-center">
3
-
4
- <!-- Show all of the statistics about all of the repositories and users within time frame -->
5
- <%= render 'hubstats/partials/quick_stats' %>
6
- <br>
7
- <br>
8
- <br>
9
- <br>
10
- <br>
11
- <br>
12
- <%= render 'hubstats/partials/quick_addition_stats' %>
13
- </div>
14
-
15
- <!-- Show all of the repositories with their individual stats -->
16
- <div class="row">
17
- <div class="col col-lg-12">
18
- <%= render 'hubstats/tables/repos' %>
19
- <div class="text-center">
20
- <%= will_paginate @repo, renderer: BootstrapPagination::Rails %>
21
- </div>
22
- </div>
23
- </div>
24
- </div>