Skip to content

Commit

Permalink
Fixing setup.sh & Crypto_Box issue
Browse files Browse the repository at this point in the history
- fixing setup so it won’t ask on apt-get install
- fixing crypto_box to properly load things so sinatra_helpers won’t
fail on errors. Need to work on encrypt/decrypt errors to handle this
better and don’t load unnecessary gems. For the time being, is a quick
fix for #46 submitted by @marksee
  • Loading branch information
mrbrutti committed May 29, 2015
1 parent cc18c11 commit 160418b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions data/scripts/setup.sh
Expand Up @@ -161,7 +161,7 @@ function install_ruby_nix
print_good "Correct version of Ruby is installed"
else
print_status "Installing Linux dependencies"
sudo apt-get install ruby2.1 ruby2.1-dev build-essential zlib1g-dev libxslt-dev libxml2-dev zlib1g zlib1g-dev libxml2 libxml2-dev libxslt-dev locate libreadline6-dev libcurl4-openssl-dev git-core libssl-dev libyaml-dev openssl autoconf libtool ncurses-dev bison curl wget xsel libapr1 libaprutil1 libsvn1 libpcap-dev
sudo apt-get -y install ruby2.1 ruby2.1-dev build-essential zlib1g-dev libxslt-dev libxml2-dev zlib1g zlib1g-dev libxml2 libxml2-dev libxslt-dev locate libreadline6-dev libcurl4-openssl-dev git-core libssl-dev libyaml-dev openssl autoconf libtool ncurses-dev bison curl wget xsel libapr1 libaprutil1 libsvn1 libpcap-dev
print_status "Installing the bundler Gem"
gem install bundler >> $LOGFILE 2>&1
fi
Expand All @@ -179,11 +179,11 @@ function install_mongodb {
;;
*Ubuntu*)
print_status "Installing mongodb"
sudo apt-get install mongodb
sudo apt-get -y install mongodb
;;
*Debian*)
print_status "Installing mongodb"
sudo apt-get install mongodb
sudo apt-get -y install mongodb
;;
*Arch*)
print_status "Installing mongodb"
Expand Down
2 changes: 2 additions & 0 deletions lib/cartero/crypto_box.rb
Expand Up @@ -12,6 +12,8 @@ def self.setup
if ::Cartero::GlobalConfig["crypto"] =~ /AES/i
require 'openssl'
require 'digest'
require 'rbnacl/libsodium'
require 'rbnacl'
require 'cartero/crypto/aes'
else
require 'rbnacl/libsodium'
Expand Down
2 changes: 1 addition & 1 deletion lib/cartero/sinatra_helpers.rb
Expand Up @@ -92,7 +92,7 @@ def log_debug(message)

def slack_notification
if ::Cartero::GlobalConfig["slack"]
@slack ||= Slack::Notifier.new ::Cartero::GlobalConfig["slack"]["webhook"],
@slack ||= ::Slack::Notifier.new ::Cartero::GlobalConfig["slack"]["webhook"],
username: ::Cartero::GlobalConfig["slack"]["username"],
channel: ::Cartero::GlobalConfig["slack"]["channel"]
geo_loc = "#{request.location.city}/#{request.location.country}" if request.location != nil
Expand Down

0 comments on commit 160418b

Please sign in to comment.