licensed 1.3.2 → 1.3.3

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: 877368e57ede0682327f09bcfcea106b6f34ac3a
4
- data.tar.gz: 44e24e3dab3df7507ff805cd3eccc10591827586
3
+ metadata.gz: 75d816dc3934658ad4d8133632c7a14da32c9364
4
+ data.tar.gz: 78c9eff92c3b95b1b8162dd4bfc5b71047932170
5
5
  SHA512:
6
- metadata.gz: 7891002cbec39b405c48498b93be1fe6b261ef88815673f5efc2b0a0fdf9410afbfb374bc41f2bf3030e4afe3505cc2ea9002d969693c32e78960e7044d01855
7
- data.tar.gz: 3f254744732b945cd9df93f1c113ca424844200c1cc5686687108af7907cc2cc5d37a719b4b94800703b0f25f52eeabd4c535c0e3b54415e60c36e5afc8db684
6
+ metadata.gz: b7fec5980b6b926bbc6cc44c1ea097c8b3a6229d7e7303119b4d53c87afcf6b2da3f0951e36ab2bfb6aea614efe43a2ebd4759d5121a82649a5a3ffb05a31013
7
+ data.tar.gz: c3b9d9d5e0b5ea49eaba02341c67dba62390272f7cf7debca4306a2844e3d018cb109784573fa6c3c064653090dabb9c754c19f56606a20e06dd97a0f6858b1c
@@ -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.2...HEAD
76
+ [Unreleased]: https://github.com/github/licensed/compare/1.3.3...HEAD
@@ -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-tree", "--full-tree", "-r", "--name-only", "HEAD")
34
+ output = Licensed::Shell.execute("git", "ls-files", "--full-name", "--recurse-submodules")
41
35
  output.lines.map(&:strip)
42
36
  end
43
37
  end
@@ -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" => Licensed::Git.version(package_dir)
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)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Licensed
3
- VERSION = "1.3.2".freeze
3
+ VERSION = "1.3.3".freeze
4
4
  end
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.2
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-08-15 00:00:00.000000000 Z
11
+ date: 2018-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: licensee