aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-06-19 11:36:52 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-06-19 11:36:52 -0500
commit3c7d11ff2840fdc40be8cf916aef1ae7f532c309 (patch)
tree90d4ae4a1aefb3dcccfd8014408ef3cd3b4168cf
parent0a7805f9130308e264ac0ea77c93f3554c5a66cc (diff)
downloadmediagoblin-3c7d11ff2840fdc40be8cf916aef1ae7f532c309.tar.lz
mediagoblin-3c7d11ff2840fdc40be8cf916aef1ae7f532c309.tar.xz
mediagoblin-3c7d11ff2840fdc40be8cf916aef1ae7f532c309.zip
renaming storage_system_from_paste_config()->storage_system_from_config()
As Elrond points out, this name doesn't make sense anymore since this isn't based on the paste config. Thanks Elrond!
-rw-r--r--mediagoblin/app.py4
-rw-r--r--mediagoblin/storage.py4
-rw-r--r--mediagoblin/tests/test_storage.py6
3 files changed, 7 insertions, 7 deletions
diff --git a/mediagoblin/app.py b/mediagoblin/app.py
index d2a0695e..b27b5761 100644
--- a/mediagoblin/app.py
+++ b/mediagoblin/app.py
@@ -75,9 +75,9 @@ class MediaGoblinApp(object):
app_config.get('user_template_path'))
# Set up storage systems
- self.public_store = storage.storage_system_from_paste_config(
+ self.public_store = storage.storage_system_from_config(
app_config, 'publicstore')
- self.queue_store = storage.storage_system_from_paste_config(
+ self.queue_store = storage.storage_system_from_config(
app_config, 'queuestore')
# set up routing
diff --git a/mediagoblin/storage.py b/mediagoblin/storage.py
index ba6ac017..5d6faa4c 100644
--- a/mediagoblin/storage.py
+++ b/mediagoblin/storage.py
@@ -247,7 +247,7 @@ def clean_listy_filepath(listy_filepath):
return cleaned_filepath
-def storage_system_from_paste_config(paste_config, storage_prefix):
+def storage_system_from_config(paste_config, storage_prefix):
"""
Utility for setting up a storage system from the paste app config.
@@ -266,7 +266,7 @@ def storage_system_from_paste_config(paste_config, storage_prefix):
An instantiated storage system.
Example:
- storage_system_from_paste_config(
+ storage_system_from_config(
{'publicstore_base_url': '/media/',
'publicstore_base_dir': '/var/whatever/media/'},
'publicstore')
diff --git a/mediagoblin/tests/test_storage.py b/mediagoblin/tests/test_storage.py
index 55b66e84..1800c29d 100644
--- a/mediagoblin/tests/test_storage.py
+++ b/mediagoblin/tests/test_storage.py
@@ -58,8 +58,8 @@ class FakeRemoteStorage(storage.BasicFileStorage):
local_storage = False
-def test_storage_system_from_paste_config():
- this_storage = storage.storage_system_from_paste_config(
+def test_storage_system_from_config():
+ this_storage = storage.storage_system_from_config(
{'somestorage_base_url': 'http://example.org/moodia/',
'somestorage_base_dir': '/tmp/',
'somestorage_garbage_arg': 'garbage_arg',
@@ -69,7 +69,7 @@ def test_storage_system_from_paste_config():
assert this_storage.base_dir == '/tmp/'
assert this_storage.__class__ is storage.BasicFileStorage
- this_storage = storage.storage_system_from_paste_config(
+ this_storage = storage.storage_system_from_config(
{'somestorage_foobie': 'eiboof',
'somestorage_blech': 'hcelb',
'somestorage_garbage_arg': 'garbage_arg',