licensed 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/lib/licensed/git.rb +2 -8
- data/lib/licensed/source/go.rb +13 -1
- data/lib/licensed/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: 75d816dc3934658ad4d8133632c7a14da32c9364
|
4
|
+
data.tar.gz: 78c9eff92c3b95b1b8162dd4bfc5b71047932170
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7fec5980b6b926bbc6cc44c1ea097c8b3a6229d7e7303119b4d53c87afcf6b2da3f0951e36ab2bfb6aea614efe43a2ebd4759d5121a82649a5a3ffb05a31013
|
7
|
+
data.tar.gz: c3b9d9d5e0b5ea49eaba02341c67dba62390272f7cf7debca4306a2844e3d018cb109784573fa6c3c064653090dabb9c754c19f56606a20e06dd97a0f6858b1c
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## 1.3.3 - 2018-09-07
|
10
|
+
### Fixed
|
11
|
+
- Manifest source configuration globs correctly enumerates files from within submodules
|
12
|
+
- The manifest source no longer errors when getting version information from submodules
|
13
|
+
|
9
14
|
## 1.3.2 - 2018-08-15
|
10
15
|
### Fixed
|
11
16
|
- Fixed issue when multiple versions of a cabal package are found
|
@@ -68,4 +73,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
68
73
|
|
69
74
|
Initial release :tada:
|
70
75
|
|
71
|
-
[Unreleased]: https://github.com/github/licensed/compare/1.3.
|
76
|
+
[Unreleased]: https://github.com/github/licensed/compare/1.3.3...HEAD
|
data/lib/licensed/git.rb
CHANGED
@@ -18,13 +18,7 @@ module Licensed
|
|
18
18
|
# descriptor - file or directory to retrieve latest SHA for
|
19
19
|
def version(descriptor)
|
20
20
|
return unless available? && descriptor
|
21
|
-
|
22
|
-
dir = File.directory?(descriptor) ? descriptor : File.dirname(descriptor)
|
23
|
-
file = File.directory?(descriptor) ? "." : File.basename(descriptor)
|
24
|
-
|
25
|
-
Dir.chdir dir do
|
26
|
-
Licensed::Shell.execute("git", "rev-list", "-1", "HEAD", "--", file, allow_failure: true)
|
27
|
-
end
|
21
|
+
Licensed::Shell.execute("git", "rev-list", "-1", "HEAD", "--", descriptor, allow_failure: true)
|
28
22
|
end
|
29
23
|
|
30
24
|
# Returns the commit date for the provided SHA as a timestamp
|
@@ -37,7 +31,7 @@ module Licensed
|
|
37
31
|
|
38
32
|
def files
|
39
33
|
return unless available?
|
40
|
-
output = Licensed::Shell.execute("git", "ls-
|
34
|
+
output = Licensed::Shell.execute("git", "ls-files", "--full-name", "--recurse-submodules")
|
41
35
|
output.lines.map(&:strip)
|
42
36
|
end
|
43
37
|
end
|
data/lib/licensed/source/go.rb
CHANGED
@@ -36,12 +36,24 @@ module Licensed
|
|
36
36
|
"summary" => package["Doc"],
|
37
37
|
"homepage" => homepage(import_path),
|
38
38
|
"search_root" => search_root(package_dir),
|
39
|
-
"version" =>
|
39
|
+
"version" => package_version(package_dir)
|
40
40
|
})
|
41
41
|
end.compact
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
+
# Returns the most recent git SHA for a package, or nil if SHA is
|
46
|
+
# not available
|
47
|
+
#
|
48
|
+
# package_directory - package location
|
49
|
+
def package_version(package_directory)
|
50
|
+
return unless package_directory
|
51
|
+
|
52
|
+
Dir.chdir package_directory do
|
53
|
+
Licensed::Git.version(".")
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
45
57
|
# Returns the homepage for a package import_path. Assumes that the
|
46
58
|
# import path itself is a url domain and path
|
47
59
|
def homepage(import_path)
|
data/lib/licensed/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: licensed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: licensee
|