Last active
August 29, 2015 14:14
-
-
Save shimabox/92430b26f6e31938cd71 to your computer and use it in GitHub Desktop.
mailcatcherのレシピ(gem eventmachineをダウングレードして動かす)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Cookbook Name:: app | |
# Recipe:: mailcatcher | |
# | |
# Copyright 2015, YOUR_COMPANY_NAME | |
# | |
# All rights reserved - Do Not Redistribute | |
# | |
# rubyとgem は既に入っている想定 | |
# ruby -v => 2.0.0p598 | |
# gem -v => 2.0.14 | |
# 下記 /usr/local/bin/gem 及び、IPは適宜書き換える | |
# mailcatcher install | |
# version 0.5.12 | |
execute "mailcatcher install" do | |
user "root" | |
command "/usr/local/bin/gem install mailcatcher" | |
not_if "/usr/local/bin/gem list | grep mailcatcher" | |
end | |
# @link https://github.com/sj26/mailcatcher/issues/182#issuecomment-68647414 | |
execute "gem install eventmachine -v 1.0.3" do | |
user "root" | |
command "/usr/local/bin/gem install eventmachine -v 1.0.3" | |
not_if "/usr/local/bin/gem list | grep \"eventmachine (1.0.3)\"" | |
end | |
execute "gem uninstall eventmachine -v 1.0.4" do | |
user "root" | |
command "/usr/local/bin/gem uninstall eventmachine -v 1.0.4" | |
only_if "/usr/local/bin/gem list | grep \"eventmachine (1.0.4\"" | |
end | |
# start | |
execute "mailcatcher --http-ip 192.168.30.10" do | |
command "mailcatcher --http-ip 192.168.30.10" | |
not_if "ps aux | grep [m]ailcatcher" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment