Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support the file+ini scheme in the upcoming plaster 0.5 #4

Merged
merged 1 commit into from Jun 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGES.rst
@@ -1,3 +1,10 @@
unreleased
==========

- Drop the ``ini`` scheme and replace with ``file+ini`` and ``pastedeploy``.
Also rename ``ini+pastedeploy`` and ``egg+pastedeploy`` to
``pastedeploy+ini`` and ``pastedeploy+egg`` respectively.

0.2.1 (2017-03-29)
==================

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Expand Up @@ -61,9 +61,9 @@ Some examples are below:

- ``development.ini?http_port=8080#main``

- ``ini+pastedeploy:///path/to/development.ini``
- ``pastedeploy+ini:///path/to/development.ini``

- ``ini+pastedeploy://development.ini#foo``
- ``pastedeploy+ini://development.ini#foo``

- ``egg:MyApp?debug=false#foo``

Expand Down
14 changes: 8 additions & 6 deletions setup.py
Expand Up @@ -53,16 +53,18 @@ def readfile(name):
],
entry_points={
'plaster.loader_factory': [
'ini=plaster_pastedeploy:Loader',
'ini+pastedeploy=plaster_pastedeploy:Loader',
'file+ini=plaster_pastedeploy:Loader',
'egg=plaster_pastedeploy:Loader',
'egg+pastedeploy=plaster_pastedeploy:Loader',
'pastedeploy=plaster_pastedeploy:Loader',
'pastedeploy+ini=plaster_pastedeploy:Loader',
'pastedeploy+egg=plaster_pastedeploy:Loader',
],
'plaster.wsgi_loader_factory': [
'ini=plaster_pastedeploy:Loader',
'ini+pastedeploy=plaster_pastedeploy:Loader',
'file+ini=plaster_pastedeploy:Loader',
'egg=plaster_pastedeploy:Loader',
'egg+pastedeploy=plaster_pastedeploy:Loader',
'pastedeploy=plaster_pastedeploy:Loader',
'pastedeploy+ini=plaster_pastedeploy:Loader',
'pastedeploy+egg=plaster_pastedeploy:Loader',
],
},
)
2 changes: 1 addition & 1 deletion tests/test_get_settings.py
Expand Up @@ -68,7 +68,7 @@ def test_no_section_name_passed(self):


class TestFullURI(TestSectionedURI):
config_uri = 'ini+pastedeploy:' + test_settings_path + '#section1'
config_uri = 'pastedeploy+ini:' + test_settings_path + '#section1'


class TestEggURI(object):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_get_wsgi_app.py
Expand Up @@ -39,7 +39,7 @@ class TestSectionedURI(TestSimpleURI):


class TestSchemeAndSectionedURI(TestSimpleURI):
config_uri = 'ini+pastedeploy:' + basic_app_path + '#main'
config_uri = 'pastedeploy+ini:' + basic_app_path + '#main'


class TestRelativeURI(TestSimpleURI):
Expand All @@ -52,7 +52,7 @@ class TestRelativeSectionedURI(TestSectionedURI, TestRelativeURI):

class TestRelativeSchemeAndSectionedURI(TestSchemeAndSectionedURI,
TestRelativeURI):
config_uri = 'ini+pastedeploy:' + basic_app_relpath + '#main'
config_uri = 'pastedeploy+ini:' + basic_app_relpath + '#main'


class TestEggURI(object):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_get_wsgi_filter.py
Expand Up @@ -41,7 +41,7 @@ def test_get_wsgi_filter(self):
app_filter_factory = self.loader.get_wsgi_filter()

other_loader = plaster.get_loader(
'ini+pastedeploy:sample_configs/basic_app.ini#main',
'pastedeploy+ini:sample_configs/basic_app.ini#main',
protocols=['wsgi'])
app = other_loader.get_wsgi_app()
app_filter = app_filter_factory(app)
Expand All @@ -52,7 +52,7 @@ def test_get_wsgi_filter(self):


class TestSchemeAndSectionedURI(TestSectionedURI):
config_uri = 'ini+pastedeploy:' + test_filter_path + '#filt'
config_uri = 'pastedeploy+ini:' + test_filter_path + '#filt'


class TestEggURI(object):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_get_wsgi_server.py
Expand Up @@ -39,7 +39,7 @@ def test_get_wsgi_server_default(self):


class TestSchemeAndSectionedURI(TestSectionedURI):
config_uri = 'ini+pastedeploy:' + test_config_path + '#other'
config_uri = 'pastedeploy+ini:' + test_config_path + '#other'


class TestEggURI(object):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_loader.py
Expand Up @@ -2,8 +2,8 @@

def test___repr__():
from plaster_pastedeploy import Loader
uri = plaster.PlasterURL('ini+pastedeploy', 'development.ini')
uri = plaster.PlasterURL('pastedeploy+ini', 'development.ini')
loader = Loader(uri)
assert str(loader) == (
'plaster_pastedeploy.Loader(uri="ini+pastedeploy://development.ini")'
'plaster_pastedeploy.Loader(uri="pastedeploy+ini://development.ini")'
)
3 changes: 3 additions & 0 deletions tox.ini
Expand Up @@ -21,6 +21,9 @@ commands =
setenv =
COVERAGE_FILE=.coverage.{envname}

deps =
-egit+https://github.com/Pylons/plaster.git#egg=plaster

[testenv:coverage]
basepython = python3.5
commands =
Expand Down