Skip to content

Instantly share code, notes, and snippets.

@shimabox
Created March 5, 2015 21:20
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save shimabox/e9fcda2ddf534690b61d to your computer and use it in GitHub Desktop.
mailcatcherのレシピ
#
# Cookbook Name:: app
# Recipe:: mailcatcher
#
# Copyright 2014, 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は適宜書き換える
# install
# version 0.6.1
execute "mailcatcher install" do
user "root"
command "/usr/local/bin/gem install mailcatcher"
not_if "/usr/local/bin/gem list | grep mailcatcher"
end
# version 1.0.5
execute "gem install eventmachine" do
user "root"
command "/usr/local/bin/gem install eventmachine"
not_if "/usr/local/bin/gem list | grep eventmachine"
end
# start
execute "mailcatcher --http-ip #{node[:http_ip]}" do
command "mailcatcher --http-ip #{node[:http_ip]}"
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