ruby - Check if Gemfile.lock matches Gemfile -


i want write unit test check if gemfile.lock in project matches gemfile in case forget call bundle before committing.

is there option bundle command (or method) check this?

note bundle check not suit purpose. checks see if gems in gemfile installed on local system, not check gemfile.lock. therefore bundle install --deployment command on server can fail if bundle check succeeds on development machine or in ci.

try:

cp gemfile.lock gemfile.lock.orig bundle install diff gemfile.lock gemfile.lock.orig && echo "gemfile.lock matches gemfile" 

Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -