You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2015/04/15 16:55:00 UTC
[1/8] allura git commit: [#7870] Standardize .ini comments with ;
Repository: allura
Updated Branches:
refs/heads/db/7870 [created] a04d77fed
[#7870] Standardize .ini comments with ;
'#' sort of works, but you actually end up with config keys like '# my comment'
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/915b8288
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/915b8288
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/915b8288
Branch: refs/heads/db/7870
Commit: 915b8288fd131599c07e3fb747f101c5855574c3
Parents: 33dcb08
Author: Dave Brondsema <da...@brondsema.net>
Authored: Thu Apr 9 17:03:57 2015 -0400
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Tue Apr 14 17:37:27 2015 -0400
----------------------------------------------------------------------
Allura/development.ini | 310 ++++++++++++++++++++++----------------------
1 file changed, 155 insertions(+), 155 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/915b8288/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index b6c3154..b7ccde6 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -1,34 +1,34 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-# allura - Pylons development environment configuration
-#
-# The %(here)s variable will be replaced with the parent directory of this file
-#
-# This file is for deployment specific config options -- other configuration
-# that is always required for the app is done in the config directory,
-# and generally should not be modified by end users.
+; Licensed to the Apache Software Foundation (ASF) under one
+; or more contributor license agreements. See the NOTICE file
+; distributed with this work for additional information
+; regarding copyright ownership. The ASF licenses this file
+; to you under the Apache License, Version 2.0 (the
+; "License"); you may not use this file except in compliance
+; with the License. You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing,
+; software distributed under the License is distributed on an
+; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+; KIND, either express or implied. See the License for the
+; specific language governing permissions and limitations
+; under the License.
+;
+; allura - Pylons development environment configuration
+;
+; The %(here)s variable will be replaced with the parent directory of this file
+;
+; This file is for deployment specific config options -- other configuration
+; that is always required for the app is done in the config directory,
+; and generally should not be modified by end users.
[DEFAULT]
debug = true
-# Uncomment and replace with the address which should receive any error reports
-#email_to = you@yourdomain.com
+; Uncomment and replace with the address which should receive any error reports
+;email_to = you@yourdomain.com
-# Smtp settings
+; Smtp settings
;smtp_tls = False
;smtp_ssl = True
;smtp_user = some_user
@@ -59,12 +59,12 @@ site_name = Allura
domain = localhost
base_url = http://localhost:8080
-#lang = ru
+;lang = ru
cache_dir = %(here)s/data
-# Cache Neighborhood objects for N seconds (speeds up requests).
-# Set to 0 to disable (the default).
-# neighborhood.cache.duration = 0
+; Cache Neighborhood objects for N seconds (speeds up requests).
+; Set to 0 to disable (the default).
+; neighborhood.cache.duration = 0
; Docs at http://beaker.readthedocs.org/en/latest/configuration.html#session-options
; and http://beaker.readthedocs.org/en/latest/modules/session.html#beaker.session.CookieSession
@@ -76,29 +76,29 @@ beaker.session.secure = false
; CHANGE THIS VALUE FOR YOUR SITE
beaker.session.validate_key = 714bfe3612c42390726f
-# Google Analytics account for tracking
-# ga.account = UA-XXXXX-X
+; Google Analytics account for tracking
+; ga.account = UA-XXXXX-X
registration.method = local
-# theme = sftheme
+; theme = sftheme
theme = allura
show_export_control = false
-# auth.method = ldap
+; auth.method = ldap
auth.method = local
auth.remember_for = 365 ; in days, for the "remember me" checkbox on login
-# auth.login_url = /auth/
-# auth.logout_url = /auth/logout
-# auth.login_fragment_url = /auth/login_fragment
+; auth.login_url = /auth/
+; auth.logout_url = /auth/logout
+; auth.login_fragment_url = /auth/login_fragment
auth.min_password_len = 6
auth.max_password_len = 30
-# password expiration options (disabled if neither is set)
-# auth.pwdexpire.days = 1
-# auth.pwdexpire.before = 1401949912 ; unix timestamp
+; password expiration options (disabled if neither is set)
+; auth.pwdexpire.days = 1
+; auth.pwdexpire.before = 1401949912 ; unix timestamp
-# if using LDAP, also run `pip install python-ldap` in your Allura environment
+; if using LDAP, also run `pip install python-ldap` in your Allura environment
auth.ldap.server = ldap://localhost
auth.ldap.suffix = ou=people,dc=localdomain
@@ -108,11 +108,11 @@ auth.ldap.schroot_name = scm
auth.ldap.password.algorithm = 6
auth.ldap.password.rounds = 6000
auth.ldap.password.salt_len = 16
-# "autoregister" allows users to log in to Allura with an existing LDAP account
-# If using ldap, with autoregister, you should also set "allow_user_registration"
-# to false below.
-# Set "autoregister" to false to require user to register in Allura to create
-# the LDAP record and Allura record for the user.
+; "autoregister" allows users to log in to Allura with an existing LDAP account
+; If using ldap, with autoregister, you should also set "allow_user_registration"
+; to false below.
+; Set "autoregister" to false to require user to register in Allura to create
+; the LDAP record and Allura record for the user.
auth.ldap.autoregister = true
auth.allow_user_registration = true
@@ -125,16 +125,16 @@ auth.allow_birth_date = true
auth.allow_non_primary_email_password_reset = true
auth.require_email_addr = true
-# In seconds
+; In seconds
auth.recovery_hash_expiry_period = 600
user_prefs_storage.method = local
-# user_prefs_storage.method = ldap
-# If using ldap, you can specify which fields to use for a preference.
-# Any fields not specified here will be stored locally in mongo
+; user_prefs_storage.method = ldap
+; If using ldap, you can specify which fields to use for a preference.
+; Any fields not specified here will be stored locally in mongo
user_prefs_storage.ldap.fields.display_name = cn
-# Limit the number of emails a user can claim.
+; Limit the number of emails a user can claim.
user_prefs.maximum_claimed_emails = 20
; Spam filtering service: mollom or akismet
@@ -145,32 +145,32 @@ user_prefs.maximum_claimed_emails = 20
;spam.public_key =
;spam.private_key =
-# webhook.timeout = 30 # seconds, default = 30
+; webhook.timeout = 30 # seconds, default = 30
-# List of pauses between retries, if hook fails (in seconds)
-# webhook.retry = 60 120 240
+; List of pauses between retries, if hook fails (in seconds)
+; webhook.retry = 60 120 240
-# Limit rate of webhook firing (in seconds, default = 30)
-# Option format: webhook.<hook type>.limit,
-# all '-' in hook type must be changed to '_'
-# e.g. for repo-push webhook:
-# webhook.repo_push.limit = 10
+; Limit rate of webhook firing (in seconds, default = 30)
+; Option format: webhook.<hook type>.limit,
+; all '-' in hook type must be changed to '_'
+; e.g. for repo-push webhook:
+; webhook.repo_push.limit = 10
-# Limit max number of hooks that can be created for given project/app
-# Option name format: same as above.
-# Value format: json dict, where keys are app names (as appears in
-# `WebhookSender.triggered_by`) and values are actual limits (default=3), e.g.:
-# webhook.repo_push.max_hooks = {"git": 3, "hg": 3, "svn": 3}
+; Limit max number of hooks that can be created for given project/app
+; Option name format: same as above.
+; Value format: json dict, where keys are app names (as appears in
+; `WebhookSender.triggered_by`) and values are actual limits (default=3), e.g.:
+; webhook.repo_push.max_hooks = {"git": 3, "hg": 3, "svn": 3}
-# Additional fields for admin project/user search
-# Note: whitespace after comma is important!
-# search.project.additional_search_fields = private, url, title
-# search.user.additional_search_fields = email_addresses
+; Additional fields for admin project/user search
+; Note: whitespace after comma is important!
+; search.project.additional_search_fields = private, url, title
+; search.user.additional_search_fields = email_addresses
-# Additional fields to show in the result of admin project/user search
-# Note: whitespace after comma is important!
-# search.project.additional_display_fields = private, url, title
-# search.user.additional_display_fields = email_addresses
+; Additional fields to show in the result of admin project/user search
+; Note: whitespace after comma is important!
+; search.project.additional_display_fields = private, url, title
+; search.user.additional_display_fields = email_addresses
; To make all pages use ssl: (also set beaker.session.secure above)
; force_ssl.pattern = .
@@ -182,10 +182,10 @@ user_prefs.maximum_claimed_emails = 20
; no_redirect.pattern = ^/nf/\d+/_(ew|static)_/|^/rest/|^/nf/tool_icon_css|^/auth/refresh_repo
-# Set the locations of some static resources. ("ew" stands for EasyWidgets library)
-# script_name is the path that is handled by the application
-# url_base is the prefix that references to the static resources should have
-# If you use a CDN, put your CDN prefix in the url_base values
+; Set the locations of some static resources. ("ew" stands for EasyWidgets library)
+; script_name is the path that is handled by the application
+; url_base is the prefix that references to the static resources should have
+; If you use a CDN, put your CDN prefix in the url_base values
ew.script_name = /nf/%(build_key)s/_ew_/
ew.url_base = /nf/%(build_key)s/_ew_/
static.script_name = /nf/%(build_key)s/_static_/
@@ -199,26 +199,26 @@ ew.extra_headers = [ ('Access-Control-Allow-Origin', '*') ]
; If your environment (e.g. behind a server-side proxy) needs to look at an http header to get the actual remote addr
;ip_address_header = X-Forwarded-For
-# SCM settings for local development
+; SCM settings for local development
scm.host.ro.git = /srv/git$path
scm.host.rw.git = /srv/git$path
-# remote access varies by configuration. If you are using a vagrant VM, this should work:
-#scm.host.rw.git = ssh://vagrant@localhost:2222/srv/git$path
+; remote access varies by configuration. If you are using a vagrant VM, this should work:
+;scm.host.rw.git = ssh://vagrant@localhost:2222/srv/git$path
scm.host.ro.hg = /srv/hg$path
scm.host.rw.hg = /srv/hg$path
scm.host.ro.svn = file:///srv/svn$path/
scm.host.rw.svn = file:///srv/svn$path/
-# SCM settings for chroot + ldap configuration. See Allura/docs/getting_started/scm_host.rst
-# scm.host.ro.git = git://git.localhost$path
-# scm.host.rw.git = ssh://$username@localhost:8022/scm-repo$path
-# scm.host.ro.hg = http://hg.localhost$path
-# scm.host.rw.hg = ssh://$username@localhost:8022/scm-repo$path
-# scm.host.ro.svn = http://svn.localhost$path/
-# scm.host.rw.svn = svn+ssh://localhost:8022/scm-repo$path/
+; SCM settings for chroot + ldap configuration. See Allura/docs/getting_started/scm_host.rst
+; scm.host.ro.git = git://git.localhost$path
+; scm.host.rw.git = ssh://$username@localhost:8022/scm-repo$path
+; scm.host.ro.hg = http://hg.localhost$path
+; scm.host.rw.hg = ssh://$username@localhost:8022/scm-repo$path
+; scm.host.ro.svn = http://svn.localhost$path/
+; scm.host.rw.svn = svn+ssh://localhost:8022/scm-repo$path/
-# SCM settings for https (sorry no docs for setting these up)
-# these settings are currently required by the template, no matter what
+; SCM settings for https (sorry no docs for setting these up)
+; these settings are currently required by the template, no matter what
scm.host.https.git = https://$username@localhost:8022/scm-repo$path
scm.host.https_anon.git = https://localhost:8022/scm-repo$path
scm.host.https.hg = https://$username@localhost:8022/scm-repo$path
@@ -253,21 +253,21 @@ bulk_export_download_instructions = Sample instructions for {project}
importer_upload_path = /tmp/importer_upload/{nbhd}/{project}
-# GitHub importer keys. For github ticket import, it is best to set
-# up an app at https://github.com/settings/applications Use the root URL
-# of your Allura instance for both URLs, and enter client values here:
-# github_importer.client_id =
-# github_importer.client_secret =
+; GitHub importer keys. For github ticket import, it is best to set
+; up an app at https://github.com/settings/applications Use the root URL
+; of your Allura instance for both URLs, and enter client values here:
+; github_importer.client_id =
+; github_importer.client_secret =
-# space-separated list of tool names that are valid options
-# for project admins to set for their 'support_page' field
-# this field is not used by default in Allura, so this option
-# is disabled by default
-#support_tool_choices = wiki tickets discussion
+; space-separated list of tool names that are valid options
+; for project admins to set for their 'support_page' field
+; this field is not used by default in Allura, so this option
+; is disabled by default
+;support_tool_choices = wiki tickets discussion
trovecategories.enableediting = true
-# ActivityStream
+; ActivityStream
activitystream.master = mongodb://127.0.0.1:27017
activitystream.database = activitystream
activitystream.activity_collection = activities
@@ -276,9 +276,9 @@ activitystream.timeline_collection = timelines
activitystream.enabled = true
activitystream.recording.enabled = true
-# Ming setup
-# These don't necessarily have to be separate databases, they could
-# be all in the same database if desired
+; Ming setup
+; These don't necessarily have to be separate databases, they could
+; be all in the same database if desired
ming.main.uri = mongodb://127.0.0.1:27017/allura
ming.main.auto_ensure_indexes = False
ming.project.uri = mongodb://127.0.0.1:27017/project-data
@@ -288,57 +288,57 @@ ming.task.auto_ensure_indexes = False
ming.zarkov.uri = mongodb://127.0.0.1:27017/zarkov
ming.zarkov.auto_ensure_indexes = False
-# Zarkov host setting, requires the zarkov and gevent libraries.
-#zarkov.host = tcp://127.0.0.1:9000
+; Zarkov host setting, requires the zarkov and gevent libraries.
+;zarkov.host = tcp://127.0.0.1:9000
stats.sample_rate = 1
; Taskd setup
monq.poll_interval=2
-# SOLR setup
+; SOLR setup
solr.server = http://localhost:8983/solr
-# commit on every add/delete?
+; commit on every add/delete?
solr.commit = false
-# commit add operations within N ms
+; commit add operations within N ms
solr.commitWithin = 10000
-# Use improved data types for labels and custom fields?
-# New Allura deployments should leave this set to true. Existing deployments
-# should set to false until existing data has been reindexed. Reindexing will
-# convert existing label and custom field data to more appropriate solr types.
+; Use improved data types for labels and custom fields?
+; New Allura deployments should leave this set to true. Existing deployments
+; should set to false until existing data has been reindexed. Reindexing will
+; convert existing label and custom field data to more appropriate solr types.
solr.use_new_types = true
-# Forgemail server
+; Forgemail server
forgemail.host = 0.0.0.0
forgemail.port = 8825
forgemail.domain = .in.sf.net
forgemail.url = http://localhost:8080
forgemail.return_path = noreply@sf.net
-# Specify the number of projects allowed to be created by a user
-# depending on the age of their user account.
-# Keys are number of seconds, values are max number of projects allowed
-# (including the default user-project, so you probably want to add 1)
-# This example allows for 1 project if the account is less than an hour old
-# and 5 projects if the account is less than a day old. No limits after that
-# project.rate_limits = {"3600": 2, "86400": 6}
+; Specify the number of projects allowed to be created by a user
+; depending on the age of their user account.
+; Keys are number of seconds, values are max number of projects allowed
+; (including the default user-project, so you probably want to add 1)
+; This example allows for 1 project if the account is less than an hour old
+; and 5 projects if the account is less than a day old. No limits after that
+; project.rate_limits = {"3600": 2, "86400": 6}
-# Special Command settings
-# no need to sleep in devel
+; Special Command settings
+; no need to sleep in devel
ensure_index.sleep = 0
-# set this to "false" if you are deploying to production and want performance improvements
+; set this to "false" if you are deploying to production and want performance improvements
auto_reload_templates = true
-# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*
-# Debug mode will enable the interactive debugging tool, allowing ANYONE to
-# execute malicious code after an exception is raised.
-#set debug = false
+; WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*
+; Debug mode will enable the interactive debugging tool, allowing ANYONE to
+; execute malicious code after an exception is raised.
+;set debug = false
-# Enable or disable external RSS feed importing in ForgeBlog tool.
-# Default is "false". This feature requires GPL library "html2text". Install it
-# with following command:
-# pip install -e git://github.com/brondsem/html2text.git#egg=html2text
+; Enable or disable external RSS feed importing in ForgeBlog tool.
+; Default is "false". This feature requires GPL library "html2text". Install it
+; with following command:
+; pip install -e git://github.com/brondsem/html2text.git#egg=html2text
forgeblog.exfeed = false
short_url.url_pattern = {base_url}/{nbhd}/{project}/{mount_point}/{short_name}
@@ -356,16 +356,16 @@ beaker.session.key = allura
beaker.session.type = cookie
beaker.session.validate_key = 714bfe3612c42390726f
-# Ming setup
+; Ming setup
ming.main.uri = mongo://127.0.0.1:27017/allura:test
sqlalchemy.url = sqlite:///%(here)s/devdata.db
-#echo shouldn't be used together with the logging module.
+;echo shouldn't be used together with the logging module.
sqlalchemy.echo = false
sqlalchemy.echo_pool = false
sqlalchemy.pool_recycle = 3600
-# Forgemail server
+; Forgemail server
forgemail.host = 0.0.0.0
forgemail.port = 8825
forgemail.domain = .in.sf.net
@@ -375,26 +375,26 @@ forgemail.url = http://localhost:8080
auth.method = local
registration.method = local
-# When rendering discussion post Markdown to html, if the render takes longer
-# than `markdown_cache_threshold` (in seconds), the resulting html will be
-# cached and served from cache on subsequent requests. Set to 0 to cache all
-# posts. Remove entirely to cache nothing.
+; When rendering discussion post Markdown to html, if the render takes longer
+; than `markdown_cache_threshold` (in seconds), the resulting html will be
+; cached and served from cache on subsequent requests. Set to 0 to cache all
+; posts. Remove entirely to cache nothing.
markdown_cache_threshold = .1
-# markdown text longer than max length will not be converted to html
+; markdown text longer than max length will not be converted to html
markdown_render_max_length = 999999999
-# If your site has docs about specific importers, you can add them here and
-# they'll appear on the import forms
-#doc.url.importers.Google Code = http://...
+; If your site has docs about specific importers, you can add them here and
+; they'll appear on the import forms
+;doc.url.importers.Google Code = http://...
[app:task]
use = main
override_root = task ; TurboGears will use controllers/task.py as root controller
-# Logging configuration
-# Add additional loggers, handlers, formatters here
-# Uses python's logging config file format
-# http://docs.python.org/lib/logging-config-fileformat.html
+; Logging configuration
+; Add additional loggers, handlers, formatters here
+; Uses python's logging config file format
+; http://docs.python.org/lib/logging-config-fileformat.html
[loggers]
keys = root, allura, sqlalchemy, paste, pylons, taskdstatus, timermiddleware, tmw_details
@@ -405,7 +405,7 @@ keys = console, stats, taskdstatus, timermiddleware
[formatters]
keys = generic, stats, timermiddleware
-# If you create additional loggers, add them as a key to [loggers]
+; If you create additional loggers, add them as a key to [loggers]
[logger_root]
level = INFO
handlers = console, stats
@@ -419,9 +419,9 @@ qualname = allura
level = INFO
handlers =
qualname = sqlalchemy.engine
-# "level = INFO" logs SQL queries.
-# "level = DEBUG" logs SQL queries and results.
-# "level = WARN" logs neither. (Recommended for production systems.)
+; "level = INFO" logs SQL queries.
+; "level = DEBUG" logs SQL queries and results.
+; "level = WARN" logs neither. (Recommended for production systems.)
[logger_paste]
level = INFO
@@ -434,7 +434,7 @@ qualname = pylons
handlers =
[logger_tmw_details]
-# DEBUG will include every instrumented call in our logging
+; DEBUG will include every instrumented call in our logging
level = INFO
qualname = timermiddleware
handlers =
@@ -450,7 +450,7 @@ handlers = timermiddleware
qualname = stats
propagate = 0
-# If you create additional handlers, add them as a key to [handlers]
+; If you create additional handlers, add them as a key to [handlers]
[handler_console]
class = StreamHandler
args = (sys.stderr,)
@@ -471,13 +471,13 @@ formatter = generic
[handler_timermiddleware]
class = handlers.WatchedFileHandler
-# if you run 'paster serve' in allura/Allura/ then that's where this file will be
-# you may want to hard-code a specific directory here.
+; if you run 'paster serve' in allura/Allura/ then that's where this file will be
+; you may want to hard-code a specific directory here.
args = ('stats.log', 'a')
level = NOTSET
formatter = timermiddleware
-# If you create additional formatters, add them as a key to [formatters]
+; If you create additional formatters, add them as a key to [formatters]
[formatter_generic]
format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S
[6/8] allura git commit: tests
Posted by br...@apache.org.
tests
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/8e91db7a
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/8e91db7a
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/8e91db7a
Branch: refs/heads/db/7870
Commit: 8e91db7a9ca9f083592822a9fd3d25db5aed48aa
Parents: 445caa6
Author: Dave Brondsema <da...@brondsema.net>
Authored: Wed Apr 15 10:54:06 2015 -0400
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Wed Apr 15 10:54:23 2015 -0400
----------------------------------------------------------------------
ForgeGit/forgegit/tests/model/test_repository.py | 1 +
ForgeTracker/forgetracker/tests/functional/test_root.py | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/8e91db7a/ForgeGit/forgegit/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/model/test_repository.py b/ForgeGit/forgegit/tests/model/test_repository.py
index 854462c..dbc12b0 100644
--- a/ForgeGit/forgegit/tests/model/test_repository.py
+++ b/ForgeGit/forgegit/tests/model/test_repository.py
@@ -404,6 +404,7 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
self.assertEqual(cids[-1], '9a7df788cf800241e3bb5a849c8870f2f8259d98')
def test_ls(self):
+ c.lcid_cache = {} # else it'll be a mock
lcd_map = self.repo.commit('HEAD').tree.ls()
self.assertEqual(lcd_map, [{
'href': u'README',
http://git-wip-us.apache.org/repos/asf/allura/blob/8e91db7a/ForgeTracker/forgetracker/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py b/ForgeTracker/forgetracker/tests/functional/test_root.py
index 0e92b1f..5b0d094 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -2318,7 +2318,7 @@ class TestFunctionalController(TrackerTestController):
return_path, rcpts, body = _client.sendmail.call_args[0]
body = body.split('\n')
assert 'Subject: [test:bugs] #1 test <h2> ticket' in body
- assert '<p><strong> <a class="alink" href="http://localhost/p/test/bugs/1">[bugs:#1]</a> test <h2> ticket</strong></p>' in body
+ assert_in('<p><strong> <a class="alink" href="http://localhost:8080/p/test/bugs/1">[bugs:#1]</a> test <h2> ticket</strong></p>', body)
@patch('forgetracker.search.query_filter_choices')
def test_multiselect(self, query_filter_choices):
[3/8] allura git commit: Consolidate test config
Posted by br...@apache.org.
Consolidate test config
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/97eb3ac0
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/97eb3ac0
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/97eb3ac0
Branch: refs/heads/db/7870
Commit: 97eb3ac0d891d81629083ec0865594baf890c3f9
Parents: a6a3b49
Author: Dave Brondsema <da...@brondsema.net>
Authored: Thu Apr 9 18:34:47 2015 -0400
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Tue Apr 14 17:38:03 2015 -0400
----------------------------------------------------------------------
Allura/allura/websetup/bootstrap.py | 1 -
Allura/development.ini | 43 ++++++-----------------------
Allura/test.ini | 47 ++++----------------------------
3 files changed, 13 insertions(+), 78 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/97eb3ac0/Allura/allura/websetup/bootstrap.py
----------------------------------------------------------------------
diff --git a/Allura/allura/websetup/bootstrap.py b/Allura/allura/websetup/bootstrap.py
index bb89995..ed76c15 100644
--- a/Allura/allura/websetup/bootstrap.py
+++ b/Allura/allura/websetup/bootstrap.py
@@ -90,7 +90,6 @@ def bootstrap(command, conf, vars):
# Clean up all old stuff
ThreadLocalORMSession.close_all()
c.user = c.project = c.app = None
- database = conf.get('db_prefix', '') + 'project:test'
wipe_database()
try:
g.solr.delete(q='*:*')
http://git-wip-us.apache.org/repos/asf/allura/blob/97eb3ac0/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index 4a4f18c..68f2136 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -30,15 +30,15 @@
; You may copy this file to make a new configuration file (e.g. production.ini)
; Just use the new file name instead of development.ini for any paster commands you run.
-
-; TODO:
-; remove test config
-; clarify debug settings
-
[DEFAULT]
+; WARNING: *THE LINE BELOW MUST BE CHANGED ON A PRODUCTION ENVIRONMENT*
+; Debug mode will enable the interactive debugging tool, allowing ANYONE to
+; execute malicious code after an exception is raised.
debug = true
-; Uncomment and replace with the address which should receive any error reports
+
+; If you want to receive an email for every unhandled HTTP 500 error, set your email address here:
;email_to = you@yourdomain.com
+error_email_from = paste@localhost
; SMTP settings for outgoing mail
smtp_tls = false
@@ -51,7 +51,6 @@ smtp_port = 8826
; Reply-To and From address often used in email notifications:
forgemail.return_path = noreply@sf.net
-error_email_from = paste@localhost
; Used to uniquify references to static resources, can be a timestamp or any unique value
; This should be updated each time you deploy (or make significant changes, like new tools, new css)
build_key=1276635823
@@ -61,6 +60,7 @@ use = egg:Paste#http
host = 0.0.0.0
port = 8080
+; for profiling with https://pypi.python.org/pypi/keas.profile
[filter-app:profile]
use=egg:keas.profile#profiler
next=main
@@ -75,6 +75,7 @@ site_name = Allura
domain = localhost
base_url = http://localhost:8080
+; Used by Turbogears / Pylons in some cases. Not particularly relevant for Allura.
cache_dir = %(here)s/data
; Cache Neighborhood objects for N seconds (speeds up requests).
@@ -395,11 +396,6 @@ forgemail.url = http://localhost:8080
; set this to "false" if you are deploying to production and want performance improvements
auto_reload_templates = true
-; WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*
-; Debug mode will enable the interactive debugging tool, allowing ANYONE to
-; execute malicious code after an exception is raised.
-;set debug = false
-
; How frequently users can send messages
user_message.time_interval = 3600
user_message.max_messages = 20
@@ -457,29 +453,6 @@ short_url.url_pattern = {base_url}/{nbhd}/{project}/{mount_point}/{short_name}
userstats.count_lines_of_code = true
-; Setup for tool testing
-[app:tool_test]
-use = egg:Allura
-override_root=basetest_project_root ; TurboGears will use controllers/basetest_project_root.py as root controller
-full_stack = true
-
-cache_dir = %(here)s/data
-beaker.session.key = allura
-beaker.session.type = cookie
-beaker.session.validate_key = 714bfe3612c42390726f
-
-; Ming setup
-ming.main.uri = mongo://127.0.0.1:27017/allura:test
-
-; Forgemail server
-forgemail.host = 0.0.0.0
-forgemail.port = 8825
-forgemail.domain = .in.sf.net
-forgemail.return_path = noreply@sourceforge.net
-forgemail.url = http://localhost:8080
-
-auth.method = local
-registration.method = local
; setup for the taskd background daemon request controller
[app:task]
http://git-wip-us.apache.org/repos/asf/allura/blob/97eb3ac0/Allura/test.ini
----------------------------------------------------------------------
diff --git a/Allura/test.ini b/Allura/test.ini
index ecf1639..101a427 100644
--- a/Allura/test.ini
+++ b/Allura/test.ini
@@ -15,18 +15,13 @@
# specific language governing permissions and limitations
# under the License.
#
-# allura - TurboGears 2 testing environment configuration
+# allura - testing configuration
#
-# The %(here)s variable will be replaced with the parent directory of this file
#
[DEFAULT]
debug = false
-# make sure, since this extends development.ini
-set debug = false
-# Uncomment and replace with the address which should receive any error reports
-# email_to = you@yourdomain.com
+
smtp_server = localhost
-error_email_from = paste@localhost
[server:main]
use = egg:Paste#http
@@ -34,24 +29,11 @@ host = 0.0.0.0
port = 5000
[app:main]
-use = config:development.ini#tool_test
-db_prefix = test_
+use = config:development.ini#main
+override_root=basetest_project_root ; TurboGears will use controllers/basetest_project_root.py as root controller
disable_template_overrides = True
-site_name = Allura
-base_url = http://localhost
-domain = localhost
-
-mediawikiimporter.db_config_prefix = hostedapps.db.
-mediawikiimporter.attachments_dir_prefix = /nfs/mediawiki-attachments/
-mediawikiimporter.db_name_template = p_%s_mediawiki
-hostedapps.db.host = localhost
-hostedapps.db.port = 3306
-hostedapps.db.user = user
-hostedapps.db.password = password
-
-# Use test MongoDB DB server
-# ming.main.master = mongo://127.0.0.1:27018/allura
+# Use in-memory MongoDB
ming.main.uri = mim:///allura
ming.project.uri = mim:///project-data
ming.task.uri = mim:///task
@@ -68,15 +50,8 @@ activitystream.recording.enabled = true
activitystream.enabled = true
solr.mock = true
-amqp.mock = true
smtp.mock = true
-# Forgemail server
-forgemail.host = 0.0.0.0
-forgemail.port = 8825
-forgemail.domain = .in.localhost
-forgemail.url = http://localhost:8080
-forgemail.return_path = noreply@localhost
load_test_data = true
cache_test_data = false
@@ -123,9 +98,6 @@ bulk_export_download_instructions = Sample instructions for {project}
support_tool_choices = wiki tickets discussion
-#stats.sample_rate = 0
-
-short_url.url_pattern = {base_url}/{nbhd}/{project}/{mount_point}/{short_name}
# markdown text longer than max length will not be converted to html
# tests expect max length of 40000
@@ -151,15 +123,6 @@ user_prefs_storage.ldap.fields.display_name = cn
auth.allow_user_to_disable_account = true
auth.allow_edit_prefs = true
-[app:main_with_amqp]
-use = main
-# Use test RabbitMQ vhost
-amqp.mock = false
-amqp.hostname = localhost
-amqp.port = 5672
-amqp.userid = testuser
-amqp.password = testpw
-amqp.vhost = vhost_testing
# Add additional test specific configuration options as necessary.
[7/8] allura git commit: layout tidying
Posted by br...@apache.org.
layout tidying
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/ec969151
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/ec969151
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/ec969151
Branch: refs/heads/db/7870
Commit: ec969151745c042f9abb7b4805edfc362d4123d3
Parents: 8e91db7
Author: Dave Brondsema <da...@brondsema.net>
Authored: Tue Apr 14 17:24:37 2015 -0400
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Wed Apr 15 10:54:23 2015 -0400
----------------------------------------------------------------------
Allura/development.ini | 27 +++++++---
Allura/test.ini | 127 ++++++++++++--------------------------------
2 files changed, 52 insertions(+), 102 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/ec969151/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index 9d4df9d..69718d9 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -28,7 +28,10 @@
; More settings should be changed for good performance in a production site (no autoreload, no debugging, etc)
;
; You may copy this file to make a new configuration file (e.g. production.ini)
-; Just use the new file name instead of development.ini for any paster commands you run.
+; Or inherit from this file by starting your .ini file like this:
+; [app:main]
+; use = config:development.ini#main
+; Then just use the new file name instead of development.ini for any paster commands you run.
[DEFAULT]
; WARNING: *THE LINE BELOW MUST BE CHANGED ON A PRODUCTION ENVIRONMENT*
@@ -54,16 +57,14 @@ smtp_port = 8826
; Reply-To and From address often used in email notifications:
forgemail.return_path = noreply@localhost
-
+;
+; Settings for `paster serve` command
+;
[server:main]
use = egg:Paste#http
host = 0.0.0.0
port = 8080
-; for profiling with https://pypi.python.org/pypi/keas.profile
-[filter-app:profile]
-use=egg:keas.profile#profiler
-next=main
[app:main]
use = egg:Allura
@@ -457,20 +458,30 @@ short_url.url_pattern = {base_url}/{nbhd}/{project}/{mount_point}/{short_name}
userstats.count_lines_of_code = true
+;
+; Optional settings for profiling with https://pypi.python.org/pypi/keas.profile
+;
+[filter-app:profile]
+use=egg:keas.profile#profiler
+next=main
+
+;
; setup for the taskd background daemon request controller
+;
[app:task]
use = main
override_root = task ; TurboGears will use controllers/task.py as root controller
-
+;
; Logging configuration
+;
; Add additional loggers, handlers, formatters here
; Uses python's logging config file format
; http://docs.python.org/lib/logging-config-fileformat.html
-
+;
[loggers]
keys = root, allura, sqlalchemy, paste, pylons, taskdstatus, timermiddleware, tmw_details
http://git-wip-us.apache.org/repos/asf/allura/blob/ec969151/Allura/test.ini
----------------------------------------------------------------------
diff --git a/Allura/test.ini b/Allura/test.ini
index eb43592..a309a1d 100644
--- a/Allura/test.ini
+++ b/Allura/test.ini
@@ -1,106 +1,67 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-# allura - testing configuration
-#
-#
+; Licensed to the Apache Software Foundation (ASF) under one
+; or more contributor license agreements. See the NOTICE file
+; distributed with this work for additional information
+; regarding copyright ownership. The ASF licenses this file
+; to you under the Apache License, Version 2.0 (the
+; "License"); you may not use this file except in compliance
+; with the License. You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing,
+; software distributed under the License is distributed on an
+; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+; KIND, either express or implied. See the License for the
+; specific language governing permissions and limitations
+; under the License.
+;
+; Allura - testing configuration
+;
+;
;
; This inherits all the settings from development.ini
; and then overrides only settings needed for tests to work.
;
-[DEFAULT]
-
-
-;smtp_server = localhost
-
-;[server:main]
-;use = egg:Paste#http
-;host = 0.0.0.0
-;port = 5000
-
[app:main]
use = config:development.ini#main
-;full_stack = True
override_root=basetest_project_root ; TurboGears will use controllers/basetest_project_root.py as root controller
disable_template_overrides = True
-; required so that g.production_mode is True, and Google Analytics is included (weird.)
-; may also be useful for other reasons during tests (e.g. not intercepting error handling)
-debug = false
-
-# Use in-memory MongoDB
+; Use in-memory MongoDB
ming.main.uri = mim:///allura
ming.project.uri = mim:///project-data
ming.task.uri = mim:///task
-
-# ActivityStream
activitystream.master = mim://
-;activitystream.database = activitystream
-;activitystream.activity_collection = activities
-;activitystream.node_collection = nodes
-;activitystream.timeline_collection = timelines
-;activitystream.recording.enabled = true
-;activitystream.enabled = true
solr.server =
smtp.mock = true
-
load_test_data = true
cache_test_data = false
site_admin_project = test
-# useful primarily for test suites, where we want to see the error right away
+; useful primarily for test suites, where we want to see the error right away
monq.raise_errors = true
+; Required so that g.production_mode is True, and Google Analytics is included (weird.)
+; may also be useful for other reasons during tests (e.g. not intercepting error handling)
+debug = false
+
; specify these without any build_key being included
ew.script_name = /nf/_ew_/
ew.url_base = /nf/_ew_/
static.script_name = /nf/_static_/
static.url_base = /nf/_static_/
-;
scm.host.ro.git = git://git.localhost$path
scm.host.rw.git = ssh://$username@localhost:8022/scm-repo$path
-;scm.host.https.git = https://$username@localhost:8022/scm-repo$path
-;scm.host.https_anon.git = https://localhost:8022/scm-repo$path
-;scm.host.ro.hg = http://hg.localhost$path
-;scm.host.rw.hg = ssh://$username@localhost:8022/scm-repo$path
-;scm.host.https.hg = https://$username@localhost:8022/scm-repo$path
-;scm.host.https_anon.hg = https://localhost:8022/scm-repo$path
-;scm.host.ro.svn = http://svn.localhost$path/
-;scm.host.rw.svn = svn+ssh://$username@localhost:8022/scm-repo$path/
-;scm.host.https.svn = https://$username@localhost:8022/scm-repo$path/
-;scm.host.https_anon.svn = https://localhost:8022/scm-repo$path/
-;
-;scm.clone.git = git clone $source_url $dest_path
-;scm.clone.hg = hg clone $source_url $dest_path
-;scm.clone.https_anon.svn = svn checkout $source_url $dest_path
-;scm.clone.ro.svn = svn checkout $source_url $dest_path
-;scm.clone.svn = svn checkout --username=$username $source_url $dest_path
-;
+
scm.repos.root = /tmp
scm.repos.tarball.enable = true
scm.repos.tarball.root = /tmp/tarball
scm.repos.tarball.url_prefix = file://
-;
-;bulk_export_path = /tmp/bulk_export/{nbhd}/{project}
; TODO: make this and tests match development.ini
bulk_export_filename = {project}.zip
@@ -108,45 +69,23 @@ bulk_export_filename = {project}.zip
; TODO: update tests and let this be true
solr.use_new_types = false
-;support_tool_choices = wiki tickets discussion
-
-# markdown text longer than max length will not be converted to html
-# tests expect max length of 40000
-markdown_render_max_length = 40000
-
-;user_message.max_messages = 200
-
; TODO: update tests and remove this setting override
auth.require_email_addr = false
+; markdown text longer than max length will not be converted to html
+; tests expect max length of 40000
+markdown_render_max_length = 40000
+
; if enabled during tests, TimerMiddleware will end up wrapping requests way too many times instead of just once
; not necessary anyway
stats.sample_rate = 0
-# LDAP auth provider
-;auth.ldap.server = ldaps://localhost/
-;auth.ldap.suffix = ou=users,dc=sf,dc=net
-;auth.ldap.admin_dn = cn=site,ou=admin,dc=sf,dc=net
-;auth.ldap.admin_password = admin-password
-;auth.ldap.use_schroot = False
-;auth.ldap.password.algorithm = 6
-;auth.ldap.password.rounds = 6000
-;auth.ldap.password.salt_len = 16
-;user_prefs_storage.ldap.fields.display_name = cn
;
-;auth.allow_user_to_disable_account = true
-;auth.allow_edit_prefs = true
-
-
-
-# Add additional test specific configuration options as necessary.
+; Logging goes to a test.log file in current directory
+;
[loggers]
keys = root, allura
-; TODO: ./run_tests will capture ming.mim DEBUG output
-; but running a test individually ok
-
-; TODO: forgeblog.tests.test_commands:test_plaintext_preprocessor_wrapped fails with slight difference in output
[handlers]
keys = test
[5/8] allura git commit: simplify test.ini further,
adjust lots of test failures due to inheriting development.ini
settings
Posted by br...@apache.org.
simplify test.ini further, adjust lots of test failures due to inheriting development.ini settings
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/fd2c2582
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/fd2c2582
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/fd2c2582
Branch: refs/heads/db/7870
Commit: fd2c258240933b68e439b33d440748258a9f71e9
Parents: 97eb3ac
Author: Dave Brondsema <da...@brondsema.net>
Authored: Tue Apr 14 10:07:05 2015 -0400
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Tue Apr 14 17:38:05 2015 -0400
----------------------------------------------------------------------
Allura/allura/lib/plugin.py | 4 +
Allura/allura/tests/functional/test_auth.py | 2 +
.../tests/functional/test_neighborhood.py | 2 +-
.../tests/functional/test_user_profile.py | 4 +-
Allura/allura/tests/unit/test_app.py | 4 +-
.../tests/unit/test_ldap_auth_provider.py | 10 +-
Allura/development.ini | 20 +--
Allura/setup.py | 3 +
Allura/test.ini | 139 +++++++++++--------
9 files changed, 111 insertions(+), 77 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/fd2c2582/Allura/allura/lib/plugin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/plugin.py b/Allura/allura/lib/plugin.py
index fb1c3b9..f28839c 100644
--- a/Allura/allura/lib/plugin.py
+++ b/Allura/allura/lib/plugin.py
@@ -546,9 +546,13 @@ class LdapAuthenticationProvider(AuthenticationProvider):
algorithm = config.get(cfg_prefix + 'algorithm', 6)
rounds = asint(config.get(cfg_prefix + 'rounds', 6000))
salt = self._get_salt(salt_len) if salt is None else salt
+ # FIXME on OSX bug?
+ # allura.tests.unit.test_ldap_auth_provider:TestLdapAuthenticationProvider.test_password_encoder
+ print salt
encrypted = crypt.crypt(
password.encode('utf-8'),
'$%s$rounds=%s$%s' % (algorithm, rounds, salt))
+ print encrypted
return '{CRYPT}%s' % encrypted
def by_username(self, username):
http://git-wip-us.apache.org/repos/asf/allura/blob/fd2c2582/Allura/allura/tests/functional/test_auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_auth.py b/Allura/allura/tests/functional/test_auth.py
index f288b0b..f19b506 100644
--- a/Allura/allura/tests/functional/test_auth.py
+++ b/Allura/allura/tests/functional/test_auth.py
@@ -763,9 +763,11 @@ class TestAuth(TestController):
def test_no_open_return_to(self):
r = self.app.get('/auth/logout')
+ print 11
r = self.app.post('/auth/do_login', params=dict(
username='test-user', password='foo',
return_to='/foo'))
+ print 22
assert_equal(r.location, 'http://localhost/foo')
r = self.app.get('/auth/logout')
http://git-wip-us.apache.org/repos/asf/allura/blob/fd2c2582/Allura/allura/tests/functional/test_neighborhood.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_neighborhood.py b/Allura/allura/tests/functional/test_neighborhood.py
index 332a60b..afe4dc6 100644
--- a/Allura/allura/tests/functional/test_neighborhood.py
+++ b/Allura/allura/tests/functional/test_neighborhood.py
@@ -281,7 +281,7 @@ class TestNeighborhood(TestController):
extra_environ=dict(username='root'))
r = self.app.get('/adobe/adobe-1/admin/overview',
extra_environ=dict(username='root'))
- assert "_add_tracking('nbhd', 'U-123456');" in r
+ assert "_add_tracking('nbhd', 'U-123456');" in r, r
assert "_add_tracking('proj', 'U-654321');" in r
# analytics not allowed
neighborhood = M.Neighborhood.query.get(name='Adobe')
http://git-wip-us.apache.org/repos/asf/allura/blob/fd2c2582/Allura/allura/tests/functional/test_user_profile.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_user_profile.py b/Allura/allura/tests/functional/test_user_profile.py
index a3ea741..c539baf 100644
--- a/Allura/allura/tests/functional/test_user_profile.py
+++ b/Allura/allura/tests/functional/test_user_profile.py
@@ -80,7 +80,7 @@ class TestUserProfile(TestController):
sendsimplemail.post.assert_called_once_with(
cc=User.by_username('test-admin').get_pref('email_address'),
- text=u'test message\n\n---\n\nThis message was sent to you via the Allura web mail form. You may reply to this message directly, or send a message to Test Admin at http://localhost/u/test-admin/profile/send_message\n',
+ text=u'test message\n\n---\n\nThis message was sent to you via the Allura web mail form. You may reply to this message directly, or send a message to Test Admin at http://localhost:8080/u/test-admin/profile/send_message\n',
toaddr=User.by_username('test-user').get_pref('email_address'),
fromaddr=User.by_username('test-admin').get_pref('email_address'),
reply_to=User.by_username('test-admin').get_pref('email_address'),
@@ -93,7 +93,7 @@ class TestUserProfile(TestController):
sendsimplemail.post.assert_called_once_with(
cc=None,
- text=u'test message\n\n---\n\nThis message was sent to you via the Allura web mail form. You may reply to this message directly, or send a message to Test Admin at http://localhost/u/test-admin/profile/send_message\n',
+ text=u'test message\n\n---\n\nThis message was sent to you via the Allura web mail form. You may reply to this message directly, or send a message to Test Admin at http://localhost:8080/u/test-admin/profile/send_message\n',
toaddr=User.by_username('test-user').get_pref('email_address'),
fromaddr=User.by_username('test-admin').get_pref('email_address'),
reply_to=User.by_username('test-admin').get_pref('email_address'),
http://git-wip-us.apache.org/repos/asf/allura/blob/fd2c2582/Allura/allura/tests/unit/test_app.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/unit/test_app.py b/Allura/allura/tests/unit/test_app.py
index 95c56c5..eca1ae7 100644
--- a/Allura/allura/tests/unit/test_app.py
+++ b/Allura/allura/tests/unit/test_app.py
@@ -17,6 +17,8 @@
from unittest import TestCase
+from nose.tools import assert_equal
+
from allura.app import Application
from allura import model
from allura.tests.unit import WithDatabase
@@ -100,7 +102,7 @@ class TestAppDefaults(WithDatabase):
def test_email_address(self):
self.app.url = '/p/project/mount-point/'
- assert self.app.email_address == 'mount-point@project.p.in.localhost'
+ assert_equal(self.app.email_address, 'mount-point@project.p.in.localhost')
def install_app():
http://git-wip-us.apache.org/repos/asf/allura/blob/fd2c2582/Allura/allura/tests/unit/test_ldap_auth_provider.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/unit/test_ldap_auth_provider.py b/Allura/allura/tests/unit/test_ldap_auth_provider.py
index 1dc4bf3..7d7f5b5 100644
--- a/Allura/allura/tests/unit/test_ldap_auth_provider.py
+++ b/Allura/allura/tests/unit/test_ldap_auth_provider.py
@@ -53,7 +53,7 @@ class TestLdapAuthenticationProvider(object):
self.provider._encode_password = Mock(return_value='new-pass-hash')
ldap.dn.escape_dn_chars = lambda x: x
- dn = 'uid=%s,ou=users,dc=sf,dc=net' % user.username
+ dn = 'uid=%s,ou=people,dc=localdomain' % user.username
self.provider.set_password(user, 'old-pass', 'new-pass')
ldap.initialize.assert_called_once_with('ldaps://localhost/')
connection = ldap.initialize.return_value
@@ -74,7 +74,7 @@ class TestLdapAuthenticationProvider(object):
self.provider._login()
- dn = 'uid=%s,ou=users,dc=sf,dc=net' % params['username']
+ dn = 'uid=%s,ou=people,dc=localdomain' % params['username']
ldap.initialize.assert_called_once_with('ldaps://localhost/')
connection = ldap.initialize.return_value
connection.bind_s.called_once_with(dn, 'test-password')
@@ -90,7 +90,7 @@ class TestLdapAuthenticationProvider(object):
self.provider.request.method = 'POST'
self.provider.request.body = '&'.join(['%s=%s' % (k,v) for k,v in params.iteritems()])
ldap.dn.escape_dn_chars = lambda x: x
- dn = 'uid=%s,ou=users,dc=sf,dc=net' % params['username']
+ dn = 'uid=%s,ou=people,dc=localdomain' % params['username']
conn = ldap.initialize.return_value
conn.search_s.return_value = [(dn, {'cn': [u'åℒƒ'.encode('utf-8')]})]
@@ -117,11 +117,11 @@ class TestLdapAuthenticationProvider(object):
ThreadLocalORMSession.flush_all()
assert_not_equal(M.User.query.get(username=user_doc['username']), None)
- dn = 'uid=%s,ou=users,dc=sf,dc=net' % user_doc['username']
+ dn = 'uid=%s,ou=people,dc=localdomain' % user_doc['username']
ldap.initialize.assert_called_once_with('ldaps://localhost/')
connection = ldap.initialize.return_value
connection.bind_s.called_once_with(
- 'cn=site,ou=admin,dc=sf,dc=net',
+ 'cn=admin,dc=localdomain',
'admin-password')
connection.add_s.assert_called_once_with(dn, modlist.addModlist.return_value)
connection.unbind_s.assert_called_once()
http://git-wip-us.apache.org/repos/asf/allura/blob/fd2c2582/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index 68f2136..45eb98b 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -40,6 +40,9 @@ debug = true
;email_to = you@yourdomain.com
error_email_from = paste@localhost
+; TODO:
+; move these configs out of [DEFAULT] so they can be overriden ??
+
; SMTP settings for outgoing mail
smtp_tls = false
smtp_ssl = false
@@ -49,11 +52,8 @@ smtp_timeout = 10
smtp_server = localhost
smtp_port = 8826
; Reply-To and From address often used in email notifications:
-forgemail.return_path = noreply@sf.net
+forgemail.return_path = noreply@localhost
-; Used to uniquify references to static resources, can be a timestamp or any unique value
-; This should be updated each time you deploy (or make significant changes, like new tools, new css)
-build_key=1276635823
[server:main]
use = egg:Paste#http
@@ -75,6 +75,10 @@ site_name = Allura
domain = localhost
base_url = http://localhost:8080
+; Used to uniquify references to static resources, can be a timestamp or any unique value
+; This should be updated each time you deploy (or make significant changes, like new tools, new css)
+build_key=1276635823
+
; Used by Turbogears / Pylons in some cases. Not particularly relevant for Allura.
cache_dir = %(here)s/data
@@ -126,7 +130,7 @@ auth.max_password_len = 30
; if using LDAP, also run `pip install python-ldap` in your Allura environment
-auth.ldap.server = ldap://localhost
+auth.ldap.server = ldaps://localhost/
auth.ldap.suffix = ou=people,dc=localdomain
auth.ldap.admin_dn = cn=admin,dc=localdomain
auth.ldap.admin_password = secret
@@ -188,7 +192,7 @@ webhook.retry = 60 120 240
; Option format: webhook.<hook type>.limit,
; all '-' in hook type must be changed to '_'
; e.g. for repo-push webhook:
-webhook.repo_push.limit = 10
+webhook.repo_push.limit = 30
; Limit max number of hooks that can be created for given project/app
; Option name format: same as above.
; Value format: json dict, where keys are app names (as appears in
@@ -360,7 +364,7 @@ stats.sample_rate = 1
monq.poll_interval=2
; SOLR setup
-solr.server = http://localhost:8983/solr
+solr.server = http://localhost:8983/solrMAIN
; Alternate server to use just for querying
;solr.query_server =
; Shorter timeout for search queries (longer timeout for saving to solr)
@@ -381,7 +385,7 @@ forgemail.host = 0.0.0.0
forgemail.port = 8825
; domain suffix for your mail, change this. You also need to route *.*.*.forgemail.domain to the above host/port via
; your mail and DNS configuration
-forgemail.domain = .in.sf.net
+forgemail.domain = .in.localhost
; probably unused?
forgemail.url = http://localhost:8080
http://git-wip-us.apache.org/repos/asf/allura/blob/fd2c2582/Allura/setup.py
----------------------------------------------------------------------
diff --git a/Allura/setup.py b/Allura/setup.py
index e44c0c2..99fb419 100644
--- a/Allura/setup.py
+++ b/Allura/setup.py
@@ -90,6 +90,9 @@ setup(
('templates/**.html', 'genshi', None),
('public/**', 'ignore', None)]},
+ # These entry points define what tools and plugins are available for Allura.
+ # Other packages (the Forge* directories) or 3rd-party can add more too.
+ # development.ini is used for many cases to specify which to actually use.
entry_points="""
[paste.app_factory]
main = allura.config.middleware:make_app
http://git-wip-us.apache.org/repos/asf/allura/blob/fd2c2582/Allura/test.ini
----------------------------------------------------------------------
diff --git a/Allura/test.ini b/Allura/test.ini
index 101a427..6c6c945 100644
--- a/Allura/test.ini
+++ b/Allura/test.ini
@@ -18,38 +18,47 @@
# allura - testing configuration
#
#
+
+;
+; This inherits all the settings from development.ini
+; and then overrides a few for testing
+;
+
[DEFAULT]
-debug = false
-smtp_server = localhost
-[server:main]
-use = egg:Paste#http
-host = 0.0.0.0
-port = 5000
+;smtp_server = localhost
+
+;[server:main]
+;use = egg:Paste#http
+;host = 0.0.0.0
+;port = 5000
[app:main]
use = config:development.ini#main
+;full_stack = True
override_root=basetest_project_root ; TurboGears will use controllers/basetest_project_root.py as root controller
disable_template_overrides = True
+; required so that g.production_mode is True, and Google Analytics is included (weird.)
+; may also be useful for other reasons during tests (e.g. not intercepting error handling)
+debug = false
+
# Use in-memory MongoDB
ming.main.uri = mim:///allura
ming.project.uri = mim:///project-data
ming.task.uri = mim:///task
-trovecategories.enableediting = true
-
# ActivityStream
activitystream.master = mim://
-activitystream.database = activitystream
-activitystream.activity_collection = activities
-activitystream.node_collection = nodes
-activitystream.timeline_collection = timelines
-activitystream.recording.enabled = true
-activitystream.enabled = true
-
-solr.mock = true
+;activitystream.database = activitystream
+;activitystream.activity_collection = activities
+;activitystream.node_collection = nodes
+;activitystream.timeline_collection = timelines
+;activitystream.recording.enabled = true
+;activitystream.enabled = true
+
+solr.server =
smtp.mock = true
@@ -60,74 +69,84 @@ site_admin_project = test
# useful primarily for test suites, where we want to see the error right away
monq.raise_errors = true
-# Set the locations of some static resources
-# script_name is the path that is handled by the application
-# url_base is the prefix that references to the static resources should have
+; specify these without any build_key being included
ew.script_name = /nf/_ew_/
ew.url_base = /nf/_ew_/
static.script_name = /nf/_static_/
static.url_base = /nf/_static_/
-scm.host.ro.git = git://git.localhost$path
-scm.host.rw.git = ssh://$username@localhost:8022/scm-repo$path
-scm.host.https.git = https://$username@localhost:8022/scm-repo$path
-scm.host.https_anon.git = https://localhost:8022/scm-repo$path
-scm.host.ro.hg = http://hg.localhost$path
-scm.host.rw.hg = ssh://$username@localhost:8022/scm-repo$path
-scm.host.https.hg = https://$username@localhost:8022/scm-repo$path
-scm.host.https_anon.hg = https://localhost:8022/scm-repo$path
-scm.host.ro.svn = http://svn.localhost$path/
-scm.host.rw.svn = svn+ssh://$username@localhost:8022/scm-repo$path/
-scm.host.https.svn = https://$username@localhost:8022/scm-repo$path/
-scm.host.https_anon.svn = https://localhost:8022/scm-repo$path/
-
-scm.clone.git = git clone $source_url $dest_path
-scm.clone.hg = hg clone $source_url $dest_path
-scm.clone.https_anon.svn = svn checkout $source_url $dest_path
-scm.clone.ro.svn = svn checkout $source_url $dest_path
-scm.clone.svn = svn checkout --username=$username $source_url $dest_path
-
+;
+;scm.host.ro.git = git://git.localhost$path
+;scm.host.rw.git = ssh://$username@localhost:8022/scm-repo$path
+;scm.host.https.git = https://$username@localhost:8022/scm-repo$path
+;scm.host.https_anon.git = https://localhost:8022/scm-repo$path
+;scm.host.ro.hg = http://hg.localhost$path
+;scm.host.rw.hg = ssh://$username@localhost:8022/scm-repo$path
+;scm.host.https.hg = https://$username@localhost:8022/scm-repo$path
+;scm.host.https_anon.hg = https://localhost:8022/scm-repo$path
+;scm.host.ro.svn = http://svn.localhost$path/
+;scm.host.rw.svn = svn+ssh://$username@localhost:8022/scm-repo$path/
+;scm.host.https.svn = https://$username@localhost:8022/scm-repo$path/
+;scm.host.https_anon.svn = https://localhost:8022/scm-repo$path/
+;
+;scm.clone.git = git clone $source_url $dest_path
+;scm.clone.hg = hg clone $source_url $dest_path
+;scm.clone.https_anon.svn = svn checkout $source_url $dest_path
+;scm.clone.ro.svn = svn checkout $source_url $dest_path
+;scm.clone.svn = svn checkout --username=$username $source_url $dest_path
+;
scm.repos.root = /tmp
-scm.repos.tarball.enable = true
-scm.repos.tarball.root = /tmp/tarball
-scm.repos.tarball.url_prefix = file://
+;scm.repos.tarball.enable = true
+;scm.repos.tarball.root = /tmp/tarball
+;scm.repos.tarball.url_prefix = file://
+;
+;bulk_export_path = /tmp/bulk_export/{nbhd}/{project}
-bulk_export_path = /tmp/bulk_export/{nbhd}/{project}
+; TODO: make this and tests match development.ini
bulk_export_filename = {project}.zip
-bulk_export_download_instructions = Sample instructions for {project}
-support_tool_choices = wiki tickets discussion
+;bulk_export_download_instructions = Sample instructions for {project}
+
+;support_tool_choices = wiki tickets discussion
# markdown text longer than max length will not be converted to html
# tests expect max length of 40000
markdown_render_max_length = 40000
-user_message.time_interval = 3600
-user_message.max_messages = 200
+;user_message.max_messages = 200
-auth.min_password_len = 6
-auth.max_password_len = 30
+; TODO: update tests and remove this setting override
+auth.require_email_addr = false
-# LDAP auth provider
-auth.ldap.server = ldaps://localhost/
-auth.ldap.suffix = ou=users,dc=sf,dc=net
-auth.ldap.admin_dn = cn=site,ou=admin,dc=sf,dc=net
-auth.ldap.admin_password = admin-password
-auth.ldap.use_schroot = False
-auth.ldap.password.algorithm = 6
-auth.ldap.password.rounds = 6000
-auth.ldap.password.salt_len = 16
-user_prefs_storage.ldap.fields.display_name = cn
+; if enabled during tests, TimerMiddleware will end up wrapping requests way too many times instead of just once
+; not necessary anyway
+stats.sample_rate = 0
-auth.allow_user_to_disable_account = true
-auth.allow_edit_prefs = true
+
+# LDAP auth provider
+;auth.ldap.server = ldaps://localhost/
+;auth.ldap.suffix = ou=users,dc=sf,dc=net
+;auth.ldap.admin_dn = cn=site,ou=admin,dc=sf,dc=net
+;auth.ldap.admin_password = admin-password
+;auth.ldap.use_schroot = False
+;auth.ldap.password.algorithm = 6
+;auth.ldap.password.rounds = 6000
+;auth.ldap.password.salt_len = 16
+;user_prefs_storage.ldap.fields.display_name = cn
+;
+;auth.allow_user_to_disable_account = true
+;auth.allow_edit_prefs = true
# Add additional test specific configuration options as necessary.
[loggers]
keys = root, allura
+; TODO: ./run_tests will capture ming.mim DEBUG output
+; but running a test individually ok
+
+; TODO: forgeblog.tests.test_commands:test_plaintext_preprocessor_wrapped fails with slight difference in output
[handlers]
keys = test
[2/8] allura git commit: [#7870] Add missing config examples,
move some configs up from app:tool_test,
standardize format for example vs default configs
Posted by br...@apache.org.
[#7870] Add missing config examples, move some configs up from app:tool_test, standardize format for example vs default configs
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/a6a3b496
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/a6a3b496
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/a6a3b496
Branch: refs/heads/db/7870
Commit: a6a3b49656e42aff44f8f7a58a0ff429ae5031da
Parents: 915b828
Author: Dave Brondsema <da...@brondsema.net>
Authored: Thu Apr 9 18:23:55 2015 -0400
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Tue Apr 14 17:37:54 2015 -0400
----------------------------------------------------------------------
Allura/development.ini | 258 ++++++++++++++++++++++++++++++--------------
1 file changed, 178 insertions(+), 80 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/a6a3b496/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index b7ccde6..4a4f18c 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -14,28 +14,42 @@
; KIND, either express or implied. See the License for the
; specific language governing permissions and limitations
; under the License.
+
+
+;
+; Allura configuration
;
-; allura - Pylons development environment configuration
+; Default config values are shown in this file.
+; Commented-out configurations are examples that you can use if you want.
;
-; The %(here)s variable will be replaced with the parent directory of this file
+; Logging configuration is at the end of the file (starting at [loggers])
;
-; This file is for deployment specific config options -- other configuration
-; that is always required for the app is done in the config directory,
-; and generally should not be modified by end users.
+; There are many settings you should change for your site (name, domain, secret keys, etc)
+; More settings should be changed for good performance in a production site (no autoreload, no debugging, etc)
+;
+; You may copy this file to make a new configuration file (e.g. production.ini)
+; Just use the new file name instead of development.ini for any paster commands you run.
+
+
+; TODO:
+; remove test config
+; clarify debug settings
[DEFAULT]
debug = true
; Uncomment and replace with the address which should receive any error reports
;email_to = you@yourdomain.com
-; Smtp settings
-;smtp_tls = False
-;smtp_ssl = True
+; SMTP settings for outgoing mail
+smtp_tls = false
+smtp_ssl = false
;smtp_user = some_user
;smtp_password = some_password
-;smtp_timeout = 10
+smtp_timeout = 10
smtp_server = localhost
smtp_port = 8826
+; Reply-To and From address often used in email notifications:
+forgemail.return_path = noreply@sf.net
error_email_from = paste@localhost
; Used to uniquify references to static resources, can be a timestamp or any unique value
@@ -54,17 +68,25 @@ next=main
[app:main]
use = egg:Allura
full_stack = true
-site_name = Allura
+; Change this to your website's name
+site_name = Allura
+; Change these to your website's domain
domain = localhost
base_url = http://localhost:8080
-;lang = ru
cache_dir = %(here)s/data
; Cache Neighborhood objects for N seconds (speeds up requests).
; Set to 0 to disable (the default).
-; neighborhood.cache.duration = 0
+;neighborhood.cache.duration = 0
+
+; Template cache settings
+; See http://jinja.pocoo.org/docs/api/#jinja2.Environment
+jinja_cache_size = -1
+;jinja_bytecode_cache_type = filesystem
+;jinja_bytecode_cache_type = memcached
+;memcached_host =
; Docs at http://beaker.readthedocs.org/en/latest/configuration.html#session-options
; and http://beaker.readthedocs.org/en/latest/modules/session.html#beaker.session.CookieSession
@@ -77,26 +99,29 @@ beaker.session.secure = false
beaker.session.validate_key = 714bfe3612c42390726f
; Google Analytics account for tracking
-; ga.account = UA-XXXXX-X
+;ga.account = UA-XXXXX-X
+; Project registration system. Only local is available, unless you write a custom one for custom integratino.
registration.method = local
-; theme = sftheme
theme = allura
-show_export_control = false
-; auth.method = ldap
+; For LDAP see https://forge-allura.apache.org/docs/getting_started/installation.html#using-ldap
+;auth.method = ldap
auth.method = local
auth.remember_for = 365 ; in days, for the "remember me" checkbox on login
-; auth.login_url = /auth/
-; auth.logout_url = /auth/logout
-; auth.login_fragment_url = /auth/login_fragment
+
+; Customize login/logout URLs only if you have some custom authentication set up.
+auth.login_url = /auth/
+auth.logout_url = /auth/logout
+auth.login_fragment_url = /auth/login_fragment/
+auth.post_logout_url = /
auth.min_password_len = 6
auth.max_password_len = 30
; password expiration options (disabled if neither is set)
-; auth.pwdexpire.days = 1
-; auth.pwdexpire.before = 1401949912 ; unix timestamp
+;auth.pwdexpire.days = 1
+;auth.pwdexpire.before = 1401949912 ; unix timestamp
; if using LDAP, also run `pip install python-ldap` in your Allura environment
@@ -124,6 +149,8 @@ auth.allow_user_messages_config = true
auth.allow_birth_date = true
auth.allow_non_primary_email_password_reset = true
auth.require_email_addr = true
+; List of social network options to use on user account settings
+socialnetworks = Facebook, Linkedin, Twitter, Google+
; In seconds
auth.recovery_hash_expiry_period = 600
@@ -137,6 +164,13 @@ user_prefs_storage.ldap.fields.display_name = cn
; Limit the number of emails a user can claim.
user_prefs.maximum_claimed_emails = 20
+; Control the order of sections on the user profile page
+;user_profile_sections.order = activity, personal-data, skills
+
+; Site admins will be the same as the admins of this project:
+site_admin_project = allura
+site_admin_project_nbhd = Projects
+
; Spam filtering service: mollom or akismet
;spam.method = akismet
; for akismet:
@@ -145,41 +179,39 @@ user_prefs.maximum_claimed_emails = 20
;spam.public_key =
;spam.private_key =
-; webhook.timeout = 30 # seconds, default = 30
-
+; Webhook timeout in seconds
+webhook.timeout = 30
; List of pauses between retries, if hook fails (in seconds)
-; webhook.retry = 60 120 240
-
+webhook.retry = 60 120 240
; Limit rate of webhook firing (in seconds, default = 30)
; Option format: webhook.<hook type>.limit,
; all '-' in hook type must be changed to '_'
; e.g. for repo-push webhook:
-; webhook.repo_push.limit = 10
-
+webhook.repo_push.limit = 10
; Limit max number of hooks that can be created for given project/app
; Option name format: same as above.
; Value format: json dict, where keys are app names (as appears in
; `WebhookSender.triggered_by`) and values are actual limits (default=3), e.g.:
-; webhook.repo_push.max_hooks = {"git": 3, "hg": 3, "svn": 3}
+webhook.repo_push.max_hooks = {"git": 3, "hg": 3, "svn": 3}
; Additional fields for admin project/user search
; Note: whitespace after comma is important!
-; search.project.additional_search_fields = private, url, title
-; search.user.additional_search_fields = email_addresses
+;search.project.additional_search_fields = private, url, title
+;search.user.additional_search_fields = email_addresses
; Additional fields to show in the result of admin project/user search
; Note: whitespace after comma is important!
-; search.project.additional_display_fields = private, url, title
-; search.user.additional_display_fields = email_addresses
+;search.project.additional_display_fields = private, url, title
+;search.user.additional_display_fields = email_addresses
; To make all pages use ssl: (also set beaker.session.secure above)
-; force_ssl.pattern = .
+;force_ssl.pattern = .
; To use ssl if and only if a user is logged in:
-; force_ssl.logged_in = true
+;force_ssl.logged_in = true
; If you set force_ssl.logged_in, you probably want some URLs to be ssl when logged out:
-; force_ssl.pattern = ^/auth|^/[a-z0-9-]+/import_project/ ; import_project uses a login overlay
+;force_ssl.pattern = ^/auth|^/[a-z0-9-]+/import_project/ ; import_project uses a login overlay
; And to permit some URLs to be accessed over http anyway:
-; no_redirect.pattern = ^/nf/\d+/_(ew|static)_/|^/rest/|^/nf/tool_icon_css|^/auth/refresh_repo
+;no_redirect.pattern = ^/nf/\d+/_(ew|static)_/|^/rest/|^/nf/tool_icon_css|^/auth/refresh_repo
; Set the locations of some static resources. ("ew" stands for EasyWidgets library)
@@ -210,12 +242,12 @@ scm.host.ro.svn = file:///srv/svn$path/
scm.host.rw.svn = file:///srv/svn$path/
; SCM settings for chroot + ldap configuration. See Allura/docs/getting_started/scm_host.rst
-; scm.host.ro.git = git://git.localhost$path
-; scm.host.rw.git = ssh://$username@localhost:8022/scm-repo$path
-; scm.host.ro.hg = http://hg.localhost$path
-; scm.host.rw.hg = ssh://$username@localhost:8022/scm-repo$path
-; scm.host.ro.svn = http://svn.localhost$path/
-; scm.host.rw.svn = svn+ssh://localhost:8022/scm-repo$path/
+;scm.host.ro.git = git://git.localhost$path
+;scm.host.rw.git = ssh://$username@localhost:8022/scm-repo$path
+;scm.host.ro.hg = http://hg.localhost$path
+;scm.host.rw.hg = ssh://$username@localhost:8022/scm-repo$path
+;scm.host.ro.svn = http://svn.localhost$path/
+;scm.host.rw.svn = svn+ssh://localhost:8022/scm-repo$path/
; SCM settings for https (sorry no docs for setting these up)
; these settings are currently required by the template, no matter what
@@ -240,24 +272,46 @@ scm.repos.tarball.zip_binary = /usr/bin/zip
; SCM imports (currently just SVN) will retry if it fails
; You can control the number of tries and delay between tries here:
-;scm.import.retry_count = 50
-;scm.import.retry_sleep_secs = 5
+scm.import.retry_count = 50
+scm.import.retry_sleep_secs = 5
; One-click merge is enabled by default, but can be turned off on for each type of repo
-;scm.merge.git.disabled = true
-;scm.merge.hg.disabled = true
+scm.merge.git.disabled = false
+scm.merge.hg.disabled = false
+
+; bulk_export_enabled = true
+; If you keep bulk_export_enabled, you should set up your server to securely share bulk_export_path with users somehow
bulk_export_path = /tmp/bulk_export/{nbhd}/{project}
bulk_export_filename = {project}-backup-{date:%Y-%m-%d-%H%M%S}.zip
+; You will need to specify site-specific instructions here for accessing the exported files.
bulk_export_download_instructions = Sample instructions for {project}
importer_upload_path = /tmp/importer_upload/{nbhd}/{project}
+; To disable any plugin, tool, importer, etc from being available, you can use the disable_entry_points config option.
+; Specify the keys and values as they are declared in the tool's "setup.py" file.
+; Examples:
+;disable_entry_points.importers = google-code-tracker, google-code-repo
+;disable_entry_points.allura.project_importers = google-code
+
+; Importers specifically, can be left enabled but not linked to. You have to know the URL to use it. Example:
+;hidden_importers = trac-tickets
+
; GitHub importer keys. For github ticket import, it is best to set
; up an app at https://github.com/settings/applications Use the root URL
; of your Allura instance for both URLs, and enter client values here:
-; github_importer.client_id =
-; github_importer.client_secret =
+;github_importer.client_id =
+;github_importer.client_secret =
+
+; If your site has docs about specific importers, you can add them here and
+; they'll appear on the import forms
+;doc.url.importers.Google Code = http://...
+
+; List of oauth API keys permitted to use special forum import API
+; (should be converted to newer importer system)
+;oauth.can_import_forum = api-key-1234, fa832r0fdsafd, f23f80sdf32fd
+
; space-separated list of tool names that are valid options
; for project admins to set for their 'support_page' field
@@ -265,7 +319,13 @@ importer_upload_path = /tmp/importer_upload/{nbhd}/{project}
; is disabled by default
;support_tool_choices = wiki tickets discussion
+; Control how /categories URL can be accessed to edit trove categories (used in project categories and user skills)
+; Default: everyone
trovecategories.enableediting = true
+; Nobody:
+;trovecategories.enableediting = false
+; Site admins only:
+;trovecategories.enableediting = admin
; ActivityStream
activitystream.master = mongodb://127.0.0.1:27017
@@ -285,12 +345,14 @@ ming.project.uri = mongodb://127.0.0.1:27017/project-data
ming.project.auto_ensure_indexes = False
ming.task.uri = mongodb://127.0.0.1:27017/task
ming.task.auto_ensure_indexes = False
-ming.zarkov.uri = mongodb://127.0.0.1:27017/zarkov
-ming.zarkov.auto_ensure_indexes = False
+;ming.zarkov.uri = mongodb://127.0.0.1:27017/zarkov
+;ming.zarkov.auto_ensure_indexes = False
; Zarkov host setting, requires the zarkov and gevent libraries.
;zarkov.host = tcp://127.0.0.1:9000
+; A float from 0-1 representing a % of requests to measure timing on.
+; Sampled requests will have timing logged to stats.log (can change file in [handler_timermiddleware] logging section)
stats.sample_rate = 1
; Taskd setup
@@ -298,6 +360,10 @@ monq.poll_interval=2
; SOLR setup
solr.server = http://localhost:8983/solr
+; Alternate server to use just for querying
+;solr.query_server =
+; Shorter timeout for search queries (longer timeout for saving to solr)
+solr.short_timeout = 10
; commit on every add/delete?
solr.commit = false
; commit add operations within N ms
@@ -308,12 +374,15 @@ solr.commitWithin = 10000
; convert existing label and custom field data to more appropriate solr types.
solr.use_new_types = true
-; Forgemail server
+; Incoming email settings. Used when you run: paster smtp_server development.ini
+; address to listen to
forgemail.host = 0.0.0.0
forgemail.port = 8825
+; domain suffix for your mail, change this. You also need to route *.*.*.forgemail.domain to the above host/port via
+; your mail and DNS configuration
forgemail.domain = .in.sf.net
+; probably unused?
forgemail.url = http://localhost:8080
-forgemail.return_path = noreply@sf.net
; Specify the number of projects allowed to be created by a user
; depending on the age of their user account.
@@ -321,11 +390,7 @@ forgemail.return_path = noreply@sf.net
; (including the default user-project, so you probably want to add 1)
; This example allows for 1 project if the account is less than an hour old
; and 5 projects if the account is less than a day old. No limits after that
-; project.rate_limits = {"3600": 2, "86400": 6}
-
-; Special Command settings
-; no need to sleep in devel
-ensure_index.sleep = 0
+;project.rate_limits = {"3600": 2, "86400": 6}
; set this to "false" if you are deploying to production and want performance improvements
auto_reload_templates = true
@@ -335,17 +400,64 @@ auto_reload_templates = true
; execute malicious code after an exception is raised.
;set debug = false
+; How frequently users can send messages
+user_message.time_interval = 3600
+user_message.max_messages = 20
+; Default number of times to show a sitewide notification
+site_notification.impressions = 0
+
+; When rendering discussion post Markdown to html, if the render takes longer
+; than `markdown_cache_threshold` (in seconds), the resulting html will be
+; cached and served from cache on subsequent requests. Set to 0 to cache all
+; posts. Remove entirely to cache nothing.
+markdown_cache_threshold = .1
+; markdown text longer than max length will not be converted to html
+markdown_render_max_length = 999999999
+; Don't add rel=nofollow to these domains when generating links from Markdown content
+;nofollow_exempt_domains =
+
+; Export control choices on the project admin overview page.
+show_export_control = false
+
+; By default project admins can soft-delete their projects.
+allow_project_delete = true
+allow_project_undelete = true
+
+; Advanced settings for controlling "Last Commit Doc" algorithm used when visiting any repo browse page
+lcd_thread_chunk_size = 10
+lcd_timeout = 60
+
+
+;
+; Settings for the Blog tool
+;
; Enable or disable external RSS feed importing in ForgeBlog tool.
-; Default is "false". This feature requires GPL library "html2text". Install it
-; with following command:
-; pip install -e git://github.com/brondsem/html2text.git#egg=html2text
+; Default is "false". This feature requires GPL library "html2text". Install it with following command:
+; pip install -e git://github.com/brondsem/html2text.git#egg=html2text
+; You will also need to run `paster pull-rss-feeds development.ini` in a cron job to fetch them.
forgeblog.exfeed = false
+;
+; Settings for the Chat tool
+;
+forgechat.host = irc.freenode.net
+forgechat.port = 6667
+ircbot.nick = allurabot
+
+;
+; Settings for ShortUrl tool
+;
+; Override this if you set up an additional shortening mechanism (e.g. custom short domain)
short_url.url_pattern = {base_url}/{nbhd}/{project}/{mount_point}/{short_name}
-user_message.time_interval = 3600
-user_message.max_messages = 20
+;
+; Settings for UserStats tool
+;
+userstats.count_lines_of_code = true
+
+
+; Setup for tool testing
[app:tool_test]
use = egg:Allura
override_root=basetest_project_root ; TurboGears will use controllers/basetest_project_root.py as root controller
@@ -359,12 +471,6 @@ beaker.session.validate_key = 714bfe3612c42390726f
; Ming setup
ming.main.uri = mongo://127.0.0.1:27017/allura:test
-sqlalchemy.url = sqlite:///%(here)s/devdata.db
-;echo shouldn't be used together with the logging module.
-sqlalchemy.echo = false
-sqlalchemy.echo_pool = false
-sqlalchemy.pool_recycle = 3600
-
; Forgemail server
forgemail.host = 0.0.0.0
forgemail.port = 8825
@@ -375,22 +481,14 @@ forgemail.url = http://localhost:8080
auth.method = local
registration.method = local
-; When rendering discussion post Markdown to html, if the render takes longer
-; than `markdown_cache_threshold` (in seconds), the resulting html will be
-; cached and served from cache on subsequent requests. Set to 0 to cache all
-; posts. Remove entirely to cache nothing.
-markdown_cache_threshold = .1
-; markdown text longer than max length will not be converted to html
-markdown_render_max_length = 999999999
-
-; If your site has docs about specific importers, you can add them here and
-; they'll appear on the import forms
-;doc.url.importers.Google Code = http://...
-
+; setup for the taskd background daemon request controller
[app:task]
use = main
override_root = task ; TurboGears will use controllers/task.py as root controller
+
+
+
; Logging configuration
; Add additional loggers, handlers, formatters here
; Uses python's logging config file format
[8/8] allura git commit: [#7870] remove DEFAULT section altogether,
unnecessary entry points
Posted by br...@apache.org.
[#7870] remove DEFAULT section altogether, unnecessary entry points
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/a04d77fe
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/a04d77fe
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/a04d77fe
Branch: refs/heads/db/7870
Commit: a04d77fed09f5b2218726f1a7484a4572246bf0f
Parents: ec96915
Author: Dave Brondsema <da...@brondsema.net>
Authored: Tue Apr 14 17:32:34 2015 -0400
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Wed Apr 15 10:54:32 2015 -0400
----------------------------------------------------------------------
Allura/allura/config/middleware.py | 4 +--
Allura/development.ini | 47 ++++++++++++++++-----------------
Allura/setup.py | 9 -------
3 files changed, 25 insertions(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/a04d77fe/Allura/allura/config/middleware.py
----------------------------------------------------------------------
diff --git a/Allura/allura/config/middleware.py b/Allura/allura/config/middleware.py
index 840a39c..a8720e4 100644
--- a/Allura/allura/config/middleware.py
+++ b/Allura/allura/config/middleware.py
@@ -155,7 +155,7 @@ def _make_core_app(root, global_conf, full_stack=True, **app_conf):
# Setup resource manager, widget context SOP
app = ew.WidgetMiddleware(
app,
- compress=not asbool(global_conf['debug']),
+ compress=not asbool(app_conf['debug']),
# compress=True,
script_name=app_conf.get('ew.script_name', '/_ew_resources/'),
url_base=app_conf.get('ew.url_base', '/_ew_resources/'),
@@ -175,7 +175,7 @@ def _make_core_app(root, global_conf, full_stack=True, **app_conf):
# don't use TG footer with extra CSS & images that take time to load
tg.error.footer_html = '<!-- %s %s -->'
app = tg.error.ErrorHandler(
- app, global_conf, **config['pylons.errorware'])
+ app, app_conf, **config['pylons.errorware'])
# Redirect some status codes to /error/document
if asbool(config['debug']):
http://git-wip-us.apache.org/repos/asf/allura/blob/a04d77fe/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index 69718d9..0821bce 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -33,29 +33,6 @@
; use = config:development.ini#main
; Then just use the new file name instead of development.ini for any paster commands you run.
-[DEFAULT]
-; WARNING: *THE LINE BELOW MUST BE CHANGED ON A PRODUCTION ENVIRONMENT*
-; Debug mode will enable the interactive debugging tool, allowing ANYONE to
-; execute malicious code after an exception is raised.
-debug = true
-
-; If you want to receive an email for every unhandled HTTP 500 error, set your email address here:
-;email_to = you@yourdomain.com
-error_email_from = paste@localhost
-
-; TODO:
-; move these configs out of [DEFAULT] so they can be overriden ??
-
-; SMTP settings for outgoing mail
-smtp_tls = false
-smtp_ssl = false
-;smtp_user = some_user
-;smtp_password = some_password
-smtp_timeout = 10
-smtp_server = localhost
-smtp_port = 8826
-; Reply-To and From address often used in email notifications:
-forgemail.return_path = noreply@localhost
;
; Settings for `paster serve` command
@@ -65,11 +42,18 @@ use = egg:Paste#http
host = 0.0.0.0
port = 8080
-
+;
+; The main allura settings
+;
[app:main]
use = egg:Allura
full_stack = true
+; WARNING: *THE LINE BELOW MUST BE CHANGED ON A PRODUCTION ENVIRONMENT*
+; Debug mode will enable the interactive debugging tool, allowing ANYONE to
+; execute malicious code after an exception is raised.
+debug = false
+
; Change this to your website's name
site_name = Allura
; Change these to your website's domain
@@ -81,6 +65,21 @@ forgemail.url = http://localhost:8080
; This should be updated each time you deploy (or make significant changes, like new tools, new css)
build_key=1276635823
+; If you want to receive an email for every unhandled HTTP 500 error, set your email address here:
+;email_to = you@yourdomain.com
+error_email_from = paste@localhost
+
+; SMTP settings for outgoing mail
+smtp_tls = false
+smtp_ssl = false
+;smtp_user = some_user
+;smtp_password = some_password
+smtp_timeout = 10
+smtp_server = localhost
+smtp_port = 8826
+; Reply-To and From address often used in email notifications:
+forgemail.return_path = noreply@localhost
+
; Used by Turbogears / Pylons in some cases. Not particularly relevant for Allura.
cache_dir = %(here)s/data
http://git-wip-us.apache.org/repos/asf/allura/blob/a04d77fe/Allura/setup.py
----------------------------------------------------------------------
diff --git a/Allura/setup.py b/Allura/setup.py
index 99fb419..f2213b3 100644
--- a/Allura/setup.py
+++ b/Allura/setup.py
@@ -94,15 +94,6 @@ setup(
# Other packages (the Forge* directories) or 3rd-party can add more too.
# development.ini is used for many cases to specify which to actually use.
entry_points="""
- [paste.app_factory]
- main = allura.config.middleware:make_app
- task = allura.config.middleware:make_task_app
- tool_test = allura.config.middleware:make_tool_test_app
-
- [paste.app_install]
- main = pylons.util:PylonsInstaller
- tool_test = pylons.util:PylonsInstaller
-
[allura]
profile = allura.ext.user_profile:UserProfileApp
admin = allura.ext.admin:AdminApp
[4/8] allura git commit: fix more tests
Posted by br...@apache.org.
fix more tests
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/445caa60
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/445caa60
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/445caa60
Branch: refs/heads/db/7870
Commit: 445caa600d1a6b81d57f034bc523cec2627fecd1
Parents: fd2c258
Author: Dave Brondsema <da...@brondsema.net>
Authored: Tue Apr 14 17:09:16 2015 -0400
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Tue Apr 14 17:38:05 2015 -0400
----------------------------------------------------------------------
Allura/allura/tests/test_globals.py | 2 +-
Allura/development.ini | 4 ++--
Allura/test.ini | 16 ++++++++--------
ForgeGit/forgegit/tests/model/test_repository.py | 5 +++--
.../forgetracker/tests/unit/test_root_controller.py | 9 ++++++---
5 files changed, 20 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/445caa60/Allura/allura/tests/test_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_globals.py b/Allura/allura/tests/test_globals.py
index 6920f6d..ca04652 100644
--- a/Allura/allura/tests/test_globals.py
+++ b/Allura/allura/tests/test_globals.py
@@ -430,7 +430,7 @@ Some text in a regular paragraph
for i in range(10):
print i
''')
- assert 'http://localhost/' in g.forge_markdown(email=True).convert('[Home]')
+ assert_in('http://localhost:8080/', g.forge_markdown(email=True).convert('[Home]'))
assert 'class="codehilite"' in g.markdown.convert('''
~~~~
def foo(): pass
http://git-wip-us.apache.org/repos/asf/allura/blob/445caa60/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index 45eb98b..9d4df9d 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -74,6 +74,7 @@ site_name = Allura
; Change these to your website's domain
domain = localhost
base_url = http://localhost:8080
+forgemail.url = http://localhost:8080
; Used to uniquify references to static resources, can be a timestamp or any unique value
; This should be updated each time you deploy (or make significant changes, like new tools, new css)
@@ -135,6 +136,7 @@ auth.ldap.suffix = ou=people,dc=localdomain
auth.ldap.admin_dn = cn=admin,dc=localdomain
auth.ldap.admin_password = secret
auth.ldap.schroot_name = scm
+auth.ldap.use_schroot = false
auth.ldap.password.algorithm = 6
auth.ldap.password.rounds = 6000
auth.ldap.password.salt_len = 16
@@ -386,8 +388,6 @@ forgemail.port = 8825
; domain suffix for your mail, change this. You also need to route *.*.*.forgemail.domain to the above host/port via
; your mail and DNS configuration
forgemail.domain = .in.localhost
-; probably unused?
-forgemail.url = http://localhost:8080
; Specify the number of projects allowed to be created by a user
; depending on the age of their user account.
http://git-wip-us.apache.org/repos/asf/allura/blob/445caa60/Allura/test.ini
----------------------------------------------------------------------
diff --git a/Allura/test.ini b/Allura/test.ini
index 6c6c945..eb43592 100644
--- a/Allura/test.ini
+++ b/Allura/test.ini
@@ -21,7 +21,7 @@
;
; This inherits all the settings from development.ini
-; and then overrides a few for testing
+; and then overrides only settings needed for tests to work.
;
[DEFAULT]
@@ -76,8 +76,8 @@ static.script_name = /nf/_static_/
static.url_base = /nf/_static_/
;
-;scm.host.ro.git = git://git.localhost$path
-;scm.host.rw.git = ssh://$username@localhost:8022/scm-repo$path
+scm.host.ro.git = git://git.localhost$path
+scm.host.rw.git = ssh://$username@localhost:8022/scm-repo$path
;scm.host.https.git = https://$username@localhost:8022/scm-repo$path
;scm.host.https_anon.git = https://localhost:8022/scm-repo$path
;scm.host.ro.hg = http://hg.localhost$path
@@ -96,20 +96,20 @@ static.url_base = /nf/_static_/
;scm.clone.svn = svn checkout --username=$username $source_url $dest_path
;
scm.repos.root = /tmp
-;scm.repos.tarball.enable = true
-;scm.repos.tarball.root = /tmp/tarball
-;scm.repos.tarball.url_prefix = file://
+scm.repos.tarball.enable = true
+scm.repos.tarball.root = /tmp/tarball
+scm.repos.tarball.url_prefix = file://
;
;bulk_export_path = /tmp/bulk_export/{nbhd}/{project}
; TODO: make this and tests match development.ini
bulk_export_filename = {project}.zip
-;bulk_export_download_instructions = Sample instructions for {project}
+; TODO: update tests and let this be true
+solr.use_new_types = false
;support_tool_choices = wiki tickets discussion
-
# markdown text longer than max length will not be converted to html
# tests expect max length of 40000
markdown_render_max_length = 40000
http://git-wip-us.apache.org/repos/asf/allura/blob/445caa60/ForgeGit/forgegit/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/model/test_repository.py b/ForgeGit/forgegit/tests/model/test_repository.py
index 3ffb2a2..854462c 100644
--- a/ForgeGit/forgegit/tests/model/test_repository.py
+++ b/ForgeGit/forgegit/tests/model/test_repository.py
@@ -82,6 +82,7 @@ class TestNewGit(unittest.TestCase):
'1e146e67985dcd71c74de79613719bef7bddca4a/')
all_cis = list(self.repo.log(self.rev._id, id_only=True))
assert len(all_cis) == 4
+ c.lcid_cache = {}
self.rev.tree.ls()
# print self.rev.tree.readme()
assert_equal(self.rev.tree.readme(), (
@@ -204,7 +205,7 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
with open(os.path.join(g.tmpdir, 'testgit.git/hooks/post-receive')) as f:
c = f.read()
self.assertIn(
- 'curl -s http://localhost/auth/refresh_repo/p/test/src-git/\n', c)
+ 'curl -s http://localhost:8080/auth/refresh_repo/p/test/src-git/\n', c)
self.assertIn('exec $DIR/post-receive-user\n', c)
shutil.rmtree(dirname)
@@ -238,7 +239,7 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
with open(os.path.join(g.tmpdir, 'testgit.git/hooks/post-receive')) as f:
c = f.read()
self.assertIn(
- 'curl -s http://localhost/auth/refresh_repo/p/test/src-git/\n', c)
+ 'curl -s http://localhost:8080/auth/refresh_repo/p/test/src-git/\n', c)
self.assertIn('exec $DIR/post-receive-user\n', c)
shutil.rmtree(dirname)
http://git-wip-us.apache.org/repos/asf/allura/blob/445caa60/ForgeTracker/forgetracker/tests/unit/test_root_controller.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/unit/test_root_controller.py b/ForgeTracker/forgetracker/tests/unit/test_root_controller.py
index facc28c..ae2f7a1 100644
--- a/ForgeTracker/forgetracker/tests/unit/test_root_controller.py
+++ b/ForgeTracker/forgetracker/tests/unit/test_root_controller.py
@@ -15,16 +15,19 @@
# specific language governing permissions and limitations
# under the License.
+import unittest
+
from mock import Mock, patch
from ming.orm.ormsession import session
+from pylons import tmpl_context as c
+from nose.tools import assert_equal
from allura.lib import helpers as h
from allura.model import User
-from pylons import tmpl_context as c
+
from forgetracker.tests.unit import TrackerTestWithModel
from forgetracker.model import Ticket
from forgetracker import tracker_main
-import unittest
class WithUserAndBugsApp(TrackerTestWithModel):
@@ -46,7 +49,7 @@ class TestWhenSearchingWithCustomFields(WithUserAndBugsApp):
expected = [dict(sortable_name='_iteration_number_s',
name='_iteration_number',
label='Iteration Number')]
- assert self.response['sortable_custom_fields'] == expected
+ assert_equal(self.response['sortable_custom_fields'], expected)
def test_that_tickets_are_listed(self):
assert self.response['tickets'][0].summary == 'colors are wrong'