From ea05e571bd401d03406353153973af8daa9267ca Mon Sep 17 00:00:00 2001 From: Michael Brooks Date: Mon, 2 Feb 2015 23:54:39 -0800 Subject: [PATCH 1/6] add gitattributes to fix eols --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitattributes 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 From 05cf1ea0d6836d711b121b9a932e68098bff6ddd Mon Sep 17 00:00:00 2001 From: Michael Brooks Date: Mon, 2 Feb 2015 23:58:49 -0800 Subject: [PATCH 2/6] install curl before trying to install pip --- script/bootstrap.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script/bootstrap.sh b/script/bootstrap.sh index 32f1de4..813ef60 100644 --- a/script/bootstrap.sh +++ b/script/bootstrap.sh @@ -9,10 +9,11 @@ echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo apt-get update sudo apt-get install mongodb-org +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 From 083aed2c337b8fc524bf58f77707ae66f0baa291 Mon Sep 17 00:00:00 2001 From: Michael Brooks Date: Tue, 3 Feb 2015 00:16:22 -0800 Subject: [PATCH 3/6] install requirements, use proper script name --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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? From 14f7dacd76aebb1ec68c0985360c85736c7108ff Mon Sep 17 00:00:00 2001 From: Michael Brooks Date: Tue, 3 Feb 2015 00:16:42 -0800 Subject: [PATCH 4/6] auto-yes apt-get installs --- script/bootstrap.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/bootstrap.sh b/script/bootstrap.sh index 813ef60..21e16b9 100644 --- a/script/bootstrap.sh +++ b/script/bootstrap.sh @@ -1,13 +1,13 @@ #!/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 From c08b276549d0a05d159db2b18d3d112220d7c669 Mon Sep 17 00:00:00 2001 From: Michael Brooks Date: Tue, 3 Feb 2015 00:22:18 -0800 Subject: [PATCH 5/6] log file path not correct --- config/gnip.cfg.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) From 08fbf4e880b27ddb86870a1926fb7d60d6cfc971 Mon Sep 17 00:00:00 2001 From: Michael Brooks Date: Tue, 3 Feb 2015 00:22:35 -0800 Subject: [PATCH 6/6] write config file, not read --- bin/sample_python_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)