LEFT | RIGHT |
1 # coding: utf-8 | 1 # coding: utf-8 |
2 | 2 |
3 # This file is part of the Adblock Plus web scripts, | 3 # This file is part of the Adblock Plus web scripts, |
4 # Copyright (C) 2006-2013 Eyeo GmbH | 4 # Copyright (C) 2006-2013 Eyeo GmbH |
5 # | 5 # |
6 # Adblock Plus is free software: you can redistribute it and/or modify | 6 # Adblock Plus is free software: you can redistribute it and/or modify |
7 # it under the terms of the GNU General Public License version 3 as | 7 # it under the terms of the GNU General Public License version 3 as |
8 # published by the Free Software Foundation. | 8 # published by the Free Software Foundation. |
9 # | 9 # |
10 # Adblock Plus is distributed in the hope that it will be useful, | 10 # Adblock Plus is distributed in the hope that it will be useful, |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 signtool = _defineGlobalProperty('signtool') | 131 signtool = _defineGlobalProperty('signtool') |
132 certname = _defineGlobalProperty('signtool_certname') | 132 certname = _defineGlobalProperty('signtool_certname') |
133 dbdir = _defineGlobalProperty('signtool_dbdir') | 133 dbdir = _defineGlobalProperty('signtool_dbdir') |
134 dbpass = _defineGlobalProperty('signtool_dbpass') | 134 dbpass = _defineGlobalProperty('signtool_dbpass') |
135 | 135 |
136 keyFile = _defineLocalProperty('key', '') | 136 keyFile = _defineLocalProperty('key', '') |
137 name = _defineLocalProperty('name') | 137 name = _defineLocalProperty('name') |
138 galleryID = _defineLocalProperty('galleryID', '') | 138 galleryID = _defineLocalProperty('galleryID', '') |
139 downloadPage = _defineLocalProperty('downloadPage', '') | 139 downloadPage = _defineLocalProperty('downloadPage', '') |
140 experimental = _defineLocalProperty('experimental', '') | 140 experimental = _defineLocalProperty('experimental', '') |
141 serviceAccountEmail = _defineLocalProperty('serviceAccountEmail', '') | 141 clientID = _defineLocalProperty('clientID', '') |
142 serviceAccountKey = _defineLocalProperty('serviceAccountKey', '') | 142 clientSecret = _defineLocalProperty('clientSecret', '') |
| 143 refreshToken = _defineLocalProperty('refreshToken', '') |
143 | 144 |
144 latestRevision = _defineNightlyProperty('latestRevision') | 145 latestRevision = _defineNightlyProperty('latestRevision') |
145 | 146 |
146 def __init__(self, config, nightlyConfig, repositoryName, repository): | 147 def __init__(self, config, nightlyConfig, repositoryName, repository): |
147 """ | 148 """ |
148 Creates a new Configuration instance that is bound to a particular | 149 Creates a new Configuration instance that is bound to a particular |
149 repository. | 150 repository. |
150 """ | 151 """ |
151 | 152 |
152 self.repositoryName = repositoryName | 153 self.repositoryName = repositoryName |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 in the configuration file. | 189 in the configuration file. |
189 This static method will enumerate Configuration | 190 This static method will enumerate Configuration |
190 objects representing the settings for each repository. | 191 objects representing the settings for each repository. |
191 """ | 192 """ |
192 config = get_config() | 193 config = get_config() |
193 for key, value in config.items("extensions"): | 194 for key, value in config.items("extensions"): |
194 if key.endswith("_repository"): | 195 if key.endswith("_repository"): |
195 repositoryName = re.sub(r'_repository$', '', key) | 196 repositoryName = re.sub(r'_repository$', '', key) |
196 if repositoryName: | 197 if repositoryName: |
197 yield Configuration(config, nightlyConfig, repositoryName, value) | 198 yield Configuration(config, nightlyConfig, repositoryName, value) |
LEFT | RIGHT |