diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..d8a59ce --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.sh text eol=lf +/start text eol=lf diff --git a/README.md b/README.md index ef05f6e..b63da41 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,8 @@ Some key notes about this design are as follows: git clone git@github.com:twitterdev/sample-python-connector.git sample-python-connector cd sample-python-connector sh script/bootstrap.sh - sh ./start.sh + pip install -r requirements.txt + sh ./start ``` To run with Vagrant: @@ -33,7 +34,8 @@ Some key notes about this design are as follows: vagrant init vagrant ssh cd /vagrant - sh ./start.sh + pip install -r requirements.txt + sh ./start ``` ##Whats Next? diff --git a/bin/sample_python_app.py b/bin/sample_python_app.py index 9a9db62..8a95f0d 100644 --- a/bin/sample_python_app.py +++ b/bin/sample_python_app.py @@ -194,7 +194,7 @@ def config_file_path(): def write_out_config(config): - with open(config_file_path(), 'r+') as config_file: + with open(config_file_path(), 'w+') as config_file: config_file.truncate() config.write(config_file) diff --git a/config/gnip.cfg.example b/config/gnip.cfg.example index 223f12b..ed852f3 100644 --- a/config/gnip.cfg.example +++ b/config/gnip.cfg.example @@ -3,7 +3,7 @@ username= password= [sys] -logfilepath=../log +logfilepath=log [stream] # Twitter Powertrack stream (Gnip 2.5) diff --git a/script/bootstrap.sh b/script/bootstrap.sh index 32f1de4..21e16b9 100644 --- a/script/bootstrap.sh +++ b/script/bootstrap.sh @@ -1,18 +1,19 @@ #!/bin/sh export DEBIAN_FRONTEND=noninteractive -sudo apt-get update +sudo apt-get update -y sudo apt-get install -yq git redis-server libpython-dev tmux silversearcher-ag build-essential autoconf libtool pkg-config idle-python2.7 # Mongo sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list -sudo apt-get update -sudo apt-get install mongodb-org +sudo apt-get update -y +sudo apt-get install mongodb-org -y +sudo apt-get install -y curl sudo curl https://bootstrap.pypa.io/get-pip.py > pip_install.py sudo python pip_install.py rm pip_install.py -sudo apt-get install -y zsh curl +sudo apt-get install -y zsh chsh -s $(which zsh) sudo rm -rf ~/.oh-my-zsh && sudo curl -L http://install.ohmyz.sh > ~/install_zsh.sh && sudo zsh ~/install_zsh.sh \ No newline at end of file