seniruk/git-diff_to_commit_msg_large · Datasets at Fast360
{
// 获取包含Hugging Face文本的span元素
const spans = link.querySelectorAll('span.whitespace-nowrap, span.hidden.whitespace-nowrap');
spans.forEach(span => {
if (span.textContent && span.textContent.trim().match(/Hugging\s*Face/i)) {
span.textContent = 'AI快站';
}
});
});
// 替换logo图片的alt属性
document.querySelectorAll('img[alt*="Hugging"], img[alt*="Face"]').forEach(img => {
if (img.alt.match(/Hugging\s*Face/i)) {
img.alt = 'AI快站 logo';
}
});
}
// 替换导航栏中的链接
function replaceNavigationLinks() {
// 已替换标记,防止重复运行
if (window._navLinksReplaced) {
return;
}
// 已经替换过的链接集合,防止重复替换
const replacedLinks = new Set();
// 只在导航栏区域查找和替换链接
const headerArea = document.querySelector('header') || document.querySelector('nav');
if (!headerArea) {
return;
}
// 在导航区域内查找链接
const navLinks = headerArea.querySelectorAll('a');
navLinks.forEach(link => {
// 如果已经替换过,跳过
if (replacedLinks.has(link)) return;
const linkText = link.textContent.trim();
const linkHref = link.getAttribute('href') || '';
// 替换Spaces链接 - 仅替换一次
if (
(linkHref.includes('/spaces') || linkHref === '/spaces' ||
linkText === 'Spaces' || linkText.match(/^s*Spacess*$/i)) &&
linkText !== 'OCR模型免费转Markdown' &&
linkText !== 'OCR模型免费转Markdown'
) {
link.textContent = 'OCR模型免费转Markdown';
link.href = 'https://fast360.xyz';
link.setAttribute('target', '_blank');
link.setAttribute('rel', 'noopener noreferrer');
replacedLinks.add(link);
}
// 删除Posts链接
else if (
(linkHref.includes('/posts') || linkHref === '/posts' ||
linkText === 'Posts' || linkText.match(/^s*Postss*$/i))
) {
if (link.parentNode) {
link.parentNode.removeChild(link);
}
replacedLinks.add(link);
}
// 替换Docs链接 - 仅替换一次
else if (
(linkHref.includes('/docs') || linkHref === '/docs' ||
linkText === 'Docs' || linkText.match(/^s*Docss*$/i)) &&
linkText !== '模型下载攻略'
) {
link.textContent = '模型下载攻略';
link.href = '/';
replacedLinks.add(link);
}
// 删除Enterprise链接
else if (
(linkHref.includes('/enterprise') || linkHref === '/enterprise' ||
linkText === 'Enterprise' || linkText.match(/^s*Enterprises*$/i))
) {
if (link.parentNode) {
link.parentNode.removeChild(link);
}
replacedLinks.add(link);
}
});
// 查找可能嵌套的Spaces和Posts文本
const textNodes = [];
function findTextNodes(element) {
if (element.nodeType === Node.TEXT_NODE) {
const text = element.textContent.trim();
if (text === 'Spaces' || text === 'Posts' || text === 'Enterprise') {
textNodes.push(element);
}
} else {
for (const child of element.childNodes) {
findTextNodes(child);
}
}
}
// 只在导航区域内查找文本节点
findTextNodes(headerArea);
// 替换找到的文本节点
textNodes.forEach(node => {
const text = node.textContent.trim();
if (text === 'Spaces') {
node.textContent = node.textContent.replace(/Spaces/g, 'OCR模型免费转Markdown');
} else if (text === 'Posts') {
// 删除Posts文本节点
if (node.parentNode) {
node.parentNode.removeChild(node);
}
} else if (text === 'Enterprise') {
// 删除Enterprise文本节点
if (node.parentNode) {
node.parentNode.removeChild(node);
}
}
});
// 标记已替换完成
window._navLinksReplaced = true;
}
// 替换代码区域中的域名
function replaceCodeDomains() {
// 特别处理span.hljs-string和span.njs-string元素
document.querySelectorAll('span.hljs-string, span.njs-string, span[class*="hljs-string"], span[class*="njs-string"]').forEach(span => {
if (span.textContent && span.textContent.includes('huggingface.co')) {
span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com');
}
});
// 替换hljs-string类的span中的域名(移除多余的转义符号)
document.querySelectorAll('span.hljs-string, span[class*="hljs-string"]').forEach(span => {
if (span.textContent && span.textContent.includes('huggingface.co')) {
span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com');
}
});
// 替换pre和code标签中包含git clone命令的域名
document.querySelectorAll('pre, code').forEach(element => {
if (element.textContent && element.textContent.includes('git clone')) {
const text = element.innerHTML;
if (text.includes('huggingface.co')) {
element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com');
}
}
});
// 处理特定的命令行示例
document.querySelectorAll('pre, code').forEach(element => {
const text = element.innerHTML;
if (text.includes('huggingface.co')) {
// 针对git clone命令的专门处理
if (text.includes('git clone') || text.includes('GIT_LFS_SKIP_SMUDGE=1')) {
element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com');
}
}
});
// 特别处理模型下载页面上的代码片段
document.querySelectorAll('.flex.border-t, .svelte_hydrator, .inline-block').forEach(container => {
const content = container.innerHTML;
if (content && content.includes('huggingface.co')) {
container.innerHTML = content.replace(/huggingface.co/g, 'aifasthub.com');
}
});
// 特别处理模型仓库克隆对话框中的代码片段
try {
// 查找包含"Clone this model repository"标题的对话框
const cloneDialog = document.querySelector('.svelte_hydration_boundary, [data-target="MainHeader"]');
if (cloneDialog) {
// 查找对话框中所有的代码片段和命令示例
const codeElements = cloneDialog.querySelectorAll('pre, code, span');
codeElements.forEach(element => {
if (element.textContent && element.textContent.includes('huggingface.co')) {
if (element.innerHTML.includes('huggingface.co')) {
element.innerHTML = element.innerHTML.replace(/huggingface.co/g, 'aifasthub.com');
} else {
element.textContent = element.textContent.replace(/huggingface.co/g, 'aifasthub.com');
}
}
});
}
// 更精确地定位克隆命令中的域名
document.querySelectorAll('[data-target]').forEach(container => {
const codeBlocks = container.querySelectorAll('pre, code, span.hljs-string');
codeBlocks.forEach(block => {
if (block.textContent && block.textContent.includes('huggingface.co')) {
if (block.innerHTML.includes('huggingface.co')) {
block.innerHTML = block.innerHTML.replace(/huggingface.co/g, 'aifasthub.com');
} else {
block.textContent = block.textContent.replace(/huggingface.co/g, 'aifasthub.com');
}
}
});
});
} catch (e) {
// 错误处理但不打印日志
}
}
// 当DOM加载完成后执行替换
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', () => {
replaceHeaderBranding();
replaceNavigationLinks();
replaceCodeDomains();
// 只在必要时执行替换 - 3秒后再次检查
setTimeout(() => {
if (!window._navLinksReplaced) {
console.log('[Client] 3秒后重新检查导航链接');
replaceNavigationLinks();
}
}, 3000);
});
} else {
replaceHeaderBranding();
replaceNavigationLinks();
replaceCodeDomains();
// 只在必要时执行替换 - 3秒后再次检查
setTimeout(() => {
if (!window._navLinksReplaced) {
console.log('[Client] 3秒后重新检查导航链接');
replaceNavigationLinks();
}
}, 3000);
}
// 增加一个MutationObserver来处理可能的动态元素加载
const observer = new MutationObserver(mutations => {
// 检查是否导航区域有变化
const hasNavChanges = mutations.some(mutation => {
// 检查是否存在header或nav元素变化
return Array.from(mutation.addedNodes).some(node => {
if (node.nodeType === Node.ELEMENT_NODE) {
// 检查是否是导航元素或其子元素
if (node.tagName === 'HEADER' || node.tagName === 'NAV' ||
node.querySelector('header, nav')) {
return true;
}
// 检查是否在导航元素内部
let parent = node.parentElement;
while (parent) {
if (parent.tagName === 'HEADER' || parent.tagName === 'NAV') {
return true;
}
parent = parent.parentElement;
}
}
return false;
});
});
// 只在导航区域有变化时执行替换
if (hasNavChanges) {
// 重置替换状态,允许再次替换
window._navLinksReplaced = false;
replaceHeaderBranding();
replaceNavigationLinks();
}
});
// 开始观察document.body的变化,包括子节点
if (document.body) {
observer.observe(document.body, { childList: true, subtree: true });
} else {
document.addEventListener('DOMContentLoaded', () => {
observer.observe(document.body, { childList: true, subtree: true });
});
}
})();
',\n+\t\t\t\t\t' \\n' +\n+\t\t\t\t\t' \\n' +\n-\t\t\t\t\t'\\n');\n+\t\t\t\t\t' \\n');\n \t\t\t\tcallback(null, html);\n \t\t\t});\n \t\t});"},"message":{"kind":"string","value":"Issue # Testee client script injection needs to move to the page body"}}},{"rowIdx":1746229,"cells":{"diff":{"kind":"string","value":"diff --git a/easymode/admin/forms/fields.py b/easymode/admin/forms/fields.py\nindex .. 100644\n--- a/easymode/admin/forms/fields.py\n+++ b/easymode/admin/forms/fields.py\n@@ -37,6 +37,7 @@ class HtmlEntityField(fields.CharField):\n entityless_value = re.sub(r'&[^;]+;', 'X', tagless_value)\n else:\n entityless_value = value\n+ value = u''\n \n # validate using super class\n super(HtmlEntityField, self).clean(entityless_value)"},"message":{"kind":"string","value":"Any HTMLField in easymode will now properly clean None as u''."}}},{"rowIdx":1746230,"cells":{"diff":{"kind":"string","value":"diff --git a/src/Type/FileTypeMapper.php b/src/Type/FileTypeMapper.php\nindex .. 100644\n--- a/src/Type/FileTypeMapper.php\n+++ b/src/Type/FileTypeMapper.php\n@@ -31,7 +31,7 @@ class FileTypeMapper\n \n \tpublic function getTypeMap(string $fileName): array\n \t{\n-\t\t$cacheKey = sprintf('%s-%d-v3', $fileName, filemtime($fileName));\n+\t\t$cacheKey = sprintf('%s-%d-v4', $fileName, filemtime($fileName));\n \t\t$cachedResult = $this->cache->load($cacheKey);\n \t\tif ($cachedResult === null) {\n \t\t\t$typeMap = $this->createTypeMap($fileName);"},"message":{"kind":"string","value":"FileTypeMapper - bump cache version because of change in StaticType and bugfixes"}}},{"rowIdx":1746231,"cells":{"diff":{"kind":"string","value":"diff --git a/src/foremast/pipeline/construct_pipeline_block_lambda.py b/src/foremast/pipeline/construct_pipeline_block_lambda.py\nindex .. 100644\n--- a/src/foremast/pipeline/construct_pipeline_block_lambda.py\n+++ b/src/foremast/pipeline/construct_pipeline_block_lambda.py\n@@ -64,7 +64,7 @@ def construct_pipeline_block_lambda(env='',\n user_data = generate_encoded_user_data(env=env, region=region, app_name=gen_app_name, group_name=generated.project)\n \n # Use different variable to keep template simple\n- instance_security_groups = DEFAULT_EC2_SECURITYGROUPS[env]\n+ instance_security_groups = sorted(DEFAULT_EC2_SECURITYGROUPS[env])\n instance_security_groups.append(gen_app_name)\n instance_security_groups.extend(settings['security_group']['instance_extras'])"},"message":{"kind":"string","value":"added sorted to make a copy of the list so global variable is not mutated"}}},{"rowIdx":1746232,"cells":{"diff":{"kind":"string","value":"diff --git a/src/bbn/User.php b/src/bbn/User.php\nindex .. 100644\n--- a/src/bbn/User.php\n+++ b/src/bbn/User.php\n@@ -273,6 +273,7 @@ class User extends Models\\Cls\\Basic\n $this->_init_class_cfg($cfg);\n \n $f =& $this->class_cfg['fields'];\n+ self::retrieverInit($this);\n \n if ($this->isToken() && !empty($params[$f['token']])) {\n \n@@ -370,7 +371,6 @@ class User extends Models\\Cls\\Basic\n \n // Creating the session's variables if they don't exist yet\n $this->_init_session();\n- self::retrieverInit($this);\n \n /*\n if (x::isCli() && isset($params['id'])) {"},"message":{"kind":"string","value":"Fix in User, moved retrieverInit"}}},{"rowIdx":1746233,"cells":{"diff":{"kind":"string","value":"diff --git a/tests/ObservableBunnyTest.php b/tests/ObservableBunnyTest.php\nindex .. 100644\n--- a/tests/ObservableBunnyTest.php\n+++ b/tests/ObservableBunnyTest.php\n@@ -55,9 +55,10 @@ final class ObservableBunnyTest extends TestCase\n $messageDto = null;\n $subject->subscribe(function (Message $message) use (&$messageDto, $subject) {\n $messageDto = $message;\n- $subject->dispose();\n });\n \n+ $loop->addTimer(2, [$subject, 'dispose']);\n+\n $loop->run();\n \n self::assertSame($message, $messageDto->getMessage());"},"message":{"kind":"string","value":"Dispose after the first message has been shipped"}}},{"rowIdx":1746234,"cells":{"diff":{"kind":"string","value":"diff --git a/master/contrib/git_buildbot.py b/master/contrib/git_buildbot.py\nindex .. 100755\n--- a/master/contrib/git_buildbot.py\n+++ b/master/contrib/git_buildbot.py\n@@ -40,17 +40,17 @@ from optparse import OptionParser\n \n master = \"localhost:9989\"\n \n-# When sending the notification, send this category if\n+# When sending the notification, send this category if (and only if)\n # it's set (via --category)\n \n category = None\n \n-# When sending the notification, send this repository if\n+# When sending the notification, send this repository if (and only if)\n # it's set (via --repository)\n \n repository = None\n \n-# When sending the notification, send this project if\n+# When sending the notification, send this project if (and only if)\n # it's set (via --project)\n \n project = None"},"message":{"kind":"string","value":"replace iff with if (and only if) for non-math speakers ;)"}}},{"rowIdx":1746235,"cells":{"diff":{"kind":"string","value":"diff --git a/validator/testcases/l10ncompleteness.py b/validator/testcases/l10ncompleteness.py\nindex .. 100644\n--- a/validator/testcases/l10ncompleteness.py\n+++ b/validator/testcases/l10ncompleteness.py\n@@ -1,6 +1,6 @@\n import sys\n import os\n-import chardet\n+import fastchardet\n import json\n import fnmatch\n from StringIO import StringIO\n@@ -336,7 +336,7 @@ def _parse_l10n_doc(name, doc, no_encoding=False):\n \n # Allow the parse to specify files to skip for encoding checks\n if not no_encoding:\n- encoding = chardet.detect(doc)\n+ encoding = fastchardet.detect(doc)\n encoding[\"encoding\"] = encoding[\"encoding\"].upper()\n loc_doc.expected_encoding = encoding[\"encoding\"] in handler_formats\n loc_doc.found_encoding = encoding[\"encoding\"]"},"message":{"kind":"string","value":"Added initial support for fastchardet"}}},{"rowIdx":1746236,"cells":{"diff":{"kind":"string","value":"diff --git a/src/Illuminate/Http/Resources/Json/JsonResource.php b/src/Illuminate/Http/Resources/Json/JsonResource.php\nindex .. 100644\n--- a/src/Illuminate/Http/Resources/Json/JsonResource.php\n+++ b/src/Illuminate/Http/Resources/Json/JsonResource.php\n@@ -60,7 +60,7 @@ class JsonResource implements ArrayAccess, JsonSerializable, Responsable, UrlRou\n /**\n * Create a new resource instance.\n *\n- * @param dynamic $parameters\n+ * @param mixed $parameters\n * @return static\n */\n public static function make(...$parameters)"},"message":{"kind":"string","value":"Update DocBlock for PHP Analyses (#)"}}},{"rowIdx":1746237,"cells":{"diff":{"kind":"string","value":"diff --git a/activesupport/lib/active_support/testing/assertions.rb b/activesupport/lib/active_support/testing/assertions.rb\nindex .. 100644\n--- a/activesupport/lib/active_support/testing/assertions.rb\n+++ b/activesupport/lib/active_support/testing/assertions.rb\n@@ -167,7 +167,7 @@ module ActiveSupport\n retval\n end\n \n- # Assertion that the result of evaluating an expression is changed before\n+ # Assertion that the result of evaluating an expression is not changed before\n # and after invoking the passed in block.\n #\n # assert_no_changes 'Status.all_good?' do"},"message":{"kind":"string","value":"Add missing \"not\" in the doc for `assert_no_changes` [ci skip]"}}},{"rowIdx":1746238,"cells":{"diff":{"kind":"string","value":"diff --git a/salt/config/__init__.py b/salt/config/__init__.py\nindex .. 100644\n--- a/salt/config/__init__.py\n+++ b/salt/config/__init__.py\n@@ -73,6 +73,10 @@ if salt.utils.platform.is_windows():\n _MASTER_USER = \"SYSTEM\"\n elif salt.utils.platform.is_proxy():\n _DFLT_FQDNS_GRAINS = False\n+ _DFLT_IPC_MODE = \"ipc\"\n+ _DFLT_FQDNS_GRAINS = True\n+ _MASTER_TRIES = 1\n+ _MASTER_USER = salt.utils.user.get_user()\n else:\n _DFLT_IPC_MODE = \"ipc\"\n _DFLT_FQDNS_GRAINS = True"},"message":{"kind":"string","value":"Need additional default opions for proxy minions."}}},{"rowIdx":1746239,"cells":{"diff":{"kind":"string","value":"diff --git a/cli_helpers/tabular_output/output_formatter.py b/cli_helpers/tabular_output/output_formatter.py\nindex .. 100644\n--- a/cli_helpers/tabular_output/output_formatter.py\n+++ b/cli_helpers/tabular_output/output_formatter.py\n@@ -2,6 +2,7 @@\n \"\"\"A generic tabular data output formatter interface.\"\"\"\n \n from __future__ import unicode_literals\n+from six import text_type\n from collections import namedtuple\n \n from cli_helpers.compat import (text_type, binary_type, int_types, float_types,\n@@ -102,7 +103,7 @@ class TabularOutputFormatter(object):\n @property\n def supported_formats(self):\n \"\"\"The names of the supported output formats in a :class:`tuple`.\"\"\"\n- return tuple(self._output_formats.keys())\n+ return tuple(map(text_type, self._output_formats.keys()))\n \n @classmethod\n def register_new_formatter(cls, format_name, handler, preprocessors=(),"},"message":{"kind":"string","value":"Return the supported formats as a list of unicode strings."}}},{"rowIdx":1746240,"cells":{"diff":{"kind":"string","value":"diff --git a/merge.go b/merge.go\nindex .. 100644\n--- a/merge.go\n+++ b/merge.go\n@@ -267,8 +267,8 @@ func deepMerge(dstIn, src reflect.Value, visited map[uintptr]*visit, depth int, \n \t\t\treturn\n \t\t}\n \tdefault:\n-\t\toverwriteFull := (!isEmptyValue(src) || overwriteWithEmptySrc) && (overwrite || isEmptyValue(dst))\n-\t\tif overwriteFull {\n+\t\tmustSet := (!isEmptyValue(src) || overwriteWithEmptySrc) && (overwrite || isEmptyValue(dst))\n+\t\tif mustSet {\n \t\t\tif dst.CanSet() {\n \t\t\t\tdst.Set(src)\n \t\t\t} else {"},"message":{"kind":"string","value":"Improved name for the final condition to set"}}},{"rowIdx":1746241,"cells":{"diff":{"kind":"string","value":"diff --git a/aeron-common/src/main/java/uk/co/real_logic/aeron/util/concurrent/logbuffer/LogBuffer.java b/aeron-common/src/main/java/uk/co/real_logic/aeron/util/concurrent/logbuffer/LogBuffer.java\nindex .. 100644\n--- a/aeron-common/src/main/java/uk/co/real_logic/aeron/util/concurrent/logbuffer/LogBuffer.java\n+++ b/aeron-common/src/main/java/uk/co/real_logic/aeron/util/concurrent/logbuffer/LogBuffer.java\n@@ -75,6 +75,7 @@ public class LogBuffer\n {\n logBuffer.setMemory(0, logBuffer.capacity(), (byte)0);\n stateBuffer.setMemory(0, stateBuffer.capacity(), (byte)0);\n+ statusOrdered(CLEAN);\n }\n \n /**"},"message":{"kind":"string","value":"[Java:] Ensure cleaning writes are ordered."}}},{"rowIdx":1746242,"cells":{"diff":{"kind":"string","value":"diff --git a/fuel/utils.py b/fuel/utils.py\nindex .. 100644\n--- a/fuel/utils.py\n+++ b/fuel/utils.py\n@@ -1,7 +1,10 @@\n import collections\n+import os\n \n import six\n \n+from fuel import config\n+\n \n # See http://python3porting.com/differences.html#buffer\n if six.PY3:\n@@ -10,6 +13,32 @@ else:\n buffer_ = buffer # noqa\n \n \n+def find_in_data_path(filename):\n+ \"\"\"Searches for a file within Fuel's data path.\n+\n+ This function loops over all paths defined in Fuel's data path and\n+ returns the first path in which the file is found.\n+\n+ Returns\n+ -------\n+ file_path : str\n+ Path to the first file matching `filename` found in Fuel's\n+ data path.\n+\n+ Raises\n+ ------\n+ IOError\n+ If the file doesn't appear in Fuel's data path.\n+\n+ \"\"\"\n+ for path in config.data_path.split(os.path.pathsep):\n+ path = os.path.expanduser(os.path.expandvars(path))\n+ file_path = os.path.join(path, filename)\n+ if os.path.isfile(file_path):\n+ return file_path\n+ raise IOError(\"{} not found in Fuel's data path\".format(filename))\n+\n+\n def lazy_property_factory(lazy_property):\n \"\"\"Create properties that perform lazy loading of attributes.\"\"\"\n def lazy_property_getter(self):"},"message":{"kind":"string","value":"Make fuel.config.data_path accept multiple directories"}}},{"rowIdx":1746243,"cells":{"diff":{"kind":"string","value":"diff --git a/rflink/protocol.py b/rflink/protocol.py\nindex .. 100644\n--- a/rflink/protocol.py\n+++ b/rflink/protocol.py\n@@ -151,7 +151,7 @@ class PacketHandling(ProtocolBase):\n try:\n packet = decode_packet(raw_packet)\n except BaseException:\n- log.exception(\"failed to parse packet: %s\", packet)\n+ log.exception(\"failed to parse packet data: %s\", raw_packet)\n \n log.debug(\"decoded packet: %s\", packet)"},"message":{"kind":"string","value":"Improve debugging of failed packet parse"}}},{"rowIdx":1746244,"cells":{"diff":{"kind":"string","value":"diff --git a/lib/OpenLayers/Renderer/Canvas.js b/lib/OpenLayers/Renderer/Canvas.js\nindex .. 100644\n--- a/lib/OpenLayers/Renderer/Canvas.js\n+++ b/lib/OpenLayers/Renderer/Canvas.js\n@@ -789,7 +789,7 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, {\n var featureId, feature;\n \n // if the drawing canvas isn't visible, return undefined.\n- if (this.root.style.display === \"none\") return feature;\n+ if (this.root.style.display === \"none\") { return feature; }\n \n if (this.hitDetection) {\n // this dragging check should go in the feature handler"},"message":{"kind":"string","value":"being a good coder and adding braces around if statement body"}}},{"rowIdx":1746245,"cells":{"diff":{"kind":"string","value":"diff --git a/src/utils/test.js b/src/utils/test.js\nindex .. 100644\n--- a/src/utils/test.js\n+++ b/src/utils/test.js\n@@ -256,6 +256,19 @@ describe('graphology-utils', function () {\n assert.strictEqual(newGraph.edge(1, 2), 'rel1');\n assert.strictEqual(newGraph.edge(2, 3), 'rel2');\n });\n+\n+ it.skip('should work with undirected graphs.', function () {\n+ var graph = new Graph({type: 'undirected'});\n+ graph.mergeEdge('Jon', 'Ishtar');\n+ graph.mergeEdge('Julia', 'Robin');\n+\n+ var newGraph = renameGraphKeys(graph, {\n+ Jon: 'Joseph',\n+ Ishtar: 'Quixal'\n+ });\n+\n+ console.log(newGraph);\n+ });\n });\n \n describe('updateGraphKeys', function () {"},"message":{"kind":"string","value":"Adding unit test related to #"}}},{"rowIdx":1746246,"cells":{"diff":{"kind":"string","value":"diff --git a/dhcpcanon/timers.py b/dhcpcanon/timers.py\nindex .. 100644\n--- a/dhcpcanon/timers.py\n+++ b/dhcpcanon/timers.py\n@@ -9,8 +9,8 @@ import random\n from pytz import utc\n from datetime import datetime, timedelta\n \n-from constants import MAX_DELAY_SELECTING, RENEW_PERC, REBIND_PERC\n-from constants import DT_PRINT_FORMAT\n+from .constants import MAX_DELAY_SELECTING, RENEW_PERC, REBIND_PERC\n+from .constants import DT_PRINT_FORMAT\n \n logger = logging.getLogger(__name__)\n \ndiff --git a/setup.py b/setup.py\nindex .. 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -20,12 +20,11 @@ setup(\n url=dhcpcanon.__website__,\n packages=find_packages(exclude=['contrib', 'docs', 'tests*']),\n install_requires=[\n- \"scapy>=2.2\",\n+ 'scapy>=2.2\";python_version<=\"2.7\"',\n+ 'scapy-python3>=0.21;python_version>=\"3.4\"',\n \"netaddr>=0.7\",\n- \"ipaddr>=2.1\",\n \"pytz>=2016.6\",\n \"pip>=8.1\",\n- \"pyroute2>=0.4\",\n \"attrs>=16.3\",\n \"daemon>=1.1\"\n ],"},"message":{"kind":"string","value":"Remove not used dependencies and modify imports for python 3"}}},{"rowIdx":1746247,"cells":{"diff":{"kind":"string","value":"diff --git a/dictobj.py b/dictobj.py\nindex .. 100644\n--- a/dictobj.py\n+++ b/dictobj.py\n@@ -143,6 +143,8 @@ class DictionaryObject(object):\n if -1 == val:\n if self._defaultIsSet:\n if rhs._defaultIsSet:\n+ if self._defaultValue is None and rhs._defaultValue is None:\n+ return True\n return -1 == cmp(self._defaultValue, rhs._defaultValue)\n else:\n return False"},"message":{"kind":"string","value":"Fix comparison tests when both default values are None."}}},{"rowIdx":1746248,"cells":{"diff":{"kind":"string","value":"diff --git a/lib/discordrb/data.rb b/lib/discordrb/data.rb\nindex .. 100644\n--- a/lib/discordrb/data.rb\n+++ b/lib/discordrb/data.rb\n@@ -319,19 +319,15 @@ module Discordrb\n \n # @return [true, false] whether this member is muted server-wide.\n attr_reader :mute\n- alias_method :muted?, :mute\n \n # @return [true, false] whether this member is deafened server-wide.\n attr_reader :deaf\n- alias_method :deafened?, :deaf\n \n # @return [true, false] whether this member has muted themselves.\n attr_reader :self_mute\n- alias_method :self_muted?, :self_mute\n \n # @return [true, false] whether this member has deafened themselves.\n attr_reader :self_deaf\n- alias_method :self_deafened?, :self_deaf\n \n def initialize(user_id)\n @user_id = user_id"},"message":{"kind":"string","value":"Remove the mute/deaf aliases from VoiceState as they're only marginally useful there"}}},{"rowIdx":1746249,"cells":{"diff":{"kind":"string","value":"diff --git a/salt/modules/win_system.py b/salt/modules/win_system.py\nindex .. 100644\n--- a/salt/modules/win_system.py\n+++ b/salt/modules/win_system.py\n@@ -207,6 +207,8 @@ def set_computer_desc(desc):\n __salt__['cmd.run'](cmd)\n return {'Computer Description': get_computer_desc()}\n \n+set_computer_description = set_computer_desc\n+\n \n def get_computer_desc():\n '''"},"message":{"kind":"string","value":"Alias set_computer_description to set_computer_desc"}}},{"rowIdx":1746250,"cells":{"diff":{"kind":"string","value":"diff --git a/lib/questionlib.php b/lib/questionlib.php\nindex .. 100644\n--- a/lib/questionlib.php\n+++ b/lib/questionlib.php\n@@ -1926,9 +1926,6 @@ function question_format_grade($cmoptions, $grade) {\n */\n function question_init_qenginejs_script() {\n global $CFG;\n-\n- // Get the properties we want into a PHP array first, becase that is easier\n- // to build.\n $config = array(\n 'pixpath' => $CFG->pixpath,\n 'wwwroot' => $CFG->wwwroot,\n@@ -1937,16 +1934,7 @@ function question_init_qenginejs_script() {\n 'flaggedalt' => get_string('flagged', 'question'),\n 'unflaggedalt' => get_string('notflagged', 'question'),\n );\n-\n- // Then generate the script tag.\n- $lines = array();\n- foreach ($config as $property => $value) {\n- $lines[] = ' ' . $property . ': \"' . addslashes_js($value) . '\"';\n- }\n- $script = '\\n\";\n- return $script;\n+ return print_js_config($config, 'qengine_config', true);\n }\n \n /// FUNCTIONS THAT SIMPLY WRAP QUESTIONTYPE METHODS //////////////////////////////////"},"message":{"kind":"string","value":"Update to use print_js_config."}}},{"rowIdx":1746251,"cells":{"diff":{"kind":"string","value":"diff --git a/lib/lita/adapters/shell.rb b/lib/lita/adapters/shell.rb\nindex .. 100644\n--- a/lib/lita/adapters/shell.rb\n+++ b/lib/lita/adapters/shell.rb\n@@ -2,6 +2,7 @@ module Lita\n module Adapters\n class Shell < Adapter\n def run\n+ puts 'Type \"exit\" or \"quit\" to end the session.'\n loop do\n print \"#{robot.name} > \"\n input = gets.chomp.strip\ndiff --git a/spec/lita/adapters/shell_spec.rb b/spec/lita/adapters/shell_spec.rb\nindex .. 100644\n--- a/spec/lita/adapters/shell_spec.rb\n+++ b/spec/lita/adapters/shell_spec.rb\n@@ -8,6 +8,8 @@ describe Lita::Adapters::Shell do\n subject { described_class.new(robot) }\n \n describe \"#run\" do\n+ before { allow(subject).to receive(:puts) }\n+\n it \"passes input to the Robot and breaks on an exit message\" do\n expect(subject).to receive(:print).with(\"#{robot.name} > \").twice\n allow(subject).to receive(:gets).and_return(\"foo\", \"exit\")"},"message":{"kind":"string","value":"Add an opening message to the Shell session."}}},{"rowIdx":1746252,"cells":{"diff":{"kind":"string","value":"diff --git a/lib/transforms/insertColumn.js b/lib/transforms/insertColumn.js\nindex .. 100644\n--- a/lib/transforms/insertColumn.js\n+++ b/lib/transforms/insertColumn.js\n@@ -1,4 +1,5 @@\n const TablePosition = require('../TablePosition');\n+const moveSelection = require('./moveSelection');\n const createCell = require('../createCell');\n \n /**\n@@ -38,8 +39,9 @@ function insertColumn(opts, transform, at) {\n });\n \n // Replace the table\n- return transform\n- .setNodeByKey(table.key, newTable);\n+ transform = transform.setNodeByKey(table.key, newTable);\n+ // Update the selection (not doing can break the undo)\n+ return moveSelection(opts, transform, pos.getColumnIndex() + 1, pos.getRowIndex());\n }\n \n module.exports = insertColumn;"},"message":{"kind":"string","value":"Fix undo of insertColumn when cursor is in inserted column"}}},{"rowIdx":1746253,"cells":{"diff":{"kind":"string","value":"diff --git a/code/libraries/koowa/components/com_activities/view/activities/json.php b/code/libraries/koowa/components/com_activities/view/activities/json.php\nindex .. 100644\n--- a/code/libraries/koowa/components/com_activities/view/activities/json.php\n+++ b/code/libraries/koowa/components/com_activities/view/activities/json.php\n@@ -82,7 +82,7 @@ class ComActivitiesViewActivitiesJson extends KViewJson\n \n $item = array(\n 'id' => $activity->getActivityId(),\n- 'title' => $renderer->render($activity),\n+ 'title' => $renderer->render($activity, array('escaped_urls' => false, 'fqr' => true)),\n 'story' => $renderer->render($activity, array('html' => false)),\n 'published' => $activity->getActivityPublished()->format('c'),\n 'verb' => $activity->getActivityVerb(),"},"message":{"kind":"string","value":"re # Ask for fully qualified routes."}}},{"rowIdx":1746254,"cells":{"diff":{"kind":"string","value":"diff --git a/lib/cloud_providers/connections.rb b/lib/cloud_providers/connections.rb\nindex .. 100644\n--- a/lib/cloud_providers/connections.rb\n+++ b/lib/cloud_providers/connections.rb\n@@ -88,7 +88,7 @@ module CloudProviders\n raise StandardError.new(\"You must pass a :source=>uri option to rsync\") unless opts[:source]\n destination_path = opts[:destination] || opts[:source]\n rsync_opts = opts[:rsync_opts] || '-va'\n- rsync_opts += %q% --rsync-path=\"sudo rsync\" %\n+ rsync_opts += %q% --rsync-path=\"sudo rsync\" --exclude=.svn --exclude=.git --exclude=.cvs %\n cmd_string = \"rsync -L -e 'ssh #{ssh_options}' #{rsync_opts} #{opts[:source]} #{user}@#{host}:#{destination_path}\"\n out = system_run(cmd_string)\n out"},"message":{"kind":"string","value":"Added standard VCS files to rsync excludes to speed up transfer"}}},{"rowIdx":1746255,"cells":{"diff":{"kind":"string","value":"diff --git a/Kwf_js/Form/ComboBox.js b/Kwf_js/Form/ComboBox.js\nindex .. 100644\n--- a/Kwf_js/Form/ComboBox.js\n+++ b/Kwf_js/Form/ComboBox.js\n@@ -73,6 +73,9 @@ Kwf.Form.ComboBox = Ext.extend(Ext.form.ComboBox,\n reader: reader\n };\n Ext.apply(storeConfig, this.storeConfig);\n+ if (typeof storeConfig.remoteSort == 'undefined') {\n+ storeConfig.remoteSort = proxy instanceof Ext.data.HttpProxy;\n+ }\n if (store.type && Ext.data[store.type]) {\n this.store = new Ext.data[store.type](storeConfig);\n } else if (store.type) {"},"message":{"kind":"string","value":"set remoteSort for store when using httpProxy\n\nthis is required for SuperBoxSelect so it doesn't sort locally"}}},{"rowIdx":1746256,"cells":{"diff":{"kind":"string","value":"diff --git a/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php b/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php\nindex .. 100644\n--- a/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php\n+++ b/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php\n@@ -116,4 +116,9 @@ class SQLServer2008Platform extends SQLServer2005Platform\n {\n return Keywords\\SQLServer2008Keywords::class;\n }\n+\n+ protected function getLikeWildcardCharacters() : iterable\n+ {\n+ return array_merge(parent::getLikeWildcardCharacters(), ['[', ']', '^']);\n+ }\n }"},"message":{"kind":"string","value":"Add more meta-characters for some MS platforms\n\nThe docs only talk about and up, not sure if those should be added\nto too."}}},{"rowIdx":1746257,"cells":{"diff":{"kind":"string","value":"diff --git a/activesupport/lib/active_support/security_utils.rb b/activesupport/lib/active_support/security_utils.rb\nindex .. 100644\n--- a/activesupport/lib/active_support/security_utils.rb\n+++ b/activesupport/lib/active_support/security_utils.rb\n@@ -19,12 +19,14 @@ module ActiveSupport\n end\n module_function :fixed_length_secure_compare\n \n- # Constant time string comparison, for variable length strings.\n+ # Secure string comparison for strings of variable length.\n #\n- # The values are first processed by SHA256, so that we don't leak length info\n- # via timing attacks.\n+ # While a timing attack would not be able to discern the content of\n+ # a secret compared via secure_compare, it is possible to determine\n+ # the secret length. This should be considered when using secure_compare\n+ # to compare weak, short secrets to user input.\n def secure_compare(a, b)\n- fixed_length_secure_compare(::Digest::SHA256.digest(a), ::Digest::SHA256.digest(b)) && a == b\n+ a.length == b.length && fixed_length_secure_compare(a, b)\n end\n module_function :secure_compare\n end"},"message":{"kind":"string","value":"Remove hashing from secure_compare and clarify documentation"}}},{"rowIdx":1746258,"cells":{"diff":{"kind":"string","value":"diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb\nindex .. 100644\n--- a/lib/chef/knife/ssh.rb\n+++ b/lib/chef/knife/ssh.rb\n@@ -560,6 +560,11 @@ class Chef\n config[:ssh_password] = get_stripped_unfrozen_value(ssh_password ||\n Chef::Config[:knife][:ssh_password])\n end\n+\n+ # CHEF-4342 Diable host key verification if a password has been given.\n+ if config[:ssh_password]\n+ config[:host_key_verify] = false\n+ end\n end\n \n def configure_ssh_identity_file"},"message":{"kind":"string","value":"Fix \"knife ssh\" authentication scheme #\n\nAffects at least knife \n\nWhen a user uses knife ssh in \"password, not key\" mode, it fails."}}},{"rowIdx":1746259,"cells":{"diff":{"kind":"string","value":"diff --git a/visidata/loaders/json.py b/visidata/loaders/json.py\nindex .. 100644\n--- a/visidata/loaders/json.py\n+++ b/visidata/loaders/json.py\n@@ -45,16 +45,20 @@ class JSONSheet(Sheet):\n with self.source.open_text() as fp:\n self.rows = []\n for L in fp:\n- self.addRow(json.loads(L))\n+ try:\n+ self.addRow(json.loads(L))\n+ except Exception as e:\n+ pass # self.addRow(e)\n \n def addRow(self, row, index=None):\n super().addRow(row, index=index)\n- for k in row:\n- if k not in self.colnames:\n- c = ColumnItem(k, type=deduceType(row[k]))\n- self.colnames[k] = c\n- self.addColumn(c)\n- return row\n+ if isinstance(row, dict):\n+ for k in row:\n+ if k not in self.colnames:\n+ c = ColumnItem(k, type=deduceType(row[k]))\n+ self.colnames[k] = c\n+ self.addColumn(c)\n+ return row\n \n def newRow(self):\n return {}"},"message":{"kind":"string","value":"[json] make loader more robust"}}},{"rowIdx":1746260,"cells":{"diff":{"kind":"string","value":"diff --git a/flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java b/flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java\nindex .. 100644\n--- a/flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java\n+++ b/flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java\n@@ -156,7 +156,7 @@ public final class Utils {\n \n \t\tPath dst = new Path(homedir, suffix);\n \n-\t\tLOG.debug(\"Copying from \" + localSrcPath + \" to \" + dst);\n+\t\tLOG.debug(\"Copying from {} to {}\", localSrcPath, dst);\n \n \t\tfs.copyFromLocalFile(false, true, localSrcPath, dst);"},"message":{"kind":"string","value":"[hotfix] Replace String concatenation with Slf4j placeholders."}}},{"rowIdx":1746261,"cells":{"diff":{"kind":"string","value":"diff --git a/library/CM/SmartyPlugins/function.resource.php b/library/CM/SmartyPlugins/function.resource.php\nindex .. 100644\n--- a/library/CM/SmartyPlugins/function.resource.php\n+++ b/library/CM/SmartyPlugins/function.resource.php\n@@ -34,7 +34,7 @@ function smarty_helper_resource_internal(CM_Render $render) {\n \t// Sorts all classes according to inheritance order, pairs them with path\n \t$phpClasses = CM_View_Abstract::getClasses($render->getSite()->getNamespaces(), CM_View_Abstract::CONTEXT_JAVASCRIPT);\n \tforeach ($phpClasses as $path => $className) {\n-\t\t$path = str_replace(DIR_ROOT, '', $path);\n+\t\t$path = str_replace(DIR_ROOT, '/', $path);\n \t\t$path = str_replace(DIRECTORY_SEPARATOR, '/', $path);\n \t\t$paths[] = preg_replace('#\\.php$#', '.js', $path);\n \t}"},"message":{"kind":"string","value":"Fix: Dev resource paths should be absolute"}}},{"rowIdx":1746262,"cells":{"diff":{"kind":"string","value":"diff --git a/examples/nexrad/nexrad_copy.py b/examples/nexrad/nexrad_copy.py\nindex .. 100644\n--- a/examples/nexrad/nexrad_copy.py\n+++ b/examples/nexrad/nexrad_copy.py\n@@ -106,7 +106,7 @@ logger.info('ref_data.shape: {}'.format(ref_data.shape))\n # https://stackoverflow.com/questions/7222382/get-lat-long-given-current-point-distance-and-bearing\n def offset_by_meters(lat, lon, dist, bearing):\n R = 6378.1\n- bearing_rads = np.deg2rad(az)[:, None]\n+ bearing_rads = np.deg2rad(bearing)[:, None]\n dist_km = dist / 1000.0\n \n lat1 = np.radians(lat)"},"message":{"kind":"string","value":"Use bearing function parameter instead of az\n\nThe function was working by coincidence but it was using a global\nvariable. Fix it by using the parameter `bearing` passed to it.\n\nThanks to Goizueta, the reviewer :)"}}},{"rowIdx":1746263,"cells":{"diff":{"kind":"string","value":"diff --git a/src/jpa-engine/core/src/test/java/com/impetus/kundera/utils/LuceneCleanupUtilities.java b/src/jpa-engine/core/src/test/java/com/impetus/kundera/utils/LuceneCleanupUtilities.java\nindex .. 100644\n--- a/src/jpa-engine/core/src/test/java/com/impetus/kundera/utils/LuceneCleanupUtilities.java\n+++ b/src/jpa-engine/core/src/test/java/com/impetus/kundera/utils/LuceneCleanupUtilities.java\n@@ -53,10 +53,14 @@ public class LuceneCleanupUtilities\n {\n for (File file : files)\n {\n- // Delete each file\n- if (!file.delete())\n- {\n- }\n+ \tif(file.isDirectory() && !(file.list().length==0)){\n+ \t\n+ \t\t\tcleanDir(file.getPath());\n+ \t\t\tfile.delete();\n+ \t}else{\n+ \t\tfile.delete();\n+ \t}\n+ \n }\n }\n }"},"message":{"kind":"string","value":"for recursively cleaning the directory"}}},{"rowIdx":1746264,"cells":{"diff":{"kind":"string","value":"diff --git a/icekit/utils/testing.py b/icekit/utils/testing.py\nindex .. 100644\n--- a/icekit/utils/testing.py\n+++ b/icekit/utils/testing.py\n@@ -4,11 +4,13 @@ import os\n import uuid\n \n from django.conf import settings\n+from nose.tools import nottest\n from PIL import Image, ImageDraw\n \n \n+@nottest\n @contextlib.contextmanager\n-def get_sample_image(storage):\n+def get_test_image(storage):\n \"\"\"\n Context manager that creates an image with the given storage class, returns\n a storage name, and cleans up (including thumbnails) when done.\ndiff --git a/icekit/utils/tests.py b/icekit/utils/tests.py\nindex .. 100644\n--- a/icekit/utils/tests.py\n+++ b/icekit/utils/tests.py\n@@ -5,15 +5,15 @@ from django.conf import settings\n from django_dynamic_fixture import G\n from django_webtest import WebTest\n \n-from icekit.utils.testing import get_sample_image\n+from icekit.utils import testing\n from icekit.tests.models import ImageTest\n \n \n class TestingUtils(WebTest):\n- def test_get_sample_image(self):\n+ def test_get_test_image(self):\n image_test = G(ImageTest)\n \n- with get_sample_image(image_test.image.storage) as image_name:\n+ with testing.get_test_image(image_test.image.storage) as image_name:\n # Check that the image was created.\n image_test.image = image_name\n self.assertTrue(os.path.exists(image_test.image.path))"},"message":{"kind":"string","value":"Rename `get_sample_image()` to `get_test_image()` and tell Nose it is not a test."}}},{"rowIdx":1746265,"cells":{"diff":{"kind":"string","value":"diff --git a/commands/commands.go b/commands/commands.go\nindex .. 100644\n--- a/commands/commands.go\n+++ b/commands/commands.go\n@@ -86,6 +86,7 @@ func (c *Command) Usage() {\n \n func (c *Command) Parse() {\n \tcore.SetupDebugging(c.FlagSet)\n+\tc.FlagSet.SetOutput(core.ErrorWriter)\n \tc.FlagSet.Parse(c.Args)\n }"},"message":{"kind":"string","value":"FlagSet errors should go to the panic log too"}}},{"rowIdx":1746266,"cells":{"diff":{"kind":"string","value":"diff --git a/msaf/run.py b/msaf/run.py\nindex .. 100644\n--- a/msaf/run.py\n+++ b/msaf/run.py\n@@ -355,9 +355,9 @@ def process(in_path, annot_beats=False, feature=\"pcp\", framesync=False,\n \n # TODO: Only save if needed\n # Save estimations\n- # msaf.utils.ensure_dir(os.path.dirname(file_struct.est_file))\n- # io.save_estimations(file_struct, est_times, est_labels,\n- # boundaries_id, labels_id, **config)\n+ msaf.utils.ensure_dir(os.path.dirname(file_struct.est_file))\n+ io.save_estimations(file_struct, est_times, est_labels,\n+ boundaries_id, labels_id, **config)\n \n return est_times, est_labels\n else:"},"message":{"kind":"string","value":"Single file process saves estimations\n\nThis commented lines produced this issue "}}},{"rowIdx":1746267,"cells":{"diff":{"kind":"string","value":"diff --git a/base.php b/base.php\nindex .. 100644\n--- a/base.php\n+++ b/base.php\n@@ -1143,7 +1143,7 @@ final class Base {\n \t\t\t\t\t\tforeach (str_split($body,1024) as $part) {\n \t\t\t\t\t\t\t// Throttle output\n \t\t\t\t\t\t\t$ctr++;\n-\t\t\t\t\t\t\tif ($ctr/$kbps>$elapsed=microtime(TRUE)-$now &&\n+\t\t\t\t\t\t\tif ($ctr/$kbps>($elapsed=microtime(TRUE)-$now) &&\n \t\t\t\t\t\t\t\t!connection_aborted())\n \t\t\t\t\t\t\t\tusleep(1e6*($ctr/$kbps-$elapsed));\n \t\t\t\t\t\t\techo $part;"},"message":{"kind":"string","value":"Bug fix: Calculation of elapsed time"}}},{"rowIdx":1746268,"cells":{"diff":{"kind":"string","value":"diff --git a/telethon/sessions/memory.py b/telethon/sessions/memory.py\nindex .. 100644\n--- a/telethon/sessions/memory.py\n+++ b/telethon/sessions/memory.py\n@@ -228,7 +228,7 @@ class MemorySession(Session):\n def cache_file(self, md5_digest, file_size, instance):\n if not isinstance(instance, (InputDocument, InputPhoto)):\n raise TypeError('Cannot cache %s instance' % type(instance))\n- key = (md5_digest, file_size, _SentFileType.from_type(instance))\n+ key = (md5_digest, file_size, _SentFileType.from_type(type(instance)))\n value = (instance.id, instance.access_hash)\n self._files[key] = value"},"message":{"kind":"string","value":"Fix MemorySession file caching"}}},{"rowIdx":1746269,"cells":{"diff":{"kind":"string","value":"diff --git a/vault/testing.go b/vault/testing.go\nindex .. 100644\n--- a/vault/testing.go\n+++ b/vault/testing.go\n@@ -790,7 +790,6 @@ func TestCluster(t testing.TB, handlers []http.Handler, base *CoreConfig, unseal\n \tif err != nil {\n \t\tt.Fatalf(\"err: %v\", err)\n \t}\n-\tc1.redirectAddr = coreConfig.RedirectAddr\n \n \tcoreConfig.RedirectAddr = fmt.Sprintf(\"https://127.0.0.1:%d\", c2lns[0].Address.Port)\n \tif coreConfig.ClusterAddr != \"\" {\n@@ -800,7 +799,6 @@ func TestCluster(t testing.TB, handlers []http.Handler, base *CoreConfig, unseal\n \tif err != nil {\n \t\tt.Fatalf(\"err: %v\", err)\n \t}\n-\tc2.redirectAddr = coreConfig.RedirectAddr\n \n \tcoreConfig.RedirectAddr = fmt.Sprintf(\"https://127.0.0.1:%d\", c3lns[0].Address.Port)\n \tif coreConfig.ClusterAddr != \"\" {\n@@ -810,7 +808,6 @@ func TestCluster(t testing.TB, handlers []http.Handler, base *CoreConfig, unseal\n \tif err != nil {\n \t\tt.Fatalf(\"err: %v\", err)\n \t}\n-\tc2.redirectAddr = coreConfig.RedirectAddr\n \n \t//\n \t// Clustering setup"},"message":{"kind":"string","value":"Don't need to explictly set redirectAddrs"}}},{"rowIdx":1746270,"cells":{"diff":{"kind":"string","value":"diff --git a/lib/get/onValue.js b/lib/get/onValue.js\nindex .. 100644\n--- a/lib/get/onValue.js\n+++ b/lib/get/onValue.js\n@@ -36,7 +36,7 @@ module.exports = function onValue(model, node, seedOrFunction, outerResults, per\n }\n \n else if (outputFormat === \"JSONG\") {\n- if (typeof node.value === \"object\") {\n+ if (node.value && typeof node.value === \"object\") {\n valueNode = clone(node);\n } else {\n valueNode = node.value;"},"message":{"kind":"string","value":"made it so null is not output as an atom."}}},{"rowIdx":1746271,"cells":{"diff":{"kind":"string","value":"diff --git a/setup.py b/setup.py\nindex .. 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -12,7 +12,7 @@ if sys.version_info <= (3, 1):\n \n\n setup(\n\n name=\"ss\",\n\n- version=\"1.5.1\",\n\n+ version=\"1.5.2\",\n\n packages=[],\n\n scripts=['ss.py'],\n\n py_modules=['ss'],\n\ndiff --git a/ss.py b/ss.py\nindex .. 100644\n--- a/ss.py\n+++ b/ss.py\n@@ -18,7 +18,7 @@ import guessit\n init(autoreset=True)\n \n \n-__version__ = '1.5.0'\n+__version__ = '1.5.2'\n \n if sys.version_info[0] == 3: # pragma: no cover\n from urllib.request import urlopen"},"message":{"kind":"string","value":"Bumping version to \n\nFixes #"}}},{"rowIdx":1746272,"cells":{"diff":{"kind":"string","value":"diff --git a/runtime/API.js b/runtime/API.js\nindex .. 100644\n--- a/runtime/API.js\n+++ b/runtime/API.js\n@@ -137,6 +137,8 @@ function buildClass(base, def) {\n \n this._es6now = {\n \n+ version: \"0.7.1\",\n+\n class: buildClass,\n \n // Support for iterator protocol\ndiff --git a/src/NodeRun.js b/src/NodeRun.js\nindex .. 100644\n--- a/src/NodeRun.js\n+++ b/src/NodeRun.js\n@@ -104,6 +104,8 @@ export function startREPL() {\n \n addExtension();\n \n+ console.log(`es6now ${ _es6now.version } (Node ${ process.version })`);\n+ \n // Provide a way to load a module from the REPL\n global.loadModule = path => __load(global.require.resolve(path));\n \ndiff --git a/src/Runtime.js b/src/Runtime.js\nindex .. 100644\n--- a/src/Runtime.js\n+++ b/src/Runtime.js\n@@ -141,6 +141,8 @@ function buildClass(base, def) {\n \n this._es6now = {\n \n+ version: \"0.7.1\",\n+\n class: buildClass,\n \n // Support for iterator protocol"},"message":{"kind":"string","value":"Output the version of es6now and Node when we start the REPL."}}},{"rowIdx":1746273,"cells":{"diff":{"kind":"string","value":"diff --git a/course/report.php b/course/report.php\nindex .. 100644\n--- a/course/report.php\n+++ b/course/report.php\n@@ -21,7 +21,7 @@\n $navigation = build_navigation($navlinks);\n print_header($course->fullname.': '.$strreports, $course->fullname.': '.$strreports, $navigation);\n \n- $reports = get_plugin_list('report');\n+ $reports = get_plugin_list('coursereport');\n \n foreach ($reports as $report => $reportdirectory) {\n $pluginfile = $reportdirectory.'/mod.php';"},"message":{"kind":"string","value":"course-reports MDL- Fixed broken reports, changed plugin list type to coursereport"}}},{"rowIdx":1746274,"cells":{"diff":{"kind":"string","value":"diff --git a/components/select-ng/select-ng__lazy.js b/components/select-ng/select-ng__lazy.js\nindex .. 100644\n--- a/components/select-ng/select-ng__lazy.js\n+++ b/components/select-ng/select-ng__lazy.js\n@@ -38,11 +38,11 @@ class SelectLazy {\n }\n \n attachEvents() {\n- this.container.addEventListener('click', this.onClick, {capture: true, once: true});\n+ this.container.addEventListener('click', this.onClick, {capture: true});\n }\n \n detachEvents() {\n- this.container.removeEventListener('click', this.onClick);\n+ this.container.removeEventListener('click', this.onClick, {capture: true});\n }\n \n render(props) {"},"message":{"kind":"string","value":"RG- use {capture: true} for removeEventListener too"}}},{"rowIdx":1746275,"cells":{"diff":{"kind":"string","value":"diff --git a/src/Extensions/BlockArchiveExtension.php b/src/Extensions/BlockArchiveExtension.php\nindex .. 100644\n--- a/src/Extensions/BlockArchiveExtension.php\n+++ b/src/Extensions/BlockArchiveExtension.php\n@@ -48,7 +48,7 @@ class BlockArchiveExtension extends DataExtension implements ArchiveViewProvider\n 'Breadcrumbs' => function ($val, $item) {\n $parent = $item->Page;\n \n- return $parent ? $parent->Breadcrumbs() : null;\n+ return ($parent && $parent->hasMethod('Breadcrumbs')) ? $parent->Breadcrumbs() : null;\n },\n 'allVersions.first.LastEdited' => function ($val, $item) {\n return DBDatetime::create_field('Datetime', $val)->Ago();"},"message":{"kind":"string","value":"FIX Prevent exception when parent does not have breadcrumbs"}}},{"rowIdx":1746276,"cells":{"diff":{"kind":"string","value":"diff --git a/setup.py b/setup.py\nindex .. 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -17,7 +17,8 @@ install_requires = [\n # List your project dependencies here.\n # For more details, see:\n # http://packages.python.org/distribute/setuptools.html#declaring-dependencies\n- \"enum\", \"lxml\", \"networkx\", \"pygraphviz\"\n+ \"enum\", \"lxml\", \"networkx\", \"pygraphviz\",\n+ \"brewer2mpl\", \"unidecode\"\n ]"},"message":{"kind":"string","value":"added missing packages to setup.py"}}},{"rowIdx":1746277,"cells":{"diff":{"kind":"string","value":"diff --git a/lib/monologue/engine.rb b/lib/monologue/engine.rb\nindex .. 100644\n--- a/lib/monologue/engine.rb\n+++ b/lib/monologue/engine.rb\n@@ -15,7 +15,7 @@ module Monologue\n config.generators.fixture_replacement :factory_girl\n config.generators.integration_tool :rspec\n \n- initializer \"monologue.assets.precompile\" do |app|\n+ initializer 'monologue.assets.precompile' do |app|\n app.config.assets.paths << Rails.root.join('vendor', 'assets', 'fonts')\n app.config.assets.precompile += %w[\n monologue/admin/ckeditor-config.js\n@@ -23,7 +23,7 @@ module Monologue\n ]\n end\n \n- initializer \"monologue.configuration\", :before => :load_config_initializers do |app|\n+ initializer 'monologue.configuration', :before => :load_config_initializers do |app|\n app.config.monologue = Monologue::Configuration.new\n Monologue::Config = app.config.monologue\n end"},"message":{"kind":"string","value":"Fixes #. small refactoring"}}},{"rowIdx":1746278,"cells":{"diff":{"kind":"string","value":"diff --git a/src/Jira/Api/Client/CurlClient.php b/src/Jira/Api/Client/CurlClient.php\nindex .. 100644\n--- a/src/Jira/Api/Client/CurlClient.php\n+++ b/src/Jira/Api/Client/CurlClient.php\n@@ -90,6 +90,7 @@ class CurlClient implements ClientInterface\n if ($method == 'POST') {\n curl_setopt($curl, CURLOPT_POST, 1);\n if ($isFile) {\n+ $data['file'] = $this->getCurlValue($data['file']);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n } else {\n curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data));\n@@ -122,4 +123,19 @@ class CurlClient implements ClientInterface\n \n return $data;\n }\n+\t\n+ /**\n+ * If necessary, replace curl file @ string with a CURLFile object (for PHP 5.5 and up)\n+ *\n+ * @param string $fileString The string in @-format as it is used on PHP 5.4 and older.\n+ * @return \\CURLFile|string\n+ */\n+ protected function getCurlValue($fileString)\n+ {\n+ if (!function_exists('curl_file_create')) {\n+ return $fileString;\n+ }\n+\n+ return curl_file_create(substr($fileString, 1));\n+ }\n }"},"message":{"kind":"string","value":"Fixing deprecated error when uploading file attachments in PHP +"}}},{"rowIdx":1746279,"cells":{"diff":{"kind":"string","value":"diff --git a/php/commands/cron.php b/php/commands/cron.php\nindex .. 100644\n--- a/php/commands/cron.php\n+++ b/php/commands/cron.php\n@@ -487,6 +487,13 @@ class Cron_Command extends WP_CLI_Command {\n \n \t/**\n \t * Test the WP Cron spawning system and report back its status.\n+\t *\n+\t * This command tests the spawning system by performing the following steps:\n+\t * * Checks to see if the `DISABLE_WP_CRON` constant is set; errors if true\n+\t * because WP-Cron is disabled.\n+\t * * Checks to see if the `ALTERNATE_WP_CRON` constant is set; warns if true\n+\t * * Attempts to spawn WP-Cron over HTTP; warns if non 200 response code is\n+\t * returned.\n \t */\n \tpublic function test() {"},"message":{"kind":"string","value":"Explain what `wp cron test` actually does"}}},{"rowIdx":1746280,"cells":{"diff":{"kind":"string","value":"diff --git a/lib/Rackem/Rack.php b/lib/Rackem/Rack.php\nindex .. 100644\n--- a/lib/Rackem/Rack.php\n+++ b/lib/Rackem/Rack.php\n@@ -23,7 +23,7 @@ class Rack\n \t\t\t\"rack.multithread\" => false,\n \t\t\t\"rack.multiprocess\" => false,\n \t\t\t\"rack.run_once\" => false,\n-\t\t\t\"rack.session\" => &$_SESSION,\n+\t\t\t\"rack.session\" => array(),\n \t\t\t\"rack.logger\" => \"\"\n \t\t));\n \t\treturn new \\ArrayObject($env);"},"message":{"kind":"string","value":"don't bother with the $_SESSION global"}}},{"rowIdx":1746281,"cells":{"diff":{"kind":"string","value":"diff --git a/providers/oura/oura.go b/providers/oura/oura.go\nindex .. 100644\n--- a/providers/oura/oura.go\n+++ b/providers/oura/oura.go\n@@ -131,13 +131,26 @@ func userFromReader(reader io.Reader, user *goth.User) error {\n \t\treturn err\n \t}\n \n+\trawData := make(map[string]interface{})\n+\n+\tif u.Age != 0 {\n+\t\trawData[\"age\"] = u.Age\n+\t}\n+\tif u.Weight != 0 {\n+\t\trawData[\"weight\"] = u.Weight\n+\t}\n+\tif u.Height != 0 {\n+\t\trawData[\"height\"] = u.Height\n+\t}\n+\tif u.Gender != \"\" {\n+\t\trawData[\"gender\"] = u.Gender\n+\t}\n+\n \tuser.UserID = u.UserID\n \tuser.Email = u.Email\n-\tuser.RawData = make(map[string]interface{})\n-\tuser.RawData[\"age\"] = u.Age\n-\tuser.RawData[\"weight\"] = u.Weight\n-\tuser.RawData[\"height\"] = u.Height\n-\tuser.RawData[\"gender\"] = u.Gender\n+\tif len(rawData) > 0 {\n+\t\tuser.RawData = rawData\n+\t}\n \n \treturn err\n }"},"message":{"kind":"string","value":"Update FetchUser to only fill populated fields in RawData"}}},{"rowIdx":1746282,"cells":{"diff":{"kind":"string","value":"diff --git a/persistence/jdbc/src/main/java/org/infinispan/persistence/jdbc/table/management/OracleTableManager.java b/persistence/jdbc/src/main/java/org/infinispan/persistence/jdbc/table/management/OracleTableManager.java\nindex .. 100644\n--- a/persistence/jdbc/src/main/java/org/infinispan/persistence/jdbc/table/management/OracleTableManager.java\n+++ b/persistence/jdbc/src/main/java/org/infinispan/persistence/jdbc/table/management/OracleTableManager.java\n@@ -83,6 +83,10 @@ class OracleTableManager extends AbstractTableManager {\n return indexName;\n }\n \n+ protected String getDropTimestampSql() {\n+ return String.format(\"DROP INDEX %s\", getIndexName(true));\n+ }\n+\n @Override\n public String getInsertRowSql() {\n if (insertRowSql == null) {"},"message":{"kind":"string","value":"ISPN- Drop Index fails on Oracle DBs"}}},{"rowIdx":1746283,"cells":{"diff":{"kind":"string","value":"diff --git a/src/views/ticket/_clientInfo.php b/src/views/ticket/_clientInfo.php\nindex .. 100644\n--- a/src/views/ticket/_clientInfo.php\n+++ b/src/views/ticket/_clientInfo.php\n@@ -60,11 +60,14 @@ $this->registerCss('\n = ClientGridView::detailView([\n 'model' => $client,\n 'boxed' => false,\n- 'columns' => $client->login === 'anonym' ? ['name', 'email'] : [\n- 'name', 'email', 'messengers', 'country', 'language',\n- 'state', 'balance', 'credit',\n- 'servers_spoiler', 'domains_spoiler', 'hosting',\n- ],\n+ 'columns' => array_filter(\n+ $client->login === 'anonym' ? ['name', 'email'] : [\n+ 'name', 'email', 'messengers', 'country', 'language', 'state',\n+ Yii::$app->user->can('bill.read') ? 'balance' : null,\n+ Yii::$app->user->can('bill.read') ? 'credit' : null,\n+ 'servers_spoiler', 'domains_spoiler', 'hosting',\n+ ]\n+ ),\n ]) ?>\n \n login !== 'anonym') : ?>"},"message":{"kind":"string","value":"hidden balance and credit if can not `bill.read`"}}},{"rowIdx":1746284,"cells":{"diff":{"kind":"string","value":"diff --git a/src/Dingo/Api/Facades/API.php b/src/Dingo/Api/Facades/API.php\nindex .. 100644\n--- a/src/Dingo/Api/Facades/API.php\n+++ b/src/Dingo/Api/Facades/API.php\n@@ -1,6 +1,7 @@\n token($payload);\n \t}\n \n+\t/**\n+\t * Determine if a request is internal.\n+\t * \n+\t * @return bool\n+\t */\n+\tpublic static function internal()\n+\t{\n+\t\treturn static::$app['router']->getCurrentRequest() instanceof InternalRequest;\n+\t}\n+\n }\n\\ No newline at end of file"},"message":{"kind":"string","value":"Method to check if request is internal."}}},{"rowIdx":1746285,"cells":{"diff":{"kind":"string","value":"diff --git a/Controller/CRUDController.php b/Controller/CRUDController.php\nindex .. 100644\n--- a/Controller/CRUDController.php\n+++ b/Controller/CRUDController.php\n@@ -391,8 +391,10 @@ class CRUDController extends Controller\n */\n public function batchAction()\n {\n- if ($this->getRestMethod() != 'POST') {\n- throw new \\RuntimeException('invalid request type, POST expected');\n+ $restMethod = $this->getRestMethod();\n+\n+ if ('POST' !== $restMethod) {\n+ throw $this->createNotFoundException(sprintf('Invalid request type \"%s\", POST expected', $restMethod));\n }\n \n // check the csrf token"},"message":{"kind":"string","value":"Throw http not found exception instead of runtime\n\nAvoids a server error."}}},{"rowIdx":1746286,"cells":{"diff":{"kind":"string","value":"diff --git a/functions/functions-twig.php b/functions/functions-twig.php\nindex .. 100644\n--- a/functions/functions-twig.php\n+++ b/functions/functions-twig.php\n@@ -36,10 +36,17 @@\n \t\t$twig->addFilter('wp_title', new Twig_Filter_Function('twig_wp_title'));\n \t\t$twig->addFilter('wp_sidebar', new Twig_Filter_Function('twig_wp_sidebar'));\n \n+\t\t$twig->addFilter('get_post_info', new Twig_Filter_Function('twig_get_post_info'));\n+\n \t\t$twig = apply_filters('get_twig', $twig);\n \t\treturn $twig;\n \t}\n \n+\tfunction twig_get_post_info($id, $field = 'path'){\n+\t\t$pi = PostMaster::get_post_info($id);\n+\t\treturn $pi->$field;\n+\t}\n+\n \tfunction twig_wp_sidebar($arg){\n \t\tget_sidebar($arg);\n \t}"},"message":{"kind":"string","value":"added twig for get_post_info"}}},{"rowIdx":1746287,"cells":{"diff":{"kind":"string","value":"diff --git a/lib/weblib.php b/lib/weblib.php\nindex .. 100644\n--- a/lib/weblib.php\n+++ b/lib/weblib.php\n@@ -1605,13 +1605,20 @@ function obfuscate_text($plaintext) {\n $i=0;\n $length = strlen($plaintext);\n $obfuscated=\"\";\n+ $prev_obfuscated = false;\n while ($i < $length) {\n- if (rand(0,2)) {\n+ $c = ord($plaintext{$i});\n+ $numerical = ($c >= ord('0')) && ($c <= ord('9'));\n+ if ($prev_obfuscated and $numerical ) {\n+ $obfuscated.='&#'.ord($plaintext{$i});\n+ } else if (rand(0,2)) {\n $obfuscated.='&#'.ord($plaintext{$i});\n+ $prev_obfuscated = true;\n } else {\n $obfuscated.=$plaintext{$i};\n+ $prev_obfuscated = false;\n }\n- $i++;\n+ $i++;\n }\n return $obfuscated;\n }"},"message":{"kind":"string","value":"Fixes for obfuscate_text() when printing emails with numbers in them.\n(Patch from Zbigniew Fiedorowicz - thanks)"}}},{"rowIdx":1746288,"cells":{"diff":{"kind":"string","value":"diff --git a/lib/things/document.rb b/lib/things/document.rb\nindex .. 100644\n--- a/lib/things/document.rb\n+++ b/lib/things/document.rb\n@@ -1,6 +1,6 @@\n module Things\n class Document\n- DEFAULT_DATABASE_PATH = ENV['HOME'] + '/Library/Application Support/Cultured Code/Things/Database.xml' unless defined?(DEFAULT_DATABASE_PATH)\n+ DEFAULT_DATABASE_PATH = \"#{ENV['HOME']}/Library/Application Support/Cultured Code/Things/Database.xml\" unless defined?(DEFAULT_DATABASE_PATH)\n \n attr_reader :database_file\n \n@@ -36,4 +36,4 @@ module Things\n @doc = Hpricot(IO.read(database_file))\n end\n end\n-end\n\\ No newline at end of file\n+end"},"message":{"kind":"string","value":"Use interpolation for DEFAULT_DATABASE_PATH"}}},{"rowIdx":1746289,"cells":{"diff":{"kind":"string","value":"diff --git a/src/toil/test/jobStores/jobStoreTest.py b/src/toil/test/jobStores/jobStoreTest.py\nindex .. 100644\n--- a/src/toil/test/jobStores/jobStoreTest.py\n+++ b/src/toil/test/jobStores/jobStoreTest.py\n@@ -1253,9 +1253,16 @@ class AWSJobStoreTest(AbstractJobStoreTest.Test):\n else:\n self.fail()\n finally:\n- for attempt in retry_s3():\n- with attempt:\n- s3.delete_bucket(bucket=bucket)\n+ try:\n+ for attempt in retry_s3():\n+ with attempt:\n+ s3.delete_bucket(bucket=bucket)\n+ except boto.exception.S3ResponseError as e:\n+ if e.error_code == 404:\n+ # The bucket doesn't exist; maybe a failed delete actually succeeded.\n+ pass\n+ else:\n+ raise\n \n @slow\n def testInlinedFiles(self):"},"message":{"kind":"string","value":"Tolerate unnecessary bucket cleanup (#)"}}},{"rowIdx":1746290,"cells":{"diff":{"kind":"string","value":"diff --git a/lib/Cake/Model/Behavior/TranslateBehavior.php b/lib/Cake/Model/Behavior/TranslateBehavior.php\nindex .. 100644\n--- a/lib/Cake/Model/Behavior/TranslateBehavior.php\n+++ b/lib/Cake/Model/Behavior/TranslateBehavior.php\n@@ -392,6 +392,16 @@ class TranslateBehavior extends ModelBehavior {\n \t\tunset($this->runtime[$model->alias]['beforeValidate'], $this->runtime[$model->alias]['beforeSave']);\n \t\t$conditions = array('model' => $model->alias, 'foreign_key' => $model->id);\n \t\t$RuntimeModel = $this->translateModel($model);\n+\t\n+\t\t$fields = array_merge($this->settings[$model->alias], $this->runtime[$model->alias]['fields']);\n+\t\tif ($created) {\n+\t\t\tforeach ($fields as $field) {\n+\t\t\t\tif (!isset($tempData[$field])) {\n+\t\t\t\t\t//set the field value to an empty string\n+\t\t\t\t\t$tempData[$field] = '';\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}\n \n \t\tforeach ($tempData as $field => $value) {\n \t\t\tunset($conditions['content']);"},"message":{"kind":"string","value":"Update afterSave to ensure created entires have all translated fields present\n\nWithout all fields being present, find() will be unable to find the\ntranslated records.\n\nFixes #"}}},{"rowIdx":1746291,"cells":{"diff":{"kind":"string","value":"diff --git a/main.py b/main.py\nindex .. 100755\n--- a/main.py\n+++ b/main.py\n@@ -62,6 +62,9 @@ class Node:\n \t\t\t\tcontinue\n \t\t\tattrib = getattr(self, attr)\n \t\t\tif attrib:\n+\t\t\t\tif isinstance(attrib, int):\n+\t\t\t\t\t# Check for enums\n+\t\t\t\t\tattrib = str(int(attrib))\n \t\t\t\telement.attrib[attr] = attrib\n \t\treturn element"},"message":{"kind":"string","value":"Handle int attributes in serialization"}}},{"rowIdx":1746292,"cells":{"diff":{"kind":"string","value":"diff --git a/cruddy/__init__.py b/cruddy/__init__.py\nindex .. 100644\n--- a/cruddy/__init__.py\n+++ b/cruddy/__init__.py\n@@ -200,3 +200,18 @@ class CRUD(object):\n params = {'Key': {'id': id}}\n self._call_ddb_method(self.table.delete_item, params, response)\n return self._prepare_response(response)\n+\n+ def handler(self, item, operation):\n+ operation = operation.lower()\n+ if operation == 'list':\n+ response = self.list()\n+ elif operation == 'get':\n+ response = self.get(item['id'])\n+ elif operation == 'create':\n+ response = self.create(item)\n+ elif operation == 'update':\n+ response = self.update(item)\n+ elif operation == 'delete':\n+ response = self.delete(item['id'])\n+ return response\n+"},"message":{"kind":"string","value":"Add back the handler method. Still useful, I think."}}},{"rowIdx":1746293,"cells":{"diff":{"kind":"string","value":"diff --git a/src/streamcorpus_pipeline/_tsv_files_list.py b/src/streamcorpus_pipeline/_tsv_files_list.py\nindex .. 100644\n--- a/src/streamcorpus_pipeline/_tsv_files_list.py\n+++ b/src/streamcorpus_pipeline/_tsv_files_list.py\n@@ -151,7 +151,7 @@ class tsv_files_list(object):\n return stream_item\n \n if __name__ == '__main__':\n- ## this is a simple test of this extractor stage\n+ ## this is a simple test of this reader stage\n import argparse\n parser = argparse.ArgumentParser()\n parser.add_argument("},"message":{"kind":"string","value":"renaming extractor --> reader one more (trivial)"}}},{"rowIdx":1746294,"cells":{"diff":{"kind":"string","value":"diff --git a/packages/react-server-website/components/doc-contents.js b/packages/react-server-website/components/doc-contents.js\nindex .. 100644\n--- a/packages/react-server-website/components/doc-contents.js\n+++ b/packages/react-server-website/components/doc-contents.js\n@@ -38,7 +38,7 @@ export default class DocContents extends React.Component {\n \t}\n \n \tcomponentDidMount() {\n-\t\tgetCurrentRequestContext().navigator.on( \"navigateStart\", this.closeMenu.bind(this) );\n+\t\tgetCurrentRequestContext().navigator.on(\"loadComplete\", this.closeMenu.bind(this));\n \t}\n \n \trender() {"},"message":{"kind":"string","value":"Close mobile doc menu on load complete (#)\n\nThis feels a little nicer. Waits to close the nav menu until the page has\n\nchanged. Previously the nav menu was closed immediately, and then the page\n\nwould change _after_."}}},{"rowIdx":1746295,"cells":{"diff":{"kind":"string","value":"diff --git a/lib/spout/version.rb b/lib/spout/version.rb\nindex .. 100644\n--- a/lib/spout/version.rb\n+++ b/lib/spout/version.rb\n@@ -3,7 +3,7 @@ module Spout\n MAJOR = 0\n MINOR = 1\n TINY = 0\n- BUILD = \"pre\" # nil, \"pre\", \"rc\", \"rc2\"\n+ BUILD = \"rc\" # nil, \"pre\", \"rc\", \"rc2\"\n \n STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.')\n end"},"message":{"kind":"string","value":"Version bump to .rc"}}},{"rowIdx":1746296,"cells":{"diff":{"kind":"string","value":"diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex .. 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -2,6 +2,8 @@\n \n \n ## [Unreleased] - unreleased\n+### Added\n+- `Service.close` method for freeing resources.\n \n \n ## [2] - 2015-11-15\ndiff --git a/setup.py b/setup.py\nindex .. 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -15,7 +15,7 @@ def long_desc():\n \n setup(\n name='syndicate',\n- version='2',\n+ version='2.1',\n description='A wrapper for REST APIs',\n author='Justin Mayfield',\n author_email='tooker@gmail.com',\ndiff --git a/syndicate/client.py b/syndicate/client.py\nindex .. 100644\n--- a/syndicate/client.py\n+++ b/syndicate/client.py\n@@ -49,6 +49,7 @@ class Service(object):\n async=False, **adapter_config):\n if not uri:\n raise TypeError(\"Required: uri\")\n+ self.closed = False\n self.async = async\n self.auth = auth\n self.filters = []\n@@ -129,4 +130,9 @@ class Service(object):\n return self.do('patch', path, data=data, **kwargs)\n \n def close(self):\n- self.adapter.close()\n+ if self.closed:\n+ return\n+ if self.adapter is not None:\n+ self.adapter.close()\n+ self.adapter = None\n+ self.closed = True"},"message":{"kind":"string","value":"Rev to and add close() docs."}}},{"rowIdx":1746297,"cells":{"diff":{"kind":"string","value":"diff --git a/lxd/container_lxc.go b/lxd/container_lxc.go\nindex .. 100644\n--- a/lxd/container_lxc.go\n+++ b/lxd/container_lxc.go\n@@ -3480,7 +3480,6 @@ func (c *containerLXC) Delete() error {\n \t\t}\n \n \t\t// Update network files\n-\t\tnetworkUpdateStatic(c.state, \"\")\n \t\tfor k, m := range c.expandedDevices {\n \t\t\tif m[\"type\"] != \"nic\" || m[\"nictype\"] != \"bridged\" {\n \t\t\t\tcontinue\n@@ -3515,6 +3514,11 @@ func (c *containerLXC) Delete() error {\n \t\t}\n \t}\n \n+\tif !c.IsSnapshot() {\n+\t\t// Remove any static lease file\n+\t\tnetworkUpdateStatic(c.state, \"\")\n+\t}\n+\n \tlogger.Info(\"Deleted container\", ctxMap)\n \n \tif c.IsSnapshot() {"},"message":{"kind":"string","value":"lxd/containers: Properly clear static leases"}}},{"rowIdx":1746298,"cells":{"diff":{"kind":"string","value":"diff --git a/lib/producer.js b/lib/producer.js\nindex .. 100644\n--- a/lib/producer.js\n+++ b/lib/producer.js\n@@ -75,7 +75,7 @@ function Producer(conf, topicConf) {\n this.globalConfig = conf;\n this.topicConfig = topicConf;\n this.defaultTopic = gTopic || null;\n- this.defaultPartition = gPart || null;\n+ this.defaultPartition = gPart == null ? -1 : gPart;\n \n this.outstandingMessages = 0;\n this.sentMessages = 0;\n@@ -189,7 +189,7 @@ Producer.prototype.produceSync = function(msg) {\n this.sentMessages++;\n \n var topic = msg.topic || false;\n- var partition = msg.partition || this.defaultPartition;\n+ var partition = msg.partition == null ? this.defaultPartition : msg.partition;\n \n if (!topic) {\n throw new TypeError('\"topic\" needs to be set');"},"message":{"kind":"string","value":"Do null checking on partition instead of checking falsiness (#)"}}},{"rowIdx":1746299,"cells":{"diff":{"kind":"string","value":"diff --git a/src/main/java/org/dbflute/mail/send/embedded/proofreader/SMailPmCommentProofreader.java b/src/main/java/org/dbflute/mail/send/embedded/proofreader/SMailPmCommentProofreader.java\nindex .. 100644\n--- a/src/main/java/org/dbflute/mail/send/embedded/proofreader/SMailPmCommentProofreader.java\n+++ b/src/main/java/org/dbflute/mail/send/embedded/proofreader/SMailPmCommentProofreader.java\n@@ -73,6 +73,9 @@ public class SMailPmCommentProofreader implements SMailTextProofreader {\n // Line Adjustment\n // ===============\n protected String filterTemplateText(String templateText, Object pmb) {\n+ // #for_now jflute pending, IF in FOR comment becomes empty line when false (2019/02/21)\n+ // basically it may be unneeded because it should be structured in Java\n+ // and modification is very difficult so pending, waiting for next request\n final String replaced = Srl.replace(templateText, CRLF, LF);\n final List lineList = Srl.splitList(replaced, LF);\n final StringBuilder sb = new StringBuilder(templateText.length());"},"message":{"kind":"string","value":"comment: IF in FOR comment becomes empty line when false"}}}],"truncated":false,"partial":false},"paginationData":{"pageIndex":17462,"numItemsPerPage":100,"numTotalItems":1747442,"offset":1746200,"length":100}},"jwt":"eyJhbGciOiJFZERTQSJ9.eyJyZWFkIjp0cnVlLCJwZXJtaXNzaW9ucyI6eyJyZXBvLmNvbnRlbnQucmVhZCI6dHJ1ZX0sImlhdCI6MTc1NjM3NzQ0MSwic3ViIjoiL2RhdGFzZXRzL3NlbmlydWsvZ2l0LWRpZmZfdG9fY29tbWl0X21zZ19sYXJnZSIsImV4cCI6MTc1NjM4MTA0MSwiaXNzIjoiaHR0cHM6Ly9odWdnaW5nZmFjZS5jbyJ9.DkzOqfIbIjuWCCXql0Ct1-n08MKq-ZFRIUE7cAgO6aNITO5psxL5hx8KtkARd919gDvMR69wmb4qUlXbCct5BA","displayUrls":true},"discussionsStats":{"closed":0,"open":0,"total":0},"fullWidth":true,"hasGatedAccess":true,"hasFullAccess":true,"isEmbedded":false,"savedQueries":{"community":[],"user":[]}}">
Subset (1)
default (1.75M rows)
Split (1)
train (1.75M rows)
diff --git a/src/Providers/FortServiceProvider.php b/src/Providers/FortServiceProvider.php
index <HASH>..<HASH> 100644
--- a/src/Providers/FortServiceProvider.php
+++ b/src/Providers/FortServiceProvider.php
@@ -121,6 +121,7 @@ class FortServiceProvider extends ServiceProvider
$this->app->booted(function () use ($router) {
$router->getRoutes()->refreshNameLookups();
+ $router->getRoutes()->refreshActionLookups();
});
}
}
refreshActionLookups after routes registration
diff --git a/lib/devise_invitable/model.rb b/lib/devise_invitable/model.rb
index <HASH>..<HASH> 100644
--- a/lib/devise_invitable/model.rb
+++ b/lib/devise_invitable/model.rb
@@ -254,7 +254,7 @@ module Devise
invitable = find_or_initialize_with_errors(invite_key_array, attributes_hash)
invitable.assign_attributes(attributes)
invitable.invited_by = invited_by
- unless invitable.password || invitable.encrypted_password
+ unless invitable.password || invitable.encrypted_password.present?
invitable.password = Devise.friendly_token[0, 20]
end
fix previous commit for #<I>
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -7,14 +7,14 @@ from distutils.core import setup
setup(
name = 'febio',
- version = '0.1',
+ version = '0.1.1',
packages = ['febio',],
py_modules = ['febio.__init__','febio.MatDef','febio.MeshDef','febio.Boundary','febio.Control','febio.Load','febio.Model'],
author = 'Scott Sibole',
author_email = '[email protected] ',
license = 'MIT',
package_data = {'febio': ['verification/*'],},
- url = 'https:/github.com/siboles/pyFEBio',
- download_url = 'https://github.com/siboles/pyFEBio/tarball/0.1',
+ url = 'https://github.com/siboles/pyFEBio',
+ download_url = 'https://github.com/siboles/pyFEBio/tarball/0.1.1',
description = 'A Python API for FEBio',
)
Updated version to correct URL to homepage.
diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb
index <HASH>..<HASH> 100644
--- a/lib/jekyll/site.rb
+++ b/lib/jekyll/site.rb
@@ -122,7 +122,7 @@ module Jekyll
base = File.join(self.source, self.config['layouts'])
return unless File.exists?(base)
entries = []
- Dir.chdir(base) { entries = filter_entries(Dir['*.*']) }
+ Dir.chdir(base) { entries = filter_entries(Dir['**/*.*']) }
entries.each do |f|
name = f.split(".")[0..-2].join(".")
Add support for use of folders inside _layout path, closes #<I>
diff --git a/tests/library/CM/Model/SplitfeatureTest.php b/tests/library/CM/Model/SplitfeatureTest.php
index <HASH>..<HASH> 100644
--- a/tests/library/CM/Model/SplitfeatureTest.php
+++ b/tests/library/CM/Model/SplitfeatureTest.php
@@ -133,6 +133,15 @@ class CM_Model_SplitfeatureTest extends CMTest_TestCase {
$this->assertEquals($splitfeature, CM_Model_Splitfeature::find('foo'));
}
+ public function testFindChildClass() {
+ CM_Model_Splitfeature::createStatic(array('name' => 'bar', 'percentage' => 0));
+ $mockClass = $this->mockClass('CM_Model_Splitfeature');
+ /** @var CM_Model_Splitfeature $className */
+ $className = $mockClass->getClassName();
+
+ $this->assertInstanceOf($className, $className::find('bar'));
+ }
+
/**
* @param CM_Model_User[] $userList
* @param CM_Model_Splitfeature $splitfeature
Add test for CM_Model_Splitfeature::find() when it should create child instance
diff --git a/gifi/feature.py b/gifi/feature.py
index <HASH>..<HASH> 100644
--- a/gifi/feature.py
+++ b/gifi/feature.py
@@ -117,16 +117,17 @@ def _get_pull_requests(repo):
def _discard(repo=None):
repo = get_repo(repo)
config = configuration(repo)
- current_branch = _current_feature_branch(repo)
+ _fetch(repo, config)
+ feature_branch = _current_feature_branch(repo)
repo.git.checkout(config.target_branch)
repo.git.rebase('%s/%s' % (config.target_remote, config.target_branch))
try:
repo.git.commit('--amend', '-C', 'HEAD')
- repo.git.push(config.working_remote, ':%s' % current_branch)
+ repo.git.push(config.working_remote, ':%s' % feature_branch)
except GitCommandError as e:
logging.warn('Unable to drop remote feature branch: %s' % e)
print 'WARNING: Unable to remove remote feature branch. Maybe it was not yet created?'
- repo.git.branch('-D', current_branch)
+ repo.git.branch('-D', feature_branch)
def configuration(repo=None):
Fetch repository before rebase'ing master after feature is discarded
diff --git a/src/_pytest/cacheprovider.py b/src/_pytest/cacheprovider.py
index <HASH>..<HASH> 100755
--- a/src/_pytest/cacheprovider.py
+++ b/src/_pytest/cacheprovider.py
@@ -319,7 +319,8 @@ def cache(request):
def pytest_report_header(config):
- if config.option.verbose:
+ """Display cachedir with --cache-show and if non-default."""
+ if config.option.verbose or config.getini("cache_dir") != ".pytest_cache":
cachedir = config.cache._cachedir
# TODO: evaluate generating upward relative paths
# starting with .., ../.. if sensible
cacheprovider: display cachedir also in non-verbose mode if customized
diff --git a/library/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java b/library/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java
index <HASH>..<HASH> 100644
--- a/library/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java
+++ b/library/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java
@@ -1771,13 +1771,6 @@ public class DrawerBuilder {
}
/**
- * resets the DrawerBuilder's internal `mUsed` variable to false so the `DrawerBuilder` can be reused
- */
- public void reset() {
- this.mUsed = false;
- }
-
- /**
* helper method to close the drawer delayed
*/
protected void closeDrawerDelayed() {
* remove reset method as it is not possible
diff --git a/src/API/Implementation/TTS/IbmWatson/AudioFormat/IbmWatsonAudioFormatsTrait.php b/src/API/Implementation/TTS/IbmWatson/AudioFormat/IbmWatsonAudioFormatsTrait.php
index <HASH>..<HASH> 100644
--- a/src/API/Implementation/TTS/IbmWatson/AudioFormat/IbmWatsonAudioFormatsTrait.php
+++ b/src/API/Implementation/TTS/IbmWatson/AudioFormat/IbmWatsonAudioFormatsTrait.php
@@ -14,7 +14,7 @@ use GinoPane\PHPolyglot\Exception\InvalidAudioFormatCodeException;
*/
trait IbmWatsonAudioFormatsTrait
{
- private $formatMapping = [
+ private static $formatMapping = [
TtsAudioFormat::AUDIO_BASIC => 'audio/basic',
TtsAudioFormat::AUDIO_FLAC => 'audio/flac',
TtsAudioFormat::AUDIO_L16 => 'audio/l16',
@@ -36,7 +36,7 @@ trait IbmWatsonAudioFormatsTrait
*/
public function getAcceptParameter(TtsAudioFormat $format, array $additionalData = []): string
{
- $accept = $formatMapping[$format] ?? '';
+ $accept = self::$formatMapping[$format->getFormat()] ?? '';
if (empty($accept)) {
throw new InvalidAudioFormatCodeException($format->getFormat());
Updates:
- fixed undefined local variable.
diff --git a/commands/command.go b/commands/command.go
index <HASH>..<HASH> 100644
--- a/commands/command.go
+++ b/commands/command.go
@@ -40,12 +40,6 @@ type HelpText struct {
Subcommands string // overrides SUBCOMMANDS section
}
-// TODO: check Argument definitions when creating a Command
-// (might need to use a Command constructor)
-// * make sure any variadic args are at the end
-// * make sure there aren't duplicate names
-// * make sure optional arguments aren't followed by required arguments
-
// Command is a runnable command, with input arguments and options (flags).
// It can also have Subcommands, to group units of work into sets.
type Command struct {
commands: Removed old TODOs
diff --git a/bat/dataframe_to_parquet.py b/bat/dataframe_to_parquet.py
index <HASH>..<HASH> 100644
--- a/bat/dataframe_to_parquet.py
+++ b/bat/dataframe_to_parquet.py
@@ -20,7 +20,7 @@ def df_to_parquet(df, filename, compression='SNAPPY'):
arrow_table = pa.Table.from_pandas(df)
if compression == 'UNCOMPRESSED':
compression = None
- pq.write_table(arrow_table, filename, use_dictionary=False, compression=compression)
+ pq.write_table(arrow_table, filename, compression=compression, use_deprecated_int96_timestamps=True)
def parquet_to_df(filename, nthreads=1):
use the int<I> timestamps for now
diff --git a/system/src/Grav/Console/Gpm/UninstallCommand.php b/system/src/Grav/Console/Gpm/UninstallCommand.php
index <HASH>..<HASH> 100644
--- a/system/src/Grav/Console/Gpm/UninstallCommand.php
+++ b/system/src/Grav/Console/Gpm/UninstallCommand.php
@@ -117,7 +117,7 @@ class UninstallCommand extends Command
$this->output->writeln('');
} else {
$this->output->write(" |- Uninstalling package... ");
- $uninstall = $this->uninstallPackage($package);
+ $uninstall = $this->uninstallPackage($slug, $package);
if (!$uninstall) {
$this->output->writeln(" '- <red>Uninstallation failed or aborted.</red>");
@@ -135,12 +135,16 @@ class UninstallCommand extends Command
/**
+ * @param $slug
* @param $package
+ *
* @return bool
*/
- private function uninstallPackage($package)
+ private function uninstallPackage($slug, $package)
{
- $path = self::getGrav()['locator']->findResource($package->package_type . '://' . $package->slug);
+ $locator = self::getGrav()['locator'];
+
+ $path = self::getGrav()['locator']->findResource($package->package_type . '://' .$slug);
Installer::uninstall($path);
$errorCode = Installer::lastErrorCode();
fix #<I> - incorrect slug name causing issues
diff --git a/testsuite/domain/src/test/java/org/jboss/as/test/integration/domain/suites/AuditLogTestCase.java b/testsuite/domain/src/test/java/org/jboss/as/test/integration/domain/suites/AuditLogTestCase.java
index <HASH>..<HASH> 100644
--- a/testsuite/domain/src/test/java/org/jboss/as/test/integration/domain/suites/AuditLogTestCase.java
+++ b/testsuite/domain/src/test/java/org/jboss/as/test/integration/domain/suites/AuditLogTestCase.java
@@ -367,6 +367,7 @@ public class AuditLogTestCase {
final PathAddress serverAddress = PathAddress.pathAddress(baseAddress.getElement(0)).append(SERVER_CONFIG, servers.get(0));
final ModelNode restartOp = Util.createEmptyOperation("reload", serverAddress);
restartOp.get(BLOCKING).set(true);
+ masterLifecycleUtil.executeForResult(restartOp);
expectNoSyslogData();
//Now enable the server logger again
Execute the server reload op that the test creates
diff --git a/spec/index.spec.js b/spec/index.spec.js
index <HASH>..<HASH> 100644
--- a/spec/index.spec.js
+++ b/spec/index.spec.js
@@ -190,7 +190,7 @@ describe('phonegap-plugin-contentsync', function() {
jasmine.any(Function),
'Sync',
'cancel',
- []
+ [ options.id ]
]);
done();
}, 100);
diff --git a/www/index.js b/www/index.js
index <HASH>..<HASH> 100644
--- a/www/index.js
+++ b/www/index.js
@@ -58,9 +58,8 @@ var ContentSync = function(options) {
options.headers = null;
}
- if (typeof options.id === 'undefined') {
- options.id = null;
- }
+ // store the options to this object instance
+ this.options = options;
// triggered on update and completion
var that = this;
@@ -97,7 +96,7 @@ ContentSync.prototype.cancel = function() {
that.emit('cancel');
};
setTimeout(function() {
- exec(onCancel, onCancel, 'Sync', 'cancel', []);
+ exec(onCancel, onCancel, 'Sync', 'cancel', [ that.options.id ]);
}, 10);
};
[www] Pass id to cancel operation.
diff --git a/src/runners/cucumber/CucumberReporter.js b/src/runners/cucumber/CucumberReporter.js
index <HASH>..<HASH> 100644
--- a/src/runners/cucumber/CucumberReporter.js
+++ b/src/runners/cucumber/CucumberReporter.js
@@ -154,6 +154,8 @@ export default class CucumberReporter {
caseResult.endTime = oxutil.getTimeStamp();
caseResult.duration = caseResult.endTime - caseResult.startTime;
caseResult.status = this.determineCaseStatus(caseResult);
+ caseResult.logs = this.oxygenEventListener.resultStore && this.oxygenEventListener.resultStore.logs ? this.oxygenEventListener.resultStore.logs : [];
+ caseResult.har = this.oxygenEventListener.resultStore && this.oxygenEventListener.resultStore.har ? this.oxygenEventListener.resultStore.har : null;
// call oxygen onAfterCase if defined
if (typeof this.oxygenEventListener.onAfterCase === 'function') {
cucumber add logs collecting support (#<I>)
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -331,7 +331,7 @@ module.exports = function (connect) {
clear(callback) {
return withCallback(this.collectionReady()
- .then(collection => collection.drop())
+ .then(collection => collection.drop(this.writeOperationOptions))
, callback)
}
Add writeOperationOptions support to collection.drop() call (supported as of MongoDB <I>)
diff --git a/lib/octopress-deploy/git.rb b/lib/octopress-deploy/git.rb
index <HASH>..<HASH> 100644
--- a/lib/octopress-deploy/git.rb
+++ b/lib/octopress-deploy/git.rb
@@ -50,7 +50,7 @@ git_url: #{options[:git_url]}
# Branch defaults to master.
# If using GitHub project pages, set the branch to 'gh-pages'.
#
-# git_branch: #{options[:git_branch] || 'master'}
+git_branch: #{options[:git_branch] || 'master'}
CONFIG
end
Removed git branch comment. It was not necessary; broke tests.
diff --git a/tests/test_commands.py b/tests/test_commands.py
index <HASH>..<HASH> 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -72,6 +72,17 @@ def test_commit_retry_works(mocker):
assert not os.path.isfile(temp_file)
+def test_commit_when_nothing_to_commit(mocker):
+ is_staging_clean_mock = mocker.patch("commitizen.git.is_staging_clean")
+ is_staging_clean_mock.return_value = True
+
+ with pytest.raises(SystemExit) as err:
+ commit_cmd = commands.Commit(config, {})
+ commit_cmd()
+
+ assert err.value.code == commands.commit.NOTHING_TO_COMMIT
+
+
def test_example():
with mock.patch("commitizen.out.write") as write_mock:
commands.Example(config)()
test(commands/commit): test aborting commit when there is nothing to commit
#<I>
diff --git a/src/test/java/com/messners/gitlab/api/TestGitLabApiEvents.java b/src/test/java/com/messners/gitlab/api/TestGitLabApiEvents.java
index <HASH>..<HASH> 100644
--- a/src/test/java/com/messners/gitlab/api/TestGitLabApiEvents.java
+++ b/src/test/java/com/messners/gitlab/api/TestGitLabApiEvents.java
@@ -11,8 +11,8 @@ import org.codehaus.jackson.map.ObjectMapper;
import org.junit.BeforeClass;
import org.junit.Test;
-import com.messners.gitlab.api.event.EventObject;
-import com.messners.gitlab.api.event.PushEvent;
+import com.messners.gitlab.api.webhook.EventObject;
+import com.messners.gitlab.api.webhook.PushEvent;
public class TestGitLabApiEvents {
Mods for renamed classes.
diff --git a/src/main/java/hex/DGLM.java b/src/main/java/hex/DGLM.java
index <HASH>..<HASH> 100644
--- a/src/main/java/hex/DGLM.java
+++ b/src/main/java/hex/DGLM.java
@@ -1214,7 +1214,7 @@ public abstract class DGLM {
} else {
int d = (int) data[i]; // Enum value d can be -1 if we got enum values not seen in training
if(d == 0) continue; // level 0 of factor is skipped (coef==0).
- if( d > 0 && (idx += d) < _colCatMap[i + 1] ) p += _beta[idx]/* *1.0 */;
+ if( d > 0 && (idx += d) <= _colCatMap[i + 1] ) p += _beta[idx-1]/* *1.0 */;
else // Enum out of range?
p = Double.NaN;// Can use a zero, or a NaN
}
diff --git a/src/Adapter/MapperInterface.php b/src/Adapter/MapperInterface.php
index <HASH>..<HASH> 100644
--- a/src/Adapter/MapperInterface.php
+++ b/src/Adapter/MapperInterface.php
@@ -33,5 +33,5 @@ interface MapperInterface
*
* @return void
*/
- public function map(array $input, MetadataInterface $output);
+ public function map(array $input, MetadataInterface &$output);
}
Bugfix: Mapper should use by-reference
diff --git a/ext/extconf.rb b/ext/extconf.rb
index <HASH>..<HASH> 100644
--- a/ext/extconf.rb
+++ b/ext/extconf.rb
@@ -48,7 +48,8 @@ def check_libmemcached
Dir.chdir(HERE) do
Dir.chdir(BUNDLE_PATH) do
- run("find . | xargs touch", "Touching all files so autoconf doesn't run.")
+ ts_now=Time.now.strftime("%Y%m%d%H%M.%S")
+ run("find . | xargs touch -t #{ts_now}", "Touching all files so autoconf doesn't run.")
run("env CFLAGS='-fPIC #{LIBM_CFLAGS}' LDFLAGS='-fPIC #{LIBM_LDFLAGS}' ./configure --prefix=#{HERE} --without-memcached --disable-shared --disable-utils --disable-dependency-tracking #{$CC} #{$EXTRA_CONF} 2>&1", "Configuring libmemcached.")
end
Determine timestamp to use one time, and then update all files with that timestamp
in order to avoid a possible race condition which could cause autoconf
to run
diff --git a/core/src/elements/ons-ripple/index.js b/core/src/elements/ons-ripple/index.js
index <HASH>..<HASH> 100644
--- a/core/src/elements/ons-ripple/index.js
+++ b/core/src/elements/ons-ripple/index.js
@@ -51,10 +51,18 @@ class RippleElement extends BaseElement {
*/
/**
- * @attribute center
+ * @attribute color
+ * @type {String}
+ * @description
+ * [en]Color of the ripple effect.[/en]
+ * [ja]リップルエフェクトの色を指定します。[/ja]
+ */
+
+ /**
+ * @attribute background
* @description
- * [en]If this attribute is set, the effect will originate from the center.[/en]
- * [ja]この属性が設定された場合、その効果は要素の中央から始まります。[/ja]
+ * [en]Color of the background.[/en]
+ * [ja]背景の色を設定します。[/ja]
*/
/**
docs(ons-ripple): Add docs for "background" attribute.
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -32,6 +32,7 @@ if __name__ == "__main__":
author_email="[email protected] ",
url="https://github.com/Salamek/cron-descriptor",
long_description=long_description,
+ long_description_content_type='text/markdown',
packages=setuptools.find_packages(),
package_data={
'cron_descriptor': [
Tell PyPI the long_description is markdown
As per [packaging tutorial](<URL>) (see bottom). This should render it as markdown on <URL>
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -29,7 +29,10 @@ dev_requires = docs_requires + [
from pathlib import Path
this_directory = Path(__file__).parent
-long_description = (this_directory / "README.md").read_text()
+readme_text = (this_directory / "README.md").read_text()
+parts = readme_text.partition("A library for event sourcing in Python.")
+long_description = "".join(parts[1:])
+
packages = [
"eventsourcing",
@@ -58,6 +61,7 @@ setup(
},
zip_safe=False,
long_description=long_description,
+ long_description_content_type="text/markdown",
keywords=[
"event sourcing",
"event store",
Trimmed README text for package (to avoid including links to buttons and project image).
diff --git a/algoliasearch/algoliasearch.py b/algoliasearch/algoliasearch.py
index <HASH>..<HASH> 100644
--- a/algoliasearch/algoliasearch.py
+++ b/algoliasearch/algoliasearch.py
@@ -195,7 +195,7 @@ class Client:
params['indexes'] = indexes
return AlgoliaUtils_request(self.headers, self.hosts, "POST", "/1/keys", params)
- def generate_secured_api_key(self, private_api_key, tag_filters, user_token = None):
+ def generateSecuredApiKey(self, private_api_key, tag_filters, user_token = None):
"""
Generate a secured and public API Key from a list of tagFilters and an
optional user token identifying the current user
diff --git a/src/saml2/sigver.py b/src/saml2/sigver.py
index <HASH>..<HASH> 100644
--- a/src/saml2/sigver.py
+++ b/src/saml2/sigver.py
@@ -27,7 +27,13 @@ import base64
import random
import os
-XMLSEC_BINARY = "/opt/local/bin/xmlsec1"
+def get_xmlsec_binary():
+ for path in ('/opt/local/bin/xmlsec1',
+ '/usr/bin/xmlsec1'):
+ if os.path.exists(path):
+ return path
+
+XMLSEC_BINARY = get_xmlsec_binary()
ID_ATTR = "ID"
NODE_NAME = "urn:oasis:names:tc:SAML:2.0:assertion:Assertion"
ENC_NODE_NAME = "urn:oasis:names:tc:SAML:2.0:assertion:EncryptedAssertion"
Added a function that attempts to find the xmlsec1 binaries, made by Lorenzo Gil Sanchez
diff --git a/tests/testnumbergen.py b/tests/testnumbergen.py
index <HASH>..<HASH> 100644
--- a/tests/testnumbergen.py
+++ b/tests/testnumbergen.py
@@ -18,7 +18,7 @@ class TestUniformRandom(unittest.TestCase):
seed=_seed,
lbound=lbound,
ubound=ubound)
- for _ in xrange(_iterations):
+ for _ in range(_iterations):
value = gen()
self.assertTrue(lbound <= value < ubound)
@@ -30,7 +30,7 @@ class TestUniformRandomOffset(unittest.TestCase):
seed=_seed,
mean=(ubound + lbound) / 2,
range=ubound - lbound)
- for _ in xrange(_iterations):
+ for _ in range(_iterations):
value = gen()
self.assertTrue(lbound <= value < ubound)
Fixed numbergen unit tests for Python 3 compatibility
diff --git a/lib/server/index.js b/lib/server/index.js
index <HASH>..<HASH> 100644
--- a/lib/server/index.js
+++ b/lib/server/index.js
@@ -47,11 +47,11 @@ module.exports = {
return callback(error);
}
- var html = data.toString().replace('</head>',
- '<script type="text/javascript" src="/socket.io/socket.io.js"></script>\n' +
- '<script type="text/javascript" src="/'
+ var html = data.toString().replace('</body>',
+ ' <script type="text/javascript" src="/socket.io/socket.io.js"></script>\n' +
+ ' <script type="text/javascript" src="/'
+ config.adapterPath + '/' + config.adapters + '"></script>\n' +
- '</head>\n');
+ ' </body>\n');
callback(null, html);
});
});
Issue #<I> Testee client script injection needs to move to the page body
diff --git a/easymode/admin/forms/fields.py b/easymode/admin/forms/fields.py
index <HASH>..<HASH> 100644
--- a/easymode/admin/forms/fields.py
+++ b/easymode/admin/forms/fields.py
@@ -37,6 +37,7 @@ class HtmlEntityField(fields.CharField):
entityless_value = re.sub(r'&[^;]+;', 'X', tagless_value)
else:
entityless_value = value
+ value = u''
# validate using super class
super(HtmlEntityField, self).clean(entityless_value)
Any HTMLField in easymode will now properly clean None as u''.
diff --git a/src/Type/FileTypeMapper.php b/src/Type/FileTypeMapper.php
index <HASH>..<HASH> 100644
--- a/src/Type/FileTypeMapper.php
+++ b/src/Type/FileTypeMapper.php
@@ -31,7 +31,7 @@ class FileTypeMapper
public function getTypeMap(string $fileName): array
{
- $cacheKey = sprintf('%s-%d-v3', $fileName, filemtime($fileName));
+ $cacheKey = sprintf('%s-%d-v4', $fileName, filemtime($fileName));
$cachedResult = $this->cache->load($cacheKey);
if ($cachedResult === null) {
$typeMap = $this->createTypeMap($fileName);
FileTypeMapper - bump cache version because of change in StaticType and bugfixes
diff --git a/src/foremast/pipeline/construct_pipeline_block_lambda.py b/src/foremast/pipeline/construct_pipeline_block_lambda.py
index <HASH>..<HASH> 100644
--- a/src/foremast/pipeline/construct_pipeline_block_lambda.py
+++ b/src/foremast/pipeline/construct_pipeline_block_lambda.py
@@ -64,7 +64,7 @@ def construct_pipeline_block_lambda(env='',
user_data = generate_encoded_user_data(env=env, region=region, app_name=gen_app_name, group_name=generated.project)
# Use different variable to keep template simple
- instance_security_groups = DEFAULT_EC2_SECURITYGROUPS[env]
+ instance_security_groups = sorted(DEFAULT_EC2_SECURITYGROUPS[env])
instance_security_groups.append(gen_app_name)
instance_security_groups.extend(settings['security_group']['instance_extras'])
added sorted to make a copy of the list so global variable is not mutated
diff --git a/src/bbn/User.php b/src/bbn/User.php
index <HASH>..<HASH> 100644
--- a/src/bbn/User.php
+++ b/src/bbn/User.php
@@ -273,6 +273,7 @@ class User extends Models\Cls\Basic
$this->_init_class_cfg($cfg);
$f =& $this->class_cfg['fields'];
+ self::retrieverInit($this);
if ($this->isToken() && !empty($params[$f['token']])) {
@@ -370,7 +371,6 @@ class User extends Models\Cls\Basic
// Creating the session's variables if they don't exist yet
$this->_init_session();
- self::retrieverInit($this);
/*
if (x::isCli() && isset($params['id'])) {
Fix in User, moved retrieverInit
diff --git a/tests/ObservableBunnyTest.php b/tests/ObservableBunnyTest.php
index <HASH>..<HASH> 100644
--- a/tests/ObservableBunnyTest.php
+++ b/tests/ObservableBunnyTest.php
@@ -55,9 +55,10 @@ final class ObservableBunnyTest extends TestCase
$messageDto = null;
$subject->subscribe(function (Message $message) use (&$messageDto, $subject) {
$messageDto = $message;
- $subject->dispose();
});
+ $loop->addTimer(2, [$subject, 'dispose']);
+
$loop->run();
self::assertSame($message, $messageDto->getMessage());
Dispose after the first message has been shipped
diff --git a/master/contrib/git_buildbot.py b/master/contrib/git_buildbot.py
index <HASH>..<HASH> 100755
--- a/master/contrib/git_buildbot.py
+++ b/master/contrib/git_buildbot.py
@@ -40,17 +40,17 @@ from optparse import OptionParser
master = "localhost:9989"
-# When sending the notification, send this category if
+# When sending the notification, send this category if (and only if)
# it's set (via --category)
category = None
-# When sending the notification, send this repository if
+# When sending the notification, send this repository if (and only if)
# it's set (via --repository)
repository = None
-# When sending the notification, send this project if
+# When sending the notification, send this project if (and only if)
# it's set (via --project)
project = None
replace iff with if (and only if) for non-math speakers ;)
diff --git a/validator/testcases/l10ncompleteness.py b/validator/testcases/l10ncompleteness.py
index <HASH>..<HASH> 100644
--- a/validator/testcases/l10ncompleteness.py
+++ b/validator/testcases/l10ncompleteness.py
@@ -1,6 +1,6 @@
import sys
import os
-import chardet
+import fastchardet
import json
import fnmatch
from StringIO import StringIO
@@ -336,7 +336,7 @@ def _parse_l10n_doc(name, doc, no_encoding=False):
# Allow the parse to specify files to skip for encoding checks
if not no_encoding:
- encoding = chardet.detect(doc)
+ encoding = fastchardet.detect(doc)
encoding["encoding"] = encoding["encoding"].upper()
loc_doc.expected_encoding = encoding["encoding"] in handler_formats
loc_doc.found_encoding = encoding["encoding"]
Added initial support for fastchardet
diff --git a/src/Illuminate/Http/Resources/Json/JsonResource.php b/src/Illuminate/Http/Resources/Json/JsonResource.php
index <HASH>..<HASH> 100644
--- a/src/Illuminate/Http/Resources/Json/JsonResource.php
+++ b/src/Illuminate/Http/Resources/Json/JsonResource.php
@@ -60,7 +60,7 @@ class JsonResource implements ArrayAccess, JsonSerializable, Responsable, UrlRou
/**
* Create a new resource instance.
*
- * @param dynamic $parameters
+ * @param mixed $parameters
* @return static
*/
public static function make(...$parameters)
Update DocBlock for PHP Analyses (#<I>)
diff --git a/activesupport/lib/active_support/testing/assertions.rb b/activesupport/lib/active_support/testing/assertions.rb
index <HASH>..<HASH> 100644
--- a/activesupport/lib/active_support/testing/assertions.rb
+++ b/activesupport/lib/active_support/testing/assertions.rb
@@ -167,7 +167,7 @@ module ActiveSupport
retval
end
- # Assertion that the result of evaluating an expression is changed before
+ # Assertion that the result of evaluating an expression is not changed before
# and after invoking the passed in block.
#
# assert_no_changes 'Status.all_good?' do
Add missing "not" in the doc for `assert_no_changes` [ci skip]
diff --git a/salt/config/__init__.py b/salt/config/__init__.py
index <HASH>..<HASH> 100644
--- a/salt/config/__init__.py
+++ b/salt/config/__init__.py
@@ -73,6 +73,10 @@ if salt.utils.platform.is_windows():
_MASTER_USER = "SYSTEM"
elif salt.utils.platform.is_proxy():
_DFLT_FQDNS_GRAINS = False
+ _DFLT_IPC_MODE = "ipc"
+ _DFLT_FQDNS_GRAINS = True
+ _MASTER_TRIES = 1
+ _MASTER_USER = salt.utils.user.get_user()
else:
_DFLT_IPC_MODE = "ipc"
_DFLT_FQDNS_GRAINS = True
Need additional default opions for proxy minions.
diff --git a/cli_helpers/tabular_output/output_formatter.py b/cli_helpers/tabular_output/output_formatter.py
index <HASH>..<HASH> 100644
--- a/cli_helpers/tabular_output/output_formatter.py
+++ b/cli_helpers/tabular_output/output_formatter.py
@@ -2,6 +2,7 @@
"""A generic tabular data output formatter interface."""
from __future__ import unicode_literals
+from six import text_type
from collections import namedtuple
from cli_helpers.compat import (text_type, binary_type, int_types, float_types,
@@ -102,7 +103,7 @@ class TabularOutputFormatter(object):
@property
def supported_formats(self):
"""The names of the supported output formats in a :class:`tuple`."""
- return tuple(self._output_formats.keys())
+ return tuple(map(text_type, self._output_formats.keys()))
@classmethod
def register_new_formatter(cls, format_name, handler, preprocessors=(),
Return the supported formats as a list of unicode strings.
diff --git a/merge.go b/merge.go
index <HASH>..<HASH> 100644
--- a/merge.go
+++ b/merge.go
@@ -267,8 +267,8 @@ func deepMerge(dstIn, src reflect.Value, visited map[uintptr]*visit, depth int,
return
}
default:
- overwriteFull := (!isEmptyValue(src) || overwriteWithEmptySrc) && (overwrite || isEmptyValue(dst))
- if overwriteFull {
+ mustSet := (!isEmptyValue(src) || overwriteWithEmptySrc) && (overwrite || isEmptyValue(dst))
+ if mustSet {
if dst.CanSet() {
dst.Set(src)
} else {
Improved name for the final condition to set
diff --git a/aeron-common/src/main/java/uk/co/real_logic/aeron/util/concurrent/logbuffer/LogBuffer.java b/aeron-common/src/main/java/uk/co/real_logic/aeron/util/concurrent/logbuffer/LogBuffer.java
index <HASH>..<HASH> 100644
--- a/aeron-common/src/main/java/uk/co/real_logic/aeron/util/concurrent/logbuffer/LogBuffer.java
+++ b/aeron-common/src/main/java/uk/co/real_logic/aeron/util/concurrent/logbuffer/LogBuffer.java
@@ -75,6 +75,7 @@ public class LogBuffer
{
logBuffer.setMemory(0, logBuffer.capacity(), (byte)0);
stateBuffer.setMemory(0, stateBuffer.capacity(), (byte)0);
+ statusOrdered(CLEAN);
}
/**
[Java:] Ensure cleaning writes are ordered.
diff --git a/fuel/utils.py b/fuel/utils.py
index <HASH>..<HASH> 100644
--- a/fuel/utils.py
+++ b/fuel/utils.py
@@ -1,7 +1,10 @@
import collections
+import os
import six
+from fuel import config
+
# See http://python3porting.com/differences.html#buffer
if six.PY3:
@@ -10,6 +13,32 @@ else:
buffer_ = buffer # noqa
+def find_in_data_path(filename):
+ """Searches for a file within Fuel's data path.
+
+ This function loops over all paths defined in Fuel's data path and
+ returns the first path in which the file is found.
+
+ Returns
+ -------
+ file_path : str
+ Path to the first file matching `filename` found in Fuel's
+ data path.
+
+ Raises
+ ------
+ IOError
+ If the file doesn't appear in Fuel's data path.
+
+ """
+ for path in config.data_path.split(os.path.pathsep):
+ path = os.path.expanduser(os.path.expandvars(path))
+ file_path = os.path.join(path, filename)
+ if os.path.isfile(file_path):
+ return file_path
+ raise IOError("{} not found in Fuel's data path".format(filename))
+
+
def lazy_property_factory(lazy_property):
"""Create properties that perform lazy loading of attributes."""
def lazy_property_getter(self):
Make fuel.config.data_path accept multiple directories
diff --git a/rflink/protocol.py b/rflink/protocol.py
index <HASH>..<HASH> 100644
--- a/rflink/protocol.py
+++ b/rflink/protocol.py
@@ -151,7 +151,7 @@ class PacketHandling(ProtocolBase):
try:
packet = decode_packet(raw_packet)
except BaseException:
- log.exception("failed to parse packet: %s", packet)
+ log.exception("failed to parse packet data: %s", raw_packet)
log.debug("decoded packet: %s", packet)
Improve debugging of failed packet parse
diff --git a/lib/OpenLayers/Renderer/Canvas.js b/lib/OpenLayers/Renderer/Canvas.js
index <HASH>..<HASH> 100644
--- a/lib/OpenLayers/Renderer/Canvas.js
+++ b/lib/OpenLayers/Renderer/Canvas.js
@@ -789,7 +789,7 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, {
var featureId, feature;
// if the drawing canvas isn't visible, return undefined.
- if (this.root.style.display === "none") return feature;
+ if (this.root.style.display === "none") { return feature; }
if (this.hitDetection) {
// this dragging check should go in the feature handler
being a good coder and adding braces around if statement body
diff --git a/src/utils/test.js b/src/utils/test.js
index <HASH>..<HASH> 100644
--- a/src/utils/test.js
+++ b/src/utils/test.js
@@ -256,6 +256,19 @@ describe('graphology-utils', function () {
assert.strictEqual(newGraph.edge(1, 2), 'rel1');
assert.strictEqual(newGraph.edge(2, 3), 'rel2');
});
+
+ it.skip('should work with undirected graphs.', function () {
+ var graph = new Graph({type: 'undirected'});
+ graph.mergeEdge('Jon', 'Ishtar');
+ graph.mergeEdge('Julia', 'Robin');
+
+ var newGraph = renameGraphKeys(graph, {
+ Jon: 'Joseph',
+ Ishtar: 'Quixal'
+ });
+
+ console.log(newGraph);
+ });
});
describe('updateGraphKeys', function () {
Adding unit test related to #<I>
diff --git a/dhcpcanon/timers.py b/dhcpcanon/timers.py
index <HASH>..<HASH> 100644
--- a/dhcpcanon/timers.py
+++ b/dhcpcanon/timers.py
@@ -9,8 +9,8 @@ import random
from pytz import utc
from datetime import datetime, timedelta
-from constants import MAX_DELAY_SELECTING, RENEW_PERC, REBIND_PERC
-from constants import DT_PRINT_FORMAT
+from .constants import MAX_DELAY_SELECTING, RENEW_PERC, REBIND_PERC
+from .constants import DT_PRINT_FORMAT
logger = logging.getLogger(__name__)
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -20,12 +20,11 @@ setup(
url=dhcpcanon.__website__,
packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
install_requires=[
- "scapy>=2.2",
+ 'scapy>=2.2";python_version<="2.7"',
+ 'scapy-python3>=0.21;python_version>="3.4"',
"netaddr>=0.7",
- "ipaddr>=2.1",
"pytz>=2016.6",
"pip>=8.1",
- "pyroute2>=0.4",
"attrs>=16.3",
"daemon>=1.1"
],
Remove not used dependencies and modify imports for python 3
diff --git a/dictobj.py b/dictobj.py
index <HASH>..<HASH> 100644
--- a/dictobj.py
+++ b/dictobj.py
@@ -143,6 +143,8 @@ class DictionaryObject(object):
if -1 == val:
if self._defaultIsSet:
if rhs._defaultIsSet:
+ if self._defaultValue is None and rhs._defaultValue is None:
+ return True
return -1 == cmp(self._defaultValue, rhs._defaultValue)
else:
return False
Fix comparison tests when both default values are None.
diff --git a/lib/discordrb/data.rb b/lib/discordrb/data.rb
index <HASH>..<HASH> 100644
--- a/lib/discordrb/data.rb
+++ b/lib/discordrb/data.rb
@@ -319,19 +319,15 @@ module Discordrb
# @return [true, false] whether this member is muted server-wide.
attr_reader :mute
- alias_method :muted?, :mute
# @return [true, false] whether this member is deafened server-wide.
attr_reader :deaf
- alias_method :deafened?, :deaf
# @return [true, false] whether this member has muted themselves.
attr_reader :self_mute
- alias_method :self_muted?, :self_mute
# @return [true, false] whether this member has deafened themselves.
attr_reader :self_deaf
- alias_method :self_deafened?, :self_deaf
def initialize(user_id)
@user_id = user_id
Remove the mute/deaf aliases from VoiceState as they're only marginally useful there
diff --git a/salt/modules/win_system.py b/salt/modules/win_system.py
index <HASH>..<HASH> 100644
--- a/salt/modules/win_system.py
+++ b/salt/modules/win_system.py
@@ -207,6 +207,8 @@ def set_computer_desc(desc):
__salt__['cmd.run'](cmd)
return {'Computer Description': get_computer_desc()}
+set_computer_description = set_computer_desc
+
def get_computer_desc():
'''
Alias set_computer_description to set_computer_desc
diff --git a/lib/questionlib.php b/lib/questionlib.php
index <HASH>..<HASH> 100644
--- a/lib/questionlib.php
+++ b/lib/questionlib.php
@@ -1926,9 +1926,6 @@ function question_format_grade($cmoptions, $grade) {
*/
function question_init_qenginejs_script() {
global $CFG;
-
- // Get the properties we want into a PHP array first, becase that is easier
- // to build.
$config = array(
'pixpath' => $CFG->pixpath,
'wwwroot' => $CFG->wwwroot,
@@ -1937,16 +1934,7 @@ function question_init_qenginejs_script() {
'flaggedalt' => get_string('flagged', 'question'),
'unflaggedalt' => get_string('notflagged', 'question'),
);
-
- // Then generate the script tag.
- $lines = array();
- foreach ($config as $property => $value) {
- $lines[] = ' ' . $property . ': "' . addslashes_js($value) . '"';
- }
- $script = '<script type="text/javascript">qengine_config = {' . "\n" .
- implode(",\n", $lines) .
- "\n};</script>\n";
- return $script;
+ return print_js_config($config, 'qengine_config', true);
}
/// FUNCTIONS THAT SIMPLY WRAP QUESTIONTYPE METHODS //////////////////////////////////
Update to use print_js_config.
diff --git a/lib/lita/adapters/shell.rb b/lib/lita/adapters/shell.rb
index <HASH>..<HASH> 100644
--- a/lib/lita/adapters/shell.rb
+++ b/lib/lita/adapters/shell.rb
@@ -2,6 +2,7 @@ module Lita
module Adapters
class Shell < Adapter
def run
+ puts 'Type "exit" or "quit" to end the session.'
loop do
print "#{robot.name} > "
input = gets.chomp.strip
diff --git a/spec/lita/adapters/shell_spec.rb b/spec/lita/adapters/shell_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/lita/adapters/shell_spec.rb
+++ b/spec/lita/adapters/shell_spec.rb
@@ -8,6 +8,8 @@ describe Lita::Adapters::Shell do
subject { described_class.new(robot) }
describe "#run" do
+ before { allow(subject).to receive(:puts) }
+
it "passes input to the Robot and breaks on an exit message" do
expect(subject).to receive(:print).with("#{robot.name} > ").twice
allow(subject).to receive(:gets).and_return("foo", "exit")
Add an opening message to the Shell session.
diff --git a/lib/transforms/insertColumn.js b/lib/transforms/insertColumn.js
index <HASH>..<HASH> 100644
--- a/lib/transforms/insertColumn.js
+++ b/lib/transforms/insertColumn.js
@@ -1,4 +1,5 @@
const TablePosition = require('../TablePosition');
+const moveSelection = require('./moveSelection');
const createCell = require('../createCell');
/**
@@ -38,8 +39,9 @@ function insertColumn(opts, transform, at) {
});
// Replace the table
- return transform
- .setNodeByKey(table.key, newTable);
+ transform = transform.setNodeByKey(table.key, newTable);
+ // Update the selection (not doing can break the undo)
+ return moveSelection(opts, transform, pos.getColumnIndex() + 1, pos.getRowIndex());
}
module.exports = insertColumn;
Fix undo of insertColumn when cursor is in inserted column
diff --git a/code/libraries/koowa/components/com_activities/view/activities/json.php b/code/libraries/koowa/components/com_activities/view/activities/json.php
index <HASH>..<HASH> 100644
--- a/code/libraries/koowa/components/com_activities/view/activities/json.php
+++ b/code/libraries/koowa/components/com_activities/view/activities/json.php
@@ -82,7 +82,7 @@ class ComActivitiesViewActivitiesJson extends KViewJson
$item = array(
'id' => $activity->getActivityId(),
- 'title' => $renderer->render($activity),
+ 'title' => $renderer->render($activity, array('escaped_urls' => false, 'fqr' => true)),
'story' => $renderer->render($activity, array('html' => false)),
'published' => $activity->getActivityPublished()->format('c'),
'verb' => $activity->getActivityVerb(),
re #<I> Ask for fully qualified routes.
diff --git a/lib/cloud_providers/connections.rb b/lib/cloud_providers/connections.rb
index <HASH>..<HASH> 100644
--- a/lib/cloud_providers/connections.rb
+++ b/lib/cloud_providers/connections.rb
@@ -88,7 +88,7 @@ module CloudProviders
raise StandardError.new("You must pass a :source=>uri option to rsync") unless opts[:source]
destination_path = opts[:destination] || opts[:source]
rsync_opts = opts[:rsync_opts] || '-va'
- rsync_opts += %q% --rsync-path="sudo rsync" %
+ rsync_opts += %q% --rsync-path="sudo rsync" --exclude=.svn --exclude=.git --exclude=.cvs %
cmd_string = "rsync -L -e 'ssh #{ssh_options}' #{rsync_opts} #{opts[:source]} #{user}@#{host}:#{destination_path}"
out = system_run(cmd_string)
out
Added standard VCS files to rsync excludes to speed up transfer
diff --git a/Kwf_js/Form/ComboBox.js b/Kwf_js/Form/ComboBox.js
index <HASH>..<HASH> 100644
--- a/Kwf_js/Form/ComboBox.js
+++ b/Kwf_js/Form/ComboBox.js
@@ -73,6 +73,9 @@ Kwf.Form.ComboBox = Ext.extend(Ext.form.ComboBox,
reader: reader
};
Ext.apply(storeConfig, this.storeConfig);
+ if (typeof storeConfig.remoteSort == 'undefined') {
+ storeConfig.remoteSort = proxy instanceof Ext.data.HttpProxy;
+ }
if (store.type && Ext.data[store.type]) {
this.store = new Ext.data[store.type](storeConfig);
} else if (store.type) {
set remoteSort for store when using httpProxy
this is required for SuperBoxSelect so it doesn't sort locally
diff --git a/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php b/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php
index <HASH>..<HASH> 100644
--- a/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php
+++ b/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php
@@ -116,4 +116,9 @@ class SQLServer2008Platform extends SQLServer2005Platform
{
return Keywords\SQLServer2008Keywords::class;
}
+
+ protected function getLikeWildcardCharacters() : iterable
+ {
+ return array_merge(parent::getLikeWildcardCharacters(), ['[', ']', '^']);
+ }
}
Add more meta-characters for some MS platforms
The docs only talk about <I> and up, not sure if those should be added
to <I> too.
diff --git a/activesupport/lib/active_support/security_utils.rb b/activesupport/lib/active_support/security_utils.rb
index <HASH>..<HASH> 100644
--- a/activesupport/lib/active_support/security_utils.rb
+++ b/activesupport/lib/active_support/security_utils.rb
@@ -19,12 +19,14 @@ module ActiveSupport
end
module_function :fixed_length_secure_compare
- # Constant time string comparison, for variable length strings.
+ # Secure string comparison for strings of variable length.
#
- # The values are first processed by SHA256, so that we don't leak length info
- # via timing attacks.
+ # While a timing attack would not be able to discern the content of
+ # a secret compared via secure_compare, it is possible to determine
+ # the secret length. This should be considered when using secure_compare
+ # to compare weak, short secrets to user input.
def secure_compare(a, b)
- fixed_length_secure_compare(::Digest::SHA256.digest(a), ::Digest::SHA256.digest(b)) && a == b
+ a.length == b.length && fixed_length_secure_compare(a, b)
end
module_function :secure_compare
end
Remove hashing from secure_compare and clarify documentation
diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb
index <HASH>..<HASH> 100644
--- a/lib/chef/knife/ssh.rb
+++ b/lib/chef/knife/ssh.rb
@@ -560,6 +560,11 @@ class Chef
config[:ssh_password] = get_stripped_unfrozen_value(ssh_password ||
Chef::Config[:knife][:ssh_password])
end
+
+ # CHEF-4342 Diable host key verification if a password has been given.
+ if config[:ssh_password]
+ config[:host_key_verify] = false
+ end
end
def configure_ssh_identity_file
Fix "knife ssh" authentication scheme #<I>
Affects at least knife <I>
When a user uses knife ssh in "password, not key" mode, it fails.
diff --git a/visidata/loaders/json.py b/visidata/loaders/json.py
index <HASH>..<HASH> 100644
--- a/visidata/loaders/json.py
+++ b/visidata/loaders/json.py
@@ -45,16 +45,20 @@ class JSONSheet(Sheet):
with self.source.open_text() as fp:
self.rows = []
for L in fp:
- self.addRow(json.loads(L))
+ try:
+ self.addRow(json.loads(L))
+ except Exception as e:
+ pass # self.addRow(e)
def addRow(self, row, index=None):
super().addRow(row, index=index)
- for k in row:
- if k not in self.colnames:
- c = ColumnItem(k, type=deduceType(row[k]))
- self.colnames[k] = c
- self.addColumn(c)
- return row
+ if isinstance(row, dict):
+ for k in row:
+ if k not in self.colnames:
+ c = ColumnItem(k, type=deduceType(row[k]))
+ self.colnames[k] = c
+ self.addColumn(c)
+ return row
def newRow(self):
return {}
[json] make loader more robust
diff --git a/flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java b/flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java
index <HASH>..<HASH> 100644
--- a/flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java
+++ b/flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java
@@ -156,7 +156,7 @@ public final class Utils {
Path dst = new Path(homedir, suffix);
- LOG.debug("Copying from " + localSrcPath + " to " + dst);
+ LOG.debug("Copying from {} to {}", localSrcPath, dst);
fs.copyFromLocalFile(false, true, localSrcPath, dst);
[hotfix] Replace String concatenation with Slf4j placeholders.
diff --git a/library/CM/SmartyPlugins/function.resource.php b/library/CM/SmartyPlugins/function.resource.php
index <HASH>..<HASH> 100644
--- a/library/CM/SmartyPlugins/function.resource.php
+++ b/library/CM/SmartyPlugins/function.resource.php
@@ -34,7 +34,7 @@ function smarty_helper_resource_internal(CM_Render $render) {
// Sorts all classes according to inheritance order, pairs them with path
$phpClasses = CM_View_Abstract::getClasses($render->getSite()->getNamespaces(), CM_View_Abstract::CONTEXT_JAVASCRIPT);
foreach ($phpClasses as $path => $className) {
- $path = str_replace(DIR_ROOT, '', $path);
+ $path = str_replace(DIR_ROOT, '/', $path);
$path = str_replace(DIRECTORY_SEPARATOR, '/', $path);
$paths[] = preg_replace('#\.php$#', '.js', $path);
}
Fix: Dev resource paths should be absolute
diff --git a/examples/nexrad/nexrad_copy.py b/examples/nexrad/nexrad_copy.py
index <HASH>..<HASH> 100644
--- a/examples/nexrad/nexrad_copy.py
+++ b/examples/nexrad/nexrad_copy.py
@@ -106,7 +106,7 @@ logger.info('ref_data.shape: {}'.format(ref_data.shape))
# https://stackoverflow.com/questions/7222382/get-lat-long-given-current-point-distance-and-bearing
def offset_by_meters(lat, lon, dist, bearing):
R = 6378.1
- bearing_rads = np.deg2rad(az)[:, None]
+ bearing_rads = np.deg2rad(bearing)[:, None]
dist_km = dist / 1000.0
lat1 = np.radians(lat)
Use bearing function parameter instead of az
The function was working by coincidence but it was using a global
variable. Fix it by using the parameter `bearing` passed to it.
Thanks to Goizueta, the reviewer :)
diff --git a/src/jpa-engine/core/src/test/java/com/impetus/kundera/utils/LuceneCleanupUtilities.java b/src/jpa-engine/core/src/test/java/com/impetus/kundera/utils/LuceneCleanupUtilities.java
index <HASH>..<HASH> 100644
--- a/src/jpa-engine/core/src/test/java/com/impetus/kundera/utils/LuceneCleanupUtilities.java
+++ b/src/jpa-engine/core/src/test/java/com/impetus/kundera/utils/LuceneCleanupUtilities.java
@@ -53,10 +53,14 @@ public class LuceneCleanupUtilities
{
for (File file : files)
{
- // Delete each file
- if (!file.delete())
- {
- }
+ if(file.isDirectory() && !(file.list().length==0)){
+
+ cleanDir(file.getPath());
+ file.delete();
+ }else{
+ file.delete();
+ }
+
}
}
}
for recursively cleaning the directory
diff --git a/icekit/utils/testing.py b/icekit/utils/testing.py
index <HASH>..<HASH> 100644
--- a/icekit/utils/testing.py
+++ b/icekit/utils/testing.py
@@ -4,11 +4,13 @@ import os
import uuid
from django.conf import settings
+from nose.tools import nottest
from PIL import Image, ImageDraw
+@nottest
@contextlib.contextmanager
-def get_sample_image(storage):
+def get_test_image(storage):
"""
Context manager that creates an image with the given storage class, returns
a storage name, and cleans up (including thumbnails) when done.
diff --git a/icekit/utils/tests.py b/icekit/utils/tests.py
index <HASH>..<HASH> 100644
--- a/icekit/utils/tests.py
+++ b/icekit/utils/tests.py
@@ -5,15 +5,15 @@ from django.conf import settings
from django_dynamic_fixture import G
from django_webtest import WebTest
-from icekit.utils.testing import get_sample_image
+from icekit.utils import testing
from icekit.tests.models import ImageTest
class TestingUtils(WebTest):
- def test_get_sample_image(self):
+ def test_get_test_image(self):
image_test = G(ImageTest)
- with get_sample_image(image_test.image.storage) as image_name:
+ with testing.get_test_image(image_test.image.storage) as image_name:
# Check that the image was created.
image_test.image = image_name
self.assertTrue(os.path.exists(image_test.image.path))
Rename `get_sample_image()` to `get_test_image()` and tell Nose it is not a test.
diff --git a/commands/commands.go b/commands/commands.go
index <HASH>..<HASH> 100644
--- a/commands/commands.go
+++ b/commands/commands.go
@@ -86,6 +86,7 @@ func (c *Command) Usage() {
func (c *Command) Parse() {
core.SetupDebugging(c.FlagSet)
+ c.FlagSet.SetOutput(core.ErrorWriter)
c.FlagSet.Parse(c.Args)
}
FlagSet errors should go to the panic log too
diff --git a/msaf/run.py b/msaf/run.py
index <HASH>..<HASH> 100644
--- a/msaf/run.py
+++ b/msaf/run.py
@@ -355,9 +355,9 @@ def process(in_path, annot_beats=False, feature="pcp", framesync=False,
# TODO: Only save if needed
# Save estimations
- # msaf.utils.ensure_dir(os.path.dirname(file_struct.est_file))
- # io.save_estimations(file_struct, est_times, est_labels,
- # boundaries_id, labels_id, **config)
+ msaf.utils.ensure_dir(os.path.dirname(file_struct.est_file))
+ io.save_estimations(file_struct, est_times, est_labels,
+ boundaries_id, labels_id, **config)
return est_times, est_labels
else:
Single file process saves estimations
This commented lines produced this issue <URL>
diff --git a/base.php b/base.php
index <HASH>..<HASH> 100644
--- a/base.php
+++ b/base.php
@@ -1143,7 +1143,7 @@ final class Base {
foreach (str_split($body,1024) as $part) {
// Throttle output
$ctr++;
- if ($ctr/$kbps>$elapsed=microtime(TRUE)-$now &&
+ if ($ctr/$kbps>($elapsed=microtime(TRUE)-$now) &&
!connection_aborted())
usleep(1e6*($ctr/$kbps-$elapsed));
echo $part;
Bug fix: Calculation of elapsed time
diff --git a/telethon/sessions/memory.py b/telethon/sessions/memory.py
index <HASH>..<HASH> 100644
--- a/telethon/sessions/memory.py
+++ b/telethon/sessions/memory.py
@@ -228,7 +228,7 @@ class MemorySession(Session):
def cache_file(self, md5_digest, file_size, instance):
if not isinstance(instance, (InputDocument, InputPhoto)):
raise TypeError('Cannot cache %s instance' % type(instance))
- key = (md5_digest, file_size, _SentFileType.from_type(instance))
+ key = (md5_digest, file_size, _SentFileType.from_type(type(instance)))
value = (instance.id, instance.access_hash)
self._files[key] = value
Fix MemorySession file caching
diff --git a/vault/testing.go b/vault/testing.go
index <HASH>..<HASH> 100644
--- a/vault/testing.go
+++ b/vault/testing.go
@@ -790,7 +790,6 @@ func TestCluster(t testing.TB, handlers []http.Handler, base *CoreConfig, unseal
if err != nil {
t.Fatalf("err: %v", err)
}
- c1.redirectAddr = coreConfig.RedirectAddr
coreConfig.RedirectAddr = fmt.Sprintf("https://127.0.0.1:%d", c2lns[0].Address.Port)
if coreConfig.ClusterAddr != "" {
@@ -800,7 +799,6 @@ func TestCluster(t testing.TB, handlers []http.Handler, base *CoreConfig, unseal
if err != nil {
t.Fatalf("err: %v", err)
}
- c2.redirectAddr = coreConfig.RedirectAddr
coreConfig.RedirectAddr = fmt.Sprintf("https://127.0.0.1:%d", c3lns[0].Address.Port)
if coreConfig.ClusterAddr != "" {
@@ -810,7 +808,6 @@ func TestCluster(t testing.TB, handlers []http.Handler, base *CoreConfig, unseal
if err != nil {
t.Fatalf("err: %v", err)
}
- c2.redirectAddr = coreConfig.RedirectAddr
//
// Clustering setup
Don't need to explictly set redirectAddrs
diff --git a/lib/get/onValue.js b/lib/get/onValue.js
index <HASH>..<HASH> 100644
--- a/lib/get/onValue.js
+++ b/lib/get/onValue.js
@@ -36,7 +36,7 @@ module.exports = function onValue(model, node, seedOrFunction, outerResults, per
}
else if (outputFormat === "JSONG") {
- if (typeof node.value === "object") {
+ if (node.value && typeof node.value === "object") {
valueNode = clone(node);
} else {
valueNode = node.value;
made it so null is not output as an atom.
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ if sys.version_info <= (3, 1):
setup(
name="ss",
- version="1.5.1",
+ version="1.5.2",
packages=[],
scripts=['ss.py'],
py_modules=['ss'],
diff --git a/ss.py b/ss.py
index <HASH>..<HASH> 100644
--- a/ss.py
+++ b/ss.py
@@ -18,7 +18,7 @@ import guessit
init(autoreset=True)
-__version__ = '1.5.0'
+__version__ = '1.5.2'
if sys.version_info[0] == 3: # pragma: no cover
from urllib.request import urlopen
Bumping version to <I>
Fixes #<I>
diff --git a/runtime/API.js b/runtime/API.js
index <HASH>..<HASH> 100644
--- a/runtime/API.js
+++ b/runtime/API.js
@@ -137,6 +137,8 @@ function buildClass(base, def) {
this._es6now = {
+ version: "0.7.1",
+
class: buildClass,
// Support for iterator protocol
diff --git a/src/NodeRun.js b/src/NodeRun.js
index <HASH>..<HASH> 100644
--- a/src/NodeRun.js
+++ b/src/NodeRun.js
@@ -104,6 +104,8 @@ export function startREPL() {
addExtension();
+ console.log(`es6now ${ _es6now.version } (Node ${ process.version })`);
+
// Provide a way to load a module from the REPL
global.loadModule = path => __load(global.require.resolve(path));
diff --git a/src/Runtime.js b/src/Runtime.js
index <HASH>..<HASH> 100644
--- a/src/Runtime.js
+++ b/src/Runtime.js
@@ -141,6 +141,8 @@ function buildClass(base, def) {
this._es6now = {
+ version: "0.7.1",
+
class: buildClass,
// Support for iterator protocol
Output the version of es6now and Node when we start the REPL.
diff --git a/course/report.php b/course/report.php
index <HASH>..<HASH> 100644
--- a/course/report.php
+++ b/course/report.php
@@ -21,7 +21,7 @@
$navigation = build_navigation($navlinks);
print_header($course->fullname.': '.$strreports, $course->fullname.': '.$strreports, $navigation);
- $reports = get_plugin_list('report');
+ $reports = get_plugin_list('coursereport');
foreach ($reports as $report => $reportdirectory) {
$pluginfile = $reportdirectory.'/mod.php';
course-reports MDL-<I> Fixed broken reports, changed plugin list type to coursereport
diff --git a/components/select-ng/select-ng__lazy.js b/components/select-ng/select-ng__lazy.js
index <HASH>..<HASH> 100644
--- a/components/select-ng/select-ng__lazy.js
+++ b/components/select-ng/select-ng__lazy.js
@@ -38,11 +38,11 @@ class SelectLazy {
}
attachEvents() {
- this.container.addEventListener('click', this.onClick, {capture: true, once: true});
+ this.container.addEventListener('click', this.onClick, {capture: true});
}
detachEvents() {
- this.container.removeEventListener('click', this.onClick);
+ this.container.removeEventListener('click', this.onClick, {capture: true});
}
render(props) {
RG-<I> use {capture: true} for removeEventListener too
diff --git a/src/Extensions/BlockArchiveExtension.php b/src/Extensions/BlockArchiveExtension.php
index <HASH>..<HASH> 100644
--- a/src/Extensions/BlockArchiveExtension.php
+++ b/src/Extensions/BlockArchiveExtension.php
@@ -48,7 +48,7 @@ class BlockArchiveExtension extends DataExtension implements ArchiveViewProvider
'Breadcrumbs' => function ($val, $item) {
$parent = $item->Page;
- return $parent ? $parent->Breadcrumbs() : null;
+ return ($parent && $parent->hasMethod('Breadcrumbs')) ? $parent->Breadcrumbs() : null;
},
'allVersions.first.LastEdited' => function ($val, $item) {
return DBDatetime::create_field('Datetime', $val)->Ago();
FIX Prevent exception when parent does not have breadcrumbs
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,8 @@ install_requires = [
# List your project dependencies here.
# For more details, see:
# http://packages.python.org/distribute/setuptools.html#declaring-dependencies
- "enum", "lxml", "networkx", "pygraphviz"
+ "enum", "lxml", "networkx", "pygraphviz",
+ "brewer2mpl", "unidecode"
]
added missing packages to setup.py
diff --git a/lib/monologue/engine.rb b/lib/monologue/engine.rb
index <HASH>..<HASH> 100644
--- a/lib/monologue/engine.rb
+++ b/lib/monologue/engine.rb
@@ -15,7 +15,7 @@ module Monologue
config.generators.fixture_replacement :factory_girl
config.generators.integration_tool :rspec
- initializer "monologue.assets.precompile" do |app|
+ initializer 'monologue.assets.precompile' do |app|
app.config.assets.paths << Rails.root.join('vendor', 'assets', 'fonts')
app.config.assets.precompile += %w[
monologue/admin/ckeditor-config.js
@@ -23,7 +23,7 @@ module Monologue
]
end
- initializer "monologue.configuration", :before => :load_config_initializers do |app|
+ initializer 'monologue.configuration', :before => :load_config_initializers do |app|
app.config.monologue = Monologue::Configuration.new
Monologue::Config = app.config.monologue
end
Fixes #<I>. small refactoring
diff --git a/src/Jira/Api/Client/CurlClient.php b/src/Jira/Api/Client/CurlClient.php
index <HASH>..<HASH> 100644
--- a/src/Jira/Api/Client/CurlClient.php
+++ b/src/Jira/Api/Client/CurlClient.php
@@ -90,6 +90,7 @@ class CurlClient implements ClientInterface
if ($method == 'POST') {
curl_setopt($curl, CURLOPT_POST, 1);
if ($isFile) {
+ $data['file'] = $this->getCurlValue($data['file']);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
} else {
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data));
@@ -122,4 +123,19 @@ class CurlClient implements ClientInterface
return $data;
}
+
+ /**
+ * If necessary, replace curl file @ string with a CURLFile object (for PHP 5.5 and up)
+ *
+ * @param string $fileString The string in @-format as it is used on PHP 5.4 and older.
+ * @return \CURLFile|string
+ */
+ protected function getCurlValue($fileString)
+ {
+ if (!function_exists('curl_file_create')) {
+ return $fileString;
+ }
+
+ return curl_file_create(substr($fileString, 1));
+ }
}
Fixing deprecated error when uploading file attachments in PHP <I>+
diff --git a/php/commands/cron.php b/php/commands/cron.php
index <HASH>..<HASH> 100644
--- a/php/commands/cron.php
+++ b/php/commands/cron.php
@@ -487,6 +487,13 @@ class Cron_Command extends WP_CLI_Command {
/**
* Test the WP Cron spawning system and report back its status.
+ *
+ * This command tests the spawning system by performing the following steps:
+ * * Checks to see if the `DISABLE_WP_CRON` constant is set; errors if true
+ * because WP-Cron is disabled.
+ * * Checks to see if the `ALTERNATE_WP_CRON` constant is set; warns if true
+ * * Attempts to spawn WP-Cron over HTTP; warns if non 200 response code is
+ * returned.
*/
public function test() {
Explain what `wp cron test` actually does
diff --git a/lib/Rackem/Rack.php b/lib/Rackem/Rack.php
index <HASH>..<HASH> 100644
--- a/lib/Rackem/Rack.php
+++ b/lib/Rackem/Rack.php
@@ -23,7 +23,7 @@ class Rack
"rack.multithread" => false,
"rack.multiprocess" => false,
"rack.run_once" => false,
- "rack.session" => &$_SESSION,
+ "rack.session" => array(),
"rack.logger" => ""
));
return new \ArrayObject($env);
don't bother with the $_SESSION global
diff --git a/providers/oura/oura.go b/providers/oura/oura.go
index <HASH>..<HASH> 100644
--- a/providers/oura/oura.go
+++ b/providers/oura/oura.go
@@ -131,13 +131,26 @@ func userFromReader(reader io.Reader, user *goth.User) error {
return err
}
+ rawData := make(map[string]interface{})
+
+ if u.Age != 0 {
+ rawData["age"] = u.Age
+ }
+ if u.Weight != 0 {
+ rawData["weight"] = u.Weight
+ }
+ if u.Height != 0 {
+ rawData["height"] = u.Height
+ }
+ if u.Gender != "" {
+ rawData["gender"] = u.Gender
+ }
+
user.UserID = u.UserID
user.Email = u.Email
- user.RawData = make(map[string]interface{})
- user.RawData["age"] = u.Age
- user.RawData["weight"] = u.Weight
- user.RawData["height"] = u.Height
- user.RawData["gender"] = u.Gender
+ if len(rawData) > 0 {
+ user.RawData = rawData
+ }
return err
}
Update FetchUser to only fill populated fields in RawData
diff --git a/persistence/jdbc/src/main/java/org/infinispan/persistence/jdbc/table/management/OracleTableManager.java b/persistence/jdbc/src/main/java/org/infinispan/persistence/jdbc/table/management/OracleTableManager.java
index <HASH>..<HASH> 100644
--- a/persistence/jdbc/src/main/java/org/infinispan/persistence/jdbc/table/management/OracleTableManager.java
+++ b/persistence/jdbc/src/main/java/org/infinispan/persistence/jdbc/table/management/OracleTableManager.java
@@ -83,6 +83,10 @@ class OracleTableManager extends AbstractTableManager {
return indexName;
}
+ protected String getDropTimestampSql() {
+ return String.format("DROP INDEX %s", getIndexName(true));
+ }
+
@Override
public String getInsertRowSql() {
if (insertRowSql == null) {
ISPN-<I> Drop Index fails on Oracle DBs
diff --git a/src/views/ticket/_clientInfo.php b/src/views/ticket/_clientInfo.php
index <HASH>..<HASH> 100644
--- a/src/views/ticket/_clientInfo.php
+++ b/src/views/ticket/_clientInfo.php
@@ -60,11 +60,14 @@ $this->registerCss('
<?= ClientGridView::detailView([
'model' => $client,
'boxed' => false,
- 'columns' => $client->login === 'anonym' ? ['name', 'email'] : [
- 'name', 'email', 'messengers', 'country', 'language',
- 'state', 'balance', 'credit',
- 'servers_spoiler', 'domains_spoiler', 'hosting',
- ],
+ 'columns' => array_filter(
+ $client->login === 'anonym' ? ['name', 'email'] : [
+ 'name', 'email', 'messengers', 'country', 'language', 'state',
+ Yii::$app->user->can('bill.read') ? 'balance' : null,
+ Yii::$app->user->can('bill.read') ? 'credit' : null,
+ 'servers_spoiler', 'domains_spoiler', 'hosting',
+ ]
+ ),
]) ?>
<?php if ($client->login !== 'anonym') : ?>
hidden balance and credit if can not `bill.read`
diff --git a/src/Dingo/Api/Facades/API.php b/src/Dingo/Api/Facades/API.php
index <HASH>..<HASH> 100644
--- a/src/Dingo/Api/Facades/API.php
+++ b/src/Dingo/Api/Facades/API.php
@@ -1,6 +1,7 @@
<?php namespace Dingo\Api\Facades;
use Closure;
+use Dingo\Api\Http\InternalRequest;
use Illuminate\Support\Facades\Facade;
/**
@@ -37,4 +38,14 @@ class API extends Facade {
return static::$app['dingo.api.authorization']->token($payload);
}
+ /**
+ * Determine if a request is internal.
+ *
+ * @return bool
+ */
+ public static function internal()
+ {
+ return static::$app['router']->getCurrentRequest() instanceof InternalRequest;
+ }
+
}
\ No newline at end of file
Method to check if request is internal.
diff --git a/Controller/CRUDController.php b/Controller/CRUDController.php
index <HASH>..<HASH> 100644
--- a/Controller/CRUDController.php
+++ b/Controller/CRUDController.php
@@ -391,8 +391,10 @@ class CRUDController extends Controller
*/
public function batchAction()
{
- if ($this->getRestMethod() != 'POST') {
- throw new \RuntimeException('invalid request type, POST expected');
+ $restMethod = $this->getRestMethod();
+
+ if ('POST' !== $restMethod) {
+ throw $this->createNotFoundException(sprintf('Invalid request type "%s", POST expected', $restMethod));
}
// check the csrf token
Throw http not found exception instead of runtime
Avoids a <I> server error.
diff --git a/functions/functions-twig.php b/functions/functions-twig.php
index <HASH>..<HASH> 100644
--- a/functions/functions-twig.php
+++ b/functions/functions-twig.php
@@ -36,10 +36,17 @@
$twig->addFilter('wp_title', new Twig_Filter_Function('twig_wp_title'));
$twig->addFilter('wp_sidebar', new Twig_Filter_Function('twig_wp_sidebar'));
+ $twig->addFilter('get_post_info', new Twig_Filter_Function('twig_get_post_info'));
+
$twig = apply_filters('get_twig', $twig);
return $twig;
}
+ function twig_get_post_info($id, $field = 'path'){
+ $pi = PostMaster::get_post_info($id);
+ return $pi->$field;
+ }
+
function twig_wp_sidebar($arg){
get_sidebar($arg);
}
added twig for get_post_info
diff --git a/lib/weblib.php b/lib/weblib.php
index <HASH>..<HASH> 100644
--- a/lib/weblib.php
+++ b/lib/weblib.php
@@ -1605,13 +1605,20 @@ function obfuscate_text($plaintext) {
$i=0;
$length = strlen($plaintext);
$obfuscated="";
+ $prev_obfuscated = false;
while ($i < $length) {
- if (rand(0,2)) {
+ $c = ord($plaintext{$i});
+ $numerical = ($c >= ord('0')) && ($c <= ord('9'));
+ if ($prev_obfuscated and $numerical ) {
+ $obfuscated.='&#'.ord($plaintext{$i});
+ } else if (rand(0,2)) {
$obfuscated.='&#'.ord($plaintext{$i});
+ $prev_obfuscated = true;
} else {
$obfuscated.=$plaintext{$i};
+ $prev_obfuscated = false;
}
- $i++;
+ $i++;
}
return $obfuscated;
}
Fixes for obfuscate_text() when printing emails with numbers in them.
(Patch from Zbigniew Fiedorowicz - thanks)
diff --git a/lib/things/document.rb b/lib/things/document.rb
index <HASH>..<HASH> 100644
--- a/lib/things/document.rb
+++ b/lib/things/document.rb
@@ -1,6 +1,6 @@
module Things
class Document
- DEFAULT_DATABASE_PATH = ENV['HOME'] + '/Library/Application Support/Cultured Code/Things/Database.xml' unless defined?(DEFAULT_DATABASE_PATH)
+ DEFAULT_DATABASE_PATH = "#{ENV['HOME']}/Library/Application Support/Cultured Code/Things/Database.xml" unless defined?(DEFAULT_DATABASE_PATH)
attr_reader :database_file
@@ -36,4 +36,4 @@ module Things
@doc = Hpricot(IO.read(database_file))
end
end
-end
\ No newline at end of file
+end
Use interpolation for DEFAULT_DATABASE_PATH
diff --git a/src/toil/test/jobStores/jobStoreTest.py b/src/toil/test/jobStores/jobStoreTest.py
index <HASH>..<HASH> 100644
--- a/src/toil/test/jobStores/jobStoreTest.py
+++ b/src/toil/test/jobStores/jobStoreTest.py
@@ -1253,9 +1253,16 @@ class AWSJobStoreTest(AbstractJobStoreTest.Test):
else:
self.fail()
finally:
- for attempt in retry_s3():
- with attempt:
- s3.delete_bucket(bucket=bucket)
+ try:
+ for attempt in retry_s3():
+ with attempt:
+ s3.delete_bucket(bucket=bucket)
+ except boto.exception.S3ResponseError as e:
+ if e.error_code == 404:
+ # The bucket doesn't exist; maybe a failed delete actually succeeded.
+ pass
+ else:
+ raise
@slow
def testInlinedFiles(self):
Tolerate unnecessary bucket cleanup (#<I>)
diff --git a/lib/Cake/Model/Behavior/TranslateBehavior.php b/lib/Cake/Model/Behavior/TranslateBehavior.php
index <HASH>..<HASH> 100644
--- a/lib/Cake/Model/Behavior/TranslateBehavior.php
+++ b/lib/Cake/Model/Behavior/TranslateBehavior.php
@@ -392,6 +392,16 @@ class TranslateBehavior extends ModelBehavior {
unset($this->runtime[$model->alias]['beforeValidate'], $this->runtime[$model->alias]['beforeSave']);
$conditions = array('model' => $model->alias, 'foreign_key' => $model->id);
$RuntimeModel = $this->translateModel($model);
+
+ $fields = array_merge($this->settings[$model->alias], $this->runtime[$model->alias]['fields']);
+ if ($created) {
+ foreach ($fields as $field) {
+ if (!isset($tempData[$field])) {
+ //set the field value to an empty string
+ $tempData[$field] = '';
+ }
+ }
+ }
foreach ($tempData as $field => $value) {
unset($conditions['content']);
Update afterSave to ensure created entires have all translated fields present
Without all fields being present, find() will be unable to find the
translated records.
Fixes #<I>
diff --git a/main.py b/main.py
index <HASH>..<HASH> 100755
--- a/main.py
+++ b/main.py
@@ -62,6 +62,9 @@ class Node:
continue
attrib = getattr(self, attr)
if attrib:
+ if isinstance(attrib, int):
+ # Check for enums
+ attrib = str(int(attrib))
element.attrib[attr] = attrib
return element
Handle int attributes in serialization
diff --git a/cruddy/__init__.py b/cruddy/__init__.py
index <HASH>..<HASH> 100644
--- a/cruddy/__init__.py
+++ b/cruddy/__init__.py
@@ -200,3 +200,18 @@ class CRUD(object):
params = {'Key': {'id': id}}
self._call_ddb_method(self.table.delete_item, params, response)
return self._prepare_response(response)
+
+ def handler(self, item, operation):
+ operation = operation.lower()
+ if operation == 'list':
+ response = self.list()
+ elif operation == 'get':
+ response = self.get(item['id'])
+ elif operation == 'create':
+ response = self.create(item)
+ elif operation == 'update':
+ response = self.update(item)
+ elif operation == 'delete':
+ response = self.delete(item['id'])
+ return response
+
Add back the handler method. Still useful, I think.
diff --git a/src/streamcorpus_pipeline/_tsv_files_list.py b/src/streamcorpus_pipeline/_tsv_files_list.py
index <HASH>..<HASH> 100644
--- a/src/streamcorpus_pipeline/_tsv_files_list.py
+++ b/src/streamcorpus_pipeline/_tsv_files_list.py
@@ -151,7 +151,7 @@ class tsv_files_list(object):
return stream_item
if __name__ == '__main__':
- ## this is a simple test of this extractor stage
+ ## this is a simple test of this reader stage
import argparse
parser = argparse.ArgumentParser()
parser.add_argument(
renaming extractor --> reader one more (trivial)
diff --git a/packages/react-server-website/components/doc-contents.js b/packages/react-server-website/components/doc-contents.js
index <HASH>..<HASH> 100644
--- a/packages/react-server-website/components/doc-contents.js
+++ b/packages/react-server-website/components/doc-contents.js
@@ -38,7 +38,7 @@ export default class DocContents extends React.Component {
}
componentDidMount() {
- getCurrentRequestContext().navigator.on( "navigateStart", this.closeMenu.bind(this) );
+ getCurrentRequestContext().navigator.on("loadComplete", this.closeMenu.bind(this));
}
render() {
Close mobile doc menu on load complete (#<I>)
This feels a little nicer. Waits to close the nav menu until the page has
changed. Previously the nav menu was closed immediately, and then the page
would change _after_.
diff --git a/lib/spout/version.rb b/lib/spout/version.rb
index <HASH>..<HASH> 100644
--- a/lib/spout/version.rb
+++ b/lib/spout/version.rb
@@ -3,7 +3,7 @@ module Spout
MAJOR = 0
MINOR = 1
TINY = 0
- BUILD = "pre" # nil, "pre", "rc", "rc2"
+ BUILD = "rc" # nil, "pre", "rc", "rc2"
STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.')
end
diff --git a/CHANGELOG.md b/CHANGELOG.md
index <HASH>..<HASH> 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,8 @@
## [Unreleased] - unreleased
+### Added
+- `Service.close` method for freeing resources.
## [2] - 2015-11-15
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -15,7 +15,7 @@ def long_desc():
setup(
name='syndicate',
- version='2',
+ version='2.1',
description='A wrapper for REST APIs',
author='Justin Mayfield',
author_email='[email protected] ',
diff --git a/syndicate/client.py b/syndicate/client.py
index <HASH>..<HASH> 100644
--- a/syndicate/client.py
+++ b/syndicate/client.py
@@ -49,6 +49,7 @@ class Service(object):
async=False, **adapter_config):
if not uri:
raise TypeError("Required: uri")
+ self.closed = False
self.async = async
self.auth = auth
self.filters = []
@@ -129,4 +130,9 @@ class Service(object):
return self.do('patch', path, data=data, **kwargs)
def close(self):
- self.adapter.close()
+ if self.closed:
+ return
+ if self.adapter is not None:
+ self.adapter.close()
+ self.adapter = None
+ self.closed = True
Rev to <I> and add close() docs.
diff --git a/lxd/container_lxc.go b/lxd/container_lxc.go
index <HASH>..<HASH> 100644
--- a/lxd/container_lxc.go
+++ b/lxd/container_lxc.go
@@ -3480,7 +3480,6 @@ func (c *containerLXC) Delete() error {
}
// Update network files
- networkUpdateStatic(c.state, "")
for k, m := range c.expandedDevices {
if m["type"] != "nic" || m["nictype"] != "bridged" {
continue
@@ -3515,6 +3514,11 @@ func (c *containerLXC) Delete() error {
}
}
+ if !c.IsSnapshot() {
+ // Remove any static lease file
+ networkUpdateStatic(c.state, "")
+ }
+
logger.Info("Deleted container", ctxMap)
if c.IsSnapshot() {
lxd/containers: Properly clear static leases
diff --git a/lib/producer.js b/lib/producer.js
index <HASH>..<HASH> 100644
--- a/lib/producer.js
+++ b/lib/producer.js
@@ -75,7 +75,7 @@ function Producer(conf, topicConf) {
this.globalConfig = conf;
this.topicConfig = topicConf;
this.defaultTopic = gTopic || null;
- this.defaultPartition = gPart || null;
+ this.defaultPartition = gPart == null ? -1 : gPart;
this.outstandingMessages = 0;
this.sentMessages = 0;
@@ -189,7 +189,7 @@ Producer.prototype.produceSync = function(msg) {
this.sentMessages++;
var topic = msg.topic || false;
- var partition = msg.partition || this.defaultPartition;
+ var partition = msg.partition == null ? this.defaultPartition : msg.partition;
if (!topic) {
throw new TypeError('"topic" needs to be set');
Do null checking on partition instead of checking falsiness (#<I>)
diff --git a/src/main/java/org/dbflute/mail/send/embedded/proofreader/SMailPmCommentProofreader.java b/src/main/java/org/dbflute/mail/send/embedded/proofreader/SMailPmCommentProofreader.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/dbflute/mail/send/embedded/proofreader/SMailPmCommentProofreader.java
+++ b/src/main/java/org/dbflute/mail/send/embedded/proofreader/SMailPmCommentProofreader.java
@@ -73,6 +73,9 @@ public class SMailPmCommentProofreader implements SMailTextProofreader {
// Line Adjustment
// ===============
protected String filterTemplateText(String templateText, Object pmb) {
+ // #for_now jflute pending, IF in FOR comment becomes empty line when false (2019/02/21)
+ // basically it may be unneeded because it should be structured in Java
+ // and modification is very difficult so pending, waiting for next request
final String replaced = Srl.replace(templateText, CRLF, LF);
final List<String> lineList = Srl.splitList(replaced, LF);
final StringBuilder sb = new StringBuilder(templateText.length());
comment: IF in FOR comment becomes empty line when false
Saved Queries
Top Community Queries
No community queries yet
The top public SQL queries from the community will appear here once available.