~bac/charmworld/update-rebuild-docs

« back to all changes in this revision

Viewing changes to charmworld/testing/factory.py

  • Committer: Tarmac
  • Author(s): Brad Crittenden
  • Date: 2014-04-02 18:25:54 UTC
  • mfrom: (497.1.1 add-maintainers)
  • Revision ID: tarmac-20140402182554-h4fo6e0qnroitzni
Add a 'maintainer's field.

It was decided on the mailing list that the 'maintainer' field should be
renamed to 'maintainers' to make it clear that there can be more than one.
Note the old 'maintainer' field was capable of being a single entity or a list
just fine.

So for backward compatability, 'maintainer' is preserved, 'maintainers' is
added and the actual value used is the union of the two, with duplicates
removed.  

On the charm page the heading has been changed to 'Maintainer(s)" and an
unordered list is used to present the names.

https://codereview.appspot.com/83620043/

R=rharding.

Approved by Juju Gui Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
181
181
                   downloads_in_past_30_days=0,
182
182
                   promulgated=False, categories=None, branch_deleted=False,
183
183
                   proof=None, payload=None, empty_branch=False, hash_=None,
184
 
                   store_revision=1):
 
184
                   store_revision=1, maintainers=None):
185
185
    """Return the json of a charm."""
186
186
    if not description:
187
187
        description = """byobu-class provides remote terminal access through
200
200
            branch_root = '/var/charms/precise/charmers'
201
201
    if maintainer is None:
202
202
        maintainer = "John Doe <jdoe@example.com>"
 
203
    if maintainers is None:
 
204
        maintainers = ''
203
205
    if summary is None:
204
206
        summary = "Remote terminal classroom over https"
205
207
    if provides is None:
271
273
            "website-relation-joined",
272
274
        ],
273
275
        "maintainer": maintainer,
 
276
        "maintainers": maintainers,
274
277
        "proof": proof,
275
278
        "provides": provides,
276
279
        'requires': requires,