mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 11:12:47 +01:00
PluginDownloaded: add nanotube-bitcoin repository and check a plugin exists before downloading the tarball
This commit is contained in:
parent
72600e54af
commit
8fe3e77428
@ -169,33 +169,38 @@ class GithubRepository(GitRepository):
|
||||
|
||||
|
||||
repositories = {
|
||||
'ProgVal': GithubRepository(
|
||||
'ProgVal',
|
||||
'Supybot-plugins'
|
||||
),
|
||||
'quantumlemur': GithubRepository(
|
||||
'quantumlemur',
|
||||
'Supybot-plugins',
|
||||
),
|
||||
'stepnem': GithubRepository(
|
||||
'stepnem',
|
||||
'supybot-plugins',
|
||||
),
|
||||
'gsf-snapshot': GithubRepository(
|
||||
'gsf',
|
||||
'supybot-plugins',
|
||||
'Supybot-plugins-20060723',
|
||||
),
|
||||
'gsf-edsu': GithubRepository(
|
||||
'gsf',
|
||||
'supybot-plugins',
|
||||
'edsu-plugins',
|
||||
),
|
||||
'gsf': GithubRepository(
|
||||
'gsf',
|
||||
'supybot-plugins',
|
||||
'plugins',
|
||||
),
|
||||
'ProgVal': GithubRepository(
|
||||
'ProgVal',
|
||||
'Supybot-plugins'
|
||||
),
|
||||
'quantumlemur': GithubRepository(
|
||||
'quantumlemur',
|
||||
'Supybot-plugins',
|
||||
),
|
||||
'stepnem': GithubRepository(
|
||||
'stepnem',
|
||||
'supybot-plugins',
|
||||
),
|
||||
'gsf-snapshot': GithubRepository(
|
||||
'gsf',
|
||||
'supybot-plugins',
|
||||
'Supybot-plugins-20060723',
|
||||
),
|
||||
'gsf-edsu': GithubRepository(
|
||||
'gsf',
|
||||
'supybot-plugins',
|
||||
'edsu-plugins',
|
||||
),
|
||||
'gsf': GithubRepository(
|
||||
'gsf',
|
||||
'supybot-plugins',
|
||||
'plugins',
|
||||
),
|
||||
'nanotube-bitcoin': GithubRepository(
|
||||
'nanotube',
|
||||
'supybot-bitcoin-'
|
||||
'marketmonitor',
|
||||
),
|
||||
}
|
||||
|
||||
class PluginDownloader(callbacks.Plugin):
|
||||
@ -237,6 +242,8 @@ class PluginDownloader(callbacks.Plugin):
|
||||
'This repository does not exist or is not known by '
|
||||
'this bot.'
|
||||
))
|
||||
elif plugin not in repositories[repository].getPluginList():
|
||||
irc.error(_('This plugin does not exist in this repository.'))
|
||||
else:
|
||||
try:
|
||||
repositories[repository].install(plugin)
|
||||
|
@ -79,7 +79,7 @@ class PluginDownloaderTestCase(PluginTestCase):
|
||||
self.assertNotError('plugindownloader install stepnem Freenode')
|
||||
self._testPluginInstalled('Freenode')
|
||||
|
||||
def testGsf(self):
|
||||
def testInstallGsf(self):
|
||||
self.assertNotError('plugindownloader install gsf-snapshot Debian')
|
||||
self._testPluginInstalled('Debian')
|
||||
self.assertError('plugindownloader install gsf-snapshot Anagram')
|
||||
@ -95,4 +95,9 @@ class PluginDownloaderTestCase(PluginTestCase):
|
||||
self.assertError('plugindownloader install gsf Anagram')
|
||||
self.assertError('plugindownloader install gsf Debian')
|
||||
|
||||
def testInstallNanotubeBitcoin(self):
|
||||
self.assertNotError('plugindownloader install nanotube-bitcoin GPG')
|
||||
self._testPluginInstalled('GPG')
|
||||
|
||||
|
||||
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
|
||||
|
Loading…
Reference in New Issue
Block a user