gistory 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +17 -5
- data/.travis.yml +1 -2
- data/README.md +1 -0
- data/exe/gistory +1 -1
- data/gistory.gemspec +3 -4
- data/lib/gistory/change_log.rb +18 -8
- data/lib/gistory/git_repo.rb +1 -1
- data/lib/gistory/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 72836cca18fd26cede97fde21b76c9ae225356751cec131e9631e8c746241a26
|
4
|
+
data.tar.gz: a62e021cc1fbf194f00e84722a89c7a05bc7eb152edf4c15f1d70531a1e986e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b95cb0e28c162937b8533768d719050ae756117d2def8ba552b906636e00e282f983a1bae36860ce4afc2a7f5b3a9cbaea91873b71ce5fb24b9cf43f1f2a0707
|
7
|
+
data.tar.gz: d3f43852128ca25fa2619084b3916f54cda3ba30999a208b025329c57f7dce48d04f3ac5247056ff8a0c61abc369d80dafd5af932a0e3f8410982c6d33b2ce7d
|
data/.rubocop.yml
CHANGED
@@ -1,18 +1,30 @@
|
|
1
|
-
Metrics/LineLength:
|
2
|
-
Max: 120
|
3
|
-
|
4
1
|
Documentation:
|
5
2
|
Enabled: false
|
6
3
|
|
7
4
|
Metrics/AbcSize:
|
8
5
|
# The ABC size is a calculated magnitude, so this number can be a Fixnum or a Float.
|
9
6
|
# http://c2.com/cgi/wiki?AbcMetric
|
10
|
-
Max:
|
7
|
+
Max: 25
|
11
8
|
Exclude:
|
12
9
|
- 'test/**/*_test.rb' # ignore tests which typically have high B count due to many asserts
|
13
10
|
|
11
|
+
Metrics/ClassLength:
|
12
|
+
Exclude:
|
13
|
+
- 'test/**/*_test.rb'
|
14
|
+
|
14
15
|
Metrics/MethodLength:
|
15
|
-
Max:
|
16
|
+
Max: 20
|
17
|
+
Exclude:
|
18
|
+
- 'test/**/*_test.rb'
|
19
|
+
|
20
|
+
Metrics/LineLength:
|
21
|
+
Max: 120
|
22
|
+
|
23
|
+
Layout/EmptyLineAfterGuardClause:
|
24
|
+
Enabled: false
|
25
|
+
|
26
|
+
Style/IfUnlessModifier:
|
27
|
+
Enabled: false
|
16
28
|
|
17
29
|
Style/FrozenStringLiteralComment:
|
18
30
|
EnforcedStyle: always
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -44,3 +44,4 @@ only show the latest version changes up until it was removed.
|
|
44
44
|
- remove bundler dep
|
45
45
|
- add yard doc
|
46
46
|
- do not print the warning text if there were no more changes in the lock file
|
47
|
+
- find version with the longest length and pad all others to match it (f.i. rails has 4.2.8 and 4.2.7.1)
|
data/exe/gistory
CHANGED
data/gistory.gemspec
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
# coding: utf-8
|
2
1
|
# frozen_string_literal: true
|
3
2
|
|
4
|
-
lib = File.expand_path('
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
5
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
6
5
|
require 'gistory/version'
|
7
6
|
|
@@ -9,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
9
8
|
spec.name = 'gistory'
|
10
9
|
spec.version = Gistory::VERSION
|
11
10
|
spec.platform = Gem::Platform::RUBY
|
12
|
-
spec.required_ruby_version = '>= 2.
|
11
|
+
spec.required_ruby_version = '>= 2.2'
|
13
12
|
spec.authors = ['Sergio Medina']
|
14
13
|
spec.email = ['medinasergio@gmail.com']
|
15
14
|
|
@@ -28,6 +27,6 @@ Gem::Specification.new do |spec|
|
|
28
27
|
spec.add_dependency 'bundler', '~> 1.0'
|
29
28
|
spec.add_dependency 'colorize'
|
30
29
|
|
31
|
-
spec.add_development_dependency 'rake', '~> 10.0'
|
32
30
|
spec.add_development_dependency 'minitest', '~> 5.0'
|
31
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
33
32
|
end
|
data/lib/gistory/change_log.rb
CHANGED
@@ -12,23 +12,33 @@ module Gistory
|
|
12
12
|
|
13
13
|
def changelog_for_gem(gem_name)
|
14
14
|
version_changes = []
|
15
|
-
previous_version = nil
|
16
15
|
lockfile_changes = @repo.changes_to_file(LOCKFILE)
|
17
16
|
|
18
|
-
|
19
|
-
|
17
|
+
# no lockfile found or no changes to the lockfile found
|
18
|
+
return [] if lockfile_changes.empty?
|
19
|
+
|
20
|
+
previous_commit = lockfile_changes.shift
|
21
|
+
previous_gem_spec = gem_spec_at_commit_hash(previous_commit.short_hash, gem_name)
|
22
|
+
# only one change to the lockfile was found and the gem was not there
|
23
|
+
return [] if previous_gem_spec.nil?
|
24
|
+
|
25
|
+
lockfile_changes.each do |current_commit|
|
26
|
+
current_gem_spec = gem_spec_at_commit_hash(current_commit.short_hash, gem_name)
|
20
27
|
|
21
28
|
# we reached the end, the gem didn't exist back then
|
22
29
|
# TODO: what if it was added then removed and then added again?
|
23
|
-
break if
|
30
|
+
break if current_gem_spec.nil?
|
24
31
|
|
25
|
-
|
26
|
-
|
27
|
-
version_changes << VersionChange.new(commit: commit, version: gem_spec.version)
|
28
|
-
previous_version = gem_spec.version.to_s
|
32
|
+
if current_gem_spec.version.to_s != previous_gem_spec.version.to_s
|
33
|
+
version_changes << VersionChange.new(commit: previous_commit, version: previous_gem_spec.version)
|
29
34
|
end
|
35
|
+
|
36
|
+
previous_gem_spec = current_gem_spec
|
37
|
+
previous_commit = current_commit
|
30
38
|
end
|
31
39
|
|
40
|
+
version_changes << VersionChange.new(commit: previous_commit, version: previous_gem_spec.version)
|
41
|
+
|
32
42
|
version_changes
|
33
43
|
end
|
34
44
|
|
data/lib/gistory/git_repo.rb
CHANGED
data/lib/gistory/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gistory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergio Medina
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -39,33 +39,33 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '5.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '5.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '10.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '10.0'
|
69
69
|
description: 'Gistory: Know exactly when a gem was updated in your Gemfile.lock'
|
70
70
|
email:
|
71
71
|
- medinasergio@gmail.com
|
@@ -110,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
110
110
|
requirements:
|
111
111
|
- - ">="
|
112
112
|
- !ruby/object:Gem::Version
|
113
|
-
version: '2.
|
113
|
+
version: '2.2'
|
114
114
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
116
|
- - ">="
|
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
118
|
version: '0'
|
119
119
|
requirements: []
|
120
120
|
rubyforge_project:
|
121
|
-
rubygems_version: 2.
|
121
|
+
rubygems_version: 2.7.8
|
122
122
|
signing_key:
|
123
123
|
specification_version: 4
|
124
124
|
summary: 'Gistory: Know exactly when a gem was updated in your Gemfile.lock'
|