hubstats 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/CHANGELOG.markdown +9 -0
- data/app/models/hubstats/repo.rb +3 -3
- data/app/models/hubstats/user.rb +1 -1
- data/lib/hubstats/version.rb +1 -1
- metadata +26 -26
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MmI3ZDhkNmZmMjI0N2U5M2E4OWU5MzI2NmIzMTgwYWZlOWM4Yjc1Mw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
OTBhOTUzNDk5ZTNkYWM3YTAyYWFlYzJhY2U2MDNhYTdhNGFmMzE2Yg==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZDkxZjM5NWUxMDEwNjYwMGViODUxYjhiOTdhZTE0NWE5MzAwZTYzN2RhYTEy
|
10
|
+
YjEyMmM2OWUyOGE1NjgzMmI1OWU2OTRmNjA4ZDBhYmU2MTg5ZjdkZTVhODkw
|
11
|
+
OTViMjFiZDczZDBjYTg5MjhiNzM3YWE0MmZhYTVmMzZlNDA1Mzk=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
N2ViMmY2MGRjNjNiNGE0MDhkNjUxN2U3ZDFlMjczZWNiMTNmYTBhMjk2ODI2
|
14
|
+
MDE1MzA0YjNiYTk3NGY1MGI2NDcyNTJiMDNhMzc2N2YwZDg1YTg5M2U4MmZm
|
15
|
+
YjZhYjBkNzEyMjc3YTUyZGI3NTZiZWI2OGM2OWM4Y2NkOGY1NTM=
|
data/CHANGELOG.markdown
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
#### v0.4.2
|
2
|
+
* Fixing bugs that made counts different in show pages and indices
|
3
|
+
|
4
|
+
> Emma Sax: Nick LaMuro: https://github.com/sportngin/hubstats/pull/71
|
5
|
+
|
6
|
+
* Fixing bugs that made counts different in show pages and indices
|
7
|
+
|
8
|
+
> Emma Sax: Nick LaMuro: https://github.com/sportngin/hubstats/pull/71
|
9
|
+
|
1
10
|
#### v0.4.1
|
2
11
|
#### v0.4.0
|
3
12
|
* Cleaning up code; fixing bug with repo filter; adding pretty footer
|
data/app/models/hubstats/repo.rb
CHANGED
@@ -50,11 +50,11 @@ module Hubstats
|
|
50
50
|
# end_date - the end of the data range
|
51
51
|
#
|
52
52
|
# Returns - the average additions and deletions
|
53
|
-
scope :averages, lambda {
|
53
|
+
scope :averages, lambda {|start_date, end_date|
|
54
54
|
select("hubstats_repos.id as repo_id")
|
55
55
|
.select("ROUND(IFNULL(AVG(hubstats_pull_requests.additions),0)) AS average_additions")
|
56
56
|
.select("ROUND(IFNULL(AVG(hubstats_pull_requests.deletions),0)) AS average_deletions")
|
57
|
-
.joins("LEFT JOIN hubstats_pull_requests ON hubstats_pull_requests.repo_id = hubstats_repos.id AND hubstats_pull_requests.merged = '1'")
|
57
|
+
.joins(sanitize_sql_array(["LEFT JOIN hubstats_pull_requests ON hubstats_pull_requests.repo_id = hubstats_repos.id AND hubstats_pull_requests.merged = '1' AND (hubstats_pull_requests.merged_at BETWEEN ? AND ?)", start_date, end_date]))
|
58
58
|
.group("hubstats_repos.id")
|
59
59
|
}
|
60
60
|
|
@@ -66,7 +66,7 @@ module Hubstats
|
|
66
66
|
# Returns - all of the stats about the repo
|
67
67
|
scope :with_all_metrics, lambda {|start_date, end_date|
|
68
68
|
select("hubstats_repos.*, deploy_count, pull_request_count, comment_count, average_additions, average_deletions")
|
69
|
-
.joins("LEFT JOIN (#{averages.to_sql}) AS averages ON averages.repo_id = hubstats_repos.id")
|
69
|
+
.joins("LEFT JOIN (#{averages(start_date, end_date).to_sql}) AS averages ON averages.repo_id = hubstats_repos.id")
|
70
70
|
.joins("LEFT JOIN (#{pull_requests_count(start_date, end_date).to_sql}) AS pull_requests ON pull_requests.repo_id = hubstats_repos.id")
|
71
71
|
.joins("LEFT JOIN (#{comments_count(start_date, end_date).to_sql}) AS comments ON comments.repo_id = hubstats_repos.id")
|
72
72
|
.joins("LEFT JOIN (#{deploys_count(start_date, end_date).to_sql}) AS deploys ON deploys.repo_id = hubstats_repos.id")
|
data/app/models/hubstats/user.rb
CHANGED
@@ -124,7 +124,7 @@ module Hubstats
|
|
124
124
|
select("hubstats_users.id as user_id")
|
125
125
|
.select("SUM(IFNULL(hubstats_pull_requests.additions, 0)) AS additions")
|
126
126
|
.select("SUM(IFNULL(hubstats_pull_requests.deletions, 0)) AS deletions")
|
127
|
-
.joins(sanitize_sql_array(["LEFT JOIN hubstats_pull_requests ON hubstats_pull_requests.user_id = hubstats_users.id AND (hubstats_pull_requests.
|
127
|
+
.joins(sanitize_sql_array(["LEFT JOIN hubstats_pull_requests ON hubstats_pull_requests.user_id = hubstats_users.id AND (hubstats_pull_requests.merged_at BETWEEN ? AND ?) AND hubstats_pull_requests.merged = '1'", start_date, end_date]))
|
128
128
|
.group("hubstats_users.id")
|
129
129
|
}
|
130
130
|
|
data/lib/hubstats/version.rb
CHANGED
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.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elliot Hursh
|
@@ -15,42 +15,42 @@ dependencies:
|
|
15
15
|
name: rails
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ~>
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: 3.2.18
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - ~>
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: 3.2.18
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: octokit
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ~>
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '3.2'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - ~>
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '3.2'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: will_paginate-bootstrap
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ! '>='
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- -
|
53
|
+
- - ! '>='
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
@@ -71,70 +71,70 @@ dependencies:
|
|
71
71
|
name: bootstrap-datepicker-rails
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- -
|
74
|
+
- - ~>
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: 1.4.0
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- -
|
81
|
+
- - ~>
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: 1.4.0
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: rspec-rails
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- -
|
88
|
+
- - ~>
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: 3.0.0.beta
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- -
|
95
|
+
- - ~>
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: 3.0.0.beta
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: shoulda-matchers
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- -
|
102
|
+
- - ~>
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '2.6'
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
|
-
- -
|
109
|
+
- - ~>
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '2.6'
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
113
|
name: factory_girl_rails
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
|
-
- -
|
116
|
+
- - ~>
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '4.4'
|
119
119
|
type: :development
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
|
-
- -
|
123
|
+
- - ~>
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: '4.4'
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: faker
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
|
-
- -
|
130
|
+
- - ~>
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: '1.3'
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- -
|
137
|
+
- - ~>
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '1.3'
|
140
140
|
description: Github Statistics
|
@@ -145,12 +145,12 @@ executables: []
|
|
145
145
|
extensions: []
|
146
146
|
extra_rdoc_files: []
|
147
147
|
files:
|
148
|
-
-
|
149
|
-
-
|
150
|
-
-
|
151
|
-
-
|
152
|
-
-
|
153
|
-
-
|
148
|
+
- .codeclimate.yml
|
149
|
+
- .gitignore
|
150
|
+
- .octopolo.yml
|
151
|
+
- .rspec
|
152
|
+
- .soyuz.yml
|
153
|
+
- .travis.yml
|
154
154
|
- CHANGELOG.markdown
|
155
155
|
- Gemfile
|
156
156
|
- MIT-LICENSE
|
@@ -323,17 +323,17 @@ require_paths:
|
|
323
323
|
- lib
|
324
324
|
required_ruby_version: !ruby/object:Gem::Requirement
|
325
325
|
requirements:
|
326
|
-
- -
|
326
|
+
- - ! '>='
|
327
327
|
- !ruby/object:Gem::Version
|
328
328
|
version: '0'
|
329
329
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
330
330
|
requirements:
|
331
|
-
- -
|
331
|
+
- - ! '>='
|
332
332
|
- !ruby/object:Gem::Version
|
333
333
|
version: '0'
|
334
334
|
requirements: []
|
335
335
|
rubyforge_project:
|
336
|
-
rubygems_version: 2.
|
336
|
+
rubygems_version: 2.4.7
|
337
337
|
signing_key:
|
338
338
|
specification_version: 4
|
339
339
|
summary: Github Statistics
|