FEATURE: add contact emails metadata entry to optional plugin meta (#11879)

This commit is contained in:
Robert 2021-01-28 16:17:00 +00:00 committed by GitHub
parent 80f85167be
commit d8846e4fcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -82,7 +82,7 @@ class Plugin::Metadata
"discourse-staff-alias",
])
FIELDS ||= [:name, :about, :version, :authors, :url, :required_version, :transpile_js]
FIELDS ||= [:name, :about, :version, :authors, :contact_emails, :url, :required_version, :transpile_js]
attr_accessor(*FIELDS)
def self.parse(text)

View File

@ -10,6 +10,7 @@ describe Plugin::Metadata do
# about: about: my plugin
# version: 0.1
# authors: Frank Zappa
# contact emails: frankz@example.com
# url: http://discourse.org
# required version: 1.3.0beta6+48
@ -20,6 +21,7 @@ TEXT
expect(metadata.about).to eq("about: my plugin")
expect(metadata.version).to eq("0.1")
expect(metadata.authors).to eq("Frank Zappa")
expect(metadata.contact_emails).to eq("frankz@example.com")
expect(metadata.url).to eq("http://discourse.org")
expect(metadata.required_version).to eq("1.3.0beta6+48")
end