diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/lib/svtplay_dl/service/tv4play.py b/lib/svtplay_dl/service/tv4play.py
index <HASH>..<HASH> 100644
--- a/lib/svtplay_dl/service/tv4play.py
+++ b/lib/svtplay_dl/service/tv4play.py
@@ -165,10 +165,24 @@ class Tv4play(Service, OpenGraphThumbMixin):
show = quote_plus(show)
return show
+ def _seasoninfo(self, data):
+ if "season" in data and data["season"]:
+ season = "{:02d}".format(data["season"])
+ episode = "{:02d}".format(data["episode"])
+ if int(season) == 0 and int(episode) == 0:
+ return None
+ return "s%se%s" % (season, episode)
+ else:
+ return None
+
def _autoname(self, vid):
jsondata = self._get_show_info()
for i in jsondata["results"]:
if vid == i["id"]:
+ season = self._seasoninfo(i)
+ if season:
+ index = len(i["program"]["name"])
+ return i["title"][:index] + ".%s%s" % (season, i["title"][index:])
return i["title"]
return self._get_clip_info(vid) | tv4play: Add season and episode info in the filename |
diff --git a/source/application/layouts/index.js b/source/application/layouts/index.js
index <HASH>..<HASH> 100644
--- a/source/application/layouts/index.js
+++ b/source/application/layouts/index.js
@@ -50,13 +50,17 @@ function layout(props) {
}
function isAbsolute(reference) {
- return !isRelative(reference);
+ return !isRelative(reference) && !hasUri(reference);
}
function isReference(reference) {
- return 'id' in reference;
+ return 'id' in reference || 'uri' in reference;
}
function isRelative(reference) {
- return (reference.id || '').charAt(0) === '.';
+ return (reference.id || '').charAt(0) === '.' || hasUri(reference);
+}
+
+function hasUri(reference) {
+ return 'uri' in reference;
} | fix: make sure .uri references are injected |
diff --git a/gulp/tasks/build-scss.js b/gulp/tasks/build-scss.js
index <HASH>..<HASH> 100644
--- a/gulp/tasks/build-scss.js
+++ b/gulp/tasks/build-scss.js
@@ -24,6 +24,16 @@ exports.task = function() {
var streams = [];
var baseVars = fs.readFileSync('src/core/style/variables.scss', 'utf8').toString();
gutil.log("Building css files...");
+
+ // create SCSS file for distribution
+ streams.push(
+ gulp.src(paths)
+ .pipe(util.filterNonCodeFiles())
+ .pipe(filter(['**', '!**/*-theme.scss']))
+ .pipe(concat('angular-material.scss'))
+ .pipe(gulp.dest(dest))
+ );
+
streams.push(
gulp.src(paths)
.pipe(util.filterNonCodeFiles()) | feature(build): add concatenated SCSS file for distribution
Closes #<I>. |
diff --git a/test/e2e/kubelet_perf.go b/test/e2e/kubelet_perf.go
index <HASH>..<HASH> 100644
--- a/test/e2e/kubelet_perf.go
+++ b/test/e2e/kubelet_perf.go
@@ -256,7 +256,7 @@ var _ = framework.KubeDescribe("Kubelet [Serial] [Slow]", func() {
},
podsPerNode: 100,
memLimits: framework.ResourceUsagePerContainer{
- stats.SystemContainerKubelet: &framework.ContainerResourceUsage{MemoryRSSInBytes: 100 * 1024 * 1024},
+ stats.SystemContainerKubelet: &framework.ContainerResourceUsage{MemoryRSSInBytes: 120 * 1024 * 1024},
stats.SystemContainerRuntime: &framework.ContainerResourceUsage{MemoryRSSInBytes: 300 * 1024 * 1024},
},
}, | e2e: bump the memory limit for kubelet
The test is mainly for monitoring and tracking resource leaks. Bump the
limit to account for variations in different settings. |
diff --git a/webapp.js b/webapp.js
index <HASH>..<HASH> 100644
--- a/webapp.js
+++ b/webapp.js
@@ -283,6 +283,8 @@ function registerEvents(emitter) {
events: new EventEmitter(),
}
+ context.events.setMaxListeners(256)
+
Step(
function() {
var next = this | make ctx.events EventEmitter setMaxListeners to <I>. Perfectly fine to have a lot
of listeners. |
diff --git a/runner.go b/runner.go
index <HASH>..<HASH> 100644
--- a/runner.go
+++ b/runner.go
@@ -32,6 +32,15 @@ func init() {
}
func Expectify(suite interface{}, t *testing.T) {
+ var name string
+ defer func() {
+ if err := recover(); err != nil {
+ os.Stdout = stdout
+ color.Printf("@R 💣 %-75s\n", name)
+ panic(err)
+ }
+ }()
+
tp := reflect.TypeOf(suite)
sv := reflect.ValueOf(suite)
count := tp.NumMethod()
@@ -42,7 +51,7 @@ func Expectify(suite interface{}, t *testing.T) {
announced := false
for i := 0; i < count; i++ {
method := tp.Method(i)
- name := method.Name
+ name = method.Name
if pattern.MatchString(name) == false || method.Type.NumIn() != 1 {
continue
} | more helpful output if tested code panics |
diff --git a/tests/spec/app-handlers-spec.js b/tests/spec/app-handlers-spec.js
index <HASH>..<HASH> 100644
--- a/tests/spec/app-handlers-spec.js
+++ b/tests/spec/app-handlers-spec.js
@@ -2267,7 +2267,7 @@ describe('F2.AppHandlers - error handling - appScriptLoadFailed',function() {
var appManifest = function()
{
return {
- scripts:['http://docs.openf2.org/demos/apps/JavaScript/HelloWorld/doesNotExist.js'],
+ scripts:['http://www.openf2.org/foobar.js'],
styles:[],
inlineScripts:[],
apps:[ | updated <I> url as the github-hosted page seems to not make the test fail |
diff --git a/client/cli/ok.py b/client/cli/ok.py
index <HASH>..<HASH> 100644
--- a/client/cli/ok.py
+++ b/client/cli/ok.py
@@ -12,6 +12,7 @@ import client
import logging
import os
import sys
+import struct
LOGGING_FORMAT = '%(levelname)s | %(filename)s:%(lineno)d | %(message)s'
logging.basicConfig(format=LOGGING_FORMAT)
@@ -92,6 +93,12 @@ def parse_input(command_input=None):
def main():
"""Run all relevant aspects of ok.py."""
+
+ #Checking user's Python bit version
+ bit_v = (8 * struct.calcsize("P"))
+ if (bit_v == 32):
+ print("32 bit Python is not supported. Please install the 64 bit version.")
+ log.debug("32 bit Python is detected.")
args = parse_input()
log.setLevel(logging.DEBUG if args.debug else logging.ERROR) | Added warning for <I>bit Python |
diff --git a/bin/start-mc.js b/bin/start-mc.js
index <HASH>..<HASH> 100755
--- a/bin/start-mc.js
+++ b/bin/start-mc.js
@@ -7,7 +7,7 @@ const mri = require('mri');
const shell = require('shelljs');
const fetch = require('node-fetch');
const env = require('@commercetools-frontend/mc-html-template/env');
-const replaceHtmlPlaceholders = require('@commercetools-frontend/mc-html-template/replace-html-placeholders');
+const replaceHtmlPlaceholders = require('@commercetools-frontend/mc-html-template/utils/replace-html-placeholders');
if (process.env.NODE_ENV !== 'production')
throw new Error( | refactor(html-template): group files into folders |
diff --git a/src/ToastrServiceProvider.php b/src/ToastrServiceProvider.php
index <HASH>..<HASH> 100644
--- a/src/ToastrServiceProvider.php
+++ b/src/ToastrServiceProvider.php
@@ -66,12 +66,13 @@ class ToastrServiceProvider extends ServiceProvider
Blade::directive('jquery', function ($arguments) {
$version = $arguments;
if (strpos($arguments, ',')) {
- list($version, $src) = explode(',', $arguments);
+ [$version, $src] = explode(',', $arguments);
}
-
+
if (isset($src)) {
return "<?php echo jquery($version, $src); ?>";
}
+
return "<?php echo jquery($version); ?>";
});
} | Updated jquery blade directive to accept $src
Updated jquery blade directive to accept $src as a parameter |
diff --git a/tests/DiCompilerTest.php b/tests/DiCompilerTest.php
index <HASH>..<HASH> 100644
--- a/tests/DiCompilerTest.php
+++ b/tests/DiCompilerTest.php
@@ -89,6 +89,7 @@ class DiCompilerTest extends \PHPUnit_Framework_TestCase
{
$compiler = new DiCompiler(new FakeCarModule, $_ENV['TMP_DIR']);
$compiler->dumpGraph();
- $this->assertFileExists($_ENV['TMP_DIR'] . '/graph/Ray_Compiler_FakeCarInterface-.html');
+ $any = Name::ANY;
+ $this->assertFileExists($_ENV['TMP_DIR'] . '/graph/Ray_Compiler_FakeCarInterface-' . $any . '.html');
}
}
diff --git a/tests/Fake/FakeLoggerPointProvider.php b/tests/Fake/FakeLoggerPointProvider.php
index <HASH>..<HASH> 100644
--- a/tests/Fake/FakeLoggerPointProvider.php
+++ b/tests/Fake/FakeLoggerPointProvider.php
@@ -2,7 +2,6 @@
namespace Ray\Compiler;
-use Ray\Di\InjectionPoint;
use Ray\Di\InjectionPointInterface;
use Ray\Di\ProviderInterface; | package portability
use Name::ANY |
diff --git a/i18n.class.php b/i18n.class.php
index <HASH>..<HASH> 100644
--- a/i18n.class.php
+++ b/i18n.class.php
@@ -254,7 +254,7 @@ class i18n {
$userLangs = array_unique($userLangs);
foreach ($userLangs as $key => $value) {
- $userLangs[$key] = preg_replace('/[^a-zA-Z0-9]/', '', $value); // only allow a-z, A-Z and 0-9
+ $userLangs[$key] = preg_replace('/[^a-zA-Z0-9_-]/', '', $value); // only allow a-z, A-Z and 0-9
}
return $userLangs; | Also allow '_' and '-' for language codes
Closes #6 |
diff --git a/tuf/signed/sign.go b/tuf/signed/sign.go
index <HASH>..<HASH> 100644
--- a/tuf/signed/sign.go
+++ b/tuf/signed/sign.go
@@ -87,7 +87,8 @@ func Sign(service CryptoService, s *data.Signed, signingKeys []data.PublicKey,
})
}
- for _, sig := range s.Signatures {
+ for i := range s.Signatures {
+ sig := s.Signatures[i]
if _, ok := signingKeyIDs[sig.KeyID]; ok {
// key is in the set of key IDs for which a signature has been created
continue | linting: fix Implicit memory aliasing in RangeStmt |
diff --git a/MAVProxy/tools/MAVExplorer.py b/MAVProxy/tools/MAVExplorer.py
index <HASH>..<HASH> 100755
--- a/MAVProxy/tools/MAVExplorer.py
+++ b/MAVProxy/tools/MAVExplorer.py
@@ -101,6 +101,10 @@ def cmd_graph(args):
def cmd_test(args):
process_stdin('graph VFR_HUD.groundspeed VFR_HUD.airspeed')
+def cmd_set(args):
+ '''control MAVExporer options'''
+ mestate.settings.command(args)
+
def process_stdin(line):
'''handle commands from user'''
if line is None:
@@ -157,6 +161,7 @@ def main_loop():
command_map = {
'graph' : (cmd_graph, 'display a graph'),
+ 'set' : (cmd_set, 'control settings'),
'test' : (cmd_test, 'display a graph')
} | MAVExplorer: added set command |
diff --git a/stomp/transport.py b/stomp/transport.py
index <HASH>..<HASH> 100644
--- a/stomp/transport.py
+++ b/stomp/transport.py
@@ -61,7 +61,7 @@ class BaseTransport(stomp.listener.Publisher):
#
# Used to parse the STOMP "content-length" header lines,
#
- __content_length_re = re.compile('^content-length[:]\\s*(?P<value>[0-9]+)', re.MULTILINE)
+ __content_length_re = re.compile(b'^content-length[:]\\s*(?P<value>[0-9]+)', re.MULTILINE)
def __init__(self, wait_on_receipt, auto_decode=True):
self.__recvbuf = b''
@@ -372,7 +372,7 @@ class BaseTransport(stomp.listener.Publisher):
frame = self.__recvbuf[0:pos]
preamble_end = frame.find(b'\n\n')
if preamble_end >= 0:
- content_length_match = BaseTransport.__content_length_re.search(decode(frame[0:preamble_end]))
+ content_length_match = BaseTransport.__content_length_re.search(frame[0:preamble_end])
if content_length_match:
content_length = int(content_length_match.group('value'))
content_offset = preamble_end + 2 | Avoid decoding header chunk when looking for content-length |
diff --git a/DependencyInjection/MopArangoDbExtension.php b/DependencyInjection/MopArangoDbExtension.php
index <HASH>..<HASH> 100644
--- a/DependencyInjection/MopArangoDbExtension.php
+++ b/DependencyInjection/MopArangoDbExtension.php
@@ -48,7 +48,10 @@ class MopArangoDbExtension extends Extension
}
- $container->setAlias('mop_arangodb.default_connection', 'mop_arangodb.connections.'.$config['default_connection']);
+ if ($config['default_connection']) {
+ $container->setAlias('mop_arangodb.default_connection', 'mop_arangodb.connections.'.$config['default_connection']);
+ }
+
if (isset($config['fos'])) {
$container->setParameter('mop_arangodb.fos.collection', $config['fos']['collection']);
$container->setAlias('mop_arangodb.fos.connection', 'mop_arangodb.connections.'.$config['fos']['connection']); | checkse iff hass configurazion |
diff --git a/src/site/components/com_base/templates/helpers/ui/_ui_privacy.php b/src/site/components/com_base/templates/helpers/ui/_ui_privacy.php
index <HASH>..<HASH> 100644
--- a/src/site/components/com_base/templates/helpers/ui/_ui_privacy.php
+++ b/src/site/components/com_base/templates/helpers/ui/_ui_privacy.php
@@ -7,7 +7,7 @@
<?php else : ?>
<input type="hidden" name="privacy_name[]" value="<?= $name ?>" />
<?php endif; ?>
- <select class="autosubmit input-large" name="<?= $name ?>">
+ <select class="input-large <?= ($auto_submit) ? 'autosubmit' : '' ?>" name="<?= $name ?>">
<?= @html('options', $options, $selected)?>
</select>
<?php if ($auto_submit) : ?> | Fixed a bug which prevented switching off auto_submit |
diff --git a/salt/modules/network.py b/salt/modules/network.py
index <HASH>..<HASH> 100644
--- a/salt/modules/network.py
+++ b/salt/modules/network.py
@@ -747,7 +747,7 @@ def get_route(iface=None,dest=None):
if iface is not None and dest is None:
output = __salt__['cmd.run']('ip route show dev {0}'.format(iface)).splitlines()
#
- else
+ else:
output = __salt__['cmd.run']('ip route show').splitlines()
for line in output:
route = {}
@@ -757,6 +757,9 @@ def get_route(iface=None,dest=None):
route['dest'] = '0.0.0.0'
elif dest_re is not None:
route['dest'] = dest_re.group()
+ gw_re = re.match('.*via ([a-z0-9\.-]*) ', line)
+ if gw_re is not None:
+ route['gateway'] = gw_re.group(1)
iface_re = re.match('.*dev ([a-z0-9-]*) ', line)
if iface_re is not None:
route['iface'] = iface_re.group(1) | now actually including the gateway in the routes returned |
diff --git a/src/php/HAB/Pica/Record/Record.php b/src/php/HAB/Pica/Record/Record.php
index <HASH>..<HASH> 100644
--- a/src/php/HAB/Pica/Record/Record.php
+++ b/src/php/HAB/Pica/Record/Record.php
@@ -88,6 +88,13 @@ abstract class Record {
protected $_fields = array();
/**
+ * The containing parent record, if any.
+ *
+ * @var \HAB\Pica\Record
+ */
+ protected $_parent;
+
+ /**
* Constructor.
*
* @param array $fields Initial set of fields | New variable: Containing parent record
* php/HAB/Pica/Record/Record.php ($_parent): New variable. Containing
parent record. |
diff --git a/spec/watcher_spec.rb b/spec/watcher_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/watcher_spec.rb
+++ b/spec/watcher_spec.rb
@@ -1,5 +1,3 @@
-# frozen_string_literal: true
-
require "spec_helper"
describe(Jekyll::Watcher) do | fix: unfreeze to make tests pass |
diff --git a/mod/assignment/type/online/assignment.class.php b/mod/assignment/type/online/assignment.class.php
index <HASH>..<HASH> 100644
--- a/mod/assignment/type/online/assignment.class.php
+++ b/mod/assignment/type/online/assignment.class.php
@@ -79,7 +79,7 @@ class assignment_online extends assignment_base {
if ($editmode) {
$this->view_header(get_string('editmysubmission', 'assignment'));
} else {
- $this->view_header(get_string('viewsubmissions', 'assignment'));
+ $this->view_header();
}
$this->view_intro(); | mod-assignment MDL-<I> Fixed up incorrect string in online assignment header |
diff --git a/Model/Menu/Node/Image/Node.php b/Model/Menu/Node/Image/Node.php
index <HASH>..<HASH> 100644
--- a/Model/Menu/Node/Image/Node.php
+++ b/Model/Menu/Node/Image/Node.php
@@ -43,7 +43,7 @@ class Node
try {
$node = $this->nodeRepository->getById($nodeId);
} catch (NoSuchEntityException $exception) {
- // Normally, this error should never be happen.
+ // Normally, this error should never happen.
// But if it somehow does happen, then there is possibly an issue on JS side that should be fixed.
$this->logger->critical($exception);
return;
@@ -53,7 +53,7 @@ class Node
$node->setImage($image);
$this->nodeRepository->save($node);
} catch (CouldNotSaveException $exception) {
- // Normally, this error should never be happen.
+ // Normally, this error should never happen.
// But if it somehow does happen, then there is possibly an issue on server-side that should be fixed.
$this->logger->critical($exception);
} | [<I>] Update some comments in image node model updateNodeImage method |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -8,13 +8,9 @@ def getfile(filename):
setup(
name='autocommand',
version='2.0.1',
- py_modules=[
- 'autocommand',
- 'autocommand.automain',
- 'autocommand.autoasync',
- 'autocommand.autoparse',
- 'autocommand.autocommand',
- 'autocommand.errors'],
+ packages=[
+ 'autocommand'
+ ],
package_dir={'': 'src'},
platforms='any',
license='LGPLv3', | Updated setup.py to use 'packages' |
diff --git a/zookeeper/src/test/java/org/togglz/zookeeper/ZookeeperStateRepositoryTest.java b/zookeeper/src/test/java/org/togglz/zookeeper/ZookeeperStateRepositoryTest.java
index <HASH>..<HASH> 100644
--- a/zookeeper/src/test/java/org/togglz/zookeeper/ZookeeperStateRepositoryTest.java
+++ b/zookeeper/src/test/java/org/togglz/zookeeper/ZookeeperStateRepositoryTest.java
@@ -149,7 +149,7 @@ public class ZookeeperStateRepositoryTest {
}
}).start();
latch.await(2, TimeUnit.SECONDS);
- Thread.sleep(25);
+ Thread.sleep(500);
loadedFeatureState = stateRepository.getFeatureState(TestFeature.FEATURE);
assertThat(reflectionEquals(externallySetState, loadedFeatureState), is(true)); | Increased sleep duration to work around failing tests.. (#<I>) |
diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py
index <HASH>..<HASH> 100644
--- a/tests/integration/__init__.py
+++ b/tests/integration/__init__.py
@@ -1023,7 +1023,7 @@ class ShellCase(AdaptedConfigurationTestCaseMixIn, ShellTestCase):
'''
Execute salt-ssh
'''
- arg_str = '-i --priv {0} --roster-file {1} localhost {2} --out=json'.format(os.path.join(TMP_CONF_DIR, 'key_test'), os.path.join(TMP_CONF_DIR, 'roster'), arg_str)
+ arg_str = '-c {0} -i --priv {1} --roster-file {2} localhost {3} --out=json'.format(self.get_config_dir(), os.path.join(TMP_CONF_DIR, 'key_test'), os.path.join(TMP_CONF_DIR, 'roster'), arg_str)
return self.run_script('salt-ssh', arg_str, with_retcode=with_retcode, catch_stderr=catch_stderr, raw=True)
def run_run(self, arg_str, with_retcode=False, catch_stderr=False): | Now we don't need root anymore |
diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php
index <HASH>..<HASH> 100644
--- a/DependencyInjection/Configuration.php
+++ b/DependencyInjection/Configuration.php
@@ -38,7 +38,7 @@ class Configuration implements ConfigurationInterface
->cannotBeEmpty()
->beforeNormalization()
->ifString()
- ->then(function ($v) { return array(['form_name' => $v, 'field_name' => 'recaptcha']); })
+ ->then(function ($v) { return array(['form_name' => $v]); })
->end()
->prototype('array')
->children()
@@ -49,8 +49,6 @@ class Configuration implements ConfigurationInterface
->end()
->scalarNode('field_name')
->info('The field name that will hold the reCAPTCHA.')
- ->isRequired()
- ->cannotBeEmpty()
->defaultValue('recaptcha')
->treatNullLike('recaptcha')
->end() | Fix configuration - don't require field_name since it has a default value |
diff --git a/src/EventListener/Imagick.php b/src/EventListener/Imagick.php
index <HASH>..<HASH> 100644
--- a/src/EventListener/Imagick.php
+++ b/src/EventListener/Imagick.php
@@ -97,7 +97,7 @@ class Imagick implements ListenerInterface, ImagickAware {
}
// Inject the image blob
- $this->imagick->readImageBlob($image->getBlob());
+ $event->getLoaderManager()->load($image->getMimeType(), $image->getBlob());
// If we have specified a size hint, check if we have a different input size
// than the original and set the ratio as an argument for any other listeners | Use LoaderManager for Imagick eventlistener as well |
diff --git a/appstream/component.py b/appstream/component.py
index <HASH>..<HASH> 100644
--- a/appstream/component.py
+++ b/appstream/component.py
@@ -81,6 +81,13 @@ class Release(object):
self.size_installed = 0
self.size_download = 0
+ def get_checksum_by_target(self, target):
+ """ returns a checksum of a specific kind """
+ for csum in self.checksums:
+ if csum.target == target:
+ return csum
+ return None
+
def add_checksum(self, csum):
""" Add a checksum to a release object """
self.checksums.append(csum) | Add Release.get_checksum_by_target() |
diff --git a/pkg/kubectl/apply.go b/pkg/kubectl/apply.go
index <HASH>..<HASH> 100644
--- a/pkg/kubectl/apply.go
+++ b/pkg/kubectl/apply.go
@@ -163,16 +163,25 @@ func GetModifiedConfiguration(info *resource.Info, annotate bool) ([]byte, error
return modified, nil
}
+// If the last applied configuration annotation is already present, then
// UpdateApplyAnnotation gets the modified configuration of the object,
// without embedding it again, and then sets it on the object as the annotation.
+// Otherwise, it does nothing.
func UpdateApplyAnnotation(info *resource.Info) error {
- modified, err := GetModifiedConfiguration(info, false)
+ original, err := GetOriginalConfiguration(info)
if err != nil {
return err
}
- if err := SetOriginalConfiguration(info, modified); err != nil {
- return err
+ if len(original) > 0 {
+ modified, err := GetModifiedConfiguration(info, false)
+ if err != nil {
+ return err
+ }
+
+ if err := SetOriginalConfiguration(info, modified); err != nil {
+ return err
+ }
}
return nil | Update annotation only if apply already called. |
diff --git a/assets/__pm.js b/assets/__pm.js
index <HASH>..<HASH> 100644
--- a/assets/__pm.js
+++ b/assets/__pm.js
@@ -4,7 +4,7 @@
var root = document.createElement('div');
var DOM;
- setInterval(applyTimeAgo, 1000);
+ setInterval(applyTimeAgo, 60000);
if (host.attachShadow) {
DOM = host.attachShadow({mode: 'open'});
@@ -252,7 +252,7 @@
var days = Math.round(hours / 24);
var months = Math.round(days / 30);
var years = Math.round(days / 365);
- if (seconds < 60) date.innerHTML = seconds+" seconds ago";
+ if (seconds < 60) date.innerHTML = "less than a minute ago";
else if (minutes < 2) date.innerHTML = minutes+" minute ago";
else if (minutes < 60) date.innerHTML = minutes+" minutes ago";
else if (hours < 2) date.innerHTML = hours+" hour ago"; | Reduces frequency of applyTimeAgo to only update every minute instead of every second. |
diff --git a/test/support/app-runner.js b/test/support/app-runner.js
index <HASH>..<HASH> 100644
--- a/test/support/app-runner.js
+++ b/test/support/app-runner.js
@@ -70,9 +70,15 @@ AppRunner.prototype.start = function start (callback) {
}
AppRunner.prototype.stop = function stop (callback) {
- if (this.child) {
- kill(this.child.pid, 'SIGTERM', callback)
- } else {
+ if (!this.child) {
setImmediate(callback)
+ return
}
+
+ this.child.stderr.unpipe()
+ this.child.removeAllListeners('exit')
+
+ kill(this.child.pid, 'SIGTERM', callback)
+
+ this.child = null
} | tests: unpipe stderr when stopping app |
diff --git a/codec/src/main/java/io/netty/handler/codec/LineBasedFrameDecoder.java b/codec/src/main/java/io/netty/handler/codec/LineBasedFrameDecoder.java
index <HASH>..<HASH> 100644
--- a/codec/src/main/java/io/netty/handler/codec/LineBasedFrameDecoder.java
+++ b/codec/src/main/java/io/netty/handler/codec/LineBasedFrameDecoder.java
@@ -130,7 +130,7 @@ public class LineBasedFrameDecoder extends ByteToMessageDecoder {
fail(ctx, length);
}
} else {
- discardedBytes = buffer.readableBytes();
+ discardedBytes += buffer.readableBytes();
buffer.readerIndex(buffer.writerIndex());
}
return null; | fix the discardedBytes counting on LineBasedFrameDecoder
Motivation:
The LineBasedFrameDecoder discardedBytes counting different compare to
DelimiterBasedFrameDecoder.
Modifications:
Add plus sign
Result:
DiscardedBytes counting correctly |
diff --git a/src/CheckIfDead.php b/src/CheckIfDead.php
index <HASH>..<HASH> 100644
--- a/src/CheckIfDead.php
+++ b/src/CheckIfDead.php
@@ -7,7 +7,7 @@
*/
namespace Wikimedia\DeadlinkChecker;
-define( 'CHECKIFDEADVERSION', '1.1.1' );
+define( 'CHECKIFDEADVERSION', '1.1.2' );
class CheckIfDead {
@@ -332,7 +332,7 @@ class CheckIfDead {
return true;
}
if ( $httpCode === 0 ) {
- $this->errors[$curlInfo['rawurl']] = "CONNECTION CLOSED UNEXPECTEDLY";
+ $this->errors[$curlInfo['rawurl']] = "NO RESPONSE FROM SERVER";
return true;
}
// Check for valid non-error codes for HTTP or FTP | Minor Tweak
Update version to <I> and change HTTP 0 response to NO RESPONSE FROM
SERVER |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,7 @@ setup(
keywords='context manager shell command line repl',
scripts=['bin/with'],
install_requires=[
- 'appdirs==1.4.0',
+ 'appdirs==1.4.1',
'docopt==0.6.2',
'prompt-toolkit==1.0',
'python-slugify==1.2.1', | Upgrade dependency appdirs to ==<I> |
diff --git a/tests/integ/__init__.py b/tests/integ/__init__.py
index <HASH>..<HASH> 100644
--- a/tests/integ/__init__.py
+++ b/tests/integ/__init__.py
@@ -71,7 +71,7 @@ EI_SUPPORTED_REGIONS = [
NO_LDA_REGIONS = ["eu-west-3", "eu-north-1", "sa-east-1", "ap-east-1"]
NO_MARKET_PLACE_REGIONS = ["eu-west-3", "eu-north-1", "sa-east-1", "ap-east-1"]
-EFS_TEST_ENABLED_REGION = ["us-west-2"]
+EFS_TEST_ENABLED_REGION = []
logging.getLogger("boto3").setLevel(logging.INFO)
logging.getLogger("botocore").setLevel(logging.INFO) | fix: skip efs and fsx integ tests in all regions (#<I>) |
diff --git a/tensor2tensor/utils/trainer_lib.py b/tensor2tensor/utils/trainer_lib.py
index <HASH>..<HASH> 100644
--- a/tensor2tensor/utils/trainer_lib.py
+++ b/tensor2tensor/utils/trainer_lib.py
@@ -39,7 +39,7 @@ from tensorflow.core.protobuf import rewriter_config_pb2
from tensorflow.python import debug
-def next_checkpoint(model_dir, timeout_mins=120):
+def next_checkpoint(model_dir, timeout_mins=240):
"""Yields successive checkpoints from model_dir."""
last_ckpt = None
while True: | Wait longer for checkpoints.
PiperOrigin-RevId: <I> |
diff --git a/lib/http/cache.rb b/lib/http/cache.rb
index <HASH>..<HASH> 100644
--- a/lib/http/cache.rb
+++ b/lib/http/cache.rb
@@ -83,7 +83,14 @@ module HTTP
# Store response in cache
#
# @return [nil]
+ #
+ # ---
+ #
+ # We have to convert the response body in to a string body so
+ # that the cache store reading the body will not prevent the
+ # original requester from doing so.
def store_in_cache(request, response)
+ response.body = response.body.to_s
@cache_adapter.store(request, response)
nil
end
diff --git a/lib/http/response/io_body.rb b/lib/http/response/io_body.rb
index <HASH>..<HASH> 100644
--- a/lib/http/response/io_body.rb
+++ b/lib/http/response/io_body.rb
@@ -17,7 +17,7 @@ module HTTP
# Iterate over the body, allowing it to be enumerable
def each
- while part = readpartial # rubocop:disable Lint/AssignmentInCondition
+ while (part = readpartial)
yield part
end
end | allow both original requester and cache store to read response body |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,11 @@ setup(
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Natural Language :: English', 'Operating System :: OS Independent',
- 'Programming Language :: Python :: 2.6', 'Topic :: Utilities',
+ 'Programming Language :: Python :: 2.6',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3.3',
+ 'Topic :: Utilities',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Indexing/Search',
'Topic :: Games/Entertainment'], | Update classifiers to reflect new python version compatibility. |
diff --git a/mediasync/backends/s3.py b/mediasync/backends/s3.py
index <HASH>..<HASH> 100644
--- a/mediasync/backends/s3.py
+++ b/mediasync/backends/s3.py
@@ -72,7 +72,7 @@ class Client(BaseClient):
"x-amz-acl": "public-read",
"Content-Type": content_type,
"Expires": expires,
- "Cache-Control": 'max-age=%d' % (self.expiration_days * 24 * 3600),
+ "Cache-Control": 'max-age=%d, public' % (self.expiration_days * 24 * 3600),
}
key = self._bucket.get_key(remote_path) | Add public to S3 Cache-Control header |
diff --git a/src/Jasny/DB/Generator.php b/src/Jasny/DB/Generator.php
index <HASH>..<HASH> 100644
--- a/src/Jasny/DB/Generator.php
+++ b/src/Jasny/DB/Generator.php
@@ -226,13 +226,24 @@ $properties
/**
* Cast all properties to a type based on the field types.
*
- * @return Record \$this
+ * @return $classname \$this
*/
public function cast()
{
$cast
return \$this;
}
+
+ /**
+ * Set the table gateway.
+ * @ignore
+ *
+ * @param {$classname}Table \$table
+ */
+ public function _setDBTable(\$table)
+ {
+ if (!isset(\$this->_dbtable)) \$this->_dbtable = \$table;
+ }
}
PHP;
diff --git a/src/Jasny/DB/Record.php b/src/Jasny/DB/Record.php
index <HASH>..<HASH> 100644
--- a/src/Jasny/DB/Record.php
+++ b/src/Jasny/DB/Record.php
@@ -139,7 +139,10 @@ class Record
*/
public function _setDBTable($table)
{
- if (!isset($this->_dbtable)) $this->_dbtable = $table;
+ if (!isset($this->_dbtable)) {
+ $this->_dbtable = $table;
+ $this->cast();
+ }
}
/** | Cast directly instantiated Records when setting the table gateway. |
diff --git a/src/shell_extension/extension.js b/src/shell_extension/extension.js
index <HASH>..<HASH> 100644
--- a/src/shell_extension/extension.js
+++ b/src/shell_extension/extension.js
@@ -10,6 +10,7 @@
*/
const DBus = imports.dbus;
+const GLib = imports.gi.GLib
const Lang = imports.lang;
const St = imports.gi.St;
const Shell = imports.gi.Shell;
@@ -113,6 +114,9 @@ HamsterButton.prototype = {
this.facts = null;
this.currentFact = null;
+ // refresh the label every 60 secs
+ GLib.timeout_add_seconds(0, 60,
+ Lang.bind(this, function () {this.refresh(); return true}))
this.refresh(); | refresh the panel every <I> seconds |
diff --git a/plugins/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/compiler/ImportManager.java b/plugins/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/compiler/ImportManager.java
index <HASH>..<HASH> 100644
--- a/plugins/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/compiler/ImportManager.java
+++ b/plugins/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/compiler/ImportManager.java
@@ -50,6 +50,10 @@ public class ImportManager {
this(organizeImports, null, innerTypeSeparator);
}
+ public ImportManager() {
+ this(true, null);
+ }
+
public ImportManager(boolean organizeImports) {
this(organizeImports, null);
} | [ImportManager] added constructor (see #<I>) |
diff --git a/test/support/utils.rb b/test/support/utils.rb
index <HASH>..<HASH> 100644
--- a/test/support/utils.rb
+++ b/test/support/utils.rb
@@ -1,5 +1,5 @@
-require_relative 'matchers'
-require_relative 'temporary'
+require 'support/matchers'
+require 'support/temporary'
module Byebug
# | Use `require` instead of `require_relative`
For consistency with the rest of the code. |
diff --git a/common/os.go b/common/os.go
index <HASH>..<HASH> 100644
--- a/common/os.go
+++ b/common/os.go
@@ -9,6 +9,7 @@ import (
func TrapSignal(cb func()) {
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt)
+ signal.Notify(c, os.Kill)
go func() {
for sig := range c {
fmt.Printf("captured %v, exiting...\n", sig)
diff --git a/process/process.go b/process/process.go
index <HASH>..<HASH> 100644
--- a/process/process.go
+++ b/process/process.go
@@ -84,6 +84,7 @@ func Create(mode int, label string, execPath string, args []string, input string
}
func Stop(proc *Process, kill bool) error {
+ defer proc.OutputFile.Close()
if kill {
fmt.Printf("Killing process %v\n", proc.Cmd.Process)
return proc.Cmd.Process.Kill() | Close files upon stop. Still need to fix bash issues? |
diff --git a/TYPO3.Media/Classes/TYPO3/Media/Domain/Service/ThumbnailService.php b/TYPO3.Media/Classes/TYPO3/Media/Domain/Service/ThumbnailService.php
index <HASH>..<HASH> 100644
--- a/TYPO3.Media/Classes/TYPO3/Media/Domain/Service/ThumbnailService.php
+++ b/TYPO3.Media/Classes/TYPO3/Media/Domain/Service/ThumbnailService.php
@@ -121,7 +121,9 @@ class ThumbnailService
return null;
}
- $this->thumbnailRepository->add($thumbnail);
+ if (!$this->persistenceManager->isNewObject($asset)) {
+ $this->thumbnailRepository->add($thumbnail);
+ }
$asset->addThumbnail($thumbnail);
// Allow thumbnails to be persisted even if this is a "safe" HTTP request: | BUGFIX: Do not automatically persist thumbnails for new asset objects
Prevents issues with database constraints caused by new assets being added to persistence, since
the asset would be added through the thumbnail as a related object as well.
Due to the automatic creation of thumbnails on asset creation, this caused problems for the site import.
NEOS-<I> |
diff --git a/lib/auto_increment/version.rb b/lib/auto_increment/version.rb
index <HASH>..<HASH> 100644
--- a/lib/auto_increment/version.rb
+++ b/lib/auto_increment/version.rb
@@ -1,3 +1,3 @@
module AutoIncrement
- VERSION = "1.1.0"
+ VERSION = "1.1.1"
end | Bump to version <I> |
diff --git a/lib/right_api_client/client.rb b/lib/right_api_client/client.rb
index <HASH>..<HASH> 100644
--- a/lib/right_api_client/client.rb
+++ b/lib/right_api_client/client.rb
@@ -146,7 +146,7 @@ module RightApi
end
end
- data = JSON.parse(body)
+ data = JSON.parse(body) # TODO: check type before parsing as JSON
[resource_type, path, data]
end | Added TODO, specifically meant for vnd.rightscale.text. |
diff --git a/redisson/src/main/java/org/redisson/connection/MasterSlaveConnectionManager.java b/redisson/src/main/java/org/redisson/connection/MasterSlaveConnectionManager.java
index <HASH>..<HASH> 100644
--- a/redisson/src/main/java/org/redisson/connection/MasterSlaveConnectionManager.java
+++ b/redisson/src/main/java/org/redisson/connection/MasterSlaveConnectionManager.java
@@ -275,7 +275,6 @@ public class MasterSlaveConnectionManager implements ConnectionManager {
RFuture<RedisConnection> future = client.connectAsync();
future.onComplete((connection, e) -> {
if (e != null) {
- connection.closeAsync();
result.tryFailure(e);
return;
} | Fixed - Connection leak when redis cluster has "<I>" in its node list. #<I> |
diff --git a/core/Log.php b/core/Log.php
index <HASH>..<HASH> 100644
--- a/core/Log.php
+++ b/core/Log.php
@@ -418,6 +418,13 @@ class Log extends Singleton
if (is_string($message)
&& !empty($sprintfParams)
) {
+ // handle array sprintf parameters
+ foreach ($sprintfParams as &$param) {
+ if (is_array($param)) {
+ $param = json_encode($param);
+ }
+ }
+
$message = vsprintf($message, $sprintfParams);
}
@@ -676,6 +683,8 @@ class Log extends Singleton
*/
Piwik::postEvent(self::FORMAT_FILE_MESSAGE_EVENT, array(&$message, $level, $tag, $datetime, $logger));
}
+
+ $message = str_replace("\n", "\n ", $message);
return $message . "\n";
}
} | Make sure arrays are formatted correctly in Log calls w/ sprintf params and indent message newlines so they can be more easily parsed. |
diff --git a/abot/dubtrack.py b/abot/dubtrack.py
index <HASH>..<HASH> 100644
--- a/abot/dubtrack.py
+++ b/abot/dubtrack.py
@@ -451,8 +451,8 @@ class DubtrackUserUpdate(DubtrackEvent):
class DubtrackBotBackend(Backend):
# Official Bot methods
- def __init__(self):
- self.dubtrackws = DubtrackWS()
+ def __init__(self, room):
+ self.dubtrackws = DubtrackWS(room)
self.dubtrack_channel = None
self.dubtrack_users = defaultdict(dict) # ID: user_session_info
self.dubtrack_entities = weakref.WeakValueDictionary()
@@ -578,7 +578,7 @@ class DubtrackWS:
PONG = '3'
DATA = '4'
- def __init__(self, room='master-of-soundtrack'):
+ def __init__(self, room):
self.room = room
self.heartbeat = None
self.ws_client_id = None | dubtrack: Dubtrack backend needs a room as argument (#6)
Moving towards a more agnostic backend |
diff --git a/packages/http/httpDataService.js b/packages/http/httpDataService.js
index <HASH>..<HASH> 100644
--- a/packages/http/httpDataService.js
+++ b/packages/http/httpDataService.js
@@ -9,18 +9,19 @@ HttpDataService.prototype.request = function(relativeUrl, httpConfig) {
var self = this;
return this.baseUrlPromise.then(function(baseUrl) {
httpConfig.url = baseUrl + relativeUrl;
- return Promise.resolve(self.$http(httpConfig)).then(function(response) {
- if (response.status !== 200) {
- console.error('Non-OK response with status ' + response.status);
- console.error(response);
- throw new Error(response);
- }
- return response.data;
+ return new Promise(function(resolve, reject) {
+ self.$http(httpConfig).then(function successCallback(response) {
+ if (response.status !== 200) {
+ console.error(response);
+ return reject(new Error("Network request failed with invalid status", response.status));
+ }
+ return resolve(response.data);
+ }, function errorCallback(error) {
+ console.error(error);
+ error = new Error(error);
+ return reject(error);
+ });
});
- }).catch(function(error) {
- error = new Error(error);
- console.error(error);
- throw error;
});
}; | Fix for network error handler (#<I>) |
diff --git a/test/scenario_test/lib/base.py b/test/scenario_test/lib/base.py
index <HASH>..<HASH> 100644
--- a/test/scenario_test/lib/base.py
+++ b/test/scenario_test/lib/base.py
@@ -82,7 +82,7 @@ def make_gobgp_ctn(tag='gobgp', local_gobgp_path=''):
class Bridge(object):
- def __init__(self, name, subnet='', with_ip=True):
+ def __init__(self, name, subnet='', with_ip=True, self_ip=False):
self.name = name
self.with_ip = with_ip
if with_ip:
@@ -101,7 +101,8 @@ class Bridge(object):
local("ip link add {0} type bridge".format(self.name), capture=True)
local("ip link set up dev {0}".format(self.name), capture=True)
- if with_ip:
+ self.self_ip = self_ip
+ if self_ip:
self.ip_addr = self.next_ip_address()
local("ip addr add {0} dev {1}".format(self.ip_addr, self.name),
capture=True) | test: don't give ip address to a bridge by default
now telnet to quagga occurs in quagga container's local network
namespace. we don't need to address a bridge |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -44,7 +44,7 @@ install_requires = [
extras_require = {
'testing': [
# third-party dependencies (versions should be flexible to allow for bug fixes)
- 'flake8>=4,<6',
+ 'flake8~=5.0',
'flake8-blind-except~=0.2.1',
'flake8-bugbear~=22.7',
'flake8-debugger~=4.1', | Update flake8 requirement to ~<I> |
diff --git a/lib/how_is/report.rb b/lib/how_is/report.rb
index <HASH>..<HASH> 100644
--- a/lib/how_is/report.rb
+++ b/lib/how_is/report.rb
@@ -69,6 +69,8 @@ module HowIs
oldest_pull_date: @gh_pulls.oldest["createdAt"],
travis_builds: @travis.builds.to_h,
+
+ date: @end_date,
}
frontmatter = | *shakes head* damnit, past me. |
diff --git a/src/main/java/org/jcodec/containers/mxf/model/MXFMetadata.java b/src/main/java/org/jcodec/containers/mxf/model/MXFMetadata.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/jcodec/containers/mxf/model/MXFMetadata.java
+++ b/src/main/java/org/jcodec/containers/mxf/model/MXFMetadata.java
@@ -71,7 +71,13 @@ public abstract class MXFMetadata {
}
protected String readUtf16String(ByteBuffer _bb) {
- return Platform.stringFromCharset(NIOUtils.toArray(_bb), Charset.forName("utf-16"));
+ byte[] array;
+ if (_bb.getShort(_bb.limit() - 2) != 0) {
+ array = NIOUtils.toArray(_bb);
+ } else {
+ array = NIOUtils.toArray((ByteBuffer) _bb.limit(_bb.limit() - 2));
+ }
+ return Platform.stringFromCharset(array, Charset.forName("utf-16"));
}
public UL getUl() { | readUtf<I>String support zero ended strings |
diff --git a/examples/colors.py b/examples/colors.py
index <HASH>..<HASH> 100644
--- a/examples/colors.py
+++ b/examples/colors.py
@@ -12,7 +12,10 @@ from PIL import Image
def main():
img_path = os.path.abspath(os.path.join(os.path.dirname(__file__), 'images', 'balloon.png'))
- balloon = Image.open(img_path).convert("RGB")
+ balloon = Image.open(img_path) \
+ .transform((device.width, device.height), Image.AFFINE, (1, 0, 0, 0, 1, 0), Image.BILINEAR) \
+ .convert(device.mode)
+
while True:
# Image display
device.display(balloon) | Make colour demo agnostic of screen size |
diff --git a/src/main/java/com/hp/autonomy/parametricvalues/ParametricRequest.java b/src/main/java/com/hp/autonomy/parametricvalues/ParametricRequest.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/hp/autonomy/parametricvalues/ParametricRequest.java
+++ b/src/main/java/com/hp/autonomy/parametricvalues/ParametricRequest.java
@@ -14,6 +14,7 @@ import lombok.Setter;
import lombok.experimental.Accessors;
import java.io.Serializable;
+import java.util.Collections;
import java.util.Set;
@Data
@@ -32,7 +33,7 @@ public class ParametricRequest implements Serializable {
this.databases = databases;
this.query = query;
this.fieldText = fieldText;
- this.fieldNames = fieldNames;
+ this.fieldNames = fieldNames == null ? Collections.<String>emptySet() : fieldNames;
}
@JsonPOJOBuilder(withPrefix = "set") | [CCUK-<I>] The fieldname parameter can be sent as null, so the parametric request replaces the field names with the empty set to prevent null pointer exceptions. [rev: alex.scown] |
diff --git a/src/HelpScout/model/ref/PersonRef.php b/src/HelpScout/model/ref/PersonRef.php
index <HASH>..<HASH> 100644
--- a/src/HelpScout/model/ref/PersonRef.php
+++ b/src/HelpScout/model/ref/PersonRef.php
@@ -21,7 +21,11 @@ class PersonRef {
}
public function getObjectVars() {
- return get_object_vars($this);
+ $vars = get_object_vars($this);
+ if (isset($vars['id']) && $vars['id'] == false){
+ unset($vars['id']);
+ }
+ return $vars;
}
public function setEmail($email) { | Updated getObjectVars to unset the id if the value is false |
diff --git a/cake/tests/cases/libs/all_configure.test.php b/cake/tests/cases/libs/all_configure.test.php
index <HASH>..<HASH> 100644
--- a/cake/tests/cases/libs/all_configure.test.php
+++ b/cake/tests/cases/libs/all_configure.test.php
@@ -34,9 +34,10 @@ class AllConfigureTest extends PHPUnit_Framework_TestSuite {
* @return void
*/
public static function suite() {
- $suite = new PHPUnit_Framework_TestSuite('All Configure, App and ClassRegistry related tests');
+ $suite = new CakeTestSuite('All Configure, App and ClassRegistry related tests');
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'configure.test.php');
+ $suite->addTestDirectory(CORE_TEST_CASES . DS . 'libs' . DS . 'config');
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'app.test.php');
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'class_registry.test.php');
return $suite; | Adding new test cases into configure suite. |
diff --git a/mpd.py b/mpd.py
index <HASH>..<HASH> 100644
--- a/mpd.py
+++ b/mpd.py
@@ -163,7 +163,7 @@ _commands = {
"sendmessage": "_fetch_nothing",
}
-class MPDClient():
+class MPDClient(object):
def __init__(self, use_unicode=False):
self.iterate = False
self.use_unicode = use_unicode | transform MPDClient to new style class. |
diff --git a/library/oosql/oosql.php b/library/oosql/oosql.php
index <HASH>..<HASH> 100644
--- a/library/oosql/oosql.php
+++ b/library/oosql/oosql.php
@@ -1117,6 +1117,7 @@ class oosql extends \PDO
$this->prepFetch();
$stmt = $this->oosql_stmt;
}
+
return $stmt;
} | core-<I> [core-<I>] Fix tests and add method comments for the new methods |
diff --git a/casjobs.py b/casjobs.py
index <HASH>..<HASH> 100644
--- a/casjobs.py
+++ b/casjobs.py
@@ -264,6 +264,7 @@ class CasJobs(object):
* `job_id` (int): The id of the _output_ job.
* `outfn` (str): The file where the output should be stored.
+ May also be a file-like object with a 'write' method.
"""
job_info = self.job_info(jobid=job_id)[0]
@@ -285,9 +286,12 @@ class CasJobs(object):
%(remotefn, code))
# Save the data to a file.
- f = open(outfn, "wb")
- f.write(r.content)
- f.close()
+ try:
+ outfn.write(r.content)
+ except AttributeError:
+ f = open(outfn, "wb")
+ f.write(r.content)
+ f.close()
def request_and_get_output(self, table, outtype, outfn):
"""
@@ -303,6 +307,7 @@ class CasJobs(object):
FITS - Flexible Image Transfer System (FITS Binary)
VOTable - XML Virtual Observatory VOTABLE
* `outfn` (str): The file where the output should be stored.
+ May also be a file-like object with a 'write' method.
"""
job_id = self.request_output(table, outtype) | allow file-like object as parameter to get_output
If the outfn parameter to get_output has a write() method, that is used
for the output rather than opening a new file. This allows e.g. a
StringIO object to be passed in so that output can be captured in
memory rather than creating a temporary file. |
diff --git a/core-bundle/contao/library/Contao/User.php b/core-bundle/contao/library/Contao/User.php
index <HASH>..<HASH> 100644
--- a/core-bundle/contao/library/Contao/User.php
+++ b/core-bundle/contao/library/Contao/User.php
@@ -279,7 +279,7 @@ abstract class User extends \System
$this->save();
// Add a log entry and the error message, because checkAccountStatus() will not be called (see #4444)
- $this->log('The account has been locked for security reasons', __METHOD__, TL_ACCESS);
+ $this->log('User "' . $this->username . '" has been locked for ' . ceil($GLOBALS['TL_CONFIG']['lockPeriod'] / 60) . ' minutes', __METHOD__, TL_ACCESS);
\Message::addError(sprintf($GLOBALS['TL_LANG']['ERR']['accountLocked'], ceil((($this->locked + $GLOBALS['TL_CONFIG']['lockPeriod']) - $time) / 60)));
// Send admin notification | [Core] Add the username to the "account has been locked" log entry (see #<I>) |
diff --git a/lib/tty/progressbar.rb b/lib/tty/progressbar.rb
index <HASH>..<HASH> 100644
--- a/lib/tty/progressbar.rb
+++ b/lib/tty/progressbar.rb
@@ -258,6 +258,7 @@ module TTY
write(ECMA_CSI + DEC_TCEM + DEC_SET, false)
end
return if done?
+ render
clear ? clear_line : write("\n", false)
@meter.clear
@stopped = true
diff --git a/spec/unit/stop_spec.rb b/spec/unit/stop_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/stop_spec.rb
+++ b/spec/unit/stop_spec.rb
@@ -14,6 +14,7 @@ RSpec.describe TTY::ProgressBar, '#stop' do
expect(output.read).to eq([
"\e[1G[= ]",
"\e[1G[== ]",
+ "\e[1G[=== ]",
"\e[1G[=== ]\n"
].join)
end | Change stop call to rerender the bar so that configuration changes take effect |
diff --git a/molgenis-core/src/main/java/org/molgenis/framework/server/services/MolgenisGuiService.java b/molgenis-core/src/main/java/org/molgenis/framework/server/services/MolgenisGuiService.java
index <HASH>..<HASH> 100644
--- a/molgenis-core/src/main/java/org/molgenis/framework/server/services/MolgenisGuiService.java
+++ b/molgenis-core/src/main/java/org/molgenis/framework/server/services/MolgenisGuiService.java
@@ -51,8 +51,7 @@ public abstract class MolgenisGuiService
/**
* Handle use of molgenis GUI
*
- * TODO: this method is horrible and should be properly refactored,
- * documented and tested!
+ * TODO: this method is horrible and should be properly refactored, documented and tested!
*
* @param request
* @param response
@@ -232,7 +231,7 @@ public abstract class MolgenisGuiService
session.setAttribute("application", appController);
// prepare the response
- response.getResponse().setContentType("text/html");
+ response.getResponse().setContentType("text/html;charset=UTF-8");
// response.setBufferSize(10000);
PrintWriter writer = response.getResponse().getWriter(); | bug fix: do not rely on platform default encoding |
diff --git a/app/models/concerns/hyrax/collection_behavior.rb b/app/models/concerns/hyrax/collection_behavior.rb
index <HASH>..<HASH> 100644
--- a/app/models/concerns/hyrax/collection_behavior.rb
+++ b/app/models/concerns/hyrax/collection_behavior.rb
@@ -4,7 +4,6 @@ module Hyrax
extend ActiveSupport::Concern
include Hydra::AccessControls::WithAccessRight
include Hydra::WithDepositor # for access to apply_depositor_metadata
- include Hydra::AccessControls::Permissions
include Hyrax::CoreMetadata
include Hydra::Works::CollectionBehavior
include Hyrax::Noid | add Hydra::AccessControls::Permissions to CollectionBehavior once
`Hydra::AccessControls::WithAccessRight` already includes
`Hydra::AccessControls::Permissions` as its own dependency. avoid including it
explictly later. |
diff --git a/lib/qonfig/version.rb b/lib/qonfig/version.rb
index <HASH>..<HASH> 100644
--- a/lib/qonfig/version.rb
+++ b/lib/qonfig/version.rb
@@ -5,5 +5,5 @@ module Qonfig
#
# @api public
# @since 0.1.0
- VERSION = '0.12.0'
+ VERSION = '0.13.0'
end | [gem] bumpt to <I> |
diff --git a/sherlock/__version__.py b/sherlock/__version__.py
index <HASH>..<HASH> 100644
--- a/sherlock/__version__.py
+++ b/sherlock/__version__.py
@@ -1 +1 @@
-__version__ = '1.0.5'
+__version__ = '1.0.6' | fixing issue where the transientTable setting in the sherlock settings file wasn't being respected |
diff --git a/csirtg_indicator/indicator.py b/csirtg_indicator/indicator.py
index <HASH>..<HASH> 100644
--- a/csirtg_indicator/indicator.py
+++ b/csirtg_indicator/indicator.py
@@ -55,6 +55,9 @@ class Indicator(object):
continue
if isinstance(kwargs[k], basestring):
+ # always stripe whitespace
+ kwargs[k] = kwargs[k].strip()
+
if self._lowercase is True:
kwargs[k] = kwargs[k].lower()
if k in ['tags', 'peers']:
@@ -75,7 +78,7 @@ class Indicator(object):
self._indicator = None
if indicator:
- self.indicator = indicator
+ self.indicator = indicator.strip()
self._confidence = 0
self.confidence = kwargs.get('confidence', 0) | Strip whitespace from str fields (#<I>)
If a source has tabs (\t) at the end of some fields, those currently make it into backend store. This should normalize removing those forms of spurious whitespace. |
diff --git a/client/cli/ok.py b/client/cli/ok.py
index <HASH>..<HASH> 100644
--- a/client/cli/ok.py
+++ b/client/cli/ok.py
@@ -89,6 +89,9 @@ def main():
assign = None
try:
+ if args.authenticate:
+ auth.authenticate(True)
+
# Instantiating assignment
assign = assignment.load_config(args.config, args)
assign.load()
diff --git a/client/protocols/backup.py b/client/protocols/backup.py
index <HASH>..<HASH> 100644
--- a/client/protocols/backup.py
+++ b/client/protocols/backup.py
@@ -28,7 +28,7 @@ class BackupProtocol(models.Protocol):
self.check_ssl()
- access_token = auth.authenticate(self.args.authenticate)
+ access_token = auth.authenticate(False)
log.info('Authenticated with access token %s', access_token)
response = self.send_all_messages(access_token, message_list) | Allow --authenticate even without an assignment |
diff --git a/bin/cmd.js b/bin/cmd.js
index <HASH>..<HASH> 100755
--- a/bin/cmd.js
+++ b/bin/cmd.js
@@ -78,8 +78,26 @@ b.on('bundle', function (out) {
if (opts.watch) {
var w = watchify(b);
- w.on('update', function () {
- b.bundle();
+ var bundling = false;
+ var queued = false;
+
+ var bundle = function () {
+ if (!bundling) {
+ bundling = true;
+ b.bundle();
+ } else {
+ queued = true;
+ }
+ };
+ w.on('update', bundle);
+ b.on('bundle', function (out) {
+ out.on('end', function () {
+ bundling = false;
+ if (queued) {
+ queued = false;
+ setImmediate(bundle);
+ }
+ });
});
process.on('SIGINT', function () { | Avoid concurrent executions when using --watch |
diff --git a/less-watch-compiler.js b/less-watch-compiler.js
index <HASH>..<HASH> 100644
--- a/less-watch-compiler.js
+++ b/less-watch-compiler.js
@@ -144,7 +144,7 @@ function getFileExtension(string){
// Here's where we run the less compiler
function compileCSS(file){
var filename = getFilenameWithoutExtention(file);
- var command = 'lessc --yui-compress '+file.replace(/\s+/g,'\\ ')+' '+argvs[1]+'/'+filename.replace(/\s+/g,'\\ ')+'.css';
+ var command = 'lessc -x '+file.replace(/\s+/g,'\\ ')+' '+argvs[1]+'/'+filename.replace(/\s+/g,'\\ ')+'.css';
// Run the command
exec(command, function (error, stdout, stderr){
if (error !== null) | Update less-watch-compiler.js
--yui-compress seems to be deprecated, replacing with -x.
You can take or leave it, this is what I did to my copy. |
diff --git a/react-native/react/tabs/devices/index.js b/react-native/react/tabs/devices/index.js
index <HASH>..<HASH> 100644
--- a/react-native/react/tabs/devices/index.js
+++ b/react-native/react/tabs/devices/index.js
@@ -50,21 +50,12 @@ export default class Devices extends Component {
}
render () {
- const {
- devices,
- waitingForServer,
- showRemoveDevicePage,
- showExistingDevicePage,
- showGenPaperKeyPage
- } = this.props
-
- return <DevicesRender {... {
- devices,
- waitingForServer,
- showRemoveDevicePage,
- showExistingDevicePage,
- showGenPaperKeyPage
- }}/>
+ return <DevicesRender
+ devices={this.props.devices}
+ waitingForServer={this.props.waitingForServer}
+ showRemoveDevicePage={this.props.showRemoveDevicePage}
+ showExistingDevicePage={this.props.showExistingDevicePage}
+ showGenPaperKeyPage={this.props.showGenPaperKeyPag}/>
}
} | Use other style for passing props in |
diff --git a/dvc/command/remote.py b/dvc/command/remote.py
index <HASH>..<HASH> 100644
--- a/dvc/command/remote.py
+++ b/dvc/command/remote.py
@@ -18,7 +18,7 @@ class CmdRemote(CmdConfig):
def _check_exists(self, conf):
if self.args.name not in conf["remote"]:
- raise ConfigError(f"remote '{self.args.name}' doesn't exists.")
+ raise ConfigError(f"remote '{self.args.name}' doesn't exist.")
class CmdRemoteAdd(CmdRemote): | Fix typo in `dvc remote modify` output (#<I>) |
diff --git a/lib/jasmine-jquery.js b/lib/jasmine-jquery.js
index <HASH>..<HASH> 100644
--- a/lib/jasmine-jquery.js
+++ b/lib/jasmine-jquery.js
@@ -74,6 +74,7 @@ jasmine.Fixtures.prototype.loadFixtureIntoCache_ = function(url) {
var self = this;
$.ajax({
async: false, // must be synchronous to guarantee that no tests are run before fixture is loaded
+ cache: false,
dataType: 'html',
url: url,
success: function(data) { | make sure fixtures aren't cached in browser cache |
diff --git a/cmd/oci-runtime-tool/generate.go b/cmd/oci-runtime-tool/generate.go
index <HASH>..<HASH> 100644
--- a/cmd/oci-runtime-tool/generate.go
+++ b/cmd/oci-runtime-tool/generate.go
@@ -384,6 +384,10 @@ func setupSpec(g *generate.Generator, context *cli.Context) error {
g.SetLinuxResourcesCPURealtimeRuntime(context.Uint64("linux-realtime-runtime"))
}
+ if context.IsSet("linux-pids-limit") {
+ g.SetLinuxResourcesPidsLimit(context.Int64("linux-pids-limit"))
+ }
+
if context.IsSet("linux-realtime-period") {
g.SetLinuxResourcesCPURealtimePeriod(context.Uint64("linux-realtime-period"))
} | Set pids limit when set through the CLI |
diff --git a/src/android/BackgroundExt.java b/src/android/BackgroundExt.java
index <HASH>..<HASH> 100644
--- a/src/android/BackgroundExt.java
+++ b/src/android/BackgroundExt.java
@@ -83,6 +83,8 @@ class BackgroundExt {
});
}
+ // codebeat:disable[ABC]
+
/**
* Executes the request.
*
@@ -113,6 +115,8 @@ class BackgroundExt {
}
}
+ // codebeat:enable[ABC]
+
/**
* Move app to background.
*/
diff --git a/src/android/BackgroundMode.java b/src/android/BackgroundMode.java
index <HASH>..<HASH> 100644
--- a/src/android/BackgroundMode.java
+++ b/src/android/BackgroundMode.java
@@ -77,6 +77,8 @@ public class BackgroundMode extends CordovaPlugin {
}
};
+ // codebeat:disable[ABC]
+
/**
* Executes the request.
*
@@ -115,6 +117,8 @@ public class BackgroundMode extends CordovaPlugin {
return true;
}
+ // codebeat:enable[ABC]
+
/**
* Called when the system is about to start resuming a previous activity.
* | Muting ABC issues [ci skip] |
diff --git a/MenuItem.php b/MenuItem.php
index <HASH>..<HASH> 100644
--- a/MenuItem.php
+++ b/MenuItem.php
@@ -1160,9 +1160,15 @@ class MenuItem implements \ArrayAccess, \Countable, \IteratorAggregate
*/
public function getIsCurrent()
{
+ $currentUri = $this->getCurrentUri();
+
+ if(null === $currentUri) {
+ return false;
+ }
+
if ($this->isCurrent === null)
{
- $this->isCurrent = ($this->getUri() === $this->getCurrentUri());
+ $this->isCurrent = ($this->getUri() === $currentUri);
}
return $this->isCurrent; | No item is current if the current uri is not set |
diff --git a/src/main/java/com/squareup/javapoet/TypeSpec.java b/src/main/java/com/squareup/javapoet/TypeSpec.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/squareup/javapoet/TypeSpec.java
+++ b/src/main/java/com/squareup/javapoet/TypeSpec.java
@@ -139,9 +139,7 @@ public final class TypeSpec {
}
public static Builder anonymousClassBuilder(String typeArgumentsFormat, Object... args) {
- return anonymousClassBuilder(CodeBlock.builder()
- .add(typeArgumentsFormat, args)
- .build());
+ return anonymousClassBuilder(CodeBlock.of(typeArgumentsFormat, args));
}
public static Builder anonymousClassBuilder(CodeBlock typeArguments) { | Nit: Simplify a CodeBlock |
diff --git a/lib/adp-downloader/http_client.rb b/lib/adp-downloader/http_client.rb
index <HASH>..<HASH> 100644
--- a/lib/adp-downloader/http_client.rb
+++ b/lib/adp-downloader/http_client.rb
@@ -12,7 +12,7 @@ module ADPDownloader
res = agent.get(url)
_raise_on_error(res)
contents = res.body
- contents.body.to_s.empty? ? {} : JSON.parse(contents)
+ contents.to_s.empty? ? {} : JSON.parse(contents)
end
def post(url, data)
@@ -42,7 +42,8 @@ module ADPDownloader
def _raise_on_error(res)
uri = res.uri.to_s.downcase
- if not uri.start_with? TARGET_URL or uri.include? "login"
+ #if not uri.start_with? TARGET_URL or uri.include? "login"
+ if uri.include? "login"
#raise "Unable to authenticate: make sure your username and password are correct"
raise "Unable to authenticate: make sure the file cookie.txt is up to date"
end | Fix bug when displaying auth error messages
In order to properly display error messages, the original method had to
change a bit, otherwise, the app always displays the error message, even
when the request succeeded. |
diff --git a/components/chart.js b/components/chart.js
index <HASH>..<HASH> 100644
--- a/components/chart.js
+++ b/components/chart.js
@@ -4,6 +4,7 @@ const V = require('victory');
const d3Arr = require('d3-array');
const types = {
+ AREA: V.VictoryArea,
TIME: V.VictoryLine,
LINE: V.VictoryLine,
BAR: V.VictoryBar,
@@ -41,7 +42,11 @@ class Chart extends IdyllComponent {
<div className={this.props.className}>
{type !== 'PIE' ? (
<V.VictoryChart domainPadding={10} scale={scale}>
- <INNER_CHART data={data} x={this.props.x} y={this.props.y}>
+ <INNER_CHART
+ data={data}
+ x={this.props.x}
+ y={this.props.y}
+ interpolation={this.props.interpolation || 'linear'}>
</INNER_CHART>
</V.VictoryChart>
) : ( | Support area charts and custom interpolations |
diff --git a/cmd/helm/version.go b/cmd/helm/version.go
index <HASH>..<HASH> 100644
--- a/cmd/helm/version.go
+++ b/cmd/helm/version.go
@@ -48,6 +48,8 @@ the template:
- .GitCommit is the git commit
- .GitTreeState is the state of the git tree when Helm was built
- .GoVersion contains the version of Go that Helm was compiled with
+
+For example, --template '{{.Version}}' outputs 'v3.2.1'. See [unit tests](https://github.com/helm/helm/blob/main/cmd/helm/version_test.go) for further examples.
`
type versionOptions struct { | Add example of --template usage
Current documentation list all available template vars, but does not provide an example of a template string that demonstrates template substitution. I had to look it up in the unit test. |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,7 @@ os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='django-model-changes-py3',
- version='0.14.1',
+ version='0.15.1',
packages=find_packages(exclude=['tests']),
license='MIT License',
description='django-model-changes allows you to track model instance changes.',
@@ -24,7 +24,7 @@ setup(
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.3',
+ 'Programming Language :: Python :: 3.6',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
diff --git a/tests/models.py b/tests/models.py
index <HASH>..<HASH> 100644
--- a/tests/models.py
+++ b/tests/models.py
@@ -9,4 +9,4 @@ class User(ChangesMixin, models.Model):
class Article(ChangesMixin, models.Model):
title = models.CharField(max_length=20)
- user = models.ForeignKey(User)
\ No newline at end of file
+ user = models.ForeignKey(User, on_delete=models.CASCADE) | Updated for Django<=<I> |
diff --git a/skyfield/functions.py b/skyfield/functions.py
index <HASH>..<HASH> 100644
--- a/skyfield/functions.py
+++ b/skyfield/functions.py
@@ -1,5 +1,6 @@
"""Basic operations that are needed repeatedly throughout Skyfield."""
+import numpy as np
from numpy import (
arcsin, arctan2, array, cos, einsum, full_like,
float_, load, rollaxis, sin, sqrt,
@@ -7,6 +8,8 @@ from numpy import (
from pkgutil import get_data
from skyfield.constants import tau
+_tiny = np.finfo(np.float64).tiny
+
def dots(v, u):
"""Given one or more vectors in `v` and `u`, return their dot products.
@@ -74,7 +77,7 @@ def to_spherical(xyz):
"""
r = length_of(xyz)
x, y, z = xyz
- theta = arcsin(z / r)
+ theta = arcsin(z / (r + _tiny)) # "+ _tiny" avoids division by zero
phi = arctan2(y, x) % tau
return r, theta, phi | Fix #<I> with a very, very small number |
diff --git a/test.js b/test.js
index <HASH>..<HASH> 100644
--- a/test.js
+++ b/test.js
@@ -146,21 +146,6 @@ test('TXT record', function (dns, t) {
dns.query('hello-world', 'TXT')
})
-test('TXT record - empty', function (dns, t) {
- dns.once('query', function (packet) {
- dns.respond([{type: 'TXT', name: 'hello-world', ttl: 120}])
- })
-
- dns.once('response', function (packet) {
- t.same(packet.answers[0], {type: 'TXT', name: 'hello-world', ttl: 120, data: new Buffer('00', 'hex'), class: 1, flush: false})
- dns.destroy(function () {
- t.end()
- })
- })
-
- dns.query('hello-world', 'TXT')
-})
-
test('QU question bit', function (dns, t) {
dns.once('query', function (packet) {
t.same(packet.questions, [ | remove empty txt test as that should go in another module |
diff --git a/Filter/Filter.php b/Filter/Filter.php
index <HASH>..<HASH> 100644
--- a/Filter/Filter.php
+++ b/Filter/Filter.php
@@ -54,7 +54,7 @@ abstract class Filter implements FilterInterface
get bound, the default dataMapper is a PropertyPathMapper).
So use this trick to avoid any issue.
*/
- return str_replace('.', '~', $this->name);
+ return str_replace('.', '__', $this->name);
}
/** | fixed filtering on sub-entities for sf <I> |
diff --git a/src/python/pants/backend/python/util_rules/pex_from_targets.py b/src/python/pants/backend/python/util_rules/pex_from_targets.py
index <HASH>..<HASH> 100644
--- a/src/python/pants/backend/python/util_rules/pex_from_targets.py
+++ b/src/python/pants/backend/python/util_rules/pex_from_targets.py
@@ -206,7 +206,7 @@ async def pex_from_targets(request: PexFromTargetsRequest, python_setup: PythonS
repository_pex: Pex | None = None
description = request.description
- if python_setup.requirement_constraints:
+ if python_setup.requirement_constraints and requirements:
constraints_file_contents = await Get(
DigestContents,
PathGlobs(
@@ -288,7 +288,7 @@ async def pex_from_targets(request: PexFromTargetsRequest, python_setup: PythonS
"`[python-setup].resolve_all_constraints` is enabled, so "
"`[python-setup].requirement_constraints` must also be set."
)
- elif python_setup.lockfile:
+ elif python_setup.lockfile and requirements:
# TODO(#12314): This does not handle the case where requirements are disjoint to the
# lockfile. We should likely regenerate the lockfile (or warn/error), as the inputs have
# changed. | Don't resolve constraints file / lockfile if no 3rd-party requirements used (#<I>)
This is an obvious performance improvement with no downsides.
[ci skip-rust]
[ci skip-build-wheels] |
diff --git a/tests/unit/services/websockets/on-test.js b/tests/unit/services/websockets/on-test.js
index <HASH>..<HASH> 100644
--- a/tests/unit/services/websockets/on-test.js
+++ b/tests/unit/services/websockets/on-test.js
@@ -25,6 +25,7 @@ module('Sockets Service - on(*) tests', {
},
teardown() {
window.WebSocket = originalWebSocket;
+ mockServer.close();
Ember.run(() => {
component.destroy(); | Fixing tests for upcoming mock-socket release |
diff --git a/panoptes_client/collection.py b/panoptes_client/collection.py
index <HASH>..<HASH> 100644
--- a/panoptes_client/collection.py
+++ b/panoptes_client/collection.py
@@ -92,3 +92,29 @@ class Collection(PanoptesObject):
_subjects.append(_subject_id)
return _subjects
+
+ def add_default_subject(self, subject):
+ if not (
+ isinstance(subject, Subject)
+ or isinstance(subject, (int, str,))
+ ):
+ raise TypeError
+
+ _subject_id = subject.id if isinstance(subject, Subject) else str(subject)
+
+ self.http_post(
+ '{}/links/default_subject/{}'.format(self.id, _subject_id)
+ )
+
+ def link_to_project(self, project):
+ if not (
+ isinstance(project, Project)
+ or isinstance(project, (int, str))
+ ):
+ raise TypeError
+
+ _project_id = project.id if isinstance(project, Project) else str(project)
+
+ self.http_post(
+ '{}/links/project/{}'.format(self.id, _project_id)
+ ) | Add Collection class methods to update default subject and project links |
diff --git a/pkg/metrics/counter.go b/pkg/metrics/counter.go
index <HASH>..<HASH> 100644
--- a/pkg/metrics/counter.go
+++ b/pkg/metrics/counter.go
@@ -29,9 +29,8 @@ func RegCounter(name string, tagStrings ...string) Counter {
// StandardCounter is the standard implementation of a Counter and uses the
// sync/atomic package to manage a single int64 value.
type StandardCounter struct {
+ count int64 //Due to a bug in golang the 64bit variable need to come first to be 64bit aligned. https://golang.org/pkg/sync/atomic/#pkg-note-BUG
*MetricMeta
-
- count int64
}
// Clear sets the counter to zero. | fix(metrics): <I>bit aligns standardcounter
Due to a bug in golang the <I>bit variable i
need to come first to be <I>bit aligned.
<URL> |
diff --git a/lib/bitcoin/tx_in.rb b/lib/bitcoin/tx_in.rb
index <HASH>..<HASH> 100644
--- a/lib/bitcoin/tx_in.rb
+++ b/lib/bitcoin/tx_in.rb
@@ -75,6 +75,12 @@ module Bitcoin
to_payload == other.to_payload
end
+ # return previous output hash (not txid)
+ def prev_hash
+ return nil unless out_point
+ out_point.hash
+ end
+
end
end | Add Bitcoin::TxIn#prev_hash which returns outpoint hash |
diff --git a/timepiece/views.py b/timepiece/views.py
index <HASH>..<HASH> 100644
--- a/timepiece/views.py
+++ b/timepiece/views.py
@@ -538,6 +538,7 @@ def remove_contact_from_project(request, business, project, contact_id):
else:
return HttpResponseRedirect(reverse('view_project', business, project,))
+
@permission_required('timepiece.change_project')
@transaction.commit_on_success
@render_with('timepiece/project/relationship.html') | added space for pep8
--HG--
branch : feature/no-crm |
diff --git a/allegedb/allegedb/query.py b/allegedb/allegedb/query.py
index <HASH>..<HASH> 100644
--- a/allegedb/allegedb/query.py
+++ b/allegedb/allegedb/query.py
@@ -66,7 +66,7 @@ class GlobalKeyValueStore(MutableMapping):
class QueryEngine(object):
"""Wrapper around either a DBAPI2.0 connection or an
- Alchemist. Provides functions to run queries using either.
+ Alchemist. Provides methods to run queries using either.
"""
json_path = xjpath | Correct function->method in docstring |
diff --git a/src/org/opencms/ade/upload/CmsUploadBean.java b/src/org/opencms/ade/upload/CmsUploadBean.java
index <HASH>..<HASH> 100644
--- a/src/org/opencms/ade/upload/CmsUploadBean.java
+++ b/src/org/opencms/ade/upload/CmsUploadBean.java
@@ -292,6 +292,21 @@ public class CmsUploadBean extends CmsJspBean {
if (title.lastIndexOf('.') != -1) {
title = title.substring(0, title.lastIndexOf('.'));
}
+
+ // fileName really shouldn't contain the full path, but for some reason it does sometimes when the client is
+ // running on IE7, so we eliminate anything before and including the last slash or backslash in the title
+ // before setting it as a property.
+
+ int backslashIndex = title.lastIndexOf('\\');
+ if (backslashIndex != -1) {
+ title = title.substring(backslashIndex + 1);
+ }
+
+ int slashIndex = title.lastIndexOf('/');
+ if (slashIndex != -1) {
+ title = title.substring(slashIndex + 1);
+ }
+
List<CmsProperty> properties = new ArrayList<CmsProperty>(1);
CmsProperty titleProp = new CmsProperty();
titleProp.setName(CmsPropertyDefinition.PROPERTY_TITLE); | Fixed problem with full paths being set as title when uploading files. |
diff --git a/src/Models/Tenant.php b/src/Models/Tenant.php
index <HASH>..<HASH> 100644
--- a/src/Models/Tenant.php
+++ b/src/Models/Tenant.php
@@ -4,8 +4,8 @@ declare(strict_types=1);
namespace Rinvex\Tenants\Models;
-use Spatie\Sluggable\HasSlug;
use Spatie\Sluggable\SlugOptions;
+use Rinvex\Support\Traits\HasSlug;
use Illuminate\Database\Eloquent\Model;
use Rinvex\Cacheable\CacheableEloquent;
use Illuminate\Database\Eloquent\Builder;
@@ -176,23 +176,6 @@ class Tenant extends Model implements TenantContract
}
/**
- * {@inheritdoc}
- */
- protected static function boot()
- {
- parent::boot();
-
- // Auto generate slugs early before validation
- static::validating(function (self $tenant) {
- if ($tenant->exists && $tenant->getSlugOptions()->generateSlugsOnUpdate) {
- $tenant->generateSlugOnUpdate();
- } elseif (! $tenant->exists && $tenant->getSlugOptions()->generateSlugsOnCreate) {
- $tenant->generateSlugOnCreate();
- }
- });
- }
-
- /**
* Get all attached models of the given class to the tenant.
*
* @param string $class | Move slug auto generation to the custom HasSlug trait |
diff --git a/tests/scripts/selenium/selenium_adapter.rb b/tests/scripts/selenium/selenium_adapter.rb
index <HASH>..<HASH> 100644
--- a/tests/scripts/selenium/selenium_adapter.rb
+++ b/tests/scripts/selenium/selenium_adapter.rb
@@ -22,23 +22,22 @@ class SeleniumAdapter
move_cursor(index)
type_text(op['value'])
break
- else
- if op['start'] > index
- move_cursor(index)
- delete_length = op['start'] - index
- delete(delete_length)
- break
- elsif !op['attributes'].empty?
- length = op['end'] - op['start']
- move_cursor(index)
- highlight(length)
- op['attributes'].each do |attr, val|
- format(attr, val)
- end
- break
- else
- index += op['end'] - op['start']
+ elsif op['start'] > index
+ debugger
+ move_cursor(index)
+ delete_length = op['start'] - index
+ delete(delete_length)
+ break
+ elsif !op['attributes'].empty?
+ length = op['end'] - op['start']
+ move_cursor(index)
+ highlight(length)
+ op['attributes'].each do |attr, val|
+ format(attr, val)
end
+ break
+ else
+ index += op['end'] - op['start']
end
end
end | Cleanup apply_delta logic. |
diff --git a/lnwallet/wallet.go b/lnwallet/wallet.go
index <HASH>..<HASH> 100644
--- a/lnwallet/wallet.go
+++ b/lnwallet/wallet.go
@@ -993,8 +993,16 @@ func (l *LightningWallet) openChannelAfterConfirmations(res *ChannelReservation,
txid := res.partialState.FundingTx.TxSha()
l.chainNotifier.RegisterConfirmationsNotification(&txid, numConfs, trigger)
- // Wait until the specified number of confirmations has been reached.
- <-trigger.TriggerChan
+ // Wait until the specified number of confirmations has been reached,
+ // or the wallet signals a shutdown.
+out:
+ select {
+ case <-trigger.TriggerChan:
+ break out
+ case <-l.quit:
+ res.chanOpen <- nil
+ return
+ }
// Finally, create and officially open the payment channel!
// TODO(roasbeef): CreationTime once tx is 'open' | lnwallet: avoid goroutines waiting for channel open indefinitely blocking
Select over the quit channel in order to shutdown goroutines waiting
for funding txn confirmations. Without this we may leak goroutines
which are blocked forever if the process isn’t exiting when the walet
is signaled to shutdown. |
diff --git a/.eslintrc.js b/.eslintrc.js
index <HASH>..<HASH> 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -5,14 +5,10 @@ module.exports = {
'globals': {
'Promise': false,
- '__TEST__': true,
- '__MIN__': true,
- '__FILE_NAME__': true,
'__PAYPAL_CHECKOUT__': true,
'__paypal_checkout__': true,
'__sdk__': true,
'__LOCALE__': true,
- '__ENV__': true,
'__CLIENT_ID__': true,
'__MERCHANT_ID__': true
}, | Remove globals handled by grumbler-scripts |
diff --git a/lib/site.php b/lib/site.php
index <HASH>..<HASH> 100644
--- a/lib/site.php
+++ b/lib/site.php
@@ -9,14 +9,10 @@ class Site extends \TimberSite
protected static $themeSupport = array();
protected $optionPages = array();
protected $editor;
- protected $currentUser;
public function __construct()
{
-
-
\Timber::$dirname = 'app/templates';
- $this->currentUser = new User();
self::addThemeSupport();
@@ -109,12 +105,6 @@ class Site extends \TimberSite
return $context;
}
- public function addCurrentUserToContext($context)
- {
- $context['current_user'] = $this->currentUser;
- return $context;
- }
-
public function addToTwig($twig)
{
/* this is where you can add your own fuctions to twig */ | Remove support for current user, it is getting refactored to a separate Auth class
Currently the Auth class is not in Understory, but implemented in the theme. |
diff --git a/moto/iam/responses.py b/moto/iam/responses.py
index <HASH>..<HASH> 100644
--- a/moto/iam/responses.py
+++ b/moto/iam/responses.py
@@ -1349,6 +1349,7 @@ LIST_GROUPS_FOR_USER_TEMPLATE = """<ListGroupsForUserResponse>
<GroupName>{{ group.name }}</GroupName>
<GroupId>{{ group.id }}</GroupId>
<Arn>{{ group.arn }}</Arn>
+ <CreateDate>{{ group.created_iso_8601 }}</CreateDate>
</member>
{% endfor %}
</Groups>
@@ -1651,6 +1652,7 @@ LIST_GROUPS_FOR_USER_TEMPLATE = """<ListGroupsForUserResponse>
<GroupName>{{ group.name }}</GroupName>
<GroupId>{{ group.id }}</GroupId>
<Arn>{{ group.arn }}</Arn>
+ <CreateDate>{{ group.created_iso_8601 }}</CreateDate>
</member>
{% endfor %}
</Groups> | Add CreateDate to iam list_groups_for_user.
Add the CreateDate field to the list_groups_for_user to match the
correct AWS response. Fixes #<I> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.