Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
Merge branch 'consolidate'
Browse files Browse the repository at this point in the history
  • Loading branch information
djmitche committed Jun 3, 2015
2 parents b6079a7 + 5e5a302 commit 53e04e4
Show file tree
Hide file tree
Showing 141 changed files with 6,695 additions and 643 deletions.
6 changes: 3 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NOTE: these files must *also* be specified in setup.py
include docs/conf.py
recursive-include docs *.rst
recursive-include docs/_static *
include relengapi/docs/conf.py
recursive-include relengapi/docs *.rst
recursive-include relengapi/docs/_static *
recursive-include relengapi *.html *.jpg *.css *.js *.txt *.map *.eot *.svg *.ttf *.woff
include LICENSE.txt
include README.md
Expand Down
258 changes: 0 additions & 258 deletions docs/deployment/@relengapi/config.rst

This file was deleted.

10 changes: 0 additions & 10 deletions docs/deployment/@relengapi/index.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs/development/index.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/usage/@relengapi/index.rst

This file was deleted.

10 changes: 0 additions & 10 deletions docs/usage/index.rst

This file was deleted.

1 change: 0 additions & 1 deletion relengapi/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover
38 changes: 24 additions & 14 deletions relengapi/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import logging
import os
import pkg_resources
import relengapi
import wsme.types

Expand Down Expand Up @@ -36,7 +37,7 @@ class BlueprintInfo(wsme.types.Base):

"Information about an installed Blueprint"

#: Python distribution containing this blueprint
#: Python distribution containing this blueprint (always 'relengapi')
distribution = unicode

#: Version of the blueprint (really, of its distribution)
Expand All @@ -53,8 +54,7 @@ class DistributionInfo(wsme.types.Base):
#: Version of the distribution
version = unicode

# TODO: ref docs
#: Additional RelengAPI-specific metadata
#: Additional RelengAPI-specific metadata (deprecated; always empty)
relengapi_metadata = {unicode: unicode}


Expand All @@ -69,9 +69,24 @@ class VersionInfo(wsme.types.Base):
blueprints = {unicode: BlueprintInfo}


def create_app(cmdline=False, test_config=None):
blueprints = introspection.get_blueprints()
def _load_bp(n):
relengapi_mod = __import__('relengapi.blueprints.' + n)
return getattr(relengapi_mod.blueprints, n).bp

blueprints = [_load_bp(n) for n in [
'auth',
'badpenny',
'base',
'clobberer',
'docs',
'mapper',
'slaveloan',
'tokenauth',
'tooltool',
]]


def create_app(cmdline=False, test_config=None):
app = Flask(__name__)
env_var = 'RELENGAPI_SETTINGS'
if test_config:
Expand Down Expand Up @@ -125,20 +140,15 @@ def root():
def versions():
dists = {}
for dist in introspection.get_distributions().itervalues():
relengapi_metadata = dist.relengapi_metadata
dists[dist.key] = DistributionInfo(
project_name=dist.project_name,
version=dist.version,
relengapi_metadata=relengapi_metadata)
relengapi_metadata={})
blueprints = {}
relengapi_dist = pkg_resources.get_distribution('relengapi')
for bp in app.relengapi_blueprints.itervalues():
blueprints[bp.name] = BlueprintInfo(distribution=bp.dist.key,
version=bp.dist.version)
blueprints[bp.name] = BlueprintInfo(distribution='relengapi',
version=relengapi_dist.version)
return VersionInfo(distributions=dists, blueprints=blueprints)

return app

metadata = {
'repository_of_record': 'https://git.mozilla.org/?p=build/relengapi.git',
'bug_report_url': 'https://github.com/mozilla/build-relengapi/issues',
}
1 change: 0 additions & 1 deletion relengapi/blueprints/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover
Loading

0 comments on commit 53e04e4

Please sign in to comment.