summaryrefslogtreecommitdiff
path: root/lib/license/finder/ext/trash.rb
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-11-03 15:38:05 -0700
committermo khan <mo.khan@gmail.com>2020-11-10 14:28:21 -0700
commit6001e7586f04528067b16c08a6b046be5b5b62ec (patch)
tree2bab9c7af37ede194edc8283405a07f59caea8d8 /lib/license/finder/ext/trash.rb
parent191185c4303768c6d9a1431c35143501c06ee4d7 (diff)
use recursive scan by defaultrecursive-default
docs: update CHANGELOG and version feat: scan packages in parallel fix: prevent infinite recursion
Diffstat (limited to 'lib/license/finder/ext/trash.rb')
-rw-r--r--lib/license/finder/ext/trash.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/license/finder/ext/trash.rb b/lib/license/finder/ext/trash.rb
new file mode 100644
index 0000000..76f16b1
--- /dev/null
+++ b/lib/license/finder/ext/trash.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+module LicenseFinder
+ class Trash
+ def active?
+ return if project_path.to_path.include?('/vendor/')
+
+ project_path.join('vendor.conf').exist?
+ end
+
+ def prepare
+ within_project_path do
+ tool_box.install(tool: :golang)
+ shell.execute([:go, :get, '-u', 'github.com/rancher/trash'], capture: false)
+ shell.execute([:asdf, :reshim], capture: false)
+ end
+ end
+ end
+end