Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Merge branch 'master' into disconnect-639
Browse files Browse the repository at this point in the history
Conflicts:
	gittip/elsewhere/__init__.py
	gittip/models/_mixin_elsewhere.py
	templates/connected-accounts.html
	tests/test_elsewhere.py
	tests/test_participant.py
  • Loading branch information
Changaco committed Feb 27, 2014
2 parents 15e487e + d2295fc commit 33be817
Show file tree
Hide file tree
Showing 148 changed files with 16,561 additions and 4,630 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# EditorConfig is awesome: http://EditorConfig.org
root = true

# All defaulty with the four-space things
[*]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

# Makefiles require us to use tabs, so we're gonna keep tabs with Makefiles
[Makefile]
indent_style = tab

# These files are generated programmatically, so we're going to keep with the
# program
[{package,bower}.json]
indent_size = 2
6 changes: 6 additions & 0 deletions .slugignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Files removed before slug
# compilation on Heroku
# See: https://devcenter.heroku.com/articles/slug-compiler#slug-size
img-src/
tests/
jstests/
15 changes: 9 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
language: python
addons:
postgresql: 9.3
before_install:
- node --version
install: make env node_modules
before_script:
- make tests/env
- echo "YES_PLEASE_DELETE_ALL_MY_DATA_VERY_OFTEN=Pretty please, with sugar on top." >> tests/env
- echo "DATABASE_URL=postgres://postgres@localhost/gittip-test" >> tests/env
- psql -U postgres -c 'CREATE DATABASE "gittip-test";'
- make test-schema
- echo "DATABASE_URL=dbname=gittip" | tee -a tests/local.env local.env
- psql -U postgres -c 'CREATE DATABASE "gittip";'
- rm -rf tests/fixtures
script: make test
notifications:
email: false
irc:
irc:
channels:
- "irc.freenode.org#gittip"
on_success: change
Expand Down
34 changes: 0 additions & 34 deletions .vimrc_local.vim

This file was deleted.

19 changes: 15 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ module.exports = function(grunt) {
files: [
'www/assets/jquery-1.10.2.min.js',
'www/assets/%version/utils.js',
'jstests/**/test_*.js',
'jstests/**/*.js',
],

browserify: { watch: true },
Expand Down Expand Up @@ -90,16 +90,27 @@ module.exports = function(grunt) {
.on('error', function(e) {
grunt.log.write('Starting Gittip server...');

var started = false;
var gittip = spawn('make', ['run']);
var started = false,
stdout = [],
gittip = spawn('make', ['run']);

gittip.stdout.setEncoding('utf8');

gittip.stdout.on('data', function(data) {
if (!started && /Greetings, program! Welcome to port 8537\./.test(data)) {
started = true;
grunt.log.writeln('started.');
done();
setTimeout(done, 1000);
} else if (started && /Is something already running on port 8537/.test(data)) {
started = false;
} else
stdout.push(data);
});

gittip.on('exit', function() {
if (!started) {
grunt.log.writeln(stdout);
grunt.fail.fatal('Something went wrong when starting the Gittip server :<');
}
});

Expand Down
54 changes: 18 additions & 36 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if response.status_code == 200:
')
endef

env: $(env_bin)/swaddle
env:
$(python) $(venv)\
--unzip-setuptools \
--prompt="[gittip] " \
Expand All @@ -29,59 +29,45 @@ env: $(env_bin)/swaddle
./$(env_bin)/pip install -r requirements_tests.txt
./$(env_bin)/pip install -e ./

$(env_bin)/swaddle:
$(python) $(venv)\
--unzip-setuptools \
--prompt="[gittip] " \
--never-download \
--extra-search-dir=./vendor/ \
--distribute \
./env/
./$(env_bin)/pip install -r requirements.txt
./$(env_bin)/pip install -r requirements_tests.txt
./$(env_bin)/pip install -e ./

clean:
rm -rf env *.egg *.egg-info
find . -name \*.pyc -delete

local.env:
echo "Creating a local.env file ..."
echo
cp default_local.env local.env

cloud-db: env local.env
cloud-db: env
echo -n $(postgression_database) >> local.env

schema: env local.env
./$(env_bin)/swaddle local.env ./recreate-schema.sh
schema: env
./$(env_bin)/honcho -e defaults.env,local.env run ./recreate-schema.sh

data:
./$(env_bin)/swaddle local.env ./$(env_bin)/fake_data fake_data
./$(env_bin)/honcho -e defaults.env,local.env run ./$(env_bin)/fake_data fake_data

db: cloud-db schema data

run: env local.env
./$(env_bin)/swaddle local.env ./$(env_bin)/aspen \
run: env
./$(env_bin)/honcho -e defaults.env,local.env run ./$(env_bin)/aspen \
--www_root=www/ \
--project_root=. \
--show_tracebacks=yes \
--changes_reload=yes \
--network_address=:8537

test-cloud-db: env tests/env
echo -n $(postgression_database) >> tests/env
test-cloud-db: env
echo -n $(postgression_database) >> tests/local.env

test-schema: env tests/env
./$(env_bin)/swaddle tests/env ./recreate-schema.sh
test-schema: env
./$(env_bin)/honcho -e tests/defaults.env,tests/local.env run ./recreate-schema.sh

test-db: test-cloud-db test-schema

test: env tests/env test-schema
./$(env_bin)/swaddle tests/env ./$(env_bin)/py.test ./tests/
test: env test-schema
./$(env_bin)/honcho -e tests/defaults.env,tests/local.env run ./$(env_bin)/py.test ./tests/

retest: env
./$(env_bin)/honcho -e tests/defaults.env,tests/local.env run ./$(env_bin)/py.test ./tests/ --lf

retest: env tests/env
./$(env_bin)/swaddle tests/env ./$(env_bin)/py.test ./tests/ --lf
test-cov: env test-schema
./$(env_bin)/honcho -e tests/defaults.env,tests/local.env run ./$(env_bin)/py.test --cov gittip ./tests/

tests: test

Expand All @@ -92,7 +78,3 @@ node_modules: package.json
jstest: node_modules
./node_modules/.bin/grunt test

tests/env:
echo "Creating a tests/env file ..."
echo
cp default_tests.env tests/env
Loading

0 comments on commit 33be817

Please sign in to comment.