Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Inform the user of new bundled gems.

  • Loading branch information...
commit 1e4e5dff0a4444d61befe8baad2d721ba7e86907 1 parent 435ac0b
@elliotcm elliotcm authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 lib/git-up.rb
View
14 lib/git-up.rb
@@ -43,6 +43,8 @@ def run
end
end
end
+
+ check_bundler
rescue GitError => e
puts e.message
exit 1
@@ -117,6 +119,18 @@ def rebase(target_branch)
end
end
+ def check_bundler
+ return unless File.exists? 'Gemfile'
+
+ begin
+ require 'bundler'
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('Gemfile')
+ Bundler.setup
+ rescue Bundler::GemNotFound
+ puts 'Gems are missing. You should `bundle install`.'.yellow
+ end
+ end
+
def is_fast_forward?(a, b)
merge_base(a.name, b.name) == b.commit.sha
end
Please sign in to comment.
Something went wrong with that request. Please try again.