Skip to content

Commit

Permalink
Merge pull request #353 from mvexel/master
Browse files Browse the repository at this point in the history
version 2015.11
  • Loading branch information
mvexel committed Nov 10, 2015
2 parents 66064a4 + da9c471 commit 5667ae7
Show file tree
Hide file tree
Showing 13 changed files with 270 additions and 374 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ maproulette/static/js/maproulette.js
.module-cache/
bower_components/
responses.json
migrations/
migrations/
.idea/
34 changes: 17 additions & 17 deletions config-example.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
import sys
import os
import logging

# The application secret key
SECRET_KEY = 'CHANGE THIS'

# The OAuth configuration paramters for OSM.
OSM = {
'base_url': 'http://www.openstreetmap.org/api/0.6/',
'base_url': 'http://master.apis.dev.openstreetmap.org/api/0.6/',
'request_token_url':
'https://www.openstreetmap.org/oauth/request_token',
'access_token_url': 'https://www.openstreetmap.org/oauth/access_token',
'authorize_url': 'https://www.openstreetmap.org/oauth/authorize',
'http://master.apis.dev.openstreetmap.org/oauth/request_token',
'access_token_url': 'http://master.apis.dev.openstreetmap.org/oauth/access_token',
'authorize_url': 'http://master.apis.dev.openstreetmap.org/oauth/authorize',
'consumer_key': 'CHANGE THIS',
'consumer_secret': 'CHANGE THIS'
'consumer_secret': 'CHANGE_THIS'
}

# by default, disable Flask debug and testing modes
DEBUG = True # Also remember to change LOGLEVEL below
TESTING = True
# Set debugging mode. This is detected by looking at the 'runserver' argument passed to manage.py
DEBUG = (len(sys.argv)>1 and sys.argv[1] == 'runserver')

# This is the buffer for looking for tasks / challenges near the given
# lon/lat
Expand All @@ -28,17 +31,11 @@
SQLALCHEMY_DATABASE_URI = "postgresql://osm:osm@localhost/maproulette"

# Logging details
import logging
LOGFILE = '/tmp/maproulette.log'
LOGLEVEL = logging.DEBUG
LOGFILE = os.path.join(os.path.expanduser('~'), '/tmp/maproulette.log')
LOGLEVEL = logging.DEBUG if DEBUG else logging.INFO

# the default challenge to run
DEFAULT_CHALLENGE = 'CHANGE THIS'

# show a teaser page instead of the real thing
TEASER = False
# the text that should go into the teaser
TEASER_TEXT = 'New MapRoulette Coming SOON!'
DEFAULT_CHALLENGE = 'CHANGE_THIS'

# IP Whitelist for external API calls
# (/api/admin/*, /api/stats*, /api/users, /api/challenges)
Expand All @@ -56,3 +53,6 @@
# Basic Authentication user / pass
AUTHORIZED_USER = 'testuser'
AUTHORIZED_PASSWORD = 'password'

# SQLAlchemy defaults
SQLALCHEMY_TRACK_MODIFICATIONS = False
88 changes: 36 additions & 52 deletions fabric_templates/config
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
# The application secret key

# http://www.thedutchtable.com/2013/03/een-ei-is-geen-eivrolijk-pasen.html
SECRET_KEY = 'REPLACE WITH YOUR APPLICATION SECRET KEY'

{% if is_dev -%}
{% set db = "maproulette_dev" -%}
{% set cors_url = "http://maproulette-metrics-stage.s3-website-us-east-1.amazonaws.com/" -%}
{% set osm_url = "http://api06.dev.openstreetmap.org" -%}
{% else -%}
{% set db = "maproulette" -%}
{% set cors_url = "http://maproulette-metrics-production.s3-website-us-east-1.amazonaws.com/" -%}
{% set osm_url = "https://www.openstreetmap.org" -%}
{% endif -%}
import sys
import os
import logging

# The database connection
SQLALCHEMY_DATABASE_URI = "postgresql://osm:osm@localhost/{{db}}"
# The application secret key
SECRET_KEY = 'CHANGEME'

# show a teaser page instead of the real thing
TEASER = False
# the text that should go into the teaser
TEASER_TEXT = 'New MapRoulette Challenges coming SOON!'
# The OAuth configuration paramters for OSM.

import logging
LOGFILE = '/srv/www/{{instance}}/log/maproulette.log'
LOGLEVEL = logging.DEBUG
OSM = {
'base_url': '{{osm_url}}/api/0.6/',
'request_token_url':
'{{osm_url}}/oauth/request_token',
'access_token_url': '{{osm_url}}/oauth/access_token',
'authorize_url': '{{osm_url}}/oauth/authorize',
'consumer_key': 'CHANGEME',
'consumer_secret': 'CHANGEME'
}

# by default, disable Flask debug and testing modes
DEBUG = True
TESTING = True
# Set debugging mode. This is detected by looking at the 'runserver' argument passed to manage.py
DEBUG = (sys.argv[1] == 'runserver')

# This is the buffer for looking for tasks / challenges near the given
# lon/lat
Expand All @@ -35,47 +37,29 @@ NEARBUFFER = 0.01
# for considering a challenge 'local'
MAX_SQ_DEGREES_FOR_LOCAL = 10

from datetime import timedelta

# The expiration threshold for tasks that are 'assigned' or 'editing'
TASK_EXPIRATION_THRESHOLD = timedelta(hours=1)

# The expiration threshold for tasks that are 'assigned' or 'editing'
TASK_EXPIRATION_THRESHOLD = timedelta(hours=1)
# The database connection
SQLALCHEMY_DATABASE_URI = "postgresql://osm:osm@localhost/{{db}}"

# The time buffer between a task marked as fixed and the timestamp on the
# changeset in OSM. (Used in validation)
MAX_CHANGESET_OFFSET = timedelta(hours=1)
# Logging details
LOGFILE = '/srv/www/{{instance}}/log/maproulette.log'
LOGLEVEL = logging.DEBUG if DEBUG else logging.INFO

# the default challenge to run
DEFAULT_CHALLENGE = 'test1'

# The OAuth configuration paramters for OSM.
{% if is_dev -%}
{% set osm_url = "http://api06.dev.openstreetmap.org" -%}
{% else -%}
{% set osm_url = "https://www.openstreetmap.org" -%}
{% endif -%}

OSM = {
'base_url': '{{osm_url}}/api/0.6/',
'request_token_url':
'{{osm_url}}/oauth/request_token',
'access_token_url': '{{osm_url}}/oauth/access_token',
'authorize_url': '{{osm_url}}/oauth/authorize',
'consumer_key': '{{consumer_key}}',
'consumer_secret': '{{consumer_secret}}'
}

# The MailGun API KEY
MAILGUN_API_KEY = 'REPLACE WITH YOUR MAILGUN API KEY'
DEFAULT_CHALLENGE = 'CHANGEME'

# IP Whitelist for external API calls
# (/api/admin/*, /api/stats*, /api/users, /api/challenges)
IP_WHITELIST = [ ]
IP_WHITELIST = []

# Max number of tasks in a bulk update call
MAX_TASKS_BULK_UPDATE = 5000
# Service API keys
MAILGUN_API_KEY = 'CHANGEME'

# URL to the metrics site instance, for allowing CORS requests from
METRICS_URL = '{{cors_url}}'
METRICS_URL = '{{cors_url}}'

# Max number of tasks in a bulk task update
MAX_TASKS_BULK_UPDATE = 5000

# Basic Authentication user / pass
AUTHORIZED_USER = 'CHANGEME'
AUTHORIZED_PASSWORD = 'CHANGEME'
Loading

0 comments on commit 5667ae7

Please sign in to comment.