diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/project/library/CM/Mail.php b/project/library/CM/Mail.php
index <HASH>..<HASH> 100644
--- a/project/library/CM/Mail.php
+++ b/project/library/CM/Mail.php
@@ -183,7 +183,7 @@ class CM_Mail extends CM_Renderable_Abstract {
}
list($subject, $html, $text) = CM_Render::getInstance($site)->render($this);
if ($this->_delayed) {
- $this->_queue($text, $html);
+ $this->_queue($subject, $text, $html);
} else {
self::_send($subject, $text, $this->_senderAddress, $this->_recipientAddress, $this->_senderName, $html);
}
@@ -208,8 +208,8 @@ class CM_Mail extends CM_Renderable_Abstract {
}
}
- private function _queue($text, $html) {
- CM_Mysql::insert(TBL_CM_MAIL, array('subject' => $this->_subject, 'text' => $text, 'html' => $html,
+ private function _queue($subject, $text, $html) {
+ CM_Mysql::insert(TBL_CM_MAIL, array('subject' => $subject, 'text' => $text, 'html' => $html,
'senderAddress' => $this->_senderAddress, 'recipientAddress' => $this->_recipientAddress, 'senderName' => $this->_senderName,
'createStamp' => time()));
}
|
mail-queue has no subject; fixed
|
diff --git a/src/define/build.js b/src/define/build.js
index <HASH>..<HASH> 100644
--- a/src/define/build.js
+++ b/src/define/build.js
@@ -28,11 +28,20 @@ var _gpfDefinedEntities = [];
* @since 0.2.4
*/
function _gpfDefineGetEntityFromBuilder (instanceBuilder) {
- return _gpfArrayForEachFalsy(_gpfDefinedEntities, function (entityDefinition) {
+ var result = _gpfArrayForEachFalsy(_gpfDefinedEntities, function (entityDefinition) {
if (entityDefinition.getInstanceBuilder() === instanceBuilder) {
return entityDefinition;
}
});
+ if (!result) {
+ // Reversed lookup because the level
+ result = _gpfArrayForEachFalsy([].concat(_gpfDefinedEntities).reverse(), function (entityDefinition) {
+ if (instanceBuilder.prototype instanceof entityDefinition.getInstanceBuilder()) {
+ return entityDefinition;
+ }
+ });
+ }
+ return result;
}
Object.assign(_GpfEntityDefinition.prototype, {
|
Working on native inheritance (#<I>)
|
diff --git a/src/gc.js b/src/gc.js
index <HASH>..<HASH> 100644
--- a/src/gc.js
+++ b/src/gc.js
@@ -59,6 +59,7 @@ function GarbageCollector(consumer) {
}
function registerEvents() {
+ unregisterEvents();
consumer.on(events.GC_SM_QUEUE, (queue) => {
debug(`Inspecting processing queue [${queue}]... `);
const { queueName, consumerId } = redisKeys.getKeySegments(queue);
@@ -209,7 +210,6 @@ function GarbageCollector(consumer) {
redisClientInstance = null;
messageCollector = null;
ticker = null;
- unregisterEvents();
powerStateManager.down();
consumer.emit(events.GC_DOWN);
});
|
Always call unregisterEvents() before registering new events
In case of improper shutdown, this will prevent GC from behaving incorrectly (duplicate listeners) and also from memory leakage (accumulating listeners).
|
diff --git a/zetta-app.js b/zetta-app.js
index <HASH>..<HASH> 100644
--- a/zetta-app.js
+++ b/zetta-app.js
@@ -173,8 +173,18 @@ function Application(appFolder, appConfig) {
if(self.config.caption)
zutils.render(self.config.caption);
- if(self.config.translator)
- self.translator = new Translator({ storagePath : path.join(appFolder,'config') });
+ if(self.config.translator) {
+ var options = {
+ storagePath: path.join(appFolder,'config'),
+ rootFolderPath: appFolder
+ };
+ options = _.extend(self.config.translator, options);
+
+ self.translator = new Translator(options, function() {
+ self.translator.separateEditor();
+ });
+ }
+
http.globalAgent.maxSockets = self.config.maxHttpSockets || 1024; // 1024;
https.globalAgent.maxSockets = self.config.maxHttpSockets || 1024;
@@ -485,16 +495,6 @@ function Application(appFolder, appConfig) {
// })
-
- if(self.config.translator) {
- self.translator.init(self.config.translator, function () {
- self.translator.separateEditor();
- finish();
- });
-
- return;
- }
-
finish();
function finish() {
|
Fixed some problems with new version of zetta-translator
|
diff --git a/core/client/fs/src/main/java/alluxio/client/block/stream/NettyPacketWriter.java b/core/client/fs/src/main/java/alluxio/client/block/stream/NettyPacketWriter.java
index <HASH>..<HASH> 100644
--- a/core/client/fs/src/main/java/alluxio/client/block/stream/NettyPacketWriter.java
+++ b/core/client/fs/src/main/java/alluxio/client/block/stream/NettyPacketWriter.java
@@ -106,7 +106,7 @@ public final class NettyPacketWriter implements PacketWriter {
/** This condition is met if mPacketWriteException != null or the buffer is not full. */
private final Condition mBufferNotFullOrFailed = mLock.newCondition();
/** This condition is met if there is nothing in the netty buffer. */
- private Condition mBufferEmptyOrFailed = mLock.newCondition();
+ private final Condition mBufferEmptyOrFailed = mLock.newCondition();
/**
* @param context the file system context
|
Improve core/client/fs/src/main/java/alluxio/client/block/stream/NettyPacketWriter.java as mBufferNotFullOrFailed can be marked as final.\nChange\n private Condition mBufferNotFullOrFailed = mLock.newCondition();\nto\n private final Condition mBufferNotFullOrFailed = mLock.newCondition();
|
diff --git a/components/input/__tests__/textarea.test.js b/components/input/__tests__/textarea.test.js
index <HASH>..<HASH> 100644
--- a/components/input/__tests__/textarea.test.js
+++ b/components/input/__tests__/textarea.test.js
@@ -115,6 +115,7 @@ describe('TextArea', () => {
},
},
]);
+ await Promise.resolve();
expect(onResize).toHaveBeenCalledWith(
expect.objectContaining({
diff --git a/components/page-header/__tests__/index.test.js b/components/page-header/__tests__/index.test.js
index <HASH>..<HASH> 100644
--- a/components/page-header/__tests__/index.test.js
+++ b/components/page-header/__tests__/index.test.js
@@ -112,9 +112,10 @@ describe('PageHeader', () => {
expect(render(wrapper)).toMatchSnapshot();
});
- it('change container width', () => {
+ it('change container width', async () => {
const wrapper = mount(<PageHeader title="Page Title" extra="extra" />);
wrapper.triggerResize();
+ await Promise.resolve();
wrapper.update();
expect(wrapper.find('.ant-page-header').hasClass('ant-page-header-compact')).toBe(true);
});
|
test: Fix resize related test case
|
diff --git a/lib/active_admin_import/model.rb b/lib/active_admin_import/model.rb
index <HASH>..<HASH> 100644
--- a/lib/active_admin_import/model.rb
+++ b/lib/active_admin_import/model.rb
@@ -138,8 +138,10 @@ module ActiveAdminImport
def encode(data)
data = content_encode(data) if force_encoding?
- data = data.encode('UTF-8',
- invalid: :replace, undef: :replace)
+ data = data.encode(
+ 'UTF-8',
+ invalid: :replace, undef: :replace, universal_newline: true
+ )
begin
data.sub("\xEF\xBB\xBF", '') # bom
rescue StandardError => _
|
universal_newline - Replaces \rn and \r with \n
|
diff --git a/client-js/utilities/fetch-json.js b/client-js/utilities/fetch-json.js
index <HASH>..<HASH> 100644
--- a/client-js/utilities/fetch-json.js
+++ b/client-js/utilities/fetch-json.js
@@ -18,7 +18,12 @@ export default function fetchJson(method, url, body) {
opts.body = JSON.stringify(body)
}
- return fetch(BASE_URL + url, opts)
+ let fetchUrl = BASE_URL + url
+ if (BASE_URL && url.substring(0, 1) !== '/') {
+ fetchUrl = BASE_URL + '/' + url
+ }
+
+ return fetch(fetchUrl, opts)
.then(response => {
// API server will send 200 even if error occurs
// Eventually this should change to proper status code usage
|
Fix api/app GET when BASE_URL is defined (#<I>)
|
diff --git a/core/Tracker/TableLogAction.php b/core/Tracker/TableLogAction.php
index <HASH>..<HASH> 100644
--- a/core/Tracker/TableLogAction.php
+++ b/core/Tracker/TableLogAction.php
@@ -233,6 +233,11 @@ class TableLogAction
}
/**
+ * This function will sanitize or not if it's needed for the specified action type
+ *
+ * URLs (Page URLs, Downloads, Outlinks) are stored raw (unsanitized)
+ * while other action types are stored Sanitized
+ *
* @param $actionType
* @param $actionString
* @return string
|
add a comment about perceived inconsistencies
|
diff --git a/cdn/controllers/blank_avatar.php b/cdn/controllers/blank_avatar.php
index <HASH>..<HASH> 100644
--- a/cdn/controllers/blank_avatar.php
+++ b/cdn/controllers/blank_avatar.php
@@ -53,7 +53,7 @@ class NAILS_Blank_avatar extends NAILS_CDN_Controller
// Determine dynamic values
$this->_width = $this->uri->segment( 3, 100 );
$this->_height = $this->uri->segment( 4, 100 );
- $this->_sex = $this->uri->segment( 5, 'man' );
+ $this->_sex = strtolower( $this->uri->segment( 5, 'man' ) );
// Set a unique filename (but one which is constant if requested twice, i.e
// no random values)
|
Ignoring case of sex
|
diff --git a/lib/fluent/plugin/out_file.rb b/lib/fluent/plugin/out_file.rb
index <HASH>..<HASH> 100644
--- a/lib/fluent/plugin/out_file.rb
+++ b/lib/fluent/plugin/out_file.rb
@@ -223,7 +223,12 @@ module Fluent::Plugin
def write_without_compression(path, chunk)
File.open(path, "ab", @file_perm) do |f|
- chunk.write_to(f)
+ if @append
+ content = chunk.read()
+ f.puts content
+ else
+ chunk.write_to(f)
+ end
end
end
|
Make out_file append option work without compression
For Ruby <I>.x and <I>.x, out_file append option without compression
does not work. The cause is the following Ruby language bug:
<URL>
|
diff --git a/src/Controller/RolesController.php b/src/Controller/RolesController.php
index <HASH>..<HASH> 100644
--- a/src/Controller/RolesController.php
+++ b/src/Controller/RolesController.php
@@ -32,7 +32,7 @@ class RolesController extends AppController
public function view($id = null)
{
$role = $this->Roles->get($id, [
- 'contain' => ['Groups']
+ 'contain' => ['Groups', 'Capabilities']
]);
$this->set('role', $role);
$this->set('_serialize', ['role']);
|
passing related capabilities to View (task #<I>)
|
diff --git a/rapidoid-pages/src/main/java/org/rapidoid/widget/PagerWidget.java b/rapidoid-pages/src/main/java/org/rapidoid/widget/PagerWidget.java
index <HASH>..<HASH> 100644
--- a/rapidoid-pages/src/main/java/org/rapidoid/widget/PagerWidget.java
+++ b/rapidoid-pages/src/main/java/org/rapidoid/widget/PagerWidget.java
@@ -47,7 +47,11 @@ public class PagerWidget extends AbstractWidget {
Tag next = next().navigate("_inc", pageNumber, 1);
Tag last = last().navigate("_set", pageNumber, to);
- return pagination(first, prev, current, next, last);
+ return shouldDisplay() ? pagination(first, prev, current, next, last) : div();
+ }
+
+ protected boolean shouldDisplay() {
+ return to > 1;
}
protected Tag pagination(Tag first, Tag prev, Tag current, Tag next, Tag last) {
|
Improved pager - display only when more than 1 page is available.
|
diff --git a/src/yimaTheme/Manager/DefaultListenerAggregate.php b/src/yimaTheme/Manager/DefaultListenerAggregate.php
index <HASH>..<HASH> 100644
--- a/src/yimaTheme/Manager/DefaultListenerAggregate.php
+++ b/src/yimaTheme/Manager/DefaultListenerAggregate.php
@@ -158,7 +158,7 @@ class DefaultListenerAggregate extends Manager implements
$themeLocator = $this->getThemeLocator();
$preparedTheme = $this->manager->getThemeObject();
if (!$preparedTheme) {
- // we are not attained theme name
+ // we are not attained theme
return;
}
@@ -200,6 +200,10 @@ class DefaultListenerAggregate extends Manager implements
// load widgets into {
$themeObject = $this->manager->getThemeObject();
+ if (!$themeObject) {
+ // we are not attained theme
+ return;
+ }
$sm = $this->sm;
|
fix theme manager issue on not detected themes
|
diff --git a/lib/beaker-vmpooler/version.rb b/lib/beaker-vmpooler/version.rb
index <HASH>..<HASH> 100644
--- a/lib/beaker-vmpooler/version.rb
+++ b/lib/beaker-vmpooler/version.rb
@@ -1,3 +1,3 @@
module BeakerVmpooler
- VERSION = '1.3.2'
+ VERSION = '1.3.3'
end
|
(GEM) update beaker-vmpooler version to <I>
|
diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php
index <HASH>..<HASH> 100644
--- a/lib/db/upgrade.php
+++ b/lib/db/upgrade.php
@@ -1465,6 +1465,14 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2012111200.00);
}
+ if ($oldversion < 2012111200.01) {
+ // Force the rebuild of the cache of every courses, some cached information could contain wrong icon references.
+ rebuild_course_cache();
+
+ // Main savepoint reached.
+ upgrade_main_savepoint(true, 2012111200.01);
+ }
+
return true;
}
diff --git a/version.php b/version.php
index <HASH>..<HASH> 100644
--- a/version.php
+++ b/version.php
@@ -30,7 +30,7 @@
defined('MOODLE_INTERNAL') || die();
-$version = 2012111200.00; // YYYYMMDD = weekly release date of this DEV branch
+$version = 2012111200.01; // YYYYMMDD = weekly release date of this DEV branch
// RR = release increments - 00 in DEV branches
// .XX = incremental changes
|
MDL-<I> upgrade: Force courses cache to be rebuilt
|
diff --git a/src/Illuminate/Support/Arr.php b/src/Illuminate/Support/Arr.php
index <HASH>..<HASH> 100755
--- a/src/Illuminate/Support/Arr.php
+++ b/src/Illuminate/Support/Arr.php
@@ -110,9 +110,10 @@ class Arr {
foreach ($array as $value)
{
- $value = (array) $value;
-
- $results[] = $value[$segment];
+ if (array_key_exists($segment, $value = (array) $value))
+ {
+ $results[] = $value[$segment];
+ }
}
$array = array_values($results);
diff --git a/tests/Support/SupportHelpersTest.php b/tests/Support/SupportHelpersTest.php
index <HASH>..<HASH> 100755
--- a/tests/Support/SupportHelpersTest.php
+++ b/tests/Support/SupportHelpersTest.php
@@ -133,6 +133,8 @@ class SupportHelpersTest extends PHPUnit_Framework_TestCase {
), array_fetch($data, 'comments'));
$this->assertEquals(array(array('#foo', '#bar'), array('#baz')), array_fetch($data, 'comments.tags'));
+ $this->assertEquals([], array_fetch($data, 'foo'));
+ $this->assertEquals([], array_fetch($data, 'foo.bar'));
}
|
Ensure we can fetch an array with non existing keys
|
diff --git a/spec/filter_spec.rb b/spec/filter_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/filter_spec.rb
+++ b/spec/filter_spec.rb
@@ -199,7 +199,7 @@ describe Philtre::Filter do
end
it 'not_blank' do
- field = Sequel.expr Faker::Lorem.word
+ field = Faker::Lorem.word
expr = described_class.predicates.call :"#{field}_not_blank", Faker::Lorem.word
expr.op.should == :AND
@@ -213,7 +213,7 @@ describe Philtre::Filter do
end
it 'blank' do
- field = Sequel.expr Faker::Lorem.word
+ field = Faker::Lorem.word
expr = described_class.predicates.call :"#{field}_blank", Faker::Lorem.word
expr.op.should == :OR
|
don't pass Sequel::Sql::Expression as a field name in specs
|
diff --git a/src/clappr-dash-shaka-playback.js b/src/clappr-dash-shaka-playback.js
index <HASH>..<HASH> 100644
--- a/src/clappr-dash-shaka-playback.js
+++ b/src/clappr-dash-shaka-playback.js
@@ -121,10 +121,8 @@ class DashShakaPlayback extends HTML5Video {
}
pause() {
- super.pause()
-
- if (this.dvrEnabled)
- this._updateDvr(true)
+ this.el.pause()
+ this.dvrEnabled && this._updateDvr(true)
}
play () {
|
refactor: overwrite pause method
|
diff --git a/sshtunnel.py b/sshtunnel.py
index <HASH>..<HASH> 100644
--- a/sshtunnel.py
+++ b/sshtunnel.py
@@ -610,15 +610,16 @@ class SSHTunnelForwarder(object):
.format(ssh_config_file))
if not ssh_password:
- ssh_private_key = paramiko.RSAKey.from_private_key_file(
- ssh_private_key,
- password=ssh_private_key_password
- ) if ssh_private_key else None
-
# Check if a private key was supplied or found in ssh_config
if not ssh_private_key:
raise ValueError('No password or private key available!')
+ if isinstance(ssh_private_key, string_types):
+ ssh_private_key = paramiko.RSAKey.from_private_key_file(
+ ssh_private_key,
+ password=ssh_private_key_password
+ )
+
if not ssh_port:
ssh_port = 22
|
Support paramiko PKey as ssh_private_key
|
diff --git a/spec/build_tests_spec.rb b/spec/build_tests_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/build_tests_spec.rb
+++ b/spec/build_tests_spec.rb
@@ -12,10 +12,11 @@ describe Rscons do
end
def test_dir(build_test_directory)
- Dir.chdir("build_tests_run/#{build_test_directory}")
+ dir = "build_tests_run/#{build_test_directory}"
if File.exists?('build.rb')
- system('ruby build.rb')
+ system("ruby -r rscons -C #{dir} build.rb")
end
+ Dir.chdir(dir)
end
###########################################################################
|
require rscons when running build test in a ruby subprocess
|
diff --git a/src/Guzzle/Http/Client.php b/src/Guzzle/Http/Client.php
index <HASH>..<HASH> 100644
--- a/src/Guzzle/Http/Client.php
+++ b/src/Guzzle/Http/Client.php
@@ -478,9 +478,10 @@ class Client extends AbstractHasDispatcher implements ClientInterface
}
/**
- * Copy the cecert.pem file from the phar if it is not in the temp folder
+ * Copy the cecert.pem file from the phar if it is not in the temp folder and validate the MD5 checksum
*
- * @throws RuntimeException if the file cannot be copied
+ * @return string
+ * @throws RuntimeException if the file cannot be copied or there is a MD5 mismatch
*/
protected function preparePharCacert()
{
|
Updating docblock for preparePharCacert
|
diff --git a/simple_unit_tests.py b/simple_unit_tests.py
index <HASH>..<HASH> 100644
--- a/simple_unit_tests.py
+++ b/simple_unit_tests.py
@@ -157,4 +157,9 @@ class TestParseAction(PyparsingExpressionTestCase):
if __name__ == '__main__':
+ # we use unittest features that are in Py3 only, bail out if run on Py2
+ import sys
+ if sys.version_info[0] < 3:
+ sys.exit(0)
+
unittest.main()
\ No newline at end of file
|
simple_unit_tests.py only runs on Py3
|
diff --git a/lib/logger.js b/lib/logger.js
index <HASH>..<HASH> 100644
--- a/lib/logger.js
+++ b/lib/logger.js
@@ -72,7 +72,8 @@ define(
info.push(elemToString(elem));
info.push(component.constructor.describe.split(' ').slice(0,3).join(' '));
console.groupCollapsed && action == 'trigger' && console.groupCollapsed(action, name);
- console.info.apply(console, info);
+ // IE9 doesn't define `apply` for console methods, but this works everywhere:
+ Function.prototype.apply.call(console.info, console, info);
}
}
|
console.info.apply fix for IE9
Logging was breaking in IE9 because console.info.apply is undefined (even when dev tools is open and console.info is defined). See: <URL>
|
diff --git a/admin/webservice/forms.php b/admin/webservice/forms.php
index <HASH>..<HASH> 100644
--- a/admin/webservice/forms.php
+++ b/admin/webservice/forms.php
@@ -112,7 +112,7 @@ class external_service_form extends moodleform {
$mform->setType('id', PARAM_INT);
if (!empty($service->id)) {
- $buttonlabel = get_string('editaservice', 'webservice');
+ $buttonlabel = get_string('savechanges');
} else {
$buttonlabel = get_string('addaservice', 'webservice');
}
|
MDL-<I> rename 'Edit service' to 'Save changes'
|
diff --git a/src/actions.js b/src/actions.js
index <HASH>..<HASH> 100644
--- a/src/actions.js
+++ b/src/actions.js
@@ -14,7 +14,7 @@ export function dispatchGlobalEvent(eventName, opts, target = window) {
if (typeof window.CustomEvent === 'function') {
event = new window.CustomEvent(eventName, { detail: opts });
} else {
- event = document.createEvent('Event');
+ event = document.createEvent('CustomEvent');
event.initCustomEvent(eventName, false, true, opts);
}
|
Fix for IE<I> custom event
|
diff --git a/src/test/org/openscience/cdk/tools/diff/tree/IntegerDifferenceTest.java b/src/test/org/openscience/cdk/tools/diff/tree/IntegerDifferenceTest.java
index <HASH>..<HASH> 100644
--- a/src/test/org/openscience/cdk/tools/diff/tree/IntegerDifferenceTest.java
+++ b/src/test/org/openscience/cdk/tools/diff/tree/IntegerDifferenceTest.java
@@ -58,4 +58,11 @@ public class IntegerDifferenceTest extends CDKTestCase {
Assert.assertNotNull(diffString);
assertOneLiner(diffString);
}
+
+ @Test public void testRefs() {
+ Integer x = new Integer(1);
+ Integer y = new Integer(1);
+ IDifference diff = IntegerDifference.construct("foo", x, y);
+ Assert.assertNull(diff);
+ }
}
|
Added a test to ensure that Integer objects are compared by value rather than reference
|
diff --git a/beanstalkc.py b/beanstalkc.py
index <HASH>..<HASH> 100644
--- a/beanstalkc.py
+++ b/beanstalkc.py
@@ -53,7 +53,7 @@ class Connection(object):
self.socket.close()
def _interact(self, command, expected_ok, expected_err=[]):
- self.socket.send(command)
+ self.socket.sendall(command)
status, results = self._read_response()
if status in expected_ok:
return results
|
Use socket#sendall to fail faster
|
diff --git a/src/Env/index.js b/src/Env/index.js
index <HASH>..<HASH> 100644
--- a/src/Env/index.js
+++ b/src/Env/index.js
@@ -75,7 +75,7 @@ class Env {
_.each(matches, (match) => {
const key = match.replace(/\$|{|}/g, '')
const variable = envConfig[key] || process.env[key] || ''
- env = env.replace(match, this._interpolate(variable))
+ env = env.replace(match, this._interpolate(variable, envConfig))
})
return env
}
|
fix(env): ensure envConfig is used to interpolate env file (#<I>)
|
diff --git a/Tone/component/Meter.js b/Tone/component/Meter.js
index <HASH>..<HASH> 100644
--- a/Tone/component/Meter.js
+++ b/Tone/component/Meter.js
@@ -5,7 +5,7 @@ define(["Tone/core/Tone", "Tone/core/Master"], function(Tone){
/**
* @class Get the rms of the input signal with some averaging.
* can also just get the value of the signal
- * or the value in dB. inspired by {@link https://github.com/cwilso/volume-meter/blob/master/volume-meter.js|cwilso's volume meter}
+ * or the value in dB. inspired by https://github.com/cwilso/volume-meter/blob/master/volume-meter.js
*
* @constructor
* @extends {Tone}
diff --git a/Tone/effect/BitCrusher.js b/Tone/effect/BitCrusher.js
index <HASH>..<HASH> 100644
--- a/Tone/effect/BitCrusher.js
+++ b/Tone/effect/BitCrusher.js
@@ -4,7 +4,7 @@ define(["Tone/core/Tone", "Tone/effect/Effect"], function(Tone){
/**
* @class downsample incoming signal.
- * inspiration from {@link https://github.com/jaz303/bitcrusher/blob/master/index.js|jaz303}
+ * inspiration from https://github.com/jaz303/bitcrusher/blob/master/index.js
*
* @constructor
* @extends {Tone.Effect}
|
removed doc links
they were breaking jsdocs.
|
diff --git a/src/Providers/DashboardServiceProvider.php b/src/Providers/DashboardServiceProvider.php
index <HASH>..<HASH> 100644
--- a/src/Providers/DashboardServiceProvider.php
+++ b/src/Providers/DashboardServiceProvider.php
@@ -51,6 +51,9 @@ class DashboardServiceProvider extends ServiceProvider
__DIR__ . '/../Resources/views' => base_path('resources/views/vendor/' . $namespace),
], 'views');
+ // Load translations.
+ $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'dashboard');
+
// Publish config.
$config = realpath(__DIR__ . '/../config.php');
|
repaired missing translation include from upstream merge
|
diff --git a/daemon_windows.go b/daemon_windows.go
index <HASH>..<HASH> 100644
--- a/daemon_windows.go
+++ b/daemon_windows.go
@@ -53,3 +53,8 @@ func (windows *windowsRecord) Status() (string, error) {
return "Status could not defined", errors.New("windows daemon is not supported")
}
+
+// Get executable path
+func execPath() (string, error) {
+ return "", errors.New("windows daemon is not supported")
+}
|
Stub execPath method to compile for windows
|
diff --git a/src/components/Bootstrap.php b/src/components/Bootstrap.php
index <HASH>..<HASH> 100644
--- a/src/components/Bootstrap.php
+++ b/src/components/Bootstrap.php
@@ -153,6 +153,8 @@ class Bootstrap extends CApplicationComponent
* Each array key-value pair represents the initial options for a single plugin class,
* with the array key being the plugin name, and array value being the initial options array.
* @since 0.9.8
+ *
+ * @deprecated 2.0.0 Along with `registerPackage` this option will be refactored out in 3.0.0 release.
*/
public $plugins = array();
|
Marked `Bootstrap.plugins` as deprecated starting from version <I>
|
diff --git a/core-bundle/contao/classes/Pagination.php b/core-bundle/contao/classes/Pagination.php
index <HASH>..<HASH> 100644
--- a/core-bundle/contao/classes/Pagination.php
+++ b/core-bundle/contao/classes/Pagination.php
@@ -209,7 +209,7 @@ class Pagination extends \Frontend
// Prepare the URL
foreach (preg_split('/&(amp;)?/', $_SERVER['QUERY_STRING'], -1, PREG_SPLIT_NO_EMPTY) as $fragment)
{
- if (strpos($fragment.'=', $this->strParameter) === false)
+ if (strpos($fragment, $this->strParameter . '=') === false)
{
$this->strUrl .= (!$blnQuery ? '?' : '&') . $fragment;
$blnQuery = true;
|
[Core] Fixed two remaining issues with the new unique pagination variables (see #<I>)
|
diff --git a/libnetwork/drivers/macvlan/macvlan_network.go b/libnetwork/drivers/macvlan/macvlan_network.go
index <HASH>..<HASH> 100644
--- a/libnetwork/drivers/macvlan/macvlan_network.go
+++ b/libnetwork/drivers/macvlan/macvlan_network.go
@@ -29,7 +29,6 @@ func (d *driver) CreateNetwork(nid string, option map[string]interface{}, nInfo
if err != nil {
return err
}
- config.ID = nid
err = config.processIPAM(nid, ipV4Data, ipV6Data)
if err != nil {
return err
@@ -193,7 +192,7 @@ func parseNetworkOptions(id string, option options.Generic) (*configuration, err
config.Internal = true
}
}
-
+ config.ID = id
return config, nil
}
|
libnetwork: macvlan: set network ID as part of parseNetworkOptions
|
diff --git a/parser/parser_test.go b/parser/parser_test.go
index <HASH>..<HASH> 100644
--- a/parser/parser_test.go
+++ b/parser/parser_test.go
@@ -705,6 +705,10 @@ var bashTests = []struct {
`1:7: ++ must be followed by a word`,
},
{
+ "let a+\n",
+ `1:7: + must be followed by an expression`,
+ },
+ {
"let ))",
`1:5: "let" must be followed by arithmetic expressions`,
},
diff --git a/parser/tokenizer.go b/parser/tokenizer.go
index <HASH>..<HASH> 100644
--- a/parser/tokenizer.go
+++ b/parser/tokenizer.go
@@ -43,6 +43,9 @@ func (p *parser) next() {
if p.tok == token.EOF {
return
}
+ if p.newLine && p.quote == arithmExprLet {
+ p.npos++
+ }
if p.npos >= len(p.src) {
p.tok = token.EOF
return
|
parser: fix hang introduced by removing STOPPED
|
diff --git a/tests/ClientTest.php b/tests/ClientTest.php
index <HASH>..<HASH> 100644
--- a/tests/ClientTest.php
+++ b/tests/ClientTest.php
@@ -164,14 +164,22 @@ class ClientTest extends TestCase
protected function createClient()
{
$client = null;
+ $exception = null;
+
self::$factory->createClient()->then(function ($c) use (&$client) {
$client = $c;
+ }, function($error) use (&$exception) {
+ $exception = $error;
});
- while ($client === null) {
+ while ($client === null && $exception === null) {
self::$loop->tick();
}
+ if ($exception !== null) {
+ throw $exception;
+ }
+
return $client;
}
|
Throw exception if redis is not running
|
diff --git a/ykman/cli/info.py b/ykman/cli/info.py
index <HASH>..<HASH> 100644
--- a/ykman/cli/info.py
+++ b/ykman/cli/info.py
@@ -142,7 +142,8 @@ def _check_fips_status(pid, info):
@click.option(
"-c",
"--check-fips",
- help="Check if YubiKey is in FIPS Approved mode (YubiKey FIPS only).",
+ help="Check if YubiKey is in FIPS Approved mode (available on YubiKey 4 FIPS "
+ "only).",
is_flag=True,
)
@click.command()
@@ -202,4 +203,4 @@ def info(ctx, check_fips):
ctx.obj["conn"].close()
_check_fips_status(pid, info)
else:
- cli_fail("Not a YubiKey FIPS")
+ cli_fail("Unable to check FIPS Approved mode - Not a YubiKey 4 FIPS")
|
Clarify that --check-fips/-c for info is YK4 only.
|
diff --git a/tests/test_mypolr.py b/tests/test_mypolr.py
index <HASH>..<HASH> 100644
--- a/tests/test_mypolr.py
+++ b/tests/test_mypolr.py
@@ -1,9 +1,12 @@
import requests
import responses
import pytest
+import sys
from mypolr import PolrApi, DEFAULT_API_ROOT, exceptions as polr_errors
-from mypolr.__main__ import get_args as _get_args
+
+
+is_old = sys.version_info.major < 3 or sys.version_info.major == 3 and sys.version_info.minor <= 3
class ResponseErrorMap:
@@ -196,12 +199,14 @@ class TestLookup:
rmap.make_error_tests(api.lookup, short_url, url_key='a_secret')
-def to_args(s):
- return _get_args(s.split())
-
-
class TestCliArgs:
def test_parser(self):
+ if is_old:
+ # Skip tests for old versions for which CLI usage is not supported
+ return
+
+ from mypolr.__main__ import get_args as _get_args
+
none_kws = 'url server key custom'.split()
bool_kws = 'version secret lookup save clear'.split()
flags_true = ['--{}'.format(kw) for kw in bool_kws]
|
update CLI-test to only run on Python >=<I>
|
diff --git a/lib/reqres_rspec.rb b/lib/reqres_rspec.rb
index <HASH>..<HASH> 100644
--- a/lib/reqres_rspec.rb
+++ b/lib/reqres_rspec.rb
@@ -15,19 +15,14 @@ if defined?(RSpec) && ENV['REQRES_RSPEC'] == '1'
RSpec.configure do |config|
config.after(:each) do |example|
- if defined?(Rails)
- meta_data = self.class.example.metadata
-
- if meta_data[:type] == :request && process_example?(meta_data, example)
- begin
+ meta_data = self.class.example.metadata
+ if meta_data[:type] == :request && process_example?(meta_data, example)
+ begin
+ if defined?(Rails)
collector.collect(self, example, self.request, self.response)
- rescue NameError
- raise $!
+ elsif defined?(Sinatra)
+ collector.collect(self, example, self.last_request, self.last_response)
end
- end
- elsif defined?(Sinatra)
- begin
- collector.collect(self, self.last_request, self.last_response)
rescue Rack::Test::Error
#
rescue NameError
|
fix regression with sinatra rspec
|
diff --git a/hazelcast/src/test/java/com/hazelcast/cp/internal/CPLiteMemberTest.java b/hazelcast/src/test/java/com/hazelcast/cp/internal/CPLiteMemberTest.java
index <HASH>..<HASH> 100644
--- a/hazelcast/src/test/java/com/hazelcast/cp/internal/CPLiteMemberTest.java
+++ b/hazelcast/src/test/java/com/hazelcast/cp/internal/CPLiteMemberTest.java
@@ -21,7 +21,7 @@ import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.cp.CPMember;
import com.hazelcast.nio.Address;
import com.hazelcast.test.HazelcastParallelClassRunner;
-import com.hazelcast.test.annotation.ParallelTest;
+import com.hazelcast.test.annotation.ParallelJVMTest;
import com.hazelcast.test.annotation.QuickTest;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@@ -42,7 +42,7 @@ import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@RunWith(HazelcastParallelClassRunner.class)
-@Category({QuickTest.class, ParallelTest.class})
+@Category({QuickTest.class, ParallelJVMTest.class})
public class CPLiteMemberTest extends HazelcastRaftTestSupport {
@Test
|
Fix ParallelTest annotation for CPLiteMemberTest
|
diff --git a/kernel/classes/datatypes/ezuser/ezuser.php b/kernel/classes/datatypes/ezuser/ezuser.php
index <HASH>..<HASH> 100644
--- a/kernel/classes/datatypes/ezuser/ezuser.php
+++ b/kernel/classes/datatypes/ezuser/ezuser.php
@@ -625,18 +625,8 @@ WHERE user_id = '" . $userID . "' AND
{
$ini = eZINI::instance();
$type = strtolower( $ini->variable( 'UserSettings', 'HashType' ) );
- if ( $type == 'md5_site' )
- return self::PASSWORD_HASH_MD5_SITE;
- else if ( $type == 'md5_user' )
- return self::PASSWORD_HASH_MD5_USER;
- else if ( $type == 'plaintext' )
- return self::PASSWORD_HASH_PLAINTEXT;
- else if ( $type == 'bcrypt' )
- return self::PASSWORD_HASH_BCRYPT;
- else if ( $type == 'php_default' )
- return self::PASSWORD_HASH_PHP_DEFAULT;
- else
- return self::PASSWORD_HASH_MD5_PASSWORD;
+
+ return self::passwordHashTypeID( $type );
}
/*!
|
eZUser::hashType() lacks PASSWORD_HASH_MYSQL case
Use passwordHashTypeID() instead which has the case, thereby also reducing redundancy.
|
diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go
index <HASH>..<HASH> 100644
--- a/cmd/syncthing/main.go
+++ b/cmd/syncthing/main.go
@@ -712,11 +712,11 @@ func setupUPnP() {
l.Warnln("Failed to create UPnP port mapping")
} else {
l.Infof("Created UPnP port mapping for external port %d on UPnP device %s.", externalPort, igd.FriendlyIdentifier())
- }
- }
- if opts.UPnPRenewal > 0 {
- go renewUPnP(port)
+ if opts.UPnPRenewal > 0 {
+ go renewUPnP(port)
+ }
+ }
}
}
} else {
|
Fix UPnP log spam on networks without UPnP IGDs (see #<I>)
We should only run the UPnP port mapping renewal routine if the initial
discovery and configuration succeed. This commit applies that logic.
|
diff --git a/src/SALib/analyze/hdmr.py b/src/SALib/analyze/hdmr.py
index <HASH>..<HASH> 100644
--- a/src/SALib/analyze/hdmr.py
+++ b/src/SALib/analyze/hdmr.py
@@ -352,8 +352,14 @@ def _init(X, Y, settings):
def B_spline(X, m, d):
- '''Generate cubic B-splines using scipy built-in basis_element
- method. Knot points, t, are automatically determined. '''
+ """Generate cubic B-splines using scipy basis_element method.
+
+ Knot points (`t`) are automatically determined.
+
+ References
+ ----------
+ .. [1] https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.BSpline.basis_element.html
+ """
# Initialize B matrix
B = np.zeros((X.shape[0], m+3, d))
# Cubic basis-spline settings
|
Added reference to further documentation in docstring
|
diff --git a/lib/sonos.js b/lib/sonos.js
index <HASH>..<HASH> 100644
--- a/lib/sonos.js
+++ b/lib/sonos.js
@@ -118,7 +118,7 @@ Sonos.prototype.searchMusicLibrary = async function (searchType, searchTerm, req
let searches = `${searchTypes[searchType]}${separator}`
if (searchTerm && searchTerm !== '') {
- searches = searches.concat(encodeURIComponent(searchTerm))
+ searches = searches.concat(searchType === 'share' ? searchTerm : encodeURIComponent(searchTerm))
}
var opts = {
|
fix: Stop encoding search term for shares.
Fixed #<I>
|
diff --git a/src/Kodeine/Acl/Traits/HasRole.php b/src/Kodeine/Acl/Traits/HasRole.php
index <HASH>..<HASH> 100644
--- a/src/Kodeine/Acl/Traits/HasRole.php
+++ b/src/Kodeine/Acl/Traits/HasRole.php
@@ -1,7 +1,7 @@
<?php namespace Kodeine\Acl\Traits;
-trait HasRole
+trait HasRoleImplementation
{
use HasPermission;
@@ -253,3 +253,18 @@ trait HasRole
return parent::__call($method, $arguments);
}
}
+
+$laravel = app();
+if (version_compare($laravel::VERSION, '5.3', '<')) {
+ trait HasRole
+ {
+ use HasRoleImplementation {
+ hasRole as is;
+ }
+ }
+} else {
+ trait HasRole
+ {
+ use HasRoleImplementation;
+ }
+}
|
Preserved backwards compatibily for the HasRole trait without branching the codebase.
|
diff --git a/main.go b/main.go
index <HASH>..<HASH> 100644
--- a/main.go
+++ b/main.go
@@ -274,28 +274,28 @@ func (s *sortedIssues) Less(i, j int) bool {
for _, key := range s.order {
switch key {
case "path":
- if l.path < r.path {
- return true
+ if l.path >= r.path {
+ return false
}
case "line":
- if l.line < r.line {
- return true
+ if l.line >= r.line {
+ return false
}
case "column":
- if l.col < r.col {
- return true
+ if l.col >= r.col {
+ return false
}
case "severity":
- if l.severity < r.severity {
- return true
+ if l.severity >= r.severity {
+ return false
}
case "message":
- if l.message < r.message {
- return true
+ if l.message >= r.message {
+ return false
}
}
}
- return false
+ return true
}
func maybeSortIssues(issues chan *Issue) chan *Issue {
|
Fix sorting. Smacks forehead.
|
diff --git a/jquery.maphilight.js b/jquery.maphilight.js
index <HASH>..<HASH> 100755
--- a/jquery.maphilight.js
+++ b/jquery.maphilight.js
@@ -159,7 +159,7 @@
// jquery1.8 + ie7
var $html = $("<div>" + canvas.innerHTML + "</div>");
$html.children('[name=highlighted]').remove();
- canvas.innerHTML = $html.html();
+ $(canvas).html($html.html());
};
}
|
Bugfix for "unknown runtime error" in IE 7/8
|
diff --git a/lib/classes/plugin-manager.js b/lib/classes/plugin-manager.js
index <HASH>..<HASH> 100644
--- a/lib/classes/plugin-manager.js
+++ b/lib/classes/plugin-manager.js
@@ -487,10 +487,10 @@ class PluginManager {
// Invalid command, can happen only when Framework is used programmatically,
// as otherwise command is validated in main script
- throw new new ServerlessError(
+ throw new ServerlessError(
`Unrecognized command "${commandsArray.join(' ')}"`,
'UNRECOGNIZED COMMAND'
- )();
+ );
},
{ commands: this.commands }
);
|
fix: Fix internal unrecognized command error processing
|
diff --git a/lib/cli.js b/lib/cli.js
index <HASH>..<HASH> 100644
--- a/lib/cli.js
+++ b/lib/cli.js
@@ -14,7 +14,7 @@ module.exports = function (program) {
} catch (e) {
console.error('Something\'s wrong with the config file.');
- process.exit(1);
+ return;
}
lesshint.configure(config);
|
Don't exit (aborts tests), just return
|
diff --git a/spec/mashify_spec.rb b/spec/mashify_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/mashify_spec.rb
+++ b/spec/mashify_spec.rb
@@ -57,7 +57,7 @@ describe FaradayMiddleware::Mashify do
me.class.should == MyMash
end
- it 'should allow for use of custom Mash subclasses at the instancel evel' do
+ it 'should allow for use of custom Mash subclasses at the instance level' do
class MyMash < ::Hashie::Mash; end
mashify = described_class.new(nil, mash_class: MyMash)
|
Fixes typo in spec description
|
diff --git a/lib/assets/javascripts/autocomplete-rails-uncompressed.js b/lib/assets/javascripts/autocomplete-rails-uncompressed.js
index <HASH>..<HASH> 100644
--- a/lib/assets/javascripts/autocomplete-rails-uncompressed.js
+++ b/lib/assets/javascripts/autocomplete-rails-uncompressed.js
@@ -81,7 +81,14 @@
return;
}
for (var key in update_elements) {
- jQuery(update_elements[key]).val(ui.item ? data[key] : "");
+ element = jQuery(update_elements[key]);
+ if (element.is(':checkbox')) {
+ if (data[key] != null) {
+ element.prop('checked', data[key]);
+ }
+ } else {
+ element.val(ui.item ? data[key] : "");
+ }
}
}
},
@@ -115,7 +122,14 @@
var data = jQuery(this).data(ui.item.id.toString());
var update_elements = jQuery.parseJSON(jQuery(this).attr("data-update-elements"));
for (var key in update_elements) {
- jQuery(update_elements[key]).val(data[key]);
+ element = jQuery(update_elements[key]);
+ if (element.is(':checkbox')) {
+ if (data[key] != null) {
+ element.prop('checked', data[key]);
+ }
+ } else {
+ element.val(data[key]);
+ }
}
}
}
|
* Fixes crowdint/rails3-jquery-autocomplete#<I> Enable setting check boxes when an autocomplete entry is selected
|
diff --git a/core/src/main/java/jenkins/security/CallableDirectionChecker.java b/core/src/main/java/jenkins/security/CallableDirectionChecker.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/jenkins/security/CallableDirectionChecker.java
+++ b/core/src/main/java/jenkins/security/CallableDirectionChecker.java
@@ -120,9 +120,10 @@ public class CallableDirectionChecker extends RoleChecker {
public void onChannelBuilding(ChannelBuilder builder, Object context) {
// if the big red emergency button is pressed, then we need to disable the defense mechanism,
// including enabling classloading.
- if (BYPASS) return;
-
- builder.withRemoteClassLoadingAllowed(false);
+ if (!BYPASS && BYPASS_LOG == null) {
+ builder.withRemoteClassLoadingAllowed(false);
+ }
+ // In either of the above cases, the check method will return normally, but may log things.
builder.withRoleChecker(new CallableDirectionChecker());
}
}
|
1af<I>e8b7f<I>bca<I>d<I>b<I>e0fd<I>d3cb4e3 incorrectly disabled all logging.
When we are allowing all callables through, we want to enable remote class loading
(just in case someone is using it legitimately), but continue logging callable issues.
Currently there is no remoting flag to allow remote class loading while logging it.
|
diff --git a/connection.go b/connection.go
index <HASH>..<HASH> 100644
--- a/connection.go
+++ b/connection.go
@@ -408,7 +408,7 @@ func (cn *connection) writer(keepAliveTimeout time.Duration) {
keepAliveTimer := time.NewTimer(keepAliveTimeout)
for {
cn.mu().Lock()
- for cn.outgoingUnbufferedMessages.Len() != 0 {
+ for cn.outgoingUnbufferedMessages != nil && cn.outgoingUnbufferedMessages.Len() != 0 {
msg := cn.outgoingUnbufferedMessages.Remove(cn.outgoingUnbufferedMessages.Front()).(pp.Message)
cn.mu().Unlock()
b, err := msg.MarshalBinary()
|
Fix crash causing deadlock in connection writer when no messages have been posted yet
|
diff --git a/spyder/utils/syntaxhighlighters.py b/spyder/utils/syntaxhighlighters.py
index <HASH>..<HASH> 100644
--- a/spyder/utils/syntaxhighlighters.py
+++ b/spyder/utils/syntaxhighlighters.py
@@ -185,7 +185,6 @@ class BaseSH(QSyntaxHighlighter):
self.setup_formats(font)
self.cell_separators = None
- self.request_folding = True
self.editor = None
self.patterns = DEFAULT_COMPILED_PATTERNS
@@ -290,12 +289,6 @@ class BaseSH(QSyntaxHighlighter):
:param text: text to highlight.
"""
self.highlight_block(text)
- if self.request_folding:
- if self.editor is not None:
- if self.editor.folding_supported and self.editor.code_folding:
- diff, _ = self.editor.text_diff
- if len(diff) > 0:
- self.editor.request_folding()
def highlight_block(self, text):
"""
@@ -360,9 +353,7 @@ class BaseSH(QSyntaxHighlighter):
def rehighlight(self):
QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
- self.request_folding = False
QSyntaxHighlighter.rehighlight(self)
- self.request_folding = True
QApplication.restoreOverrideCursor()
|
Editor: Don't request folding when highlighting blocks
This is not necessary anymore.
|
diff --git a/lib/Algorithm/AlgorithmMCF.php b/lib/Algorithm/AlgorithmMCF.php
index <HASH>..<HASH> 100644
--- a/lib/Algorithm/AlgorithmMCF.php
+++ b/lib/Algorithm/AlgorithmMCF.php
@@ -7,7 +7,7 @@ abstract class AlgorithmMCF extends Algorithm {
*
* @var Graph
*/
- private $graph;
+ protected $graph;
public function __construct(Graph $graph){
$this->graph = $graph;
|
change variablen visibility from private to protected
|
diff --git a/src/Dzangocart/OM/Sale.php b/src/Dzangocart/OM/Sale.php
index <HASH>..<HASH> 100644
--- a/src/Dzangocart/OM/Sale.php
+++ b/src/Dzangocart/OM/Sale.php
@@ -130,6 +130,11 @@ class Sale extends DzangocartObject
return sprintf('%s, %s', $this->data['customer']['surname'], $this->data['customer']['given_names']);
}
+ public function getCustomerFullName()
+ {
+ return $this->data['customer']['name'];
+ }
+
public function getAffiliateId()
{
return $this->data['affiliate_id'];
|
getCustomerFullName method added
|
diff --git a/includes/class-freemius.php b/includes/class-freemius.php
index <HASH>..<HASH> 100644
--- a/includes/class-freemius.php
+++ b/includes/class-freemius.php
@@ -6305,6 +6305,9 @@
'php_version' => phpversion(),
'language' => get_bloginfo( 'language' ),
'charset' => get_bloginfo( 'charset' ),
+ 'is_premium' => $this->is_premium(),
+ 'is_active' => true,
+ 'is_uninstalled' => false,
);
if ( WP_FS__SKIP_EMAIL_ACTIVATION && $this->has_secret_key() ) {
|
[opt-in] Pass code type and the fact that the module is active on manual opt-in.
|
diff --git a/upload/catalog/controller/checkout/guest.php b/upload/catalog/controller/checkout/guest.php
index <HASH>..<HASH> 100644
--- a/upload/catalog/controller/checkout/guest.php
+++ b/upload/catalog/controller/checkout/guest.php
@@ -326,7 +326,6 @@ class ControllerCheckoutGuest extends Controller {
$this->session->data['guest']['shipping_address'] = false;
}
- // Default Payment Address
if ($this->session->data['guest']['shipping_address']) {
$this->session->data['shipping_address']['firstname'] = $this->request->post['firstname'];
$this->session->data['shipping_address']['lastname'] = $this->request->post['lastname'];
|
[guest.php] wrong comment
removed a wrong comment
|
diff --git a/src/you_get/extractors/youtube.py b/src/you_get/extractors/youtube.py
index <HASH>..<HASH> 100644
--- a/src/you_get/extractors/youtube.py
+++ b/src/you_get/extractors/youtube.py
@@ -353,7 +353,10 @@ class YouTube(VideoExtractor):
# Prepare caption tracks
try:
- caption_tracks = json.loads(ytplayer_config['args']['player_response'])['captions']['playerCaptionsTracklistRenderer']['captionTracks']
+ try:
+ caption_tracks = json.loads(ytplayer_config['args']['player_response'])['captions']['playerCaptionsTracklistRenderer']['captionTracks']
+ except:
+ caption_tracks = ytInitialPlayerResponse['captions']['playerCaptionsTracklistRenderer']['captionTracks']
for ct in caption_tracks:
ttsurl, lang = ct['baseUrl'], ct['languageCode']
|
[youtube] fix extraction of caption tracks, close #<I>
|
diff --git a/lib/togglv8/time_entries.rb b/lib/togglv8/time_entries.rb
index <HASH>..<HASH> 100644
--- a/lib/togglv8/time_entries.rb
+++ b/lib/togglv8/time_entries.rb
@@ -38,7 +38,7 @@ module TogglV8
if !params.has_key?('wid') and !params.has_key?('pid') and !params.has_key?('tid') then
raise ArgumentError, "one of params['wid'], params['pid'], params['tid'] is required"
end
- post "time_entries/start", {time_entry: params}
+ post "time_entries/start", { 'time_entry' => params }
end
def stop_time_entry(time_entry_id)
|
Make start_time_entry params hash consistent with other methods.
|
diff --git a/client/allocrunner/taskrunner/task_runner.go b/client/allocrunner/taskrunner/task_runner.go
index <HASH>..<HASH> 100644
--- a/client/allocrunner/taskrunner/task_runner.go
+++ b/client/allocrunner/taskrunner/task_runner.go
@@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
+ "strings"
"sync"
"time"
@@ -277,6 +278,25 @@ func (tr *TaskRunner) initLabels() {
Value: tr.taskName,
},
}
+
+ if tr.alloc.Job.ParentID != "" {
+ tr.baseLabels = append(tr.baseLabels, metrics.Label{
+ Name: "parent_id",
+ Value: tr.alloc.Job.ParentID,
+ })
+ if strings.Contains(tr.alloc.Job.Name, "/dispatch-") {
+ tr.baseLabels = append(tr.baseLabels, metrics.Label{
+ Name: "dispatch_id",
+ Value: strings.Split(tr.alloc.Job.Name, "/dispatch-")[1],
+ })
+ }
+ if strings.Contains(tr.alloc.Job.Name, "/periodic-") {
+ tr.baseLabels = append(tr.baseLabels, metrics.Label{
+ Name: "periodic_id",
+ Value: strings.Split(tr.alloc.Job.Name, "/periodic-")[1],
+ })
+ }
+ }
}
func (tr *TaskRunner) Run() {
|
Port client portion of #<I> to new taskrunner
PR #<I> was merged to master *after* allocrunnerv2 was branched, so the
client-specific portions must be ported from master to arv2.
|
diff --git a/lib/OpenLayers/Control/Panel.js b/lib/OpenLayers/Control/Panel.js
index <HASH>..<HASH> 100644
--- a/lib/OpenLayers/Control/Panel.js
+++ b/lib/OpenLayers/Control/Panel.js
@@ -169,11 +169,11 @@ OpenLayers.Control.Panel = OpenLayers.Class(OpenLayers.Control, {
*/
draw: function() {
OpenLayers.Control.prototype.draw.apply(this, arguments);
- if (this.div.parentNode === this.map.viewPortDiv) {
- this.map.events.register("buttonclick", this, this.onButtonClick);
- } else {
+ if (this.outsideViewport) {
this.events.element = this.div;
this.events.register("buttonclick", this, this.onButtonClick);
+ } else {
+ this.map.events.register("buttonclick", this, this.onButtonClick);
}
this.addControlsToMap(this.controls);
return this.div;
|
Check for outsideViewport - we may not have a parentNode yet.
|
diff --git a/pyemma/_base/serialization/serialization.py b/pyemma/_base/serialization/serialization.py
index <HASH>..<HASH> 100644
--- a/pyemma/_base/serialization/serialization.py
+++ b/pyemma/_base/serialization/serialization.py
@@ -201,9 +201,9 @@ class SerializableMixIn(object):
... self.x = x
>>> inst = MyClass()
- >>> with named_temporary_file() as file:
- ... inst.save(file)
- ... inst_restored = pyemma.load(file)
+ >>> with named_temporary_file() as file: # doctest: +SKIP
+ ... inst.save(file) # doctest: +SKIP
+ ... inst_restored = pyemma.load(file) # doctest: +SKIP
>>> assert inst_restored.x == inst.x # doctest: +SKIP
# skipped because MyClass is not importable.
|
disable doctest, because dynamically created classes can not be pickled.
|
diff --git a/src/lib/subgenerators/generate-swap-contribute/generator.js b/src/lib/subgenerators/generate-swap-contribute/generator.js
index <HASH>..<HASH> 100644
--- a/src/lib/subgenerators/generate-swap-contribute/generator.js
+++ b/src/lib/subgenerators/generate-swap-contribute/generator.js
@@ -23,7 +23,7 @@ export default function (app) {
* @name contribute
* @api public
*/
- task(app, 'contribute', 'generate-swap-contribute/_contribute')
+ task(app, 'contribute', 'generate-swap-contribute/contribute.md')
/**
* Run the `default` task
|
fix typo in path of the contribute template
|
diff --git a/controllers/auth.php b/controllers/auth.php
index <HASH>..<HASH> 100644
--- a/controllers/auth.php
+++ b/controllers/auth.php
@@ -122,7 +122,7 @@ class FluxBB_Auth_Controller extends Base
);
$user = User::create($user_data);
- return Redirect::to_action('fluxbb::user@profile', array($user->id))->with('message', __('fluxbb::register.reg_complete'));
+ return Redirect::to_action('fluxbb::home@index')->with('message', __('fluxbb::register.reg_complete'));
}
}
|
Redirect back to index after registering.
No point to do otherwise as the user won't be logged in automatically.
|
diff --git a/resync/sitemap.py b/resync/sitemap.py
index <HASH>..<HASH> 100644
--- a/resync/sitemap.py
+++ b/resync/sitemap.py
@@ -77,13 +77,13 @@ class Sitemap(object):
root = Element(root_element, namespaces)
if (self.pretty_xml):
root.text="\n"
- # <rs:md>
- if (hasattr(resources,'md')):
- self.add_md_to_etree(root,resources.md)
# <rs:ln>
if (hasattr(resources,'ln')):
for ln in resources.ln:
self.add_ln_to_etree(root,ln)
+ # <rs:md>
+ if (hasattr(resources,'md')):
+ self.add_md_to_etree(root,resources.md)
# <url> entries from either an iterable or an iterator
for r in resources:
e=self.resource_etree_element(r, element_name=item_element)
|
Fix to have rs:ln elements before rs:md to match <I> spec
|
diff --git a/stream-listener.js b/stream-listener.js
index <HASH>..<HASH> 100644
--- a/stream-listener.js
+++ b/stream-listener.js
@@ -18,7 +18,7 @@ var StreamListener = function() {
Events.EventEmitter.call(this);
this.subscriptions = {};
- resetStream();
+ this.resetStream();
}
Util.inherits(StreamListener, Events.EventEmitter);
@@ -95,6 +95,10 @@ StreamListener.prototype.onUnsubscribe = function(email, channel) {
StreamListener.prototype.onTweet = function(tweet) {
console.log(tweet.text);
};
+
+StreamListener.prototype.hasSubscriptions = function() {
+ return this.subscriptions.keys().length != 0;
+};
StreamListener.prototype.isValidEmail = function(email) {
try {
|
hasSubscriptions() did not exist
|
diff --git a/src/Utils.php b/src/Utils.php
index <HASH>..<HASH> 100644
--- a/src/Utils.php
+++ b/src/Utils.php
@@ -165,17 +165,7 @@ abstract class Utils
*/
protected static function saveXML(DOMDocument $dom)
{
- return preg_replace_callback(
- '([\\xF0-\\xF4]...)',
- function ($m)
- {
- $utf8 = $m[0];
- $cp = ((ord($utf8[0]) & 7) << 18) | ((ord($utf8[1]) & 63) << 12) | ((ord($utf8[2]) & 63) << 6) | (ord($utf8[3]) & 63);
-
- return '&#' . $cp . ';';
- },
- $dom->saveXML($dom->documentElement)
- );
+ return self::encodeUnicodeSupplementaryCharacters($dom->saveXML($dom->documentElement));
}
/**
|
Utils: deduplicated code
|
diff --git a/src/Frozennode/Administrator/AdministratorServiceProvider.php b/src/Frozennode/Administrator/AdministratorServiceProvider.php
index <HASH>..<HASH> 100644
--- a/src/Frozennode/Administrator/AdministratorServiceProvider.php
+++ b/src/Frozennode/Administrator/AdministratorServiceProvider.php
@@ -23,12 +23,6 @@ class AdministratorServiceProvider extends ServiceProvider {
{
$this->package('frozennode/administrator');
- //set the config items if a user has provided an application config
- foreach (Config::get('administrator::administrator', array()) as $key => $option)
- {
- Config::set('administrator::administrator.'.$key, Config::get('administrator.'.$key, Config::get('administrator::administrator.'.$key)));
- }
-
include __DIR__.'/../../filters.php';
include __DIR__.'/../../viewComposers.php';
include __DIR__.'/../../routes.php';
|
no need for this config overwrite stuff anymore
|
diff --git a/test/utils/e2e-utils.js b/test/utils/e2e-utils.js
index <HASH>..<HASH> 100644
--- a/test/utils/e2e-utils.js
+++ b/test/utils/e2e-utils.js
@@ -168,11 +168,6 @@ const freshModeGhostStart = async (options) => {
await settingsService.init();
- // Reset the URL service generators
- // @TODO: Prob B: why/how is this different to urlService.reset?
- // @TODO: why would we do this on a fresh boot?!
- urlService.resetGenerators();
-
// Actually boot Ghost
await bootGhost(options);
@@ -239,6 +234,9 @@ const stopGhost = async () => {
if (ghostServer && ghostServer.httpServer) {
await ghostServer.stop();
delete require.cache[require.resolve('../../core/app')];
+ // NOTE: similarly to urlService.reset() there doesn't seem to be a need for this call
+ // probable best location for this type of cleanup if it's needed is registering
+ // a hood during the "server cleanup" phase of the server stop
urlService.resetGenerators();
}
};
|
Removed unnecessary resetGenerators call
no issue
- This extra call doesn't seem to be necessary during a fresh boot. It only adds noise in code!
|
diff --git a/lib/filterlib.php b/lib/filterlib.php
index <HASH>..<HASH> 100644
--- a/lib/filterlib.php
+++ b/lib/filterlib.php
@@ -631,8 +631,7 @@ function filter_get_active_in_context($context) {
GROUP BY filter
HAVING MAX(f.active * ctx.depth) > -MIN(f.active * ctx.depth)
ORDER BY MAX(f.sortorder)) active
- LEFT JOIN {filter_config} fc ON fc.filter = active.filter
- WHERE fc.contextid = $context->id OR fc.contextid IS NULL");
+ LEFT JOIN {filter_config} fc ON fc.filter = active.filter AND fc.contextid = $context->id");
// Masssage the data into the specified format to return.
$filters = array();
|
filters: MDL-<I> tweak to improve SQL performance
|
diff --git a/src/java/com/threerings/gwt/ui/Widgets.java b/src/java/com/threerings/gwt/ui/Widgets.java
index <HASH>..<HASH> 100644
--- a/src/java/com/threerings/gwt/ui/Widgets.java
+++ b/src/java/com/threerings/gwt/ui/Widgets.java
@@ -309,9 +309,10 @@ public class Widgets
* Creates a PushButton with default(up), mouseover and mousedown states.
*/
public static PushButton newPushButton (Image defaultImage, Image overImage,
- Image downImage, ClickHandler onClick)
+ Image downImage, ClickHandler onClick)
{
- PushButton button = new PushButton(defaultImage, downImage, onClick);
+ PushButton button = new PushButton(defaultImage, downImage);
+ maybeAddClickHandler(button, onClick);
button.getUpHoveringFace().setImage(overImage);
return button;
}
|
Don't require a click handler for our button.
|
diff --git a/course/format/singleactivity/lib.php b/course/format/singleactivity/lib.php
index <HASH>..<HASH> 100644
--- a/course/format/singleactivity/lib.php
+++ b/course/format/singleactivity/lib.php
@@ -181,7 +181,7 @@ class format_singleactivity extends format_base {
),
);
- if (!isset($availabletypes[$config->activitytype])) {
+ if (!empty($availabletypes) && !isset($availabletypes[$config->activitytype])) {
$courseformatoptions['activitytype']['default'] = array_keys($availabletypes)[0];
}
}
|
MDL-<I> format_singleactivity: Make sure available types is not empty
|
diff --git a/dhooks/client.py b/dhooks/client.py
index <HASH>..<HASH> 100644
--- a/dhooks/client.py
+++ b/dhooks/client.py
@@ -21,7 +21,7 @@ class Webhook:
self.avatar_url = options.get('avatar_url')
def close(self):
- self.session.close()
+ return self.session.close()
def send(self, content: str = None, embeds: list or Embed = [], tts: bool = False) -> bool:
'''Sends a message to the payload url'''
|
Fix session closing for async mode
|
diff --git a/message.go b/message.go
index <HASH>..<HASH> 100644
--- a/message.go
+++ b/message.go
@@ -22,6 +22,13 @@ const (
// FlagNoAutoStart signals that the message bus should not automatically
// start an application when handling this message.
FlagNoAutoStart
+ // FlagAllowInteractiveAuthorization may be set on a method call
+ // message to inform the receiving side that the caller is prepared
+ // to wait for interactive authorization, which might take a
+ // considerable time to complete. For instance, if this flag is set,
+ // it would be appropriate to query the user for passwords or
+ // confirmation via Polkit or a similar framework.
+ FlagAllowInteractiveAuthorization
)
// Type represents the possible types of a D-Bus message.
@@ -248,7 +255,7 @@ func (msg *Message) EncodeTo(out io.Writer, order binary.ByteOrder) error {
// IsValid checks whether msg is a valid message and returns an
// InvalidMessageError if it is not.
func (msg *Message) IsValid() error {
- if msg.Flags & ^(FlagNoAutoStart|FlagNoReplyExpected) != 0 {
+ if msg.Flags & ^(FlagNoAutoStart|FlagNoReplyExpected|FlagAllowInteractiveAuthorization) != 0 {
return InvalidMessageError("invalid flags")
}
if msg.Type == 0 || msg.Type >= typeMax {
|
Add support for the ALLOW_INTERACTIVE_AUTHORIZATION flag
This adds support for the ALLOW_INTERACTIVE_AUTHORIZATION flag in
the message parser. It doesn't do anything else with this flag but
prevents failures from clients passing this option.
Fixes #<I>
|
diff --git a/DataPanel.py b/DataPanel.py
index <HASH>..<HASH> 100644
--- a/DataPanel.py
+++ b/DataPanel.py
@@ -574,10 +574,8 @@ class DataPanel(Panel.Panel):
items_per_row = 4
item_width = int(canvas_bounds.width / items_per_row)
- item_rows = int(canvas_bounds.height / item_width) + 1
drawing_context.save()
-
try:
max_index = len(self.__delegate.data_items)
top_visible_row = visible_rect.top / item_width
|
Removed unused calculation/variable.
svn r<I>
|
diff --git a/callback_query.go b/callback_query.go
index <HASH>..<HASH> 100644
--- a/callback_query.go
+++ b/callback_query.go
@@ -30,7 +30,7 @@ func Query(scope *Scope) {
if kind := dest.Kind(); kind == reflect.Slice {
isSlice = true
destType = dest.Type().Elem()
- dest.Set(reflect.Indirect(reflect.New(reflect.SliceOf(destType))))
+ dest.Set(reflect.MakeSlice(dest.Type(), 0, 0))
if destType.Kind() == reflect.Ptr {
isPtr = true
|
Overwrite initiliazed slices as empty slices
|
diff --git a/classes/Gems/Default/RespondentExportAction.php b/classes/Gems/Default/RespondentExportAction.php
index <HASH>..<HASH> 100644
--- a/classes/Gems/Default/RespondentExportAction.php
+++ b/classes/Gems/Default/RespondentExportAction.php
@@ -45,8 +45,11 @@ class Gems_Default_RespondentExportAction extends \Gems_Controller_Action
if ($request->isPost()) {
$respondents = preg_split('/[\s,;]+/', $request->getParam('id'), -1, PREG_SPLIT_NO_EMPTY);
-
- $export->render($respondents, $request->getParam('group'), $request->getParam('format'));
+ if (count($respondents)>0) {
+ $export->render($respondents, $request->getParam('group'), $request->getParam('format'));
+ } else {
+ $this->addMessage($this->_('Please select at least one respondent'));
+ }
}
}
}
\ No newline at end of file
|
Prevented error by not submitting any respondent number
|
diff --git a/bokeh/plotting.py b/bokeh/plotting.py
index <HASH>..<HASH> 100644
--- a/bokeh/plotting.py
+++ b/bokeh/plotting.py
@@ -766,6 +766,11 @@ def scatter(*args, **kwargs):
markertype = kwargs.get("type", "circle")
x_name = names[0]
+ # TODO this won't be necessary when markers are made uniform
+ if markertype == "circle":
+ if "radius" not in kwargs:
+ kwargs["radius"] = kwargs.get("size")/2
+
# TODO: How to handle this? Just call curplot()?
if not len(color_fields.intersection(set(kwargs.keys()))):
kwargs['color'] = get_default_color()
|
adapt size argmuent to circle scatter
|
diff --git a/GPy/examples/dimensionality_reduction.py b/GPy/examples/dimensionality_reduction.py
index <HASH>..<HASH> 100644
--- a/GPy/examples/dimensionality_reduction.py
+++ b/GPy/examples/dimensionality_reduction.py
@@ -207,7 +207,7 @@ def bgplvm_simulation(burnin='scg', plot_sim=False,
# cstr = 'X_variance'
# m.unconstrain(cstr), m.constrain_bounded(cstr, 1e-3, 1.)
- m.set('X_var', np.ones(N * Q) * .5 + np.random.randn(N * Q) * .01)
+ m['X_var'] = np.ones(N * Q) * .5 + np.random.randn(N * Q) * .01
# cstr = "iip"
# m.unconstrain(cstr); m.constrain_fixed(cstr)
|
rewritten dim_reduction demo to match new style of getters and setters
|
diff --git a/rules/order-in-components.js b/rules/order-in-components.js
index <HASH>..<HASH> 100644
--- a/rules/order-in-components.js
+++ b/rules/order-in-components.js
@@ -35,6 +35,10 @@ module.exports = function(context) {
return property.key.name === 'actions' && utils.isObjectExpression(property.value);
};
+ var isCustomFunction = function(property) {
+ return utils.isFunctionExpression(property.value);
+ };
+
var getOrderValue = function(property) {
var val = null;
@@ -46,10 +50,12 @@ module.exports = function(context) {
val = 30;
} else if (isActionsProp(property)) {
val = 40;
+ } else if (isCustomFunction(property)) {
+ val = 50;
}
return val;
- }
+ };
var findUnorderedProperty = function(arr) {
var len = arr.length - 1;
|
add custom functions to order-in-components rule
|
diff --git a/lib/Wrapper.js b/lib/Wrapper.js
index <HASH>..<HASH> 100644
--- a/lib/Wrapper.js
+++ b/lib/Wrapper.js
@@ -180,7 +180,7 @@ Wrapper.prototype.getCompiler = function getCompiler(cb) {
}.bind(this));
}
- if (this.opts.watch && this.opts.hmrRoot) {
+ if (this.opts.watch && this.opts.hmr && this.opts.hmrRoot) {
hmr.bindCompiler(compiler, this.opts);
}
|
Bug fix for an uncaught exception triggered by certain option combinations
|
diff --git a/micrometer-core/src/main/java/io/micrometer/core/instrument/LongTaskTimer.java b/micrometer-core/src/main/java/io/micrometer/core/instrument/LongTaskTimer.java
index <HASH>..<HASH> 100644
--- a/micrometer-core/src/main/java/io/micrometer/core/instrument/LongTaskTimer.java
+++ b/micrometer-core/src/main/java/io/micrometer/core/instrument/LongTaskTimer.java
@@ -66,6 +66,7 @@ public interface LongTaskTimer extends Meter, HistogramSupport {
* @return The return value of {@code f}.
* @throws Exception Any exception bubbling up from the callable.
*/
+ @Nullable
default <T> T recordCallable(Callable<T> f) throws Exception {
Sample sample = start();
try {
@@ -82,6 +83,7 @@ public interface LongTaskTimer extends Meter, HistogramSupport {
* @param <T> The return type of the {@link Supplier}.
* @return The return value of {@code f}.
*/
+ @Nullable
default <T> T record(Supplier<T> f) {
Sample sample = start();
try {
|
Mark supplier/callable record methods return value as nullable
This was missed originally, but the return value is nullable and should be marked as such.
Resolves gh-<I>
|
diff --git a/lib/parse/client.rb b/lib/parse/client.rb
index <HASH>..<HASH> 100644
--- a/lib/parse/client.rb
+++ b/lib/parse/client.rb
@@ -186,10 +186,10 @@ module Parse
if body.error?
if body.code <= 100
puts "[ParseError] #{body}"
- raise Parse::ServerError
+ raise Parse::ServerError, body
elsif body.code == 155
puts "[ParseError] #{body}"
- raise Parse::RequestLimitExceededError
+ raise Parse::RequestLimitExceededError, body
end
end
|
Return the body in additional exceptions.
|
diff --git a/stagpy/stagyydata.py b/stagpy/stagyydata.py
index <HASH>..<HASH> 100644
--- a/stagpy/stagyydata.py
+++ b/stagpy/stagyydata.py
@@ -453,7 +453,7 @@ class _EmptyStep(_Step):
return False
-class _Steps(Mapping):
+class _Steps:
"""Collections of time steps.
|
_Steps no longer inherits Mapping
The mixin methods offered by the Mapping interface aren't relevant
to _Steps instances.
|
diff --git a/boot/logger.js b/boot/logger.js
index <HASH>..<HASH> 100644
--- a/boot/logger.js
+++ b/boot/logger.js
@@ -53,7 +53,7 @@ function errorLogging () {
module.exports = function (options) {
var logger
- var config = { name: 'request', streams: [], level: 'error' }
+ var config = { name: 'request', streams: [], level: 'info' }
if (!env.match(/test/i)) {
var logsPath = path.join(cwd, 'logs')
|
refactor(logger): default level is now at info level, matching bunyan's default
|
diff --git a/src/Glyph.js b/src/Glyph.js
index <HASH>..<HASH> 100644
--- a/src/Glyph.js
+++ b/src/Glyph.js
@@ -25,8 +25,10 @@ function Glyph( args ) {
// each individual glyph must be explicitely made visible
this.visible = false;
- // required to display the glyph properly in a canvas
- this.fillColor = this.strokeColor = new paper.Color(0, 0, 0);
+ // default colors required to display the glyph in a canvas
+ this.fillColor = new paper.Color(0, 0, 0);
+ // stroke won't be displayed unless strokeWidth is set to 1
+ this.strokeColor = new paper.Color(0, 0, 0);
this.strokeScaling = false;
}
|
Set the stroke color to black by default
|
diff --git a/src/Model/User.php b/src/Model/User.php
index <HASH>..<HASH> 100644
--- a/src/Model/User.php
+++ b/src/Model/User.php
@@ -1148,7 +1148,7 @@ class User extends Base
// If the user's password was updated send them a notification
if ($bPasswordUpdated) {
- $oEmailer = Factory::service('Emailer');
+ $oEmailer = Factory::service('Emailer', 'nailsapp/module-email');
$oEmail = new \stdClass();
$oEmail->type = 'password_updated';
@@ -1511,7 +1511,7 @@ class User extends Base
// --------------------------------------------------------------------------
- $oEmailer = Factory::service('Emailer');
+ $oEmailer = Factory::service('Emailer', 'nailsapp/module-email');
$oEmail = new \stdClass();
$oEmail->type = 'verify_email_' . $oEmailRow->group_id;
$oEmail->to_id = $oEmailRow->user_id;
@@ -2172,7 +2172,7 @@ class User extends Base
// Send the user the welcome email
if ($sendWelcome) {
- $oEmailer = Factory::service('Emailer');
+ $oEmailer = Factory::service('Emailer', 'nailsapp/module-email');
$oEmail = new \stdClass();
$oEmail->type = 'new_user_' . $oGroup->id;
$oEmail->to_id = $iId;
|
Corrected badly loaded Emailer library
|
diff --git a/test/unexpectedMitm.js b/test/unexpectedMitm.js
index <HASH>..<HASH> 100644
--- a/test/unexpectedMitm.js
+++ b/test/unexpectedMitm.js
@@ -1780,6 +1780,21 @@ describe('unexpectedMitm', function () {
]
);
});
+
+ it('should output response headers preserving their original case', function () {
+ return expect('GET /', 'with http mocked out with extra info', {
+ response: {
+ statusCode: 200,
+ headers: {
+ 'X-Is-Test': 'yes'
+ }
+ }
+ }, 'to yield response', 200).spread(function (fulfilmentValue, httpConversation) {
+ var httpResponse = httpConversation.exchanges[0].response;
+
+ expect(httpResponse.headers.getNames(), 'to contain', 'X-Is-Test');
+ });
+ });
});
it('should preserve the fulfilment value of the promise returned by the assertion being delegated to', function () {
|
Add test asserting the preservation of the original casing of headers.
|
diff --git a/src/Controller/Api/AppController.php b/src/Controller/Api/AppController.php
index <HASH>..<HASH> 100644
--- a/src/Controller/Api/AppController.php
+++ b/src/Controller/Api/AppController.php
@@ -21,16 +21,6 @@ class AppController extends Controller
use ControllerTrait;
use PanelUtilTrait;
- /**
- * Include menus identifier
- */
- const FLAG_INCLUDE_MENUS = 'menus';
-
- /**
- * Property name for menu items
- */
- const MENU_PROPERTY_NAME = '_Menus';
-
public $components = [
'RequestHandler',
'Crud.Crud' => [
|
Removing obsolete constants (task #<I>)
|
diff --git a/src/pycdlib/utils.py b/src/pycdlib/utils.py
index <HASH>..<HASH> 100644
--- a/src/pycdlib/utils.py
+++ b/src/pycdlib/utils.py
@@ -20,10 +20,14 @@ Various utilities for PyIso.
import socket
+use_sendfile = True
try:
from sendfile import sendfile
except ImportError:
- from os import sendfile
+ try:
+ from os import sendfile
+ except ImportError:
+ use_sendfile = False
import pycdlibexception
@@ -90,7 +94,7 @@ def copy_data(data_length, blocksize, infp, outfp):
Returns:
Nothing.
'''
- if hasattr(infp, 'fileno') and hasattr(outfp, 'fileno'):
+ if use_sendfile and hasattr(infp, 'fileno') and hasattr(outfp, 'fileno'):
# This is one of those instances where using the file object and the
# file descriptor causes problems. The sendfile() call actually updates
# the underlying file descriptor, but the file object does not know
|
Allow usage of pycdlib without sendfile installed.
|
diff --git a/easy_thumbnails/files.py b/easy_thumbnails/files.py
index <HASH>..<HASH> 100644
--- a/easy_thumbnails/files.py
+++ b/easy_thumbnails/files.py
@@ -83,7 +83,11 @@ class ThumbnailFile(ImageFieldFile):
"""
if not hasattr(self, '_image_cache'):
+ was_closed = self.closed
+ self.open()
self.image = Image.open(self)
+ if was_closed:
+ self.close()
return self._image_cache
def _set_image(self, image):
@@ -271,12 +275,16 @@ class Thumbnailer(File):
def _image(self):
if not hasattr(self, '_cached_image'):
+ was_closed = self.closed
+ self.open()
# TODO: Use different methods of generating the file, rather than
# just relying on PIL.
self._cached_image = Image.open(self)
# Image.open() is a lazy operation, so force the load so we
# can close this file again if appropriate.
self._cached_image.load()
+ if was_closed:
+ self.close()
return self._cached_image
image = property(_image)
|
Ensure the underlying file is open before attempting to read it.
|
diff --git a/lib/uirusu.rb b/lib/uirusu.rb
index <HASH>..<HASH> 100644
--- a/lib/uirusu.rb
+++ b/lib/uirusu.rb
@@ -31,6 +31,7 @@ module Uirusu
VERSION = "0.0.5"
CONFIG_FILE = "~/.uirusu"
VT_API = "https://www.virustotal.com/vtapi/v2"
+ RESULT_FIELDS = [ :hash, :scanner, :version, :detected, :result, :md5, :sha1, :sha256, :update, :permalink, ]
end
require 'json'
|
Maybe this time I'll actually have RESULT_FIELDS in the file.
|
diff --git a/kubernetes/client/models/v1_projected_volume_source.py b/kubernetes/client/models/v1_projected_volume_source.py
index <HASH>..<HASH> 100644
--- a/kubernetes/client/models/v1_projected_volume_source.py
+++ b/kubernetes/client/models/v1_projected_volume_source.py
@@ -99,9 +99,6 @@ class V1ProjectedVolumeSource(object):
:param sources: The sources of this V1ProjectedVolumeSource. # noqa: E501
:type: list[V1VolumeProjection]
"""
- if self.local_vars_configuration.client_side_validation and sources is None: # noqa: E501
- raise ValueError("Invalid value for `sources`, must not be `None`") # noqa: E501
-
self._sources = sources
def to_dict(self):
|
tolerate null sources on projected volumes
See issue <I>
Removes the false requirement that sources be a populated list
|
diff --git a/holoviews/core/spaces.py b/holoviews/core/spaces.py
index <HASH>..<HASH> 100644
--- a/holoviews/core/spaces.py
+++ b/holoviews/core/spaces.py
@@ -808,13 +808,13 @@ class DynamicMap(HoloMap):
"""
Collation allows collapsing DynamicMaps with invalid nesting
hierarchies. This is particularly useful when defining
- DynamicMaps returning an (Nd)Layout. Collating will split the
- DynamicMap into an (Nd)Layout of individual DynamicMaps. Note
- that the Layout should be of consistent length and types for
- this to work correctly. In order to attach a stream as a source
- for a particular object in the Layout you may supply either
- a dictionary or list of lists of streams corresponding to each
- Element in the Layout.
+ DynamicMaps returning an (Nd)Layout or GridSpace
+ type. Collating will split the DynamicMap into of individual
+ DynamicMaps. Note that the composite object has to be of
+ consistent length and types for this to work
+ correctly. Associating streams with specific viewables in the
+ returned container declare a stream_mapping on the DynamicMap
+ Callable during instantiation.
"""
# Initialize
if self.last is not None:
|
Updated DynamicMap.collate docstring
|
diff --git a/gwpy/timeseries/core.py b/gwpy/timeseries/core.py
index <HASH>..<HASH> 100644
--- a/gwpy/timeseries/core.py
+++ b/gwpy/timeseries/core.py
@@ -790,6 +790,14 @@ class TimeSeriesBase(Series):
out.name = '{0!s} {1!s} {2!s}'.format(oname, op_, vname)
return out
+ # Quantity overrides __eq__ and __ne__ in a way that doesn't work for us,
+ # so we just undo that
+ def __eq__(self, other):
+ return numpy.ndarray.__eq__(self, other)
+
+ def __ne__(self, other):
+ return numpy.ndarray.__ne__(self, other)
+
# -- TimeSeriesBaseDict -------------------------------------------------------
|
gwpy.timeseries: overwrite equality operators
astropy overwrites them in a way that breaks the statetimeseries functionality, so we undo that
|
diff --git a/public_html/profiles/social/modules/contrib/profile/src/ProfileHtmlRouteProvider.php b/public_html/profiles/social/modules/contrib/profile/src/ProfileHtmlRouteProvider.php
index <HASH>..<HASH> 100644
--- a/public_html/profiles/social/modules/contrib/profile/src/ProfileHtmlRouteProvider.php
+++ b/public_html/profiles/social/modules/contrib/profile/src/ProfileHtmlRouteProvider.php
@@ -28,7 +28,8 @@ class ProfileHtmlRouteProvider extends DefaultHtmlRouteProvider {
$route = (new Route(
"/user/{user}/{profile_type}",
['_controller' => '\Drupal\profile\Controller\ProfileController::userProfileForm',
- '_title_callback' => '\Drupal\profile\Controller\ProfileController::addPageTitle'
+ '_title_callback' => '\Drupal\profile\Controller\ProfileController::addPageTitle',
+ ],
['_profile_access_check' => 'add'],
[
'parameters' => [
|
DS-<I> by ronaldtebrake: faulty patched
|
diff --git a/src/array/update.js b/src/array/update.js
index <HASH>..<HASH> 100644
--- a/src/array/update.js
+++ b/src/array/update.js
@@ -4,8 +4,12 @@
//------------------------------------------------------------------------------
d3plus.array.update = function( arr , x ) {
+ if ( !(arr instanceof Array) ) {
+ var arr = []
+ }
+
// If the user has passed an array, just use that.
- if(x instanceof Array){
+ if( x instanceof Array ){
arr = x;
}
// Otherwise remove it if it is present.
|
array update function now has a catch for undefined arrays
|
diff --git a/lib/fwapi.js b/lib/fwapi.js
index <HASH>..<HASH> 100644
--- a/lib/fwapi.js
+++ b/lib/fwapi.js
@@ -109,5 +109,29 @@ FWAPI.prototype.deleteRule = function (uuid, params, callback) {
};
+/**
+ * Gets VMs affected by a rule.
+ *
+ * @param {String} uuid : the rule UUID.
+ * @param {Function} callback : of the form f(err, res).
+ */
+FWAPI.prototype.getRuleVMs = function (uuid, params, callback) {
+ assert.string(uuid, 'uuid');
+ return this.get(format('/rules/%s/vms', uuid), params, callback);
+};
+
+
+/**
+ * Gets rules affecting a VM.
+ *
+ * @param {String} uuid : the rule UUID.
+ * @param {Function} callback : of the form f(err, res).
+ */
+FWAPI.prototype.getVMrules = function (uuid, params, callback) {
+ assert.string(uuid, 'uuid');
+ return this.get(format('/firewalls/vms/%s', uuid), params, callback);
+};
+
+
module.exports = FWAPI;
|
FWAPI-<I>: /rules/:uuid/vms endpoint for finding affected VMs
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.