ossert 0.1.1 → 0.1.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4e29de62f6e9596fc97c192a45328e74fed6f9d
|
4
|
+
data.tar.gz: 602c662db9da13d33f484f2138e7d48a86e08c10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcef17070653b339a372bf87367a3d3f4e3269d2da872eaafaea76d39dc78509ddeb03abb2b83f319428c557e033dc8b3e80448b6c247646f65c3ac41c2a0602
|
7
|
+
data.tar.gz: be8911bfed8303443826cbfbbc55e0fd62bb2d40ec70f65301595f387bacbf0345c3f2b2e459b6dac6be9be6adb22f079bb74fcd6678486676a79599bd88c113
|
data/config/classifiers.yml
CHANGED
@@ -64,9 +64,9 @@ classifiers:
|
|
64
64
|
forks_count: 3
|
65
65
|
users_involved_count: 3
|
66
66
|
users_involved_no_stars_count: 3
|
67
|
-
total_downloads_count:
|
67
|
+
total_downloads_count: 8
|
68
68
|
total:
|
69
|
-
dependants_count:
|
69
|
+
dependants_count: 6
|
70
70
|
users_creating_issues_count: 1
|
71
71
|
users_commenting_issues_count: 1
|
72
72
|
users_creating_pr_count: 1
|
@@ -75,7 +75,7 @@ classifiers:
|
|
75
75
|
watchers_count: 1
|
76
76
|
forks_count: 1
|
77
77
|
users_involved_no_stars_count: 1
|
78
|
-
total_downloads_count:
|
78
|
+
total_downloads_count: 8
|
79
79
|
maintenance:
|
80
80
|
last_year:
|
81
81
|
issues_processed_in_avg: 1
|
@@ -106,20 +106,20 @@ module Ossert
|
|
106
106
|
|
107
107
|
def grade
|
108
108
|
max = GRADES.count
|
109
|
-
sum = -0.
|
109
|
+
sum = -0.2
|
110
110
|
check.sort.reverse.each do |(_, gain)|
|
111
111
|
sum += gain
|
112
|
-
sum
|
112
|
+
sum -= 0.1 if gain < trusted_probability
|
113
113
|
end
|
114
114
|
GRADES[(max - sum).to_i]
|
115
115
|
end
|
116
116
|
|
117
117
|
def grade_as_hash
|
118
118
|
max = GRADES.count
|
119
|
-
sum = -0.
|
119
|
+
sum = -0.2
|
120
120
|
check.sort.reverse.each do |(_, gain)|
|
121
121
|
sum += gain
|
122
|
-
sum
|
122
|
+
sum -= 0.2 if gain < trusted_probability
|
123
123
|
end
|
124
124
|
{ gain: sum, mark: GRADES[(max - sum).to_i] }
|
125
125
|
end
|
@@ -63,10 +63,10 @@ module Ossert
|
|
63
63
|
end
|
64
64
|
end),
|
65
65
|
/period/ => (lambda do |value|
|
66
|
-
if (years = value.to_i /
|
66
|
+
if (years = value.to_i / 1.year).positive?
|
67
67
|
"#{years}+ years"
|
68
|
-
'Less than a year'
|
69
68
|
else
|
69
|
+
'Less than a year'
|
70
70
|
end
|
71
71
|
end),
|
72
72
|
/downloads/ => ->(value) { value.ceil.to_s.reverse.gsub(/(\d{3})(?=\d)/, '\\1,').reverse }
|
@@ -50,13 +50,13 @@ module Ossert
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def life_period
|
53
|
-
last_change = [last_pr_date
|
53
|
+
last_change = ([last_pr_date, last_issue_date] - [0]).max
|
54
54
|
return 0 unless last_change
|
55
55
|
|
56
|
-
first_change = [first_pr_date, first_issue_date].
|
56
|
+
first_change = ([first_pr_date, first_issue_date] - [0]).min
|
57
57
|
return 0 unless first_change
|
58
58
|
|
59
|
-
(last_change - first_change).to_i
|
59
|
+
(Time.at(last_change) - Time.at(first_change)).to_i
|
60
60
|
end
|
61
61
|
|
62
62
|
def life_period_months
|
data/lib/ossert/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ossert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey Dolganov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|