diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -76,6 +76,8 @@ Exception.readable('toJSON', function extract() {
//
if (this.capture) return this.capture;
+ var cpus = os.cpus();
+
return {
node: process.versions,
version: require('./package.json').version.split('.').shift(),
@@ -92,6 +94,13 @@ Exception.readable('toJSON', function extract() {
platform: process.platform,
arch: process.arch,
hostname: os.hostname(),
+ cpu: {
+ cores: cpus.length,
+ speed: cpus.reduce(function sum(memo, cpu) {
+ return memo + cpu.speed;
+ }, 0) / cpus.length,
+ model: cpus[0].model
+ }
},
process: {
load: os.loadavg(),
|
[minor] Added missing cpu information
|
diff --git a/examples/distillation/distiller.py b/examples/distillation/distiller.py
index <HASH>..<HASH> 100644
--- a/examples/distillation/distiller.py
+++ b/examples/distillation/distiller.py
@@ -295,7 +295,10 @@ class Distiller:
if self.is_master: logger.info(f'--- Ending epoch {self.epoch}/{self.params.n_epoch-1}')
self.end_epoch()
- if self.is_master: logger.info('Training is finished')
+ if self.is_master:
+ logger.info(f'Save very last checkpoint as `pytorch_model.bin`.')
+ self.save_checkpoint(checkpoint_name=f'pytorch_model.bin')
+ logger.info('Training is finished')
def step(self,
input_ids: torch.tensor,
|
[Distillation] save last chkpt as `pytorch_model.bin`
|
diff --git a/src/delombok/lombok/delombok/Delombok.java b/src/delombok/lombok/delombok/Delombok.java
index <HASH>..<HASH> 100644
--- a/src/delombok/lombok/delombok/Delombok.java
+++ b/src/delombok/lombok/delombok/Delombok.java
@@ -366,6 +366,7 @@ public class Delombok {
for (File fileToParse : filesToParse) {
Comments comments = new Comments();
+ context.put(Comments.class, (Comments) null);
context.put(Comments.class, comments);
@SuppressWarnings("deprecation")
|
Making delombok compatible with post-resolution transformers meant delombok would fail with a 'duplicate context value' error.
Fixes issue #<I>
Thanks to Neildo for using the <I> beta and spotting the problem - the tests don't run 1 delombok with multiple files. Maybe we should change that.
|
diff --git a/core/src/main/java/com/google/bitcoin/core/Wallet.java b/core/src/main/java/com/google/bitcoin/core/Wallet.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/com/google/bitcoin/core/Wallet.java
+++ b/core/src/main/java/com/google/bitcoin/core/Wallet.java
@@ -3588,6 +3588,12 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha
}
}
+ @Override
+ public synchronized void setTag(String tag, ByteString value) {
+ super.setTag(tag, value);
+ saveNow();
+ }
+
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Boilerplate for running event listeners - dispatches events onto the user code thread (where we don't do
@@ -4105,10 +4111,4 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha
public ReentrantLock getLock() {
return lock;
}
-
- @Override
- public synchronized void setTag(String tag, ByteString value) {
- super.setTag(tag, value);
- saveNow();
- }
}
|
Wallet: move setTag to the extensions section of the file.
|
diff --git a/cwltool/job.py b/cwltool/job.py
index <HASH>..<HASH> 100644
--- a/cwltool/job.py
+++ b/cwltool/job.py
@@ -69,7 +69,7 @@ with open(sys.argv[1], "r") as f:
if sp.stdin:
sp.stdin.close()
rcode = sp.wait()
- if isinstance(stdin, file):
+ if stdin is not subprocess.PIPE:
stdin.close()
if stdout is not sys.stderr:
stdout.close()
|
Fix Python 3 incompatibility in PYTHON_RUN_SCRIPT.
`file` is no longer a built-in with the new `io` framework. Was causing jobs to fail depending on the python in the conda env.
|
diff --git a/src/main/java/de/galan/commons/time/Durations.java b/src/main/java/de/galan/commons/time/Durations.java
index <HASH>..<HASH> 100644
--- a/src/main/java/de/galan/commons/time/Durations.java
+++ b/src/main/java/de/galan/commons/time/Durations.java
@@ -64,7 +64,7 @@ public class Durations {
String result = "";
if ((date != null) && (reference != null)) {
long time = reference.toEpochMilli() - date.toEpochMilli();
- result = humanize(time, " ");
+ result = humanize(time, SPACE);
}
return result;
}
@@ -76,7 +76,7 @@ public class Durations {
}
- private static String humanize(long time, String separator) {
+ public static String humanize(long time, String separator) {
StringBuilder result = new StringBuilder();
if (time == 0L) {
result.append("0ms");
|
Opened method with custom seperator
|
diff --git a/lib/payment.js b/lib/payment.js
index <HASH>..<HASH> 100644
--- a/lib/payment.js
+++ b/lib/payment.js
@@ -146,7 +146,7 @@ function txToPayment(tx, opts) {
// Advanced options
invoice_id: tx.InvoiceID,
- paths: tx.paths || '',
+ paths: tx.paths || [],
flag_partial_payment: (tx.Flags & 0x00010000 ? true : false),
flag_no_direct_ripple: (tx.Flags & 0x00020000 ? true : false),
diff --git a/lib/tx.js b/lib/tx.js
index <HASH>..<HASH> 100644
--- a/lib/tx.js
+++ b/lib/tx.js
@@ -17,13 +17,13 @@ module.exports.getTx = function(remote, tx_hash, callback) {
}
// Get container ledger to find close_time
- remote.requestLedger(tx.inLedger, function(err, ledger){
+ remote.requestLedger(tx.inLedger, function(err, res){
if (err) {
callback(err);
return;
}
- tx.close_time_unix = ripple.utils.toTimestamp(ledger.close_time);
+ tx.close_time_unix = ripple.utils.toTimestamp(res.ledger.close_time);
callback(null, tx);
|
[FIX] Fixed timestamp bug
|
diff --git a/Lib/ufo2ft/featureWriters/baseFeatureWriter.py b/Lib/ufo2ft/featureWriters/baseFeatureWriter.py
index <HASH>..<HASH> 100644
--- a/Lib/ufo2ft/featureWriters/baseFeatureWriter.py
+++ b/Lib/ufo2ft/featureWriters/baseFeatureWriter.py
@@ -154,7 +154,13 @@ class BaseFeatureWriter:
raise NotImplementedError
def _insert(
- self, feaFile, classDefs=None, markClassDefs=None, lookups=None, features=None
+ self,
+ feaFile,
+ classDefs=None,
+ anchorDefs=None,
+ markClassDefs=None,
+ lookups=None,
+ features=None,
):
"""
Insert feature, its classDefs or markClassDefs and lookups at insert
@@ -229,6 +235,10 @@ class BaseFeatureWriter:
if classDefs:
others.extend(classDefs)
others.append(ast.Comment(""))
+ # Insert anchorDefs
+ if anchorDefs:
+ others.extend(anchorDefs)
+ others.append(ast.Comment(""))
# Insert markClassDefs
if markClassDefs:
others.extend(markClassDefs)
|
BaseFeatureWriter: _insert() may also insert anchorDefs
|
diff --git a/message_sender/factory.py b/message_sender/factory.py
index <HASH>..<HASH> 100644
--- a/message_sender/factory.py
+++ b/message_sender/factory.py
@@ -177,6 +177,7 @@ class WassupApiSender(object):
self.session = (
session or WASSUP_SESSIONS.setdefault(token, requests.Session()))
self.session.headers.update({
+ 'Authorization': 'Token %s' % (self.token,),
'User-Agent': 'SeedMessageSender/%s' % (
distribution.version,)
})
|
include the Authorization token in the header
|
diff --git a/test/Task/GroupTaskTest.php b/test/Task/GroupTaskTest.php
index <HASH>..<HASH> 100644
--- a/test/Task/GroupTaskTest.php
+++ b/test/Task/GroupTaskTest.php
@@ -32,5 +32,33 @@ class GroupTaskTest extends DeployerTester
$this->runCommand('group');
}
+
+ public function testAfter()
+ {
+ $mock = $this->getMock('stdClass', ['callback']);
+ $mock->expects($this->exactly(2))
+ ->method('callback')
+ ->will($this->returnValue(true));
+
+ task('task1', function () {
+ });
+
+ task('task2', function () {
+ });
+
+ task('group', ['task1', 'task2']);
+
+ after('task1', function () use($mock) {
+ $mock->callback();
+ });
+
+ task('after', function () use($mock) {
+ $mock->callback();
+ });
+
+ after('task1', 'after');
+
+ $this->runCommand('group');
+ }
}
\ No newline at end of file
|
Test after/before task in group tasks :beetle:
|
diff --git a/umi_tools/umi_methods.py b/umi_tools/umi_methods.py
index <HASH>..<HASH> 100644
--- a/umi_tools/umi_methods.py
+++ b/umi_tools/umi_methods.py
@@ -202,6 +202,9 @@ def get_bundles(insam, read_events,
else:
read_events['Input Reads'] += 1
+ if paired:
+ read_events['Paired Reads'] += 1
+
if subset:
if random.random() >= subset:
read_events['Randomly excluded'] += 1
|
updates logging to include number of paired reads
|
diff --git a/modules_v3/lightbox/module.php b/modules_v3/lightbox/module.php
index <HASH>..<HASH> 100644
--- a/modules_v3/lightbox/module.php
+++ b/modules_v3/lightbox/module.php
@@ -27,6 +27,8 @@ if (!defined('WT_WEBTREES')) {
header('HTTP/1.0 403 Forbidden');
exit;
}
+// prevents the error where image on Lightbox fails to close - How? I don't know
+require_once WT_ROOT.'includes/functions/functions_print_lists.php';
class lightbox_WT_Module extends WT_Module implements WT_Module_Config, WT_Module_Tab {
// Extend WT_Module
|
reverse change <I> - it is required and it prevents the error where image on Lightbox fails to close - How? I don't know.
|
diff --git a/board.go b/board.go
index <HASH>..<HASH> 100644
--- a/board.go
+++ b/board.go
@@ -1,7 +1,6 @@
package jira
import (
- //"fmt"
"fmt"
"net/http"
)
diff --git a/project_test.go b/project_test.go
index <HASH>..<HASH> 100644
--- a/project_test.go
+++ b/project_test.go
@@ -68,7 +68,7 @@ func TestProjectGet_NoProject(t *testing.T) {
projects, resp, err := testClient.Project.Get("99999999")
if projects != nil {
- t.Errorf("Expected nil. Got %s", err)
+ t.Errorf("Expected nil. Got %+v", projects)
}
if resp.Status == "404" {
|
cosmetic fix in boards imports, tests in projects
|
diff --git a/src/Tags.php b/src/Tags.php
index <HASH>..<HASH> 100644
--- a/src/Tags.php
+++ b/src/Tags.php
@@ -38,6 +38,6 @@ class Tags extends Field
return $tags->map(function (Tag $tag) {
return ['id' => $tag->id, 'name' => $tag->name];
- });
+ })->values();
}
}
|
Fix resolveAttribute on forms
Without this, the following error occurs on forms when there are more than 1 tag returned. "TypeError: this.field.value.map is not a function"
|
diff --git a/src/MvcCore/Ext/Views/Helpers/Assets.php b/src/MvcCore/Ext/Views/Helpers/Assets.php
index <HASH>..<HASH> 100644
--- a/src/MvcCore/Ext/Views/Helpers/Assets.php
+++ b/src/MvcCore/Ext/Views/Helpers/Assets.php
@@ -417,7 +417,8 @@ class Assets extends \MvcCore\Ext\Views\Helpers\AbstractHelper
try {
@chmod($tmpDir, 0777);
} catch (\Exception $e) {
- throw new \Exception('['.__CLASS__.'] ' . $e->getMessage());
+ $selfClass = version_compare(PHP_VERSION, '5.5', '>') ? self::class : __CLASS__;
+ throw new \Exception('['.$selfClass.'] ' . $e->getMessage());
}
}
}
|
Direct usage of deprecated __CLASS__ constant conditioned.
|
diff --git a/qtpy/QtCore.py b/qtpy/QtCore.py
index <HASH>..<HASH> 100644
--- a/qtpy/QtCore.py
+++ b/qtpy/QtCore.py
@@ -24,8 +24,10 @@ if PYQT5:
del pyqtSignal, pyqtSlot, pyqtProperty, QT_VERSION_STR
elif PYSIDE2:
from PySide2.QtCore import *
- from PySide2.QtGui import QStringListModel
-
+ try: # may be limited to PySide-5.11a1 only
+ from PySide2.QtGui import QStringListModel
+ except:
+ pass
elif PYQT4:
from PyQt4.QtCore import *
# Those are things we inherited from Spyder that fix crazy crashes under
|
PySide-<I>a2 preventive change
|
diff --git a/lintools/data.py b/lintools/data.py
index <HASH>..<HASH> 100644
--- a/lintools/data.py
+++ b/lintools/data.py
@@ -73,7 +73,10 @@ class Data(object):
self.mol2.GetSubstructMatches(mol, uniquify=1)
except AttributeError:
self.mol2 = Chem.MolFromMol2File(mol2_file,removeHs=False,sanitize=False)
- self.mol2.UpdatePropertyCache(strict=False)
+ try:
+ self.mol2.UpdatePropertyCache(strict=False)
+ except AttributeError:
+ assert self.mol2 != None, "The MOL2 file could not be imported in RDKit environment. Suggestion: Check the atomtypes."
assert self.mol2 != None, "The MOL2 file could not be imported in RDKit environment."
def rename_ligand(self,ligand_name):
|
Add assertion error for MOL2
Sometimes MOL2 files cannot be imported since the atom types are not of
SYBYL type that RDKit likes. I will at some point write a solution for
that although it can be messy
|
diff --git a/lib/assets/Xml.js b/lib/assets/Xml.js
index <HASH>..<HASH> 100644
--- a/lib/assets/Xml.js
+++ b/lib/assets/Xml.js
@@ -29,9 +29,6 @@ extendWithGettersAndSetters(Xml.prototype, {
}),
document = domParser.parseFromString(this.text, 'text/xml');
- if (!firstParseError && document && (!document.documentElement || document.documentElement.nodeName !== 'svg')) {
- firstParseError = new Error('non-SVG document');
- }
if (firstParseError) {
var err = new errors.ParseError({message: 'Parse error in ' + (this.url || 'inline Xml' + (this.nonInlineAncestor ? ' in ' + this.nonInlineAncestor.url : '')) + '\n' + firstParseError.message, asset: this});
if (this.assetGraph) {
|
Fixed copy/paste error that required XML documents to have an <svg> element at the top level (assetgraph-builder#<I>).
|
diff --git a/lib/dock0/config.rb b/lib/dock0/config.rb
index <HASH>..<HASH> 100644
--- a/lib/dock0/config.rb
+++ b/lib/dock0/config.rb
@@ -36,7 +36,9 @@ module Dock0
def finalize
puts "Packing config into #{@paths['output']}"
- tar = Dir.chdir(File.dirname(@paths['build'])) { run 'tar cz .' }
+ tar = Dir.chdir(File.dirname(@paths['build'])) do
+ run 'tar -cz --owner=root --group=root .'
+ end
File.open(@paths['output'], 'w') { |fh| fh << tar }
end
|
set owner/group on config to root
|
diff --git a/src/main/java/de/jfachwert/bank/Geldbetrag.java b/src/main/java/de/jfachwert/bank/Geldbetrag.java
index <HASH>..<HASH> 100644
--- a/src/main/java/de/jfachwert/bank/Geldbetrag.java
+++ b/src/main/java/de/jfachwert/bank/Geldbetrag.java
@@ -945,11 +945,16 @@ public class Geldbetrag implements MonetaryAmount, Comparable<MonetaryAmount>, F
if (roundingMode == null) {
roundingMode = RoundingMode.HALF_UP;
}
- BigDecimal scaled = n.setScale(monetaryContext.getMaxScale(), roundingMode);
- if (scaled.compareTo(n) != 0) {
- throw new LocalizedArithmeticException(value, "lost_precision");
+ int scale = monetaryContext.getMaxScale();
+ if (scale < 0) {
+ return n;
+ } else {
+ BigDecimal scaled = n.setScale(scale, roundingMode);
+ if (scaled.compareTo(n) != 0) {
+ throw new LocalizedArithmeticException(value, "lost_precision");
+ }
+ return scaled;
}
- return scaled;
}
/**
|
scale -1 is ignored in context;
TCK: still <I> tests failing
|
diff --git a/web/auth_test.go b/web/auth_test.go
index <HASH>..<HASH> 100644
--- a/web/auth_test.go
+++ b/web/auth_test.go
@@ -11,7 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// +build integration
+// +build root, integration
package web
|
adding root tag to build statemnt.
|
diff --git a/fathom-rest-security/src/main/java/fathom/rest/controller/extractors/AuthExtractor.java b/fathom-rest-security/src/main/java/fathom/rest/controller/extractors/AuthExtractor.java
index <HASH>..<HASH> 100644
--- a/fathom-rest-security/src/main/java/fathom/rest/controller/extractors/AuthExtractor.java
+++ b/fathom-rest-security/src/main/java/fathom/rest/controller/extractors/AuthExtractor.java
@@ -58,7 +58,8 @@ public class AuthExtractor implements TypedExtractor, NamedExtractor, Configurab
@Override
public Account extract(Context context) {
Account session = context.getSession(AuthConstants.ACCOUNT_ATTRIBUTE);
- Account account = Optional.fromNullable(session).or(Account.GUEST);
+ Account local = context.getLocal(AuthConstants.ACCOUNT_ATTRIBUTE);
+ Account account = Optional.fromNullable(session).or(Optional.fromNullable(local).or(Account.GUEST));
return account;
}
}
|
Try to extract Account from local if there is no Account in the session
|
diff --git a/pydsl/Grammar/Definition.py b/pydsl/Grammar/Definition.py
index <HASH>..<HASH> 100644
--- a/pydsl/Grammar/Definition.py
+++ b/pydsl/Grammar/Definition.py
@@ -71,6 +71,9 @@ class RegularExpressionDefinition(GrammarDefinition):
import re
self.regexp = re.compile(regexp, flags)
+ def __hash__(self):
+ return hash(self.regexpstr)
+
def __eq__(self, other):
if not isinstance(other, RegularExpressionDefinition):
return False
|
hash support for regexp grammars
|
diff --git a/anndata/base.py b/anndata/base.py
index <HASH>..<HASH> 100644
--- a/anndata/base.py
+++ b/anndata/base.py
@@ -397,6 +397,10 @@ class _ViewMixin(_SetItemMixin):
self._view_args = view_args
super().__init__(*args, **kwargs)
+ def __deepcopy__(self, memo):
+ parent, k = self._view_args
+ return deepcopy(getattr(parent._adata_ref, k))
+
class ArrayView(_SetItemMixin, np.ndarray):
def __new__(
|
fix repeated slicing / uns deepcopying problem (#<I>)
|
diff --git a/src/ContactPoint.php b/src/ContactPoint.php
index <HASH>..<HASH> 100644
--- a/src/ContactPoint.php
+++ b/src/ContactPoint.php
@@ -1,16 +1,13 @@
<?php
-/**
- * @file
- * Contains CultuurNet\UDB3\ContactPoint.
- */
-
namespace CultuurNet\UDB3;
use Broadway\Serializer\SerializableInterface;
/**
* ContactPoint info.
+ * @todo Remove $type? Seems unused throughout the rest of the codebase.
+ * @see https://jira.uitdatabank.be/browse/III-1508
*/
class ContactPoint implements SerializableInterface, JsonLdSerializableInterface
{
|
III-<I>: Added @todo with Jira ticket to remove $type property on ContactPoint.
|
diff --git a/lib/maruku/version.rb b/lib/maruku/version.rb
index <HASH>..<HASH> 100644
--- a/lib/maruku/version.rb
+++ b/lib/maruku/version.rb
@@ -19,7 +19,7 @@
#++
module MaRuKu
- Version = '0.5.1.1'
+ Version = '0.5.2'
MarukuURL = 'http://maruku.rubyforge.org/'
|
pumping version number because gem seems to have problems with <I>
git-svn-id: svn://rubyforge.org/var/svn/maruku/trunk@<I> 7e2f<I>f0-5a<I>-4fd6-<I>-<I>c<I>b<I>
|
diff --git a/lib/basecamp/resources/todo_list.rb b/lib/basecamp/resources/todo_list.rb
index <HASH>..<HASH> 100644
--- a/lib/basecamp/resources/todo_list.rb
+++ b/lib/basecamp/resources/todo_list.rb
@@ -1,6 +1,4 @@
module Basecamp; class TodoList < Basecamp::Resource
- parent_resources :project
-
# Returns all lists for a project. If complete is true, only completed lists
# are returned. If complete is false, only uncompleted lists are returned.
def self.all(project_id, complete = nil)
@@ -14,7 +12,15 @@ module Basecamp; class TodoList < Basecamp::Resource
find(:all, :params => { :project_id => project_id, :filter => filter })
end
+ def project
+ @project ||= Project.find(project_id)
+ end
+
def todo_items(options = {})
@todo_items ||= TodoItem.find(:all, :params => options.merge(:todo_list_id => id))
end
+
+ def prefix_options
+ { :project_id => project_id }
+ end
end; end
\ No newline at end of file
|
Accessing project from todo_list is now possible
|
diff --git a/example/speech-demo/lstm_bucketing.py b/example/speech-demo/lstm_bucketing.py
index <HASH>..<HASH> 100644
--- a/example/speech-demo/lstm_bucketing.py
+++ b/example/speech-demo/lstm_bucketing.py
@@ -393,7 +393,7 @@ if __name__ == '__main__':
assert name_vals[0][0] == 'Acc_exlude_padding'
curr_acc = name_vals[0][1]
- if n_epoch > 0 and curr_acc < last_acc:
+ if n_epoch > 0 and lr_scheduler.base_lr > lower_bnd and curr_acc < last_acc:
logging.info('*** Reducing Learning Rate %g => %g ***' % \
(lr_scheduler.base_lr, lr_scheduler.base_lr / float(factor)))
# reduce learning rate
|
enforce a lower bound for lr decaying
|
diff --git a/retext.py b/retext.py
index <HASH>..<HASH> 100755
--- a/retext.py
+++ b/retext.py
@@ -42,6 +42,7 @@ def main(fileNames):
app.setStyleSheet(QTextStream(sheetfile).readAll())
sheetfile.close()
window = ReTextWindow()
+ window.show()
for fileName in fileNames:
try:
fileName = QString.fromUtf8(fileName)
@@ -50,7 +51,6 @@ def main(fileNames):
pass
if QFile.exists(fileName):
window.openFileWrapper(fileName)
- window.show()
sys.exit(app.exec_())
if __name__ == '__main__':
|
Show the window before opening files to fix issues
when wrong window title was displayed
|
diff --git a/src/VisitorFactory.php b/src/VisitorFactory.php
index <HASH>..<HASH> 100644
--- a/src/VisitorFactory.php
+++ b/src/VisitorFactory.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
namespace Ray\Aop;
use PhpParser\NodeTraverser;
+use PhpParser\NodeVisitor\NameResolver;
use PhpParser\Parser;
use Ray\Aop\Exception\InvalidSourceClassException;
use ReflectionClass;
@@ -31,7 +32,9 @@ final class VisitorFactory
public function __invoke(ReflectionClass $class): CodeVisitor
{
$traverser = new NodeTraverser();
+ $nameResolver = new NameResolver();
$visitor = new CodeVisitor();
+ $traverser->addVisitor($nameResolver);
$traverser->addVisitor($visitor);
$fileName = $class->getFileName();
if (is_bool($fileName)) {
|
Use NameResolver for including namespace
|
diff --git a/src/main/java/net/malisis/core/client/gui/GuiRenderer.java b/src/main/java/net/malisis/core/client/gui/GuiRenderer.java
index <HASH>..<HASH> 100644
--- a/src/main/java/net/malisis/core/client/gui/GuiRenderer.java
+++ b/src/main/java/net/malisis/core/client/gui/GuiRenderer.java
@@ -450,9 +450,7 @@ public class GuiRenderer extends MalisisRenderer
draw();
- text = StatCollector.translateToLocal(text);
- text = text.replaceAll("\r?\n", "");
- text = text.replaceAll("\t", " ");
+ text = processString(text);
GL11.glPushMatrix();
GL11.glTranslatef(x * (1 - fontScale), y * (1 - fontScale), 0);
GL11.glScalef(fontScale, fontScale, 1);
@@ -624,9 +622,12 @@ public class GuiRenderer extends MalisisRenderer
public static String processString(String str)
{
+ EnumChatFormatting ecf = getFormatting(str, 0);
+ if (ecf != null)
+ str = str.substring(2);
str = StatCollector.translateToLocal(str);
str = str.replaceAll("\r?\n", "").replaceAll("\t", " ");
- return str;
+ return (ecf != null ? ecf : "") + str;
}
/**
|
Fixed processString to handle ECF before localization strings
|
diff --git a/packages/next-server/lib/loadable.js b/packages/next-server/lib/loadable.js
index <HASH>..<HASH> 100644
--- a/packages/next-server/lib/loadable.js
+++ b/packages/next-server/lib/loadable.js
@@ -170,8 +170,9 @@ function createLoadableComponent (loadFn, options) {
}
static contextType = LoadableContext
-
- componentWillMount () {
+ // TODO: change it before next major React release
+ // eslint-disable-next-line
+ UNSAFE_componentWillMount() {
this._mounted = true
this._loadModule()
}
|
Change componentWillMount to UNSAFE (#<I>)
* Change to unsafe
* Ignore
|
diff --git a/src/Front.php b/src/Front.php
index <HASH>..<HASH> 100644
--- a/src/Front.php
+++ b/src/Front.php
@@ -232,8 +232,8 @@ class Front extends Simple\Front implements Routing\FrontController
break;
case 'application/json':
- if($this->route->hasContent('application/json', $contentKey))
- return $this->route->getContentByType('application/json', $contentKey)->asJson();
+ if($this->route->hasContent('application/json'))
+ return $this->route->getContentByType('application/json')->asJson();
elseif(404 != http_response_code()) {
http_response_code(404);
$_SERVER['REDIRECT_STATUS'] = 404;
@@ -243,7 +243,7 @@ class Front extends Simple\Front implements Routing\FrontController
break;
case 'application/xml':
if($this->route->hasContent('application/xml', $contentKey))
- return $this->route->getContent('application/xml', $contentKey)->asJson();
+ return $this->route->getContentByType('application/xml')->asJson();
elseif(404 != http_response_code()) {
http_response_code(404);
$_SERVER['REDIRECT_STATUS'] = 404;
|
Fix getContent
I'm dumb…
|
diff --git a/sqlauth/__init__.py b/sqlauth/__init__.py
index <HASH>..<HASH> 100644
--- a/sqlauth/__init__.py
+++ b/sqlauth/__init__.py
@@ -16,4 +16,4 @@
##
###############################################################################
-__version__ = "0.1.86"
+__version__ = "0.1.87"
|
sync with pypi version: <I>
|
diff --git a/lib/vagrant/util/numeric.rb b/lib/vagrant/util/numeric.rb
index <HASH>..<HASH> 100644
--- a/lib/vagrant/util/numeric.rb
+++ b/lib/vagrant/util/numeric.rb
@@ -49,6 +49,14 @@ module Vagrant
bytes
end
+ # Rounds actual value to two decimal places
+ #
+ # @param [Integer] bytes
+ # @return [Integer] megabytes - bytes representation in megabytes
+ def bytes_to_megabytes(bytes)
+ (bytes / MEGABYTE).round(2)
+ end
+
# @private
# Reset the cached values for platform. This is not considered a public
# API and should only be used for testing.
|
Add method for converting bytes to megabytes
|
diff --git a/packages/components/src/product-icon/config.js b/packages/components/src/product-icon/config.js
index <HASH>..<HASH> 100644
--- a/packages/components/src/product-icon/config.js
+++ b/packages/components/src/product-icon/config.js
@@ -99,6 +99,10 @@ export const iconToProductSlugMap = {
'jetpack_security_daily_monthly_v2',
'jetpack_security_realtime_v2',
'jetpack_security_realtime_monthly_v2',
+ 'jetpack_security_daily',
+ 'jetpack_security_daily_monthly',
+ 'jetpack_security_realtime',
+ 'jetpack_security_realtime_monthly',
],
};
|
Add missing Jetpack Security slugs (#<I>)
|
diff --git a/sprd/entity/Configuration.js b/sprd/entity/Configuration.js
index <HASH>..<HASH> 100644
--- a/sprd/entity/Configuration.js
+++ b/sprd/entity/Configuration.js
@@ -53,9 +53,7 @@ define(['js/data/Entity', 'sprd/entity/Offset', 'sprd/entity/Size', 'sprd/entity
},
_commitChangedAttributes: function ($) {
- if(this.$entityInitialized){
- this._validateTransform($);
- }
+ this._validateTransform($);
this.callBase();
},
|
removed $entityInitialized check in Configuration
|
diff --git a/testproject/tablib_test/tests.py b/testproject/tablib_test/tests.py
index <HASH>..<HASH> 100644
--- a/testproject/tablib_test/tests.py
+++ b/testproject/tablib_test/tests.py
@@ -6,6 +6,9 @@ from .models import TestModel
class DjangoTablibTestCase(TestCase):
+ def setUp(self):
+ TestModel.objects.create(field1='value')
+
def test_declarative_fields(self):
class TestModelDataset(ModelDataset):
field1 = Field()
@@ -20,3 +23,5 @@ class DjangoTablibTestCase(TestCase):
self.assertTrue('id' not in data.headers)
self.assertTrue('field1' in data.headers)
self.assertTrue('field2' in data.headers)
+
+ self.assertEqual(data[0][0], data[0][1])
|
Test that declarative fields actually work.
|
diff --git a/shap/explainers/linear.py b/shap/explainers/linear.py
index <HASH>..<HASH> 100644
--- a/shap/explainers/linear.py
+++ b/shap/explainers/linear.py
@@ -45,8 +45,13 @@ class LinearExplainer(Explainer):
# sklearn style model
elif hasattr(model, "coef_") and hasattr(model, "intercept_"):
- self.coef = model.coef_
- self.intercept = model.intercept_
+ # work around for multi-class with a single class
+ if len(model.coef_.shape) and model.coef_.shape[0] == 1:
+ self.coef = model.coef_[0]
+ self.intercept = model.intercept_[0]
+ else:
+ self.coef = model.coef_
+ self.intercept = model.intercept_
else:
raise Exception("An unknown model type was passed: " + str(type(model)))
|
Fix #<I>
Still need to support multi-class at some point.
|
diff --git a/lib/resque/plugins/later/method.rb b/lib/resque/plugins/later/method.rb
index <HASH>..<HASH> 100644
--- a/lib/resque/plugins/later/method.rb
+++ b/lib/resque/plugins/later/method.rb
@@ -25,7 +25,6 @@ module Resque::Plugins::Later::Method
end
def perform_later(queue, method, *args)
- ActiveSupport::Deprecation.warn("perform_later will be deprecated in future versions, please use the later method on your models")
args = PerformLater::ArgsParser.args_to_resque(args)
worker = PerformLater::Workers::ActiveRecord::Worker
@@ -33,8 +32,6 @@ module Resque::Plugins::Later::Method
end
def perform_later!(queue, method, *args)
- ActiveSupport::Deprecation.warn("perform_later! will be deprecated in future versions, please use the later method on your models")
-
args = PerformLater::ArgsParser.args_to_resque(args)
digest = PerformLater::PayloadHelper.get_digest(self.class.name, method, args)
worker = PerformLater::Workers::ActiveRecord::LoneWorker
|
Removed deprecation warnings
|
diff --git a/salt/utils/__init__.py b/salt/utils/__init__.py
index <HASH>..<HASH> 100644
--- a/salt/utils/__init__.py
+++ b/salt/utils/__init__.py
@@ -2016,7 +2016,11 @@ def check_state_result(running, recurse=False, highstate=None):
ret = True
for state_id, state_result in six.iteritems(running):
- if not recurse and not isinstance(state_result, dict):
+ expected_type = dict
+ # The __extend__ state is a list
+ if "__extend__" == state_id:
+ expected_type = list
+ if not recurse and not isinstance(state_result, expected_type):
ret = False
if ret and isinstance(state_result, dict):
result = state_result.get('result', _empty)
|
check_result: Correctly check the __extend__ state.
<URL> is expecting each highstate item to be a dict, but
states using extend are lists.
Conflicts:
- salt/utils/state.py
|
diff --git a/spinoff/util/testing.py b/spinoff/util/testing.py
index <HASH>..<HASH> 100644
--- a/spinoff/util/testing.py
+++ b/spinoff/util/testing.py
@@ -10,8 +10,6 @@ from twisted.internet.defer import Deferred, succeed
from spinoff.util.async import CancelledError
from spinoff.actor import Actor
from spinoff.util.pattern_matching import match, ANY, IS_INSTANCE, NOT
-from spinoff.util.python import combomethod
-from spinoff.actor.comm import ActorRef
__all__ = ['deferred', 'assert_raises', 'assert_not_raises', 'MockFunction', 'assert_num_warnings', 'assert_no_warnings', 'assert_one_warning']
@@ -30,6 +28,7 @@ def deferred(f):
clock = Clock()
d = f(clock)
+
@d.addErrback
def on_error(f):
error[0] = sys.exc_info()
|
Cleaned up in util.testing
|
diff --git a/lib/generators/social_stream/templates/migration.rb b/lib/generators/social_stream/templates/migration.rb
index <HASH>..<HASH> 100644
--- a/lib/generators/social_stream/templates/migration.rb
+++ b/lib/generators/social_stream/templates/migration.rb
@@ -38,7 +38,6 @@ class CreateSocialStream < ActiveRecord::Migration
t.string "name", :limit => 45
t.string "email", :default => "", :null => false
t.string "permalink", :limit => 45
- t.boolean "disabled", :default => false
t.datetime "created_at"
t.datetime "updated_at"
t.integer "activity_object_id"
diff --git a/lib/social_stream/models/actor.rb b/lib/social_stream/models/actor.rb
index <HASH>..<HASH> 100644
--- a/lib/social_stream/models/actor.rb
+++ b/lib/social_stream/models/actor.rb
@@ -14,7 +14,6 @@ module SocialStream
delegate :name, :name=,
:email, :email=,
:permalink, :permalink=,
- :disabled, :disabled=,
:ties, :sent_ties, :received_ties,
:active_ties_to,
:sender_subjects, :receiver_subjects, :suggestion,
|
Remove actor#disabled for now
|
diff --git a/classes/Boom/Model/Group.php b/classes/Boom/Model/Group.php
index <HASH>..<HASH> 100644
--- a/classes/Boom/Model/Group.php
+++ b/classes/Boom/Model/Group.php
@@ -177,7 +177,20 @@ class Boom_Model_Group extends ORM
public function roles($page_id = 0)
{
-
+ // Check that the given page ID is an integer.
+ if ( ! is_int($page_id))
+ {
+ // No it's not, leave us alone.
+ throw new InvalidArgumentException('Argument 1 for '.__CLASS__.'::'.__METHOD__.' must be an integer, '.gettype($page_id).' given');
+ }
+
+ // Run the query and return the results.
+ return DB::select('role_id', 'allowed')
+ ->from('group_roles')
+ ->where('group_id', '=', $this->id)
+ ->where('page_id', '=', $page_id)
+ ->execute($this->_db)
+ ->as_array('role_id', 'allowed');
}
/**
|
Completed Model_Group::roles()
|
diff --git a/lib/blimpy/livery/cwd.rb b/lib/blimpy/livery/cwd.rb
index <HASH>..<HASH> 100644
--- a/lib/blimpy/livery/cwd.rb
+++ b/lib/blimpy/livery/cwd.rb
@@ -18,7 +18,7 @@ module Blimpy
def flight(box)
run_sudo = 'sudo'
- if use_sudo?(box)
+ unless use_sudo?(box)
run_sudo = ''
end
diff --git a/lib/blimpy/livery/puppet.rb b/lib/blimpy/livery/puppet.rb
index <HASH>..<HASH> 100644
--- a/lib/blimpy/livery/puppet.rb
+++ b/lib/blimpy/livery/puppet.rb
@@ -35,7 +35,7 @@ module Blimpy
end
def bootstrap_script
- File.expand_path(File.dirname(__FILE__) + "/../../scripts/#{script}")
+ File.expand_path(File.dirname(__FILE__) + "/../../../scripts/#{script}")
end
def self.configure(&block)
|
Clean-up the remainder of the holes missed when refactoring for the Puppet livery
|
diff --git a/interface.js b/interface.js
index <HASH>..<HASH> 100644
--- a/interface.js
+++ b/interface.js
@@ -129,7 +129,7 @@ class SuperTask extends SuperTaskInternal {
}
// Sanitize args
- args = (Array.isArray(args)) ? args : [];
+ args = (Array.isArray(args)) ? args : [args];
// Compile task if it is in source form
if (typeof task.func !== 'function') {
|
Fixed arg conversion in `apply` method
|
diff --git a/src/main/java/org/jboss/ws/common/management/AbstractServerConfigMBean.java b/src/main/java/org/jboss/ws/common/management/AbstractServerConfigMBean.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/jboss/ws/common/management/AbstractServerConfigMBean.java
+++ b/src/main/java/org/jboss/ws/common/management/AbstractServerConfigMBean.java
@@ -62,4 +62,8 @@ public interface AbstractServerConfigMBean
String getWebServicePathRewriteRule();
void setWebServicePathRewriteRule(String path);
+
+ String getWebServiceUriScheme();
+
+ void setWebServiceUriScheme(String scheme);
}
|
[JBWS-<I>] Also update MBean view
|
diff --git a/grade/edit/tree/category_form.php b/grade/edit/tree/category_form.php
index <HASH>..<HASH> 100644
--- a/grade/edit/tree/category_form.php
+++ b/grade/edit/tree/category_form.php
@@ -225,7 +225,7 @@ class edit_category_form extends moodleform {
$mform->addElement('header', 'headerparent', get_string('parentcategory', 'grades'));
$options = array();
- $default = '';
+ $default = -1;
$categories = grade_category::fetch_all(array('courseid'=>$COURSE->id));
foreach ($categories as $cat) {
@@ -238,6 +238,7 @@ class edit_category_form extends moodleform {
if (count($categories) > 1) {
$mform->addElement('select', 'parentcategory', get_string('parentcategory', 'grades'), $options);
+ $mform->setDefault('parentcategory', $default);
$mform->addElement('static', 'currentparentaggregation', get_string('currentparentaggregation', 'grades'));
}
|
MDL-<I> gradebook Fixing issue where default parent in Full View Add Category could be inconsistent.
Turns out the correct default was already computed, but was not being applied to the setting.
|
diff --git a/structure_files/FileType/ExcelFile.php b/structure_files/FileType/ExcelFile.php
index <HASH>..<HASH> 100644
--- a/structure_files/FileType/ExcelFile.php
+++ b/structure_files/FileType/ExcelFile.php
@@ -348,6 +348,8 @@ class ExcelFile extends AbstractFile implements Downloadable {
} else {
array_push($line, $d[$hf]);
}
+ } else {
+ array_push($line, $section->getNull());
}
}
} else {
diff --git a/structure_files/FileType/TxtFile.php b/structure_files/FileType/TxtFile.php
index <HASH>..<HASH> 100644
--- a/structure_files/FileType/TxtFile.php
+++ b/structure_files/FileType/TxtFile.php
@@ -29,7 +29,7 @@ class TxtFile extends CommonFile {
* @param string $extension
* @return TxtFile
*/
- public static function createFromSection(SectionFile $sectionFile, $extension = '.tsv')
+ public static function createFromSection(SectionFile $sectionFile, $extension = 'tsv')
{
$cont = [];
//handle data
@@ -210,6 +210,8 @@ class TxtFile extends CommonFile {
} else {
array_push($line, $d[$hf]);
}
+ } else {
+ array_push($line, $section->getNull());
}
}
} else {
|
- Fix create from tsv section in ExcelFile and TxtFile
|
diff --git a/lib/recaptcha/client_helper.rb b/lib/recaptcha/client_helper.rb
index <HASH>..<HASH> 100644
--- a/lib/recaptcha/client_helper.rb
+++ b/lib/recaptcha/client_helper.rb
@@ -25,6 +25,7 @@ module Recaptcha
src="#{fallback_uri}"
frameborder="0" scrolling="no"
style="width: 302px; height:422px; border-style: none;">
+ title="ReCAPTCHA"
</iframe>
</div>
</div>
|
added title attribute to iframe for screen readers
|
diff --git a/test/test_repository.rb b/test/test_repository.rb
index <HASH>..<HASH> 100644
--- a/test/test_repository.rb
+++ b/test/test_repository.rb
@@ -113,14 +113,13 @@ class TestRepository < Test::Unit::TestCase
end
should 'know the most significant commits of the repository' do
- commits = @repo.significant_commits
- assert_equal 10, commits.size
+ commits = @repo.significant_commits('master', 8)
+ assert_equal 8, commits.size
assert commits.all? { |commit| commit.is_a? Metior::Commit }
- assert_equal [
- "c0f0b4f", "47ab25c", "f3a24ae", "18ec70e", "242253b", "c87612b",
- "6bb41e4", "4d9c7be", "756a947", "7569d0d"
- ], commits.collect { |commit| commit.id }
+ assert_equal %w{
+ c0f0b4f 47ab25c f3a24ae 18ec70e 242253b c87612b 6bb41e4 4d9c7be
+ }, commits.collect { |commit| commit.id }
modifications = commits.first.modifications
commits[1..-1].each do |commit|
|
Changed assertion to dodge JRuby sorting differently
|
diff --git a/test/m-cql3.js b/test/m-cql3.js
index <HASH>..<HASH> 100644
--- a/test/m-cql3.js
+++ b/test/m-cql3.js
@@ -158,7 +158,10 @@ describe('cql3', function()
return promise.then(function(v1)
{
var p2 = conn.cql(config['static_select_cnt#cql']);
- return p2.should.be.fulfilled;
+ return p2.should.eventually.have.property('length', 1).then(function(value)
+ {
+ return value[0];
+ });
}).should.eventually.be.an.instanceof(scamandrios.Row).then(function(row)
{
return row.get('cnt');
|
Fixed the test conditions for the one remaining failing test.
The cql3 tests are now all green.
|
diff --git a/lib/conf/cli.js b/lib/conf/cli.js
index <HASH>..<HASH> 100644
--- a/lib/conf/cli.js
+++ b/lib/conf/cli.js
@@ -63,6 +63,11 @@ var start = function(cb) {
// account
cli.command('account', 'Prey account management.', function(sub) {
+ sub.command('setup', 'Starts interactive command-line account setup.', function(cmd) {
+ cmd.options(['-f', '--force'], 'Force setup even if API key is already set.')
+ run_if_writable(cmd, account.setup);
+ });
+
sub.command('authorize', 'Validates auth credentials, and stores API key if authorized.', function(cmd) {
cmd.parameters(['-a', '--api-key'], 'API Key')
cmd.parameters(['-e', '--email'], 'Email')
@@ -86,11 +91,6 @@ var start = function(cb) {
run_if_writable(cmd, account.signup);
});
- sub.command('setup', 'Starts interactive command-line account setup.', function(cmd) {
- cmd.options(['-f', '--force'], 'Force setup even if API key is already set.')
- run_if_writable(cmd, account.setup);
- });
-
sub.start();
})
|
Conf/cli: Move 'setup' to top of config account section.
|
diff --git a/src/Http/Client/Adapter/Stream.php b/src/Http/Client/Adapter/Stream.php
index <HASH>..<HASH> 100644
--- a/src/Http/Client/Adapter/Stream.php
+++ b/src/Http/Client/Adapter/Stream.php
@@ -217,6 +217,7 @@ class Stream implements AdapterInterface
'ssl_allow_self_signed',
'ssl_cafile',
'ssl_local_cert',
+ 'ssl_local_pk',
'ssl_passphrase',
];
if (empty($options['ssl_cafile'])) {
|
Added ssl_local_pk option for Http/Client
|
diff --git a/framework/core/src/Foundation/Console/CacheClearCommand.php b/framework/core/src/Foundation/Console/CacheClearCommand.php
index <HASH>..<HASH> 100644
--- a/framework/core/src/Foundation/Console/CacheClearCommand.php
+++ b/framework/core/src/Foundation/Console/CacheClearCommand.php
@@ -62,7 +62,13 @@ class CacheClearCommand extends AbstractCommand
{
$this->info('Clearing the cache...');
- $this->cache->flush();
+ $succeeded = $this->cache->flush();
+
+ if (! $succeeded) {
+ $this->error('Could not clear contents of `storage/cache`. Please adjust file permissions and try again. This can frequently be fixed by clearing cache via the `Tools` dropdown on the Administration Dashboard page.');
+
+ return 1;
+ }
$storagePath = $this->paths->storage;
array_map('unlink', glob($storagePath.'/formatter/*'));
|
Don't fail silently on cache clear (#<I>)
|
diff --git a/agent/consul/internal_endpoint_test.go b/agent/consul/internal_endpoint_test.go
index <HASH>..<HASH> 100644
--- a/agent/consul/internal_endpoint_test.go
+++ b/agent/consul/internal_endpoint_test.go
@@ -605,13 +605,13 @@ func TestInternal_ServiceDump(t *testing.T) {
// so the response should be the same in all subtests
expectedGW := structs.GatewayServices{
{
- Service: structs.ServiceName{Name: "api"},
- Gateway: structs.ServiceName{Name: "terminating-gateway"},
+ Service: structs.NewServiceName("api", nil),
+ Gateway: structs.NewServiceName("terminating-gateway", nil),
GatewayKind: structs.ServiceKindTerminatingGateway,
},
{
- Service: structs.ServiceName{Name: "cache"},
- Gateway: structs.ServiceName{Name: "terminating-gateway"},
+ Service: structs.NewServiceName("cache", nil),
+ Gateway: structs.NewServiceName("terminating-gateway", nil),
GatewayKind: structs.ServiceKindTerminatingGateway,
},
}
|
ensure these tests work fine with namespaces in enterprise (#<I>)
|
diff --git a/idigbio/json_client.py b/idigbio/json_client.py
index <HASH>..<HASH> 100644
--- a/idigbio/json_client.py
+++ b/idigbio/json_client.py
@@ -89,6 +89,13 @@ class ImagesDisabledException(Exception):
pass
+def make_session():
+ import idigbio
+ s = requests.Session()
+ s.headers["User-Agent"] = "idigbio-python-client/" + idigbio.__version__
+ return s
+
+
class iDigBioMap(object):
def __init__(self, api, rq={}, style=None, t="auto", disable_images=False):
self.__api = api
@@ -162,7 +169,7 @@ class iDigBioMap(object):
if y_tiles is None:
y_tiles = range(0, 2**zoom)
- s = requests.Session()
+ s = make_session()
if self._disable_images:
raise ImagesDisabledException()
im = Image.new("RGB", (len(x_tiles) * 256, len(y_tiles) * 256))
@@ -200,7 +207,7 @@ class iDbApiJson(object):
else:
raise BadEnvException
- self.s = requests.Session()
+ self.s = make_session()
def __del__(self):
self.s.close()
|
Set the User-Agent in requests
Set the user agent to `idigbio-python-client/{version}`. This way we can
monitor usage and see what versions are in the wild.
|
diff --git a/js/jquery-confirm.js b/js/jquery-confirm.js
index <HASH>..<HASH> 100644
--- a/js/jquery-confirm.js
+++ b/js/jquery-confirm.js
@@ -221,7 +221,7 @@ var jconfirm, Jconfirm;
return false;
var key = e.which;
- console.log(e);
+ console.log(key);
if (key === 27) {
/*
* if ESC key
@@ -240,9 +240,9 @@ var jconfirm, Jconfirm;
this.close();
}
}
- if (key === 13) {
+ if (key === 13 || key == 32) {
/*
- * if ENTER key
+ * if ENTER or SPACE key
*/
if (this.$confirmButton) {
this.$confirmButton.click();
|
keyboard action , trigger Confirm on SPACE
|
diff --git a/lib/csvlint/validate.rb b/lib/csvlint/validate.rb
index <HASH>..<HASH> 100644
--- a/lib/csvlint/validate.rb
+++ b/lib/csvlint/validate.rb
@@ -77,7 +77,7 @@ module Csvlint
validate_metadata
end
request.on_body do |chunk|
- io = StringIO.new(@leading + chunk)
+ io = StringIO.new(chunk)
io.each_line do |line|
break if line_limit_reached?
parse_line(line)
|
Don't pass leading string to parse_line
This is a legacy from when `parse_line` was only used within `validate_url`. We now join the leading and the chunk within `parse_line`
|
diff --git a/soco/core.py b/soco/core.py
index <HASH>..<HASH> 100755
--- a/soco/core.py
+++ b/soco/core.py
@@ -288,6 +288,8 @@ class SoCo(_SocoSingletonBase): # pylint: disable=R0904
""" Play a track from the queue by index. The index number is
required as an argument, where the first index is 0.
+ index: the index of the track to play; first item in the queue is 0
+
Returns:
True if the Sonos speaker successfully started playing the track.
@@ -1102,6 +1104,8 @@ class SoCo(_SocoSingletonBase): # pylint: disable=R0904
""" Remove a track from the queue by index. The index number is
required as an argument, where the first index is 0.
+ index: the index of the track to remove; first item in the queue is 0
+
Returns:
True if the Sonos speaker successfully removed the track
|
Added argument explanation in remove_from_queue, play_from_queue.
|
diff --git a/app/models/test_case.rb b/app/models/test_case.rb
index <HASH>..<HASH> 100644
--- a/app/models/test_case.rb
+++ b/app/models/test_case.rb
@@ -9,14 +9,22 @@ class TestCase < Fire::Model
full_description: rspec_example.full_description,
file_path: rspec_example.file_path,
location: rspec_example.location,
- exception: rspec_example.exception,
status: rspec_example.metadata[:execution_result].status,
started_at: rspec_example.metadata[:execution_result].started_at,
run_time: rspec_example.metadata[:execution_result].run_time
}.merge!(revision_opts).merge!(extras)
+
+ if rspec_example.exception
+ data[:exception] = {
+ message: rspec_example.exception.message,
+ backtrace: rspec_example.exception.backtrace,
+ }
+ end
+
if rspec_example.respond_to?(:swat_extras)
data.merge!(swat_extras: rspec_example.swat_extras)
end
+
create(data)
end
|
prevent exception serialization on TestCase object saving
|
diff --git a/lib/jumpstart/base.rb b/lib/jumpstart/base.rb
index <HASH>..<HASH> 100644
--- a/lib/jumpstart/base.rb
+++ b/lib/jumpstart/base.rb
@@ -49,15 +49,7 @@ module JumpStart
puts "creating JumpStart project #{@project_name}"
# TODO Create functionality for creating projects if they do not exist
elsif input == "no" || input == "n"
- puts
- puts "******************************************************************************************************************************************"
- puts
- puts "Exiting JumpStart..."
- puts "Goodbye!"
- puts
- puts "******************************************************************************************************************************************"
- puts
- exit
+ exit_jumpstart
end
end
end
@@ -73,7 +65,9 @@ module JumpStart
begin
Dir.chdir(x)
rescue
+ puts
puts "The directory #{x} could not be found, or you do not have the correct permissions to access it."
+ exit_jumpstart
end
end
end
@@ -151,5 +145,16 @@ module JumpStart
number.to_i
end
+ def exit_jumpstart
+ puts
+ puts
+ puts "Exiting JumpStart..."
+ puts "Goodbye!"
+ puts
+ puts "******************************************************************************************************************************************"
+ puts
+ exit
+ end
+
end
end
\ No newline at end of file
|
a little tidying up by moving exit strings into their own method
|
diff --git a/lib/services/query.rb b/lib/services/query.rb
index <HASH>..<HASH> 100644
--- a/lib/services/query.rb
+++ b/lib/services/query.rb
@@ -64,10 +64,26 @@ module Services
scope = scope.where.not(id: v)
when :order
next unless v
- order = case v
- when 'random' then 'RANDOM()'
- when /\./ then v
- else "#{object_class.table_name}.#{v}"
+ case v
+ when 'random'
+ order = 'RANDOM()'
+ when /\A([A-Za-z0-9_]+)\./
+ table_name = $1
+ unless table_name == object_class.table_name
+ unless reflection = object_class.reflections.values.detect { |reflection| reflection.table_name == table_name }
+ fail "Reflection on class #{object_class} with table name #{table_name} not found."
+ end
+ # TODO: In Rails 5, we can use #left_outer_joins
+ # http://blog.bigbinary.com/2016/03/24/support-for-left-outer-joins-in-rails-5.html
+ join_conditions = "LEFT OUTER JOIN #{table_name} ON #{table_name}.#{reflection.foreign_key} = #{object_class.table_name}.id"
+ if reflection.type
+ join_conditions << " AND #{table_name}.#{reflection.type} = '#{object_class}'"
+ end
+ scope = scope.joins(join_conditions)
+ end
+ order = v
+ else
+ order = "#{object_class.table_name}.#{v}"
end
scope = scope.order(order)
when :limit
|
automatically add LEFT OUTER JOIN when trying to sort by a field on an association table
|
diff --git a/src/BoomCMS/Core/Editor/Editor.php b/src/BoomCMS/Core/Editor/Editor.php
index <HASH>..<HASH> 100644
--- a/src/BoomCMS/Core/Editor/Editor.php
+++ b/src/BoomCMS/Core/Editor/Editor.php
@@ -12,7 +12,6 @@ class Editor
const PREVIEW = 3;
public static $default = Editor::PREVIEW;
- public static $instance;
/**
*
@@ -37,19 +36,6 @@ class Editor
$this->state = $this->session->get($this->statePersistenceKey, $default);
}
- /**
- *
- * @return Editor
- */
- public static function instance()
- {
- if (static::$instance === null) {
- static::$instance = new static(new Auth(Session::instance()), Session::instance());
- }
-
- return static::$instance;
- }
-
public function isDisabled()
{
return $this->hasState(static::DISABLED);
|
Deleted method Editor\Editor::instance()
|
diff --git a/lib/simple_navigation/rendering/renderer/base.rb b/lib/simple_navigation/rendering/renderer/base.rb
index <HASH>..<HASH> 100644
--- a/lib/simple_navigation/rendering/renderer/base.rb
+++ b/lib/simple_navigation/rendering/renderer/base.rb
@@ -66,18 +66,31 @@ module SimpleNavigation
expand_all? || item.selected?
end
- def suppress_link?
- false
+ # to allow overriding when there is specific logic determining
+ # when a link should not be rendered (eg. breadcrumbs renderer
+ # does not render the final breadcrumb as a link when instructed
+ # not to do so.)
+ def suppress_link?(item)
+ item.url.nil?
end
+ # determine and return link or static content depending on
+ # item/renderer conditions.
def tag_for(item)
- if item.url.nil? || suppress_link?
+ if suppress_link?(item)
content_tag('span', item.name, link_options_for(item).except(:method))
else
- link_to(item.name, item.url, link_options_for(item))
+ link_to(item.name, item.url, options_for(item))
end
end
+ # to allow overriding when link options should be special-cased
+ # (eg. links renderer uses item options for the a-tag rather
+ # than an li-tag).
+ def options_for(item)
+ link_options_for(item)
+ end
+
# Extracts the options relevant for the generated link
#
def link_options_for(item)
|
better superclass methods to allow renderer subclasses finer control over behaviour
|
diff --git a/salt/wheel/config.py b/salt/wheel/config.py
index <HASH>..<HASH> 100644
--- a/salt/wheel/config.py
+++ b/salt/wheel/config.py
@@ -25,6 +25,10 @@ def values():
def apply(key, value):
'''
Set a single key
+
+ .. note::
+
+ This will strip comments from your config file
'''
path = __opts__['conf_file']
if os.path.isdir(path):
|
Added note about stripping comments from master config
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@ with open("README.rst", "r") as fh:
setuptools.setup(
name="parsenvy",
- version="2.0.5",
+ version="2.0.7",
author="Nik Kantar",
author_email="nik@nkantar.com",
description="Enviously elegant environment variable parsing",
|
Fix bad version in setup.py
|
diff --git a/modeltranslation/admin.py b/modeltranslation/admin.py
index <HASH>..<HASH> 100644
--- a/modeltranslation/admin.py
+++ b/modeltranslation/admin.py
@@ -8,6 +8,11 @@ from django.contrib.contenttypes import generic
from modeltranslation.translator import translator
from modeltranslation.utils import get_translation_fields
+# Ensure that models are registered for translation before TranslationAdmin
+# runs. The import is supposed to resolve a race condition between model import
+# and translation registration in production (see issue 19).
+import modeltranslation.models
+
class TranslationAdminBase(object):
"""
|
Resolved a race condition between model import and translation registration in production by ensuring that models are registered for translation before TranslationAdmin runs. Resolves issue <I> (thanks to carl.j.meyer).
|
diff --git a/api/kv.go b/api/kv.go
index <HASH>..<HASH> 100644
--- a/api/kv.go
+++ b/api/kv.go
@@ -156,7 +156,7 @@ func (k *KV) Keys(prefix, separator string, q *QueryOptions) ([]string, *QueryMe
}
func (k *KV) getInternal(key string, params map[string]string, q *QueryOptions) (*http.Response, *QueryMeta, error) {
- r := k.c.newRequest("GET", "/v1/kv/"+key)
+ r := k.c.newRequest("GET", "/v1/kv/"+strings.TrimPrefix(key, "/"))
r.setQueryOptions(q)
for param, val := range params {
r.params.Set(param, val)
@@ -277,7 +277,7 @@ func (k *KV) DeleteTree(prefix string, w *WriteOptions) (*WriteMeta, error) {
}
func (k *KV) deleteInternal(key string, params map[string]string, q *WriteOptions) (bool, *WriteMeta, error) {
- r := k.c.newRequest("DELETE", "/v1/kv/"+key)
+ r := k.c.newRequest("DELETE", "/v1/kv/"+strings.TrimPrefix(key, "/"))
r.setWriteOptions(q)
for param, val := range params {
r.params.Set(param, val)
|
Trim leading slash on key to avoid redirect (golang/go#<I>) (#<I>)
|
diff --git a/src/main/java/org/couchbase/mock/CouchbaseMock.java b/src/main/java/org/couchbase/mock/CouchbaseMock.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/couchbase/mock/CouchbaseMock.java
+++ b/src/main/java/org/couchbase/mock/CouchbaseMock.java
@@ -133,6 +133,13 @@ public class CouchbaseMock implements HttpRequestHandler, Runnable {
this(hostname, port, numNodes, numVBuckets, BucketType.BASE);
}
+ /**
+ * The port of the http server providing the REST interface.
+ */
+ public int getHttpPort() {
+ return httpServer.getPort();
+ }
+
public Credentials getRequiredHttpAuthorization() {
return requiredHttpAuthorization;
}
|
Expose the port the http server is listening on in CouchbaseMock.
Change-Id: Ifd<I>f2c4b<I>b1d6ead<I>deedb5f4
Reviewed-on: <URL>
|
diff --git a/test/cases/EmptyDisallow.php b/test/cases/EmptyDisallow.php
index <HASH>..<HASH> 100644
--- a/test/cases/EmptyDisallow.php
+++ b/test/cases/EmptyDisallow.php
@@ -20,8 +20,10 @@ class EmptyDisallowTest extends \PHPUnit_Framework_TestCase
$this->assertTrue($parser->isAllowed("/"));
$this->assertTrue($parser->isAllowed("/article"));
$this->assertTrue($parser->isDisallowed("/temp"));
-
- $this->assertTrue($parser->isAllowed("/temp", "spiderX"));
+
+ // The next line is commented out due to a bug. Please see issue #34
+ // https://github.com/t1gor/Robots.txt-Parser-Class/issues/34
+ //$this->assertTrue($parser->isAllowed("/temp", "spiderX"));
$this->assertTrue($parser->isDisallowed("/assets", "spiderX"));
$this->assertTrue($parser->isAllowed("/forum", "spiderX"));
|
Disabled 1 test due to non-related unfixed bug
|
diff --git a/src/Console/KeyGenerateCommand.php b/src/Console/KeyGenerateCommand.php
index <HASH>..<HASH> 100644
--- a/src/Console/KeyGenerateCommand.php
+++ b/src/Console/KeyGenerateCommand.php
@@ -24,7 +24,7 @@ class KeyGenerateCommand extends Command
*
* @return void
*/
- public function fire()
+ public function handle()
{
// call the action to generate a new key.
$key = $this->generateRandomKey();
@@ -80,4 +80,4 @@ class KeyGenerateCommand extends Command
// empty ending line.
$this->line('');
}
-}
\ No newline at end of file
+}
|
[FIX] rename method fire to handle
|
diff --git a/system/HTTP/Request.php b/system/HTTP/Request.php
index <HASH>..<HASH> 100644
--- a/system/HTTP/Request.php
+++ b/system/HTTP/Request.php
@@ -131,7 +131,7 @@ class Request extends Message implements RequestInterface
if ($spoof)
{
- for ($i = 0, $c = count($this->proxyIPs); $i < $c; $i ++ )
+ for ($i = 0, $c = count($proxy_ips); $i < $c; $i ++ )
{
// Check if we have an IP address or a subnet
if (strpos($proxy_ips[$i], '/') === FALSE)
|
php <I> fix Request::getIPAddress() error count(): Parameter must be an array or an object that implements Countable
|
diff --git a/Util/Factory/Query/QueryInterface.php b/Util/Factory/Query/QueryInterface.php
index <HASH>..<HASH> 100644
--- a/Util/Factory/Query/QueryInterface.php
+++ b/Util/Factory/Query/QueryInterface.php
@@ -105,6 +105,15 @@ interface QueryInterface
function setWhere($where, array $params = array());
/**
+ * set search
+ *
+ * @param bool $search
+ *
+ * @return Datatable
+ */
+ function setSearch($search);
+
+ /**
* add join
*
* @example:
@@ -122,4 +131,4 @@ interface QueryInterface
* @return Datatable
*/
function addJoin($join_field, $alias, $type = Join::INNER_JOIN, $cond = '');
-}
\ No newline at end of file
+}
|
add missing requirement for search call in query interface
|
diff --git a/simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/greedy_dual/GDWheelPolicy.java b/simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/greedy_dual/GDWheelPolicy.java
index <HASH>..<HASH> 100644
--- a/simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/greedy_dual/GDWheelPolicy.java
+++ b/simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/greedy_dual/GDWheelPolicy.java
@@ -122,7 +122,7 @@ public final class GDWheelPolicy implements Policy {
clockHand[level] = hand;
// if C[idx] has advanced a whole round back to 1, call migration(idx+1)
- if ((hand == 0) && (level < wheel.length)) {
+ if ((hand == 0) && (level + 1 < wheel.length)) {
migrate(level + 1);
}
|
Update GDWheelPolicy.java
A fix for null pointer in migrate.
changed the condition of the if statment as to not cause a null pointer exception by trying to access wheel at index that is out of bounds.
|
diff --git a/conversejs/boshclient.py b/conversejs/boshclient.py
index <HASH>..<HASH> 100644
--- a/conversejs/boshclient.py
+++ b/conversejs/boshclient.py
@@ -6,11 +6,12 @@ Based on https://friendpaste.com/1R4PCcqaSWiBsveoiq3HSy
"""
+import gzip
+import socket
import base64
import httplib
import logging
import StringIO
-import gzip
from random import randint
from urlparse import urlparse
@@ -87,7 +88,7 @@ class BOSHClient(object):
# TODO: raise proper exception
raise Exception('Invalid URL scheme %s' % self.bosh_service.scheme)
- self._connection = Connection(self.bosh_service.netloc)
+ self._connection = Connection(self.bosh_service.netloc, timeout=10)
self.log.debug('Connection initialized')
# TODO add exceptions handler there (URL not found etc)
@@ -308,7 +309,15 @@ class BOSHClient(object):
self.send_request(body)
def get_credentials(self):
- success = self.authenticate_xmpp()
+ try:
+ success = self.authenticate_xmpp()
+ except socket.error as error:
+ success = False
+ self.log.exception(error)
+
+ msg = 'Error trying to connect to bosh service: %s'
+ self.log.error(msg, self.bosh_service.netloc)
+
if not success:
return None, None, None
|
Setting timeout to punjab connections
|
diff --git a/src/Kris/LaravelFormBuilder/Fields/FormField.php b/src/Kris/LaravelFormBuilder/Fields/FormField.php
index <HASH>..<HASH> 100644
--- a/src/Kris/LaravelFormBuilder/Fields/FormField.php
+++ b/src/Kris/LaravelFormBuilder/Fields/FormField.php
@@ -248,7 +248,7 @@ abstract class FormField
private function setTemplate()
{
$this->template = $this->parent->getFormHelper()
- ->getConfig($this->getTemplate());
+ ->getConfig($this->getTemplate(), $this->getTemplate());
}
/**
|
Set loading the form field template if config for it not found.
|
diff --git a/gimmemotifs/maelstrom.py b/gimmemotifs/maelstrom.py
index <HASH>..<HASH> 100644
--- a/gimmemotifs/maelstrom.py
+++ b/gimmemotifs/maelstrom.py
@@ -233,11 +233,17 @@ def run_maelstrom(infile, genome, outdir, pwmfile=None, plot=True, cluster=True,
shutil.copyfile(infile, os.path.join(outdir, "input.table.txt"))
config = MotifConfig()
+ motif_dir = config.get_motif_dir()
# Default pwmfile
if pwmfile is None:
pwmfile = config.get_default_params().get("motif_db", None)
- if pwmfile is not None:
- pwmfile = os.path.join(config.get_motif_dir(), pwmfile)
+
+ if pwmfile is not None and not os.path.exists(pwmfile):
+ checkfile = os.path.join(motif_dir, pwmfile)
+ if not os.path.exists(checkfile):
+ checkfile += ".pwm"
+ if os.path.exists(checkfile):
+ pwmfile = checkfile
if pwmfile:
shutil.copy2(pwmfile, outdir)
|
fix to work with maelstrom
|
diff --git a/TwitterAPIExchange.php b/TwitterAPIExchange.php
index <HASH>..<HASH> 100755
--- a/TwitterAPIExchange.php
+++ b/TwitterAPIExchange.php
@@ -166,7 +166,7 @@ class TwitterAPIExchange
}
}
- $this->getfield = '?' . http_build_query($params);
+ $this->getfield = '?' . http_build_query($params, '', '&');
return $this;
}
@@ -298,7 +298,7 @@ class TwitterAPIExchange
if (!is_null($postfields))
{
- $options[CURLOPT_POSTFIELDS] = http_build_query($postfields);
+ $options[CURLOPT_POSTFIELDS] = http_build_query($postfields, '', '&');
}
else
{
|
Explicitly use '&' in http_build_query() (#<I>)
|
diff --git a/sanic/cli/arguments.py b/sanic/cli/arguments.py
index <HASH>..<HASH> 100644
--- a/sanic/cli/arguments.py
+++ b/sanic/cli/arguments.py
@@ -181,19 +181,12 @@ class DevelopmentGroup(Group):
dest="debug",
action="store_true",
help=(
- "Run the server in DEBUG mode. It includes DEBUG logging, "
- "additional context on exceptions, and other settings "
+ "Run the server in DEBUG mode. It includes DEBUG logging,\n"
+ "additional context on exceptions, and other settings\n"
"not-safe for PRODUCTION, but helpful for debugging problems."
),
)
self.container.add_argument(
- "-d",
- "--dev",
- dest="dev",
- action="store_true",
- help=("Debug + auto_reload."),
- )
- self.container.add_argument(
"-r",
"--reload",
"--auto-reload",
@@ -211,6 +204,13 @@ class DevelopmentGroup(Group):
action="append",
help="Extra directories to watch and reload on changes",
)
+ self.container.add_argument(
+ "-d",
+ "--dev",
+ dest="dev",
+ action="store_true",
+ help=("debug + auto reload."),
+ )
class OutputGroup(Group):
|
Updates to CLI help messaging (#<I>)
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -16,13 +16,9 @@ setup(
'Programming Language :: Java',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
- 'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.0',
- 'Programming Language :: Python :: 3.1',
- 'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
|
Update setup.py to reflect the supported Python versions
|
diff --git a/lib/twitter/version.rb b/lib/twitter/version.rb
index <HASH>..<HASH> 100644
--- a/lib/twitter/version.rb
+++ b/lib/twitter/version.rb
@@ -4,7 +4,7 @@
module Twitter::Version #:nodoc:
MAJOR = 0
MINOR = 5
- REVISION = 0
+ REVISION = 1
class << self
# Returns X.Y.Z formatted version string
def to_version
|
Upped version number for Twitter4R to <I>.
|
diff --git a/Swat/SwatFileEntry.php b/Swat/SwatFileEntry.php
index <HASH>..<HASH> 100644
--- a/Swat/SwatFileEntry.php
+++ b/Swat/SwatFileEntry.php
@@ -105,7 +105,9 @@ class SwatFileEntry extends SwatInputControl
$msg = Swat::_('The %s field is required.');
$this->addMessage(new SwatMessage($msg, SwatMessage::ERROR));
- } elseif (!in_array($this->getMimeType(), $this->accept_mime_types)) {
+ } elseif ($this->accept_mime_types !== null &&
+ !in_array($this->getMimeType(), $this->accept_mime_types)) {
+
$msg = sprintf(Swat::_('The %s field must be of the following type(s): %s.'),
'%s',
implode(', ', $this->accept_mime_types));
|
Fixed bug when mime types aren't specified
svn commit r<I>
|
diff --git a/lib/Cake/Test/TestCase/Model/Datasource/Database/QueryTest.php b/lib/Cake/Test/TestCase/Model/Datasource/Database/QueryTest.php
index <HASH>..<HASH> 100644
--- a/lib/Cake/Test/TestCase/Model/Datasource/Database/QueryTest.php
+++ b/lib/Cake/Test/TestCase/Model/Datasource/Database/QueryTest.php
@@ -467,4 +467,21 @@ class QueryTest extends \Cake\TestSuite\TestCase {
$this->assertEquals(['id' => 2], $result->fetch('assoc'));
}
+/**
+ * Tests that Query::andWhere() can be used without calling where() before
+ *
+ * @return void
+ **/
+ public function testSelectAndWhereNoPreviousCondition() {
+ $this->_insertDateRecords();
+ $query = new Query($this->connection);
+ $result = $query
+ ->select(['id'])
+ ->from('dates')
+ ->andWhere(['posted' => new \DateTime('2012-12-21 12:00')], ['posted' => 'datetime'])
+ ->andWhere(['id' => 1])
+ ->execute();
+ $this->assertCount(1, $result);
+ $this->assertEquals(['id' => 1], $result->fetch('assoc'));
+ }
}
|
Adding missing test case form previous commit
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -18,7 +18,7 @@ if not version:
with open(path.join(here, 'README.md'), encoding='utf-8') as readme:
LONG_DESC = readme.read()
-os.system('pip install git+https://github.com/RegardsCitoyens/lawfactory_utils.git@master')
+os.system('pip install --upgrade git+https://github.com/RegardsCitoyens/lawfactory_utils.git@master')
setup(
name='anpy',
|
force upgrade lawfactory-utils
|
diff --git a/salt/modules/daemontools.py b/salt/modules/daemontools.py
index <HASH>..<HASH> 100644
--- a/salt/modules/daemontools.py
+++ b/salt/modules/daemontools.py
@@ -15,7 +15,10 @@ __outputter__ = {
'get_all': 'yaml',
}
-SERVICE_DIR = "/service"
+if os.path.exists('/service'):
+ SERVICE_DIR = "/service"
+elif os.path.exists('/var/service'):
+ SERVICE_DIR = "/var/service"
def _service_path(name):
|
Added test to support alternate SERVICE_DIR location
|
diff --git a/lib/ditty/controllers/main.rb b/lib/ditty/controllers/main.rb
index <HASH>..<HASH> 100644
--- a/lib/ditty/controllers/main.rb
+++ b/lib/ditty/controllers/main.rb
@@ -133,8 +133,8 @@ module Ditty
broadcast(:user_logout, target: self, details: "IP: #{request.ip}")
logout
flash[:info] = 'Logged Out'
-
- redirect "#{settings.map_path}/"
+ halt 200 if request.xhr?
+ redirect("#{settings.map_path}/")
end
post '/auth/identity/callback' do
@@ -143,6 +143,7 @@ module Ditty
user = User.find(email: env['omniauth.auth']['info']['email'])
self.current_user = user
broadcast(:user_login, target: self, details: "IP: #{request.ip}")
+ halt 200 if request.xhr?
flash[:success] = 'Logged In'
redirect redirect_path
else
@@ -165,6 +166,7 @@ module Ditty
end
self.current_user = user
broadcast(:user_login, target: self, details: "IP: #{request.ip}")
+ halt 200 if request.xhr?
flash[:success] = 'Logged In'
redirect redirect_path
else
|
chore: Return <I>s on successful XHR logins
|
diff --git a/niworkflows/viz/utils.py b/niworkflows/viz/utils.py
index <HASH>..<HASH> 100644
--- a/niworkflows/viz/utils.py
+++ b/niworkflows/viz/utils.py
@@ -303,8 +303,8 @@ def compose_view(bg_svgs, fg_svgs, ref=0, out_file='report.svg'):
svgt.GroupElement(roots[3:], {'class': 'foreground-svg'})
]
fig.append(newroots)
- fig.root.del("width")
- fig.root.del("height")
+ fig.root.pop("width")
+ fig.root.pop("height")
fig.root.set("preserveAspectRatio", "xMidYMid meet")
out_file = op.abspath(out_file)
fig.save(out_file)
|
del is not callable like that...
|
diff --git a/iothrottler.go b/iothrottler.go
index <HASH>..<HASH> 100644
--- a/iothrottler.go
+++ b/iothrottler.go
@@ -72,6 +72,9 @@ func throttlerPoolDriver(pool *IOThrottlerPool) {
timeout := time.NewTicker(time.Second)
var thisBandwidthAllocatorChan chan Bandwidth = nil
+ // Start the timer until we get the first client
+ timeout.Stop()
+
recalculateAllocationSize := func() {
if currentBandwidth == Unlimited {
totalbandwidth = Unlimited
|
Don't start the time until we get our first client
|
diff --git a/spec/functional/resource/group_spec.rb b/spec/functional/resource/group_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/functional/resource/group_spec.rb
+++ b/spec/functional/resource/group_spec.rb
@@ -105,7 +105,11 @@ describe Chef::Resource::Group, :requires_root_or_running_windows, :not_supporte
end
def remove_user(username)
- user(username).run_action(:remove) if ! windows_domain_user?(username)
+ if ! windows_domain_user?(username)
+ u = user(username)
+ u.manage_home false # jekins hosts throw mail spool file not owned by user if we use manage_home true
+ u.run_action(:remove)
+ end
# TODO: User shouldn't exist
end
|
try to fix el breaks
the default behavior of the remove action changed to have manage_home
set toi true to match the :create action
|
diff --git a/raiden/ui/cli.py b/raiden/ui/cli.py
index <HASH>..<HASH> 100644
--- a/raiden/ui/cli.py
+++ b/raiden/ui/cli.py
@@ -364,4 +364,4 @@ def run(ctx, **kwargs):
gevent.signal(signal.SIGINT, event.set)
event.wait()
- app_.stop(leave_channels=True)
+ app_.stop(leave_channels=False)
|
Do not close/settle channels at shutdown
From our discussions on restartability/recoverability we should not be
closing all channels by default at shutdown unless otherwise
specifically requested.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -10,7 +10,7 @@ with open("README.md", "r") as fh:
setup(
name='django-cra-helper',
- version='1.2.3',
+ version='2.0.0',
description='The missing piece of the Django + React puzzle',
long_description=long_description,
long_description_content_type="text/markdown",
|
Bump package version to <I>
|
diff --git a/src/FOM/UserBundle/EventListener/UserProfileListener.php b/src/FOM/UserBundle/EventListener/UserProfileListener.php
index <HASH>..<HASH> 100644
--- a/src/FOM/UserBundle/EventListener/UserProfileListener.php
+++ b/src/FOM/UserBundle/EventListener/UserProfileListener.php
@@ -124,14 +124,9 @@ class UserProfileListener implements EventSubscriber
*/
protected function isProfileEntity($className)
{
- // this is checked for ALL entity types, so do as few instance checks as possible
- $defaultClass = 'FOM\UserBundle\Entity\BasicProfile';
- if (\is_a($className, $defaultClass, true)) {
- return true;
- } elseif ($this->profileEntityName !== $defaultClass) {
- return \is_a($className, $this->profileEntityName);
- } else {
- return false;
- }
+ // ONLY detect the configured class
+ // Relation from one User entity class to multiple different profile entity classes
+ // cannot be established, so we won't try
+ return ltrim($className, '\\') === $this->profileEntityName;
}
}
|
Limit user => profile mapping to exact configured profile class
|
diff --git a/src/support.js b/src/support.js
index <HASH>..<HASH> 100644
--- a/src/support.js
+++ b/src/support.js
@@ -25,7 +25,7 @@ export const matrix = {
11: 0b01000000000100000000
},
edge: {
- 12: 0b01011010100101001101,
+ 12: 0b01001010100101001101,
13: 0b01011110100111001111
},
node: {
|
Edge <I> does not fully support u flag for regexes
|
diff --git a/packages/now-cli/src/util/index.js b/packages/now-cli/src/util/index.js
index <HASH>..<HASH> 100644
--- a/packages/now-cli/src/util/index.js
+++ b/packages/now-cli/src/util/index.js
@@ -388,7 +388,12 @@ export default class Now extends EventEmitter {
if (!app && !Object.keys(meta).length) {
// Get the 20 latest projects and their latest deployment
const query = new URLSearchParams({ limit: (20).toString() });
- const projects = await fetchRetry(`/v2/projects/?${query}`);
+ if (nextTimestamp) {
+ query.set('until', String(nextTimestamp));
+ }
+ const { projects, pagination } = await fetchRetry(
+ `/v4/projects/?${query}`
+ );
const deployments = await Promise.all(
projects.map(async ({ id: projectId }) => {
@@ -400,7 +405,7 @@ export default class Now extends EventEmitter {
})
);
- return { deployments: deployments.filter(x => x) };
+ return { deployments: deployments.filter(x => x), pagination };
}
const query = new URLSearchParams();
|
Implement pagination for `now ls` (#<I>)
|
diff --git a/blueflood-core/src/main/java/com/rackspacecloud/blueflood/service/ScheduleContext.java b/blueflood-core/src/main/java/com/rackspacecloud/blueflood/service/ScheduleContext.java
index <HASH>..<HASH> 100644
--- a/blueflood-core/src/main/java/com/rackspacecloud/blueflood/service/ScheduleContext.java
+++ b/blueflood-core/src/main/java/com/rackspacecloud/blueflood/service/ScheduleContext.java
@@ -151,9 +151,11 @@ public class ScheduleContext implements IngestionContext, ScheduleContextMBean {
this.clock = clock;
registerMBean();
}
-
public ScheduleContext(long currentTimeMillis, Collection<Integer> managedShards) {
- this(currentTimeMillis, managedShards, new DefaultClockImpl());
+ this.scheduleTime = currentTimeMillis;
+ this.shardStateManager = new ShardStateManager(managedShards, asMillisecondsSinceEpochTicker());
+ this.lockManager = new NoOpShardLockManager();
+ this.clock = new DefaultClockImpl();
registerMBean();
}
@VisibleForTesting
|
Initialize fields in the constructor. Don't indirectly call registerMBean.
|
diff --git a/src/Monarkee/Bumble/Fields/DateTimeField.php b/src/Monarkee/Bumble/Fields/DateTimeField.php
index <HASH>..<HASH> 100644
--- a/src/Monarkee/Bumble/Fields/DateTimeField.php
+++ b/src/Monarkee/Bumble/Fields/DateTimeField.php
@@ -21,4 +21,27 @@ class DateTimeField extends TextField implements FieldInterface
{
return Carbon::parse($value)->format($this->getFormat());
}
+
+ /**
+ * Process the DateTimeField data
+ *
+ * @param $model
+ * @param $input
+ * @return BumbleModel
+ */
+ public function process($model, $input)
+ {
+ $column = $this->getColumn();
+
+ // Handle a special case where the data in the database is 0000-00-00 00:00:00
+ if ($input[$column] == '-0001-11-30 00:00:00')
+ {
+ $model->{$column} = Carbon::now();
+ }
+ elseif(isset($input[$column])) {
+ $model->{$column} = $input[$column];
+ }
+
+ return $model;
+ }
}
|
Fix bug in DateTimeField where the row had a column value like <I>-<I>-<I> <I>:<I>:<I>
|
diff --git a/zounds/learn/wgan.py b/zounds/learn/wgan.py
index <HASH>..<HASH> 100644
--- a/zounds/learn/wgan.py
+++ b/zounds/learn/wgan.py
@@ -230,9 +230,9 @@ class WassersteinGanTrainer(Trainer):
g_loss.backward()
self.generator_optim.step()
- gl = g_loss.data[0]
- dl = d_loss.data[0]
- rl = real_mean.data[0]
+ gl = g_loss.data.item()
+ dl = d_loss.data.item()
+ rl = real_mean.data.item()
self.on_batch_complete(
epoch=epoch,
|
Use new item() method after upgrade to pytorch <I>
|
diff --git a/app/helpers/bootstrap_admin/menu_helper.rb b/app/helpers/bootstrap_admin/menu_helper.rb
index <HASH>..<HASH> 100644
--- a/app/helpers/bootstrap_admin/menu_helper.rb
+++ b/app/helpers/bootstrap_admin/menu_helper.rb
@@ -55,7 +55,12 @@ module BootstrapAdmin::MenuHelper
# =============================================================================
def bootstrap_admin_menu_item row
- if respond_to?(:cannot?) && cannot?(:read, row[:item].classify.constantize)
+ obj = if row[:namespace]
+ "#{row[:namespace]}::#{row[:item]}"
+ else
+ row[:item]
+ end
+ if respond_to?(:cannot?) && cannot?(:read, obj.classify.constantize)
"".html_safe
else
content_tag(:li) do
|
fix for support namespaced models in bootstrap_admin_menu_item
|
diff --git a/tests/tests/Localization/Address/FormatterTest.php b/tests/tests/Localization/Address/FormatterTest.php
index <HASH>..<HASH> 100644
--- a/tests/tests/Localization/Address/FormatterTest.php
+++ b/tests/tests/Localization/Address/FormatterTest.php
@@ -71,13 +71,15 @@ class FormatterTest extends TestCase
// out and defines in which language the administrative area is printed
$address = $address->withLocale('en');
$address = $address->withCountryCode('JP');
- $address = $address->withAddressLine1('1-13, Chiyoda');
+ $address = $address->withAddressLine1('1-13');
+ $address = $address->withAddressLine2('Chiyoda');
$address = $address->withAdministrativeArea('13');
$address = $address->withLocality('Tokyo');
$address = $address->withPostalCode('101-0054');
$this->assertEquals(
- '1-13, Chiyoda' . "\n" .
+ '1-13' . "\n" .
+ 'Chiyoda' . "\n" .
'Tokyo, Tokyo' . "\n" .
'101-0054' . "\n" .
'Japan',
|
Move the area name to its own line
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.