diff options
| author | mo khan <mo.khan@gmail.com> | 2019-10-25 11:13:13 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2019-10-25 11:13:13 -0600 |
| commit | 05ecf50afea4315e7052fdde061e1c10bc5b17ae (patch) | |
| tree | 01a2a38c514b8d4d6b77dda8ce398dd5d37da9dd /lib | |
| parent | 119ce79c5125367cfcef14af3678509105398337 (diff) | |
Monkey patch bundler to detect in sub directories
* Details can be found [here](https://gitlab.com/gitlab-org/gitlab/issues/13748#note_235810786)
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/license/management.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/license/management.rb b/lib/license/management.rb index 64fd4e8..a6e0664 100644 --- a/lib/license/management.rb +++ b/lib/license/management.rb @@ -12,6 +12,20 @@ require 'license/management/version' # This applies a monkey patch to the JsonReport found in the `license_finder` gem. LicenseFinder::JsonReport.prepend(License::Management::Report) +# This monkey patch can be removed once we upgrade to license_finder 5.9.2. Details [here](https://gitlab.com/gitlab-org/gitlab/issues/13748#note_235810786). +module LicenseFinder + class Bundler < PackageManager + def definition + @definition ||= + begin + Dir.chdir(project_path.to_s) do + ::Bundler::Definition.build(detected_package_path, lockfile_path, nil) + end + end + end + end +end + module License module Management def self.root |
