2018-11-18 11:00:15 +05:30
|
|
|
GEMFILE_LOCK_NOT_UPDATED_MESSAGE = <<~MSG.freeze
|
|
|
|
**%<gemfile>s was updated but %<gemfile_lock>s wasn't updated.**
|
|
|
|
|
|
|
|
Usually, when %<gemfile>s is updated, you should run
|
|
|
|
```
|
|
|
|
bundle install && \
|
2019-02-13 22:33:31 +05:30
|
|
|
bundle install
|
2018-11-18 11:00:15 +05:30
|
|
|
```
|
|
|
|
|
|
|
|
or
|
|
|
|
|
|
|
|
```
|
|
|
|
bundle update <the-added-or-updated-gem>
|
|
|
|
```
|
|
|
|
|
|
|
|
and commit the %<gemfile_lock>s changes.
|
|
|
|
MSG
|
|
|
|
|
|
|
|
gemfile_modified = git.modified_files.include?("Gemfile")
|
|
|
|
gemfile_lock_modified = git.modified_files.include?("Gemfile.lock")
|
|
|
|
|
|
|
|
if gemfile_modified && !gemfile_lock_modified
|
|
|
|
warn format(GEMFILE_LOCK_NOT_UPDATED_MESSAGE, gemfile: gitlab.html_link("Gemfile"), gemfile_lock: gitlab.html_link("Gemfile.lock"))
|
|
|
|
end
|