Check if bundler is in wrapper path, excluding global gemset.
This commit is contained in:
@@ -45,3 +45,8 @@ script:
|
||||
| grep -q '2'
|
||||
&& (echo 'Really deleted ruby test: pass' && exit 0)
|
||||
|| (echo 'Really deleted ruby test: fail' && exit 1)
|
||||
- >
|
||||
ls ~/.rvm/wrappers/default/
|
||||
| grep -q 'bundler'
|
||||
&& (echo 'Bundler symlinked on system path test: pass' && exit 0)
|
||||
|| (echo 'Bundler symlinked on system path test: fail' && exit 1)
|
||||
|
||||
@@ -24,13 +24,20 @@
|
||||
when: detect_default_ruby_version.stdout == '' or
|
||||
rvm1_default_ruby_version not in detect_default_ruby_version.stdout
|
||||
|
||||
- name: Detect installed ruby patch number
|
||||
shell: >
|
||||
{{ rvm1_rvm }} list strings | grep {{ item }} | tail -n 1
|
||||
with_items: rvm1_rubies
|
||||
changed_when: False
|
||||
register: ruby_patch
|
||||
|
||||
- name: Install bundler if not installed
|
||||
shell: >
|
||||
{{ rvm1_install_path }}/wrappers/{{ item }}@global/gem list
|
||||
| if ! grep "^bundler " ; then {{ rvm1_install_path }}/wrappers/{{ item }}@global/gem install bundler ; fi
|
||||
ls {{ rvm1_install_path }}/wrappers/{{ item.stdout }}
|
||||
| if ! grep "^bundler " ; then {{ rvm1_install_path }}/wrappers/{{ item.stdout }}/gem install bundler ; fi
|
||||
args:
|
||||
creates: '{{ rvm1_install_path }}/wrappers/{{ item }}@global/bundler'
|
||||
with_items: rvm1_rubies
|
||||
creates: '{{ rvm1_install_path }}/wrappers/{{ item.stdout }}/bundler'
|
||||
with_items: ruby_patch.results
|
||||
register: bundler_install
|
||||
changed_when: '"Successfully installed bundler" in bundler_install.stdout'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user