| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import os | 5 import os |
| 6 | 6 |
| 7 IS_DEV_APP_SERVER = os.environ['SERVER_SOFTWARE'].startswith('Development') | 7 IS_DEV_APP_SERVER = os.environ['SERVER_SOFTWARE'].startswith('Development') |
| 8 | 8 |
| 9 DEFAULT = { | 9 DEFAULT = { |
| 10 'bucket': '/gs/chrome-devtools-frontend/%s', | 10 'bucket': '/chrome-devtools-frontend/%s', |
| 11 'hash_path': 'hash/%s', | 11 'hash_path': 'hash/%s', |
| 12 'max_age': 7 * 24 * 60 * 60, # in seconds | 12 'max_age': 7 * 24 * 60 * 60, # in seconds |
| 13 'meta_path': 'meta/%s', | 13 'meta_path': 'meta/%s', |
| 14 'revision_path': 'revs/%s', | 14 'revision_path': 'revs/%s', |
| 15 'version_path': 'vers/%s', | 15 'version_path': 'vers/%s', |
| 16 'zip_path': 'zips/%s.zip', | 16 'zip_path': 'zips/%s.zip', |
| 17 } | 17 } |
| 18 | 18 |
| 19 class ConfigHelper: | 19 class ConfigHelper: |
| 20 def __init__(self, conf): | 20 def __init__(self, conf): |
| (...skipping 12 matching lines...) Expand all Loading... |
| 33 return self.conf['max_age'] | 33 return self.conf['max_age'] |
| 34 | 34 |
| 35 def get_revision_path(self, rev): | 35 def get_revision_path(self, rev): |
| 36 return self.conf['revision_path'] % rev | 36 return self.conf['revision_path'] % rev |
| 37 | 37 |
| 38 def get_version_path(self, ver): | 38 def get_version_path(self, ver): |
| 39 return self.conf['version_path'] % ver | 39 return self.conf['version_path'] % ver |
| 40 | 40 |
| 41 def get_zip_path(self, name): | 41 def get_zip_path(self, name): |
| 42 return self.conf['zip_path'] % name | 42 return self.conf['zip_path'] % name |
| OLD | NEW |