hubstats 0.7.2 → 0.7.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: 2d38206085aaf51c050cb61f3487f8083a2a8945
4
- data.tar.gz: 75dabcc2b4a07fed0f0afbf35ae19b1129107041
3
+ metadata.gz: 5688b322dcd8b475e84a566cd74904508d6f845c
4
+ data.tar.gz: 50009dbc401e9a134fd99cc49ae7198c0c7a7621
5
5
  SHA512:
6
- metadata.gz: e19fee330d5d16f76a0792b40f97028131862289c2b27fc84b4a6f3234a69f5b55000113cad273081b758a3b6451755efb3210a12c8e6cc0da76f08275db3178
7
- data.tar.gz: fc5b81cc305b27650bb3f07ba52336bd66374659194808bd20d1b7fb32460af860e753755cf9f92f9515738cecc509a6e8174f2a376e0609923dd148eaa6d6c7
6
+ metadata.gz: 5817e679b851a94179e217f14a3f982e21e83a82d58a73e6f36169c237c57707d42b527fdd37eed68d680cc699ed3f5ef3110aad39173e971e6ed6cc22c1d3b1
7
+ data.tar.gz: 0695c7e533e556ae0ba1006dc84aff3ed898ece7a9e4cb91c25508aae50693364af38de7b1c6da694891de8489fc04bea4e109da528d45a71289faac5ab459e6
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,8 @@
1
+ #### v0.7.3
2
+ * Fixing bug that allowed users to be shown multiple times on teams show page
3
+
4
+ > Emma Sax: Brian Bergstrom: https://github.com/sportngin/hubstats/pull/102
5
+
1
6
  #### v0.7.2
2
7
  * Upgrading Hubstats to Ruby-2.3.0
3
8
 
@@ -33,7 +33,7 @@ module Hubstats
33
33
  @team = Hubstats::Team.where(id: params[:id]).first
34
34
  @pull_requests = Hubstats::PullRequest.belonging_to_team(@team.id).merged_in_date_range(@start_date, @end_date).order("updated_at DESC").limit(20)
35
35
  @pull_count = Hubstats::PullRequest.belonging_to_team(@team.id).merged_in_date_range(@start_date, @end_date).count(:all)
36
- @users = @team.users.where("login NOT IN (?)", Hubstats.config.github_config["ignore_users_list"]).order("login ASC")
36
+ @users = @team.users.where("login NOT IN (?)", Hubstats.config.github_config["ignore_users_list"]).order("login ASC").distinct
37
37
  @active_user_count = @users.length
38
38
  @comment_count = Hubstats::Comment.belonging_to_team(@users.pluck(:id)).created_in_date_range(@start_date, @end_date).count(:all)
39
39
  repos_pr = @pull_requests.pluck(:repo_id)
@@ -1,3 +1,3 @@
1
1
  module Hubstats
2
- VERSION = "0.7.2"
2
+ VERSION = "0.7.3"
3
3
  end
@@ -26,6 +26,7 @@ module Hubstats
26
26
  repo = create(:repo, :updated_at => Date.today)
27
27
  team.users << user1
28
28
  team.users << user2
29
+ team.users << user2
29
30
  pull1 = create(:pull_request, :user => user1, :id => 303030, :team => team, :repo_id => repo.id, :updated_at => Date.today)
30
31
  pull2 = create(:pull_request, :user => user2, :id => 404040, :team => team, :repo => pull1.repo, :updated_at => Date.today)
31
32
  allow(Hubstats).to receive_message_chain(:config, :github_config, :[]).with("ignore_users_list") { ["user"] }
@@ -33,7 +34,9 @@ module Hubstats
33
34
  expect(assigns(:team)).to eq(team)
34
35
  expect(pull1.team_id).to eq(team.id)
35
36
  expect(pull2.team_id).to eq(team.id)
36
- expect(assigns(:team).users).to contain_exactly(user1, user2)
37
+ expect(assigns(:team).users).to contain_exactly(user1, user2, user2)
38
+ expect(assigns(:users)).to contain_exactly(user1, user2)
39
+ expect(assigns(:active_user_count)).to eq(2)
37
40
  expect(response).to have_http_status(200)
38
41
  end
39
42
  end
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.7.2
4
+ version: 0.7.3
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: 2016-01-14 00:00:00.000000000 Z
12
+ date: 2016-01-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails