Skip to content

Commit

Permalink
Update mailcatcher.sh
Browse files Browse the repository at this point in the history
Merged changes from fideloper#561
  • Loading branch information
vivianspencer authored Oct 17, 2016
1 parent d42740b commit eca6ed1
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions scripts/mailcatcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,39 @@ PHP_IS_INSTALLED=$1
apache2 -v > /dev/null 2>&1
APACHE_IS_INSTALLED=$?

# Installing dependency
# Source .profile for RVM, if available
if [[ -f "/home/vagrant/.profile" ]]; then
source /home/vagrant/.profile
fi

# Installing sqlite dependency
# -qq implies -y --force-yes
sudo apt-get install -qq libsqlite3-dev ruby1.9.1-dev
sudo apt-get install -qq libsqlite3-dev

if $(which rvm) -v > /dev/null 2>&1; then
echo ">>>>Installing with RVM"
$(which rvm) default@mailcatcher --create do gem install --no-rdoc --no-ri mailcatcher
$(which rvm) wrapper default@mailcatcher --no-prefix mailcatcher catchmail
else
# Installing ruby dependency
# -qq implies -y --force-yes
sudo apt-get install -qq ruby1.9.1-dev

# Gem check
if ! gem -v > /dev/null 2>&1; then sudo aptitude install -y libgemplugin-ruby; fi

# Install Mailcatcher gem dependencies, otherwise Ruby 2.0.0+ is required
gem install --no-rdoc --no-ri mail -v 2.6.3 # Last known working with Ruby < 2.0.0
gem install --no-rdoc --no-ri activesupport -v "~> 4.0"
gem install --no-rdoc --no-ri eventmachine -v 1.0.9.1
gem install --no-rdoc --no-ri rack -v "~> 1.5"
gem install --no-rdoc --no-ri sinatra -v "~> 1.2"
gem install --no-rdoc --no-ri skinny -v "~> 0.2.3"
gem install --no-rdoc --no-ri sqlite3 -v "~> 1.3"
gem install --no-rdoc --no-ri thin -v "~> 1.5.0"

# Install
gem install --no-rdoc --no-ri mailcatcher
gem install --no-rdoc --no-ri --ignore-dependencies mailcatcher -v "~> 0.6"
fi

# Make it start on boot
Expand Down

0 comments on commit eca6ed1

Please sign in to comment.