hubstats 0.3.12 → 0.3.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.markdown +5 -0
- data/app/assets/stylesheets/hubstats/bootstrap.css +6 -0
- data/app/assets/stylesheets/hubstats/label.css +1 -2
- data/app/models/hubstats/label.rb +8 -8
- data/app/models/hubstats/pull_request.rb +2 -2
- data/app/views/hubstats/partials/_header.html.erb +8 -4
- data/app/views/hubstats/partials/_quick_addition_stats.html.erb +2 -2
- data/app/views/hubstats/partials/_quick_stats.html.erb +3 -3
- data/app/views/hubstats/pull_requests/index.html.erb +5 -7
- data/app/views/hubstats/repos/dashboard.html.erb +1 -1
- data/app/views/hubstats/repos/show.html.erb +1 -1
- data/app/views/hubstats/tables/_deploys.html.erb +1 -1
- data/app/views/hubstats/tables/_grouped_deploys.html.erb +1 -1
- data/app/views/hubstats/tables/_repos-condensed.html.erb +1 -1
- data/app/views/hubstats/tables/_repos.html.erb +3 -3
- data/app/views/hubstats/tables/_users.html.erb +2 -2
- data/app/views/hubstats/users/show.html.erb +1 -1
- data/lib/hubstats/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDAxN2M4MjI1MTU0NjMyNGIxZjJmZDUxZTExNTY0ZmRjMDU3ZmJkYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTVhOWIzOTcyYzgzYzA4YzU4ZDY2OGRhZTE4NzBjNTJiZGVmMjRjOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YmZjMTQ3MmQ5OGJmMzc1OGRiMDNjYTg1YTdlZGMyODFmNzI5ODU3Y2YyMzA3
|
10
|
+
MmY4YzNiNGMzMDcyNGQ3MGNiNGQ0ZTg1NGFmNTVhZmRhMjY3NGM0ODBjMWIz
|
11
|
+
OWE1MWI4MTQ3Y2ZhOGVhMmQ5NzkyZGFhOTUwMWZiYWQwOGE0YzQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YmMyOThlM2M5NTg1YTA1MjJkODczNmQ5MWZkMjM0MDcxNzY1ODRlYTlmZDA0
|
14
|
+
OTYxMDNlYjJiMTQzNjUwODQ1NWU4Nzg5MjcwOWIyMzdiNzIwNDhhMjcwM2E0
|
15
|
+
OTdlNTY5OTY4NTQ5ZDhmZTIzYzQzNmVmZTNlYzBjOGIzZjM0Nzk=
|
data/CHANGELOG.markdown
CHANGED
@@ -3667,6 +3667,12 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
|
|
3667
3667
|
.navbar-collapse.in {
|
3668
3668
|
overflow-y: auto;
|
3669
3669
|
}
|
3670
|
+
.navbar-active {
|
3671
|
+
font-weight: bold;
|
3672
|
+
color: #E0E0E0;
|
3673
|
+
background-color: #E0E0E0;
|
3674
|
+
border-color: #E0E0E0;
|
3675
|
+
}
|
3670
3676
|
@media (min-width: 768px) {
|
3671
3677
|
.navbar-collapse {
|
3672
3678
|
width: auto;
|
@@ -1,14 +1,14 @@
|
|
1
1
|
module Hubstats
|
2
2
|
class Label < ActiveRecord::Base
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
end
|
4
|
+
def self.count_by_pull_requests(pull_requests)
|
5
|
+
select("hubstats_labels.*")
|
6
|
+
.select("COUNT(hubstats_labels_pull_requests.pull_request_id) AS pull_request_count")
|
7
|
+
.joins(:pull_requests).merge(pull_requests)
|
8
|
+
.having("pull_request_count > 0")
|
9
|
+
.group("hubstats_labels.id")
|
10
|
+
.order("pull_request_count DESC")
|
11
|
+
end
|
12
12
|
|
13
13
|
scope :with_ids, lambda { |pull_ids| (where("hubstats_labels_pull_requests.pull_request_id" => pull_ids)) }
|
14
14
|
|
@@ -62,8 +62,8 @@ module Hubstats
|
|
62
62
|
|
63
63
|
def self.all_filtered(params, timespan)
|
64
64
|
filter_based_on_timespan(timespan, params[:state])
|
65
|
-
|
66
|
-
|
65
|
+
.belonging_to_users(params[:users])
|
66
|
+
.belonging_to_repos(params[:repos])
|
67
67
|
end
|
68
68
|
|
69
69
|
def self.filter_based_on_timespan(timespan, state)
|
@@ -14,10 +14,14 @@
|
|
14
14
|
|
15
15
|
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
16
16
|
<ul class="nav navbar-nav navbar-right">
|
17
|
-
<li
|
18
|
-
|
19
|
-
<li
|
20
|
-
|
17
|
+
<li class="<%='navbar-active' if params[:controller] == 'hubstats/deploys'%>">
|
18
|
+
<%= link_to "Deployments", deploys_path%></li>
|
19
|
+
<li class="<%='navbar-active' if params[:controller] == 'hubstats/repos'%>">
|
20
|
+
<%= link_to "Metrics", metrics_path%></li>
|
21
|
+
<li class="<%='navbar-active' if params[:controller] == 'hubstats/pull_requests'%>">
|
22
|
+
<%= link_to "Pull Requests", root_path%></li>
|
23
|
+
<li class="<%='navbar-active' if params[:controller] == 'hubstats/users'%>">
|
24
|
+
<%= link_to "Users", users_path%></li>
|
21
25
|
<li>
|
22
26
|
<select class="form-control push-down" id="time-select">
|
23
27
|
<% Hubstats::TIMESPAN_ARRAY.each do |timespan| %>
|
@@ -8,13 +8,13 @@
|
|
8
8
|
<% if @stats_additions.has_key? :avg_additions %>
|
9
9
|
<div class="col col-lg-2 col-md-4 col-sm-4 col-xs-4 text-center">
|
10
10
|
<h1> <%= @stats_additions[:avg_additions] %> </h1>
|
11
|
-
<h4> Average Additions per Pull </h4>
|
11
|
+
<h4> Average Additions per Pull Request </h4>
|
12
12
|
</div>
|
13
13
|
<% end %>
|
14
14
|
<% if @stats_additions.has_key? :avg_deletions%>
|
15
15
|
<div class="col col-lg-2 col-md-4 col-sm-4 col-xs-4 text-center">
|
16
16
|
<h1><%= @stats_additions[:avg_deletions] %> </h1>
|
17
|
-
<h4> Average Deletions per Pull </h4>
|
17
|
+
<h4> Average Deletions per Pull Request </h4>
|
18
18
|
</div>
|
19
19
|
<% end %>
|
20
20
|
<% if @stats_additions.has_key? :additions %>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<% if @stats_basics.has_key? :deploy_count %>
|
10
10
|
<div class="col col-lg-2 col-md-3 col-sm-3 col-xs-3 text-center">
|
11
11
|
<h1> <%= @stats_basics[:deploy_count] %> </h1>
|
12
|
-
<h4>
|
12
|
+
<h4> Deployments </h4>
|
13
13
|
</div>
|
14
14
|
<% end %>
|
15
15
|
<% if @stats_basics.has_key? :pull_count %>
|
@@ -39,13 +39,13 @@
|
|
39
39
|
<% if @stats_basics.has_key? :avg_additions %>
|
40
40
|
<div class="col col-lg-2 col-md-3 col-sm-3 col-xs-3 text-center">
|
41
41
|
<h1> <%= @stats_basics[:avg_additions] %> </h1>
|
42
|
-
<h4> Average Additions per Pull </h4>
|
42
|
+
<h4> Average Additions per Pull Request </h4>
|
43
43
|
</div>
|
44
44
|
<% end %>
|
45
45
|
<% if @stats_basics.has_key? :avg_deletions%>
|
46
46
|
<div class="col col-lg-2 col-md-3 col-sm-3 col-xs-3 text-center">
|
47
47
|
<h1><%= @stats_basics[:avg_deletions] %> </h1>
|
48
|
-
<h4> Average Deletions per Pull </h4>
|
48
|
+
<h4> Average Deletions per Pull Request </h4>
|
49
49
|
</div>
|
50
50
|
<% end %>
|
51
51
|
<% if @stats_basics.has_key? :additions %>
|
@@ -1,7 +1,6 @@
|
|
1
1
|
<div class="container" %>
|
2
2
|
<div class="row" %>
|
3
3
|
<div class="col col-lg-3 col-md-3 col-sm-3">
|
4
|
-
|
5
4
|
<div class="form-group">
|
6
5
|
<input class="select2-control" id="repos">
|
7
6
|
</input>
|
@@ -10,8 +9,9 @@
|
|
10
9
|
<input class="select2-control" id="users">
|
11
10
|
</input>
|
12
11
|
</div>
|
13
|
-
|
12
|
+
|
14
13
|
<hr>
|
14
|
+
|
15
15
|
<h4> Labels </h4>
|
16
16
|
<div id="labels-container">
|
17
17
|
<% @labels.each do |label| %>
|
@@ -22,10 +22,9 @@
|
|
22
22
|
</a>
|
23
23
|
<% end %>
|
24
24
|
</div>
|
25
|
-
|
26
25
|
</div>
|
27
|
-
<div class="col col-lg-9 col-md-9 col-sm-9">
|
28
26
|
|
27
|
+
<div class="col col-lg-9 col-md-9 col-sm-9">
|
29
28
|
<div id="state-group" class="btn-group" data-toggle="buttons">
|
30
29
|
<label class="btn btn-default" id="all">
|
31
30
|
<input type="radio" name="state"> All
|
@@ -54,11 +53,10 @@
|
|
54
53
|
</select>
|
55
54
|
|
56
55
|
<%= render 'hubstats/tables/grouped_pulls' %>
|
57
|
-
|
56
|
+
|
58
57
|
<div class="text-center">
|
59
58
|
<%= will_paginate @pull_requests, renderer: BootstrapPagination::Rails %>
|
60
59
|
</div>
|
61
|
-
|
62
60
|
</div>
|
63
61
|
</div>
|
64
|
-
</div>
|
62
|
+
</div>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
|
24
24
|
<!-- Show all of the deploys for this repository -->
|
25
25
|
<div class="col col-lg-6">
|
26
|
-
<h3>
|
26
|
+
<h3> Deployments </h3>
|
27
27
|
<%= render "hubstats/tables/deploys-condensed" %>
|
28
28
|
<% if @deploy_count > 20 %>
|
29
29
|
<p class="pull-right"><%= link_to "View All", deploys_path(:repos => @repo.id) %></p>
|
@@ -5,10 +5,10 @@
|
|
5
5
|
<a class="header desc" id="name"> Repository Name <span class="octicon"></span> </a>
|
6
6
|
</div>
|
7
7
|
<div class="col-lg-2 col-md-2 col-sm-2">
|
8
|
-
<a class="header desc" id="deploys">
|
8
|
+
<a class="header desc" id="deploys"> Deployments <span class="octicon"></span> </a>
|
9
9
|
</div>
|
10
10
|
<div class="col-lg-2 col-md-2 col-sm-2">
|
11
|
-
<a class="header desc" id="pulls">
|
11
|
+
<a class="header desc" id="pulls"> Pull Requests <span class="octicon"></span> </a>
|
12
12
|
</div>
|
13
13
|
<div class="col-lg-2 col-md-2 col-sm-2">
|
14
14
|
<a class="header desc" id="comments"> Comments <span class="octicon"></span></a>
|
@@ -23,6 +23,6 @@
|
|
23
23
|
<%= render partial: 'hubstats/partials/repo', collection: @repos, as: :repo %>
|
24
24
|
</div>
|
25
25
|
<% else %>
|
26
|
-
<p> No
|
26
|
+
<p> No repositories to show </p>
|
27
27
|
<% end %>
|
28
28
|
|
@@ -5,10 +5,10 @@
|
|
5
5
|
<a class="header desc" id="name"> GitHub Username <span class="octicon"></span> </a>
|
6
6
|
</div>
|
7
7
|
<div class="col-lg-2 col-md-2 col-sm-2">
|
8
|
-
<a class="header desc" id="deploys">
|
8
|
+
<a class="header desc" id="deploys"> Deployments <span class="octicon"></span> </a>
|
9
9
|
</div>
|
10
10
|
<div class="col-lg-2 col-md-2 col-sm-2">
|
11
|
-
<a class="header desc" id="pulls">
|
11
|
+
<a class="header desc" id="pulls"> Pull Requests <span class="octicon"></span> </a>
|
12
12
|
</div>
|
13
13
|
<div class="col-lg-2 col-md-2 col-sm-2">
|
14
14
|
<a class="header desc" id="comments"> Comments <span class="octicon"></span></a>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
<!-- Show all of the deploys this user did -->
|
17
17
|
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
18
|
-
<h3>
|
18
|
+
<h3> Deployments </h3>
|
19
19
|
<%= render 'hubstats/tables/deploys-condensed' %>
|
20
20
|
<% if @deploy_count > 20 %>
|
21
21
|
<p class="pull-right"><%= link_to "View All", deploys_path(:users => @user.id) %></p>
|
data/lib/hubstats/version.rb
CHANGED