summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spandx/core/update_plugin.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/spandx/core/update_plugin.rb b/lib/spandx/core/update_plugin.rb
new file mode 100644
index 0000000..3901cf8
--- /dev/null
+++ b/lib/spandx/core/update_plugin.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+module Spandx
+ module Core
+ class UpdatePlugin < Spandx::Core::Plugin
+ def enhance(dependency)
+ if dependency.package_manager == :rubygems
+ Dir.chdir(dependency.path.parent) do
+ Bundler.with_unbundled_env do
+ puts "Updating... #{dependency.name}"
+ system "bundle update #{dependency.name} --conservative"
+ system "git diff"
+ system "git checkout ."
+ end
+ end
+ end
+ end
+ end
+ end
+end