hubstats 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 537f94c651e1ab391a44870a9cb81a6a1d5dda01
4
- data.tar.gz: 95c9ad450b14a38ef5273f8517084223bd2bcec0
3
+ metadata.gz: 1cd7763f0758f877d3f10e0d2dc7746c1171689e
4
+ data.tar.gz: 974ad3ebcc7e93c846afdefd2a93ecba36c83d71
5
5
  SHA512:
6
- metadata.gz: 5250264e9388e49cb1d8b0a1c11da9df645a4cccb79edea71507c08d615537ad9d82275bc704b1020e01f253a4f8306bc5d84a29eaac3cec0344120906a1fec9
7
- data.tar.gz: 1e17e63ba54907c3d692683d10c95b0148d3470b7b48bba7ab464d7a38cd0782744e4e2a8e5d9d5160b09bbfcca2bdec404546507275d09518121276adaac8f5
6
+ metadata.gz: fa981c5887484cb270a7c324220a961f8827c2927a85352eeb619f017627174d424c84a06f8ae9ec4c9b72628a398ecd09cc1eab6cd2427f02696c43ed89bbf2
7
+ data.tar.gz: 15fceb8f602b1c47a231743b3bdf8cb6d93dddf8e77df5a4b16204c47546afd42a6c58fa3bb2e6e20612e2438506bdf4f3adbd3f0bace1cb5db821e1d5924b17
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,8 @@
1
+ #### v0.5.3
2
+ * Adding indexes to tables in database
3
+
4
+ > Emma Sax: Brian Bergstrom: https://github.com/sportngin/hubstats/pull/80
5
+
1
6
  #### v0.5.2
2
7
  * Change deployments count to comments count on user condensed page
3
8
 
@@ -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-user header">
4
+ <div class="row single-team header">
5
5
  <div class="col-lg-2 col-md-2 col-sm-2">
6
- <a class="header desc"> Team Name <span class="octicon"></span> </a>
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
- <a class="header desc"> Developers / Reviewers <span class="octicon"></span> </a>
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
- <a class="header desc"> Merged Pull Requests <span class="octicon"></span> </a>
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
- <a class="header desc"> Pull Requests per Developer <span class="octicon"></span></a>
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
- <a class="header desc"> Comments <span class="octicon"></span></a>
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
- <a class="header desc"> Comments per Reviewer <span class="octicon"></span></a>
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
@@ -1,3 +1,3 @@
1
1
  module Hubstats
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
@@ -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 => 20150713185100) do
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.2
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