Skip to content

Commit

Permalink
Merge pull request #249 from vccw-team/fix-gem-problem
Browse files Browse the repository at this point in the history
v3.3.0
  • Loading branch information
miya0001 authored May 24, 2017
2 parents aeb5ae3 + 5abbeaf commit 625986c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
5 changes: 3 additions & 2 deletions provision/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ reset_db_on_provision: true

#
# RubyGems
# Wordmove will be forcibly installed.
#
ruby_gems:
- bundler
Expand All @@ -120,8 +121,8 @@ npms: []
#
composers:
- phpunit/phpunit:5.6
- squizlabs/php_codesniffer:*
- wp-coding-standards/wpcs:*
# - squizlabs/php_codesniffer:~2.0
# - wp-coding-standards/wpcs:*
# - phpmd/phpmd:*
# - sebastian/phpcpd:*
# - phploc/phploc:*
Expand Down
11 changes: 9 additions & 2 deletions provision/playbooks/commands.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- hosts: all
vars:
wp_cli_bin_url: https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli-nightly.phar
wp_cli_bin_url: https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
composer_version: 1.3.1

tasks:
Expand Down Expand Up @@ -84,12 +84,19 @@
template:
src: templates/.gemrc
dest: "{{ ansible_env.HOME }}/.gemrc"
- name: Install Wordmove
become: no
gem:
name: "wordmove"
user_install: yes
version: "2.0.0"
ignore_errors: yes
- name: Install Ruby gems
become: no
gem:
name: "{{ item }}"
state: latest
user_install: yes
when: item != "wordmove"
with_items: "{{ vccw.ruby_gems | default([]) }}"
ignore_errors: yes

Expand Down
5 changes: 5 additions & 0 deletions provision/playbooks/wordpress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,19 @@
when: vccw.wp_siteurl != ''
command: "mv /tmp/index.php {{ vccw.document_root }}/index.php"

- stat:
path: "{{ path }}/.gitignore"
register: st
- name: Create `.gitignore`
get_url:
url: https://raw.githubusercontent.com/github/gitignore/master/WordPress.gitignore
dest: /tmp/.gitignore
mode: 0644
force: yes
when: st.stat.exists != true
- name: Move `.gitignore`
command: "mv /tmp/.gitignore {{ path }}/.gitignore"
when: st.stat.exists != true

- name: Run `wp core language install`
command: |
Expand Down
2 changes: 1 addition & 1 deletion spec/default/commands_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
end
end

$conf['ruby_gems'].each do |gem|
$conf['ruby_gems'].each do |gem, version|
describe command('su -l '+$conf['user']+' bash -lc "' + gem + ' help"') do
let(:disable_sudo) { true }
its(:exit_status) { should eq 0 }
Expand Down

0 comments on commit 625986c

Please sign in to comment.