license_scout 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/lib/license_scout/dependency_manager/berkshelf.rb +14 -2
- data/lib/license_scout/version.rb +1 -1
- data/license_scout.gemspec +8 -1
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52257de820176f3967f5ccb25d3b63c0d6ab8361
|
4
|
+
data.tar.gz: 552b96f0d3f02afad489a574eb7ac65e94b8393b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 224df51c2fc2c5a8215693476b6198fee5295e65032432fe51bdba97bd65ea1b9652532f6e8991a6c5efde6a069ed41901a30b5d342ade64efe300307d8d04da
|
7
|
+
data.tar.gz: 3bcecbde801328acc30291aa43af5768b89b37b2d50948919a5be52a99e7a5b1423bf163334006e3bae6819ddd2ed8dc20a2ed32d05f3dadb8591a1719fff4b9
|
@@ -15,8 +15,6 @@
|
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
17
|
|
18
|
-
require "berkshelf"
|
19
|
-
|
20
18
|
require "license_scout/dependency_manager/base"
|
21
19
|
|
22
20
|
module LicenseScout
|
@@ -27,11 +25,25 @@ module LicenseScout
|
|
27
25
|
"chef_berkshelf"
|
28
26
|
end
|
29
27
|
|
28
|
+
def berkshelf_available?
|
29
|
+
begin
|
30
|
+
require "berkshelf"
|
31
|
+
rescue LoadError
|
32
|
+
return false
|
33
|
+
end
|
34
|
+
|
35
|
+
true
|
36
|
+
end
|
37
|
+
|
30
38
|
def detected?
|
31
39
|
File.exists?(berksfile_path) && File.exists?(lockfile_path)
|
32
40
|
end
|
33
41
|
|
34
42
|
def dependencies
|
43
|
+
if !berkshelf_available?
|
44
|
+
raise LicenseScout::Exceptions::Error.new "Project at '#{project_dir}' is a Berkshelf project but berkshelf gem is not available in your bundle. Add berkshelf to your bundle in order to collect licenses for this project."
|
45
|
+
end
|
46
|
+
|
35
47
|
dependencies = []
|
36
48
|
cookbook_dependencies = nil
|
37
49
|
|
data/license_scout.gemspec
CHANGED
@@ -37,11 +37,18 @@ Gem::Specification.new do |spec|
|
|
37
37
|
|
38
38
|
spec.add_dependency "ffi-yajl", "~> 2.2"
|
39
39
|
spec.add_dependency "mixlib-shellout", "~> 2.2"
|
40
|
-
spec.add_dependency "berkshelf", "~> 4.3"
|
41
40
|
|
42
41
|
spec.add_development_dependency "bundler", "~> 1.12"
|
43
42
|
spec.add_development_dependency "rake", "~> 10.0"
|
44
43
|
spec.add_development_dependency "rspec"
|
45
44
|
spec.add_development_dependency "pry"
|
46
45
|
spec.add_development_dependency "rb-readline"
|
46
|
+
|
47
|
+
# We do not have berkshelf as a dependency because some of its dependencies
|
48
|
+
# can not be installed on uncommon platforms like Solaris which we need to
|
49
|
+
# support. If a project needs to collect license information for a berkshelf
|
50
|
+
# project it needs to include it seperately in its gem bundle. We have a nice
|
51
|
+
# error message when they do not. But we add berkshelf as a development
|
52
|
+
# dependency so that we can run our tests.
|
53
|
+
spec.add_development_dependency "berkshelf", "~> 4.3"
|
47
54
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: license_scout
|
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
|
- Serdar Sutay
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi-yajl
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.2'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: berkshelf
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '4.3'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '4.3'
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: bundler
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,6 +108,20 @@ dependencies:
|
|
122
108
|
- - ">="
|
123
109
|
- !ruby/object:Gem::Version
|
124
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: berkshelf
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '4.3'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '4.3'
|
125
125
|
description: Discovers license files of a project's dependencies.
|
126
126
|
email:
|
127
127
|
- serdar@chef.io
|