hubstats 0.5.2 → 0.5.3
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.
- checksums.yaml +4 -4
- data/CHANGELOG.markdown +5 -0
- data/app/controllers/hubstats/teams_controller.rb +1 -1
- data/app/views/hubstats/tables/_teams.html.erb +7 -7
- data/db/migrate/20150721192612_add_indexes_to_tables.rb +15 -0
- data/lib/hubstats/version.rb +1 -1
- data/test/dummy/db/schema.rb +12 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1cd7763f0758f877d3f10e0d2dc7746c1171689e
|
4
|
+
data.tar.gz: 974ad3ebcc7e93c846afdefd2a93ecba36c83d71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa981c5887484cb270a7c324220a961f8827c2927a85352eeb619f017627174d424c84a06f8ae9ec4c9b72628a398ecd09cc1eab6cd2427f02696c43ed89bbf2
|
7
|
+
data.tar.gz: 15fceb8f602b1c47a231743b3bdf8cb6d93dddf8e77df5a4b16204c47546afd42a6c58fa3bb2e6e20612e2438506bdf4f3adbd3f0bace1cb5db821e1d5924b17
|
data/CHANGELOG.markdown
CHANGED
@@ -36,7 +36,7 @@ module Hubstats
|
|
36
36
|
@user_count = @users.length
|
37
37
|
@comment_count = Hubstats::Comment.belonging_to_team(@users.pluck(:id)).created_in_date_range(@start_date, @end_date).count(:all)
|
38
38
|
repos_pr = @pull_requests.pluck(:repo_id)
|
39
|
-
repos_comment = Hubstats::Comment.where("user_id IN (?)", @users).pluck(:repo_id)
|
39
|
+
repos_comment = Hubstats::Comment.where("user_id IN (?)", @users).created_in_date_range(@start_date, @end_date).pluck(:repo_id)
|
40
40
|
@repo_count = repos_pr.concat(repos_comment).uniq.count
|
41
41
|
@net_additions = Hubstats::PullRequest.merged_in_date_range(@start_date, @end_date).belonging_to_team(@team.id).sum(:additions).to_i -
|
42
42
|
Hubstats::PullRequest.merged_in_date_range(@start_date, @end_date).belonging_to_team(@team.id).sum(:deletions).to_i
|
@@ -1,24 +1,24 @@
|
|
1
1
|
<!-- Either say there are no teams to show, or show all of the stat titles along with the stats/teams -->
|
2
2
|
<% if @teams.length > 0 %>
|
3
3
|
<div class="teams">
|
4
|
-
<div class="row single-
|
4
|
+
<div class="row single-team header">
|
5
5
|
<div class="col-lg-2 col-md-2 col-sm-2">
|
6
|
-
<
|
6
|
+
<span> Team Name <span class="octicon"></span> </span>
|
7
7
|
</div>
|
8
8
|
<div class="col-lg-2 col-md-2 col-sm-2">
|
9
|
-
<
|
9
|
+
<span> Developers / Reviewers <span class="octicon"></span> </span>
|
10
10
|
</div>
|
11
11
|
<div class="col-lg-2 col-md-2 col-sm-2">
|
12
|
-
<
|
12
|
+
<span> Merged Pull Requests <span class="octicon"></span> </span>
|
13
13
|
</div>
|
14
14
|
<div class="col-lg-2 col-md-2 col-sm-2">
|
15
|
-
<
|
15
|
+
<span> Pull Requests per Developer <span class="octicon"></span></span>
|
16
16
|
</div>
|
17
17
|
<div class="col-lg-2 col-md-2 col-sm-2">
|
18
|
-
<
|
18
|
+
<span> Comments <span class="octicon"></span></span>
|
19
19
|
</div>
|
20
20
|
<div class="col-lg-2 col-md-2 col-sm-2">
|
21
|
-
<
|
21
|
+
<span> Comments per Reviewer <span class="octicon"></span></span>
|
22
22
|
</div>
|
23
23
|
</div>
|
24
24
|
<%= render partial: 'hubstats/partials/team', collection: @teams, as: :team %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class AddIndexesToTables < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
add_index :hubstats_deploys, :repo_id
|
4
|
+
add_index :hubstats_deploys, :user_id
|
5
|
+
|
6
|
+
add_index :hubstats_labels_pull_requests, :pull_request_id
|
7
|
+
add_index :hubstats_labels_pull_requests, :label_id
|
8
|
+
|
9
|
+
add_index :hubstats_pull_requests, :deploy_id
|
10
|
+
add_index :hubstats_pull_requests, :team_id
|
11
|
+
|
12
|
+
add_index :hubstats_teams_users, :user_id
|
13
|
+
add_index :hubstats_teams_users, :team_id
|
14
|
+
end
|
15
|
+
end
|
data/lib/hubstats/version.rb
CHANGED
data/test/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended to check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(:version =>
|
14
|
+
ActiveRecord::Schema.define(:version => 20150721193128) do
|
15
15
|
|
16
16
|
create_table "hubstats_comments", :force => true do |t|
|
17
17
|
t.string "html_url"
|
@@ -43,6 +43,9 @@ ActiveRecord::Schema.define(:version => 20150713185100) do
|
|
43
43
|
t.integer "user_id"
|
44
44
|
end
|
45
45
|
|
46
|
+
add_index "hubstats_deploys", ["repo_id"], :name => "index_hubstats_deploys_on_repo_id"
|
47
|
+
add_index "hubstats_deploys", ["user_id"], :name => "index_hubstats_deploys_on_user_id"
|
48
|
+
|
46
49
|
create_table "hubstats_labels", :force => true do |t|
|
47
50
|
t.string "name"
|
48
51
|
t.string "color"
|
@@ -54,6 +57,9 @@ ActiveRecord::Schema.define(:version => 20150713185100) do
|
|
54
57
|
t.integer "label_id"
|
55
58
|
end
|
56
59
|
|
60
|
+
add_index "hubstats_labels_pull_requests", ["label_id"], :name => "index_hubstats_labels_pull_requests_on_label_id"
|
61
|
+
add_index "hubstats_labels_pull_requests", ["pull_request_id"], :name => "index_hubstats_labels_pull_requests_on_pull_request_id"
|
62
|
+
|
57
63
|
create_table "hubstats_pull_requests", :force => true do |t|
|
58
64
|
t.string "url"
|
59
65
|
t.string "html_url"
|
@@ -88,7 +94,9 @@ ActiveRecord::Schema.define(:version => 20150713185100) do
|
|
88
94
|
t.integer "team_id"
|
89
95
|
end
|
90
96
|
|
97
|
+
add_index "hubstats_pull_requests", ["deploy_id"], :name => "index_hubstats_pull_requests_on_deploy_id"
|
91
98
|
add_index "hubstats_pull_requests", ["repo_id"], :name => "index_hubstats_pull_requests_on_repo_id"
|
99
|
+
add_index "hubstats_pull_requests", ["team_id"], :name => "index_hubstats_pull_requests_on_team_id"
|
92
100
|
add_index "hubstats_pull_requests", ["user_id"], :name => "index_hubstats_pull_requests_on_user_id"
|
93
101
|
|
94
102
|
create_table "hubstats_repos", :force => true do |t|
|
@@ -143,6 +151,9 @@ ActiveRecord::Schema.define(:version => 20150713185100) do
|
|
143
151
|
t.integer "team_id"
|
144
152
|
end
|
145
153
|
|
154
|
+
add_index "hubstats_teams_users", ["team_id"], :name => "index_hubstats_teams_users_on_team_id"
|
155
|
+
add_index "hubstats_teams_users", ["user_id"], :name => "index_hubstats_teams_users_on_user_id"
|
156
|
+
|
146
157
|
create_table "hubstats_users", :force => true do |t|
|
147
158
|
t.string "login"
|
148
159
|
t.string "avatar_url"
|
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
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elliot Hursh
|
@@ -266,6 +266,7 @@ files:
|
|
266
266
|
- db/migrate/20150706204910_create_hubstats_teams.rb
|
267
267
|
- db/migrate/20150706205049_create_hubstats_teams_users.rb
|
268
268
|
- db/migrate/20150713185013_add_team_id_to_prs.rb
|
269
|
+
- db/migrate/20150721192612_add_indexes_to_tables.rb
|
269
270
|
- db/seeds.rb
|
270
271
|
- hubstats.gemspec
|
271
272
|
- lib/generators/hubstats/install_generator.rb
|