Automatic commit Fri Jan 31 03:00:02 PST 2014

This commit is contained in:
ellen.spertus
2014-01-31 03:00:02 -08:00
parent 6ee38cdec3
commit 576850a577
8 changed files with 283 additions and 84 deletions

View File

@@ -287,6 +287,28 @@ class Gen_compressed(threading.Thread):
code = HEADER + '\n' + json_data['compiledCode']
code = code.replace(remove, '')
# Trim down Google's Apache licences.
LICENSE = re.compile("""/\\*
[\w ]+
(Copyright \\d+ Google Inc.)
https://blockly.googlecode.com/
Licensed under the Apache License, Version 2.0 \(the "License"\);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
\\*/""")
code = re.sub(LICENSE, r"\n// \1 Apache License 2.0", code)
stats = json_data['statistics']
original_b = stats['originalSize']
compressed_b = stats['compressedSize']