libyear 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 +4 -4
- data/CHANGELOG.md +15 -0
- data/lib/libyear/query.rb +7 -3
- data/lib/libyear/report.rb +1 -1
- data/lib/libyear/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c4d0879f313a2a7aacf2c8ac2eddbf45b6f0c24
|
4
|
+
data.tar.gz: c48c16cd644315491ea135fdf6795f471218e5ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c576c854264e1c6656daed3f9d62a057bd2d7a8d222eba70dff6429b4e1795fc3115d50a5f0258025044a00e851c087b334ae6b8644f6660e5b324807cb7f5ba
|
7
|
+
data.tar.gz: e428e2869687af159d4ec857b4ab9f57427e06770ea9165728856316f6c04ecc6ba7e8130db145ef4afbc789547c2282fc3be00822669a4f1e74b83ecafef7ec
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,21 @@
|
|
3
3
|
This project follows [semver 2.0.0][1] and the recommendations
|
4
4
|
of [keepachangelog.com][2].
|
5
5
|
|
6
|
+
## 0.1.2 (2017-02-16)
|
7
|
+
|
8
|
+
Breaking changes:
|
9
|
+
|
10
|
+
- None
|
11
|
+
|
12
|
+
Added:
|
13
|
+
|
14
|
+
- None
|
15
|
+
|
16
|
+
Fixed:
|
17
|
+
|
18
|
+
- Better handling of weird sources like rails-assets
|
19
|
+
- Wider report columns
|
20
|
+
|
6
21
|
## 0.1.1 (2017-02-14)
|
7
22
|
|
8
23
|
Breaking changes:
|
data/lib/libyear/query.rb
CHANGED
@@ -25,7 +25,9 @@ module Libyear
|
|
25
25
|
gems.each do |gem|
|
26
26
|
di = release_date(gem[:name], gem[:installed][:version])
|
27
27
|
dn = release_date(gem[:name], gem[:newest][:version])
|
28
|
-
|
28
|
+
gem[:installed][:date] = di
|
29
|
+
gem[:newest][:date] = dn
|
30
|
+
if di.nil? || dn.nil? || dn <= di
|
29
31
|
# Known issue: Backports and maintenance releases of older minor versions.
|
30
32
|
# Example: json 1.8.6 (2017-01-13) was released *after* 2.0.3 (2017-01-12)
|
31
33
|
years = 0.0
|
@@ -33,8 +35,6 @@ module Libyear
|
|
33
35
|
days = (dn - di).to_f
|
34
36
|
years = days / 365.0
|
35
37
|
end
|
36
|
-
gem[:installed][:date] = di
|
37
|
-
gem[:newest][:date] = dn
|
38
38
|
gem[:libyears] = years
|
39
39
|
end
|
40
40
|
gems
|
@@ -65,6 +65,10 @@ module Libyear
|
|
65
65
|
def release_date(gem_name, gem_version)
|
66
66
|
dep = ::Bundler::Dependency.new(gem_name, gem_version)
|
67
67
|
tuples, _errors = ::Gem::SpecFetcher.fetcher.search_for_dependency(dep)
|
68
|
+
if tuples.empty?
|
69
|
+
$stderr.puts "Could not find release date for: #{gem_name}"
|
70
|
+
return nil
|
71
|
+
end
|
68
72
|
tup, source = tuples.first # Gem::NameTuple
|
69
73
|
spec = source.fetch_spec(tup) # raises Gem::RemoteFetcher::FetchError
|
70
74
|
spec.date.to_date
|
data/lib/libyear/report.rb
CHANGED
data/lib/libyear/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libyear
|
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
|
- Jared Beck
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|