diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/lib/transform/get-deps.js b/lib/transform/get-deps.js index <HASH>..<HASH> 100644 --- a/lib/transform/get-deps.js +++ b/lib/transform/get-deps.js @@ -26,6 +26,7 @@ module.exports = function(config, writer) { if(args.length === 1 && args[0].type === 'Literal') { var req = args[0].value + if(/.*\/$/g.test(req)) req = req + 'index.js' //require('./lib/') if(config.map && config.map[req]) req = config.map[req] var dep = Module({base: file.base , requiredAs: req })
resolving require when pointing to dir (dirname/index.js)
diff --git a/tests/test_gui.py b/tests/test_gui.py index <HASH>..<HASH> 100644 --- a/tests/test_gui.py +++ b/tests/test_gui.py @@ -30,3 +30,6 @@ class TestGui (unittest.TestCase): window = LinkCheckerMain() window.show() QtTest.QTest.mouseClick(window.controlButton, QtCore.Qt.LeftButton) + window.close() + del window + del app
Close GUI test window and delete instances to be sure QT deallocation routines are run.
diff --git a/kubernetes-model-generator/kubernetes-model-core/src/main/java/io/fabric8/kubernetes/api/model/HasMetadata.java b/kubernetes-model-generator/kubernetes-model-core/src/main/java/io/fabric8/kubernetes/api/model/HasMetadata.java index <HASH>..<HASH> 100644 --- a/kubernetes-model-generator/kubernetes-model-core/src/main/java/io/fabric8/kubernetes/api/model/HasMetadata.java +++ b/kubernetes-model-generator/kubernetes-model-core/src/main/java/io/fabric8/kubernetes/api/model/HasMetadata.java @@ -120,6 +120,7 @@ public interface HasMetadata extends KubernetesResource { : Pluralize.toPlural(getSingular(clazz))); } + @JsonIgnore default String getPlural() { return getPlural(getClass()); } @@ -139,6 +140,7 @@ public interface HasMetadata extends KubernetesResource { .toLowerCase(Locale.ROOT); } + @JsonIgnore default String getSingular() { return getSingular(getClass()); }
fix: do not include getSingular/Plural in serialization
diff --git a/test/psych/test_string.rb b/test/psych/test_string.rb index <HASH>..<HASH> 100644 --- a/test/psych/test_string.rb +++ b/test/psych/test_string.rb @@ -68,7 +68,7 @@ module Psych def test_literal_when_inner_and_final_line_break str = "Lorem ipsum\ndolor\n" yaml = Psych.dump str, line_width: 12 - assert_match /---\s*|\n(.*\n){2}\Z/, yaml + assert_match /---\s*\|\n(.*\n){2}\Z/, yaml assert_equal str, Psych.load(yaml) end @@ -76,7 +76,7 @@ module Psych def test_literal_strip_when_inner_line_break_and_no_final_line_break str = "Lorem ipsum\ndolor" yaml = Psych.dump str, line_width: 12 - assert_match /---\s*|-\n(.*\n){2}\Z/, yaml + assert_match /---\s*\|-\n(.*\n){2}\Z/, yaml assert_equal str, Psych.load(yaml) end
Fix assertion regexps `|' is a meta character, so needs to be escaped.
diff --git a/langserver/hover.go b/langserver/hover.go index <HASH>..<HASH> 100644 --- a/langserver/hover.go +++ b/langserver/hover.go @@ -336,11 +336,9 @@ func (h *LangHandler) handleHoverGodef(ctx context.Context, conn jsonrpc2.JSONRP return nil, fmt.Errorf("failed to find doc object for %s", target) } - contents, node := fmtDocObject(fset, docObject, target) - r := rangeForNode(fset, node) + contents, _ := fmtDocObject(fset, docObject, target) return &lsp.Hover{ Contents: contents, - Range: &r, }, nil }
hover: Do not return range for godef (#<I>) The optional range returned should be the range of the token the user is hovering over. Instead we are returning the range of the definition. It isn't trivial to return the correct range, so rather lets return nothing at all which is more correct.
diff --git a/editor/models/file.js b/editor/models/file.js index <HASH>..<HASH> 100644 --- a/editor/models/file.js +++ b/editor/models/file.js @@ -95,6 +95,7 @@ define([ 'path': path }) .then(function(file) { + that.del("buffer", { silent: true }); return that.set(file); }) .thenResolve(that);
After stat call on File model remove buffer state
diff --git a/langserver/langserver_test.go b/langserver/langserver_test.go index <HASH>..<HASH> 100644 --- a/langserver/langserver_test.go +++ b/langserver/langserver_test.go @@ -1216,8 +1216,8 @@ func lspTests(t testing.TB, ctx context.Context, fs *AtomicFS, c *jsonrpc2.Conn, // Run the tests. for pos, want := range wantGodefDefinition { - if strings.HasPrefix(want, "/goroot/") { - want = strings.Replace(want, "/goroot/", utils.UriToPath(utils.PathToURI(build.Default.GOROOT)), 1) + if strings.HasPrefix(want, "/goroot") { + want = strings.Replace(want, "/goroot", path.Clean(utils.UriToPath(utils.PathToURI(build.Default.GOROOT))), 1) } tbRun(t, fmt.Sprintf("godef-definition-%s", strings.Replace(pos, "/", "-", -1)), func(t testing.TB) { definitionTest(t, ctx, c, utils.PathToURI(tmpRootPath), pos, want, tmpDir)
fix failing goroot test if GOROOT does not have a trailing slash
diff --git a/src/Console/Commands/CoreInstallCommand.php b/src/Console/Commands/CoreInstallCommand.php index <HASH>..<HASH> 100644 --- a/src/Console/Commands/CoreInstallCommand.php +++ b/src/Console/Commands/CoreInstallCommand.php @@ -31,7 +31,9 @@ class CoreInstallCommand extends Command { $this->alert($this->description); - $this->call('cortex:publish', ['--force' => $this->option('force'), '--resource' => $this->option('resource') ?: ['config']]); + // Publish assets only if explicitly required, otherwise skip for clean installation + ! $this->option('resource') || $this->call('cortex:publish', ['--force' => $this->option('force'), '--resource' => $this->option('resource')]); + $this->call('cortex:migrate', ['--force' => $this->option('force')]); $this->call('cortex:seed');
Publish assets only if explicitly required, otherwise skip for clean installation
diff --git a/smbclient/_pool.py b/smbclient/_pool.py index <HASH>..<HASH> 100644 --- a/smbclient/_pool.py +++ b/smbclient/_pool.py @@ -206,7 +206,7 @@ def delete_session(server, port=445, connection_cache=None): :param port: The port used for the server. :param connection_cache: Connection cache to be used with """ - connection_key = "%s:%s" % (server, port) + connection_key = "%s:%s" % (server.lower(), port) if connection_cache is None: connection_cache = _SMB_CONNECTIONS
Consistent connection_key naming (#<I>) The naming of the connection_key isn't consistent between register_session and delete_session
diff --git a/liquibase-integration-tests/src/test/java/liquibase/lockservice/LockServiceExecuteTest.java b/liquibase-integration-tests/src/test/java/liquibase/lockservice/LockServiceExecuteTest.java index <HASH>..<HASH> 100644 --- a/liquibase-integration-tests/src/test/java/liquibase/lockservice/LockServiceExecuteTest.java +++ b/liquibase-integration-tests/src/test/java/liquibase/lockservice/LockServiceExecuteTest.java @@ -76,6 +76,12 @@ public class LockServiceExecuteTest { fixupLockTables(); } + + @Test + public void nothing() { + + } + //todo: failing on build server: re-enable // @Test // public void waitForLock_twoConnections() throws Exception {
trying to get tests to pass on build server. git-svn-id: <URL>
diff --git a/mbuild/examples/test_examples.py b/mbuild/examples/test_examples.py index <HASH>..<HASH> 100644 --- a/mbuild/examples/test_examples.py +++ b/mbuild/examples/test_examples.py @@ -47,8 +47,8 @@ def run_notebook(nb): if cell.cell_type != 'code': continue kc.execute(cell.source) - # wait for finish, maximum 20s - reply = shell.get_msg(timeout=20)['content'] + # wait for finish, maximum 60s + reply = shell.get_msg(timeout=60)['content'] if reply['status'] == 'error': failures += 1 print("\nFAILURE:")
Increase timeout for examples tests to <I> seconds
diff --git a/js/modules/k6/http/http.go b/js/modules/k6/http/http.go index <HASH>..<HASH> 100644 --- a/js/modules/k6/http/http.go +++ b/js/modules/k6/http/http.go @@ -23,7 +23,6 @@ package http import ( "bytes" "context" - "encoding/json" "fmt" "io" "net"
Accidentally merged in an unused import
diff --git a/Response.php b/Response.php index <HASH>..<HASH> 100644 --- a/Response.php +++ b/Response.php @@ -18,19 +18,17 @@ class Response extends EventEmitter implements WritableStreamInterface { $this->conn = $conn; - $that = $this; - - $this->conn->on('end', function () use ($that) { - $that->close(); + $this->conn->on('end', function () { + $this->close(); }); - $this->conn->on('error', function ($error) use ($that) { - $that->emit('error', array($error, $that)); - $that->close(); + $this->conn->on('error', function ($error) { + $this->emit('error', array($error, $this)); + $this->close(); }); - $this->conn->on('drain', function () use ($that) { - $that->emit('drain'); + $this->conn->on('drain', function () { + $this->emit('drain'); }); }
Clean up annoying <I> $that = $this
diff --git a/tunnel/default.go b/tunnel/default.go index <HASH>..<HASH> 100644 --- a/tunnel/default.go +++ b/tunnel/default.go @@ -201,15 +201,15 @@ func (t *tun) announce(channel, session string, link *link) { } // manage monitors outbound links and attempts to reconnect to the failed ones -func (t *tun) manage() { - reconnect := time.NewTicker(ReconnectTime) - defer reconnect.Stop() +func (t *tun) manage(reconnect time.Duration) { + r := time.NewTicker(reconnect) + defer r.Stop() for { select { case <-t.closed: return - case <-reconnect.C: + case <-r.C: t.manageLinks() } } @@ -862,8 +862,11 @@ func (t *tun) setupLink(node string) (*link, error) { // create a new link link := newLink(c) + // set link id to remote side + link.Lock() link.id = c.Remote() + link.Unlock() // send the first connect message if err := t.sendMsg("connect", link); err != nil { @@ -984,7 +987,7 @@ func (t *tun) Connect() error { t.setupLinks() // manage the links - go t.manage() + go t.manage(ReconnectTime) return nil }
Fixed tunnel race conditions. (#<I>)
diff --git a/stemcell/repo.go b/stemcell/repo.go index <HASH>..<HASH> 100644 --- a/stemcell/repo.go +++ b/stemcell/repo.go @@ -22,10 +22,6 @@ func NewRepo(configService bmconfig.DeploymentConfigService) repo { } } -// Save extracts the stemcell archive, -// parses the stemcell manifest, -// and stores the stemcell archive in the repo. -// The repo stemcell record is indexed by name & sha1 (as specified by the manifest). func (r repo) Save(stemcell Stemcell, cid CID) error { config, err := r.configService.Load() if err != nil {
Remove lying comment The repo doesn't extract and save the stemcell; it is provided the Stemcell struct which is a representation of the already-extracted stemcell. repo.Save only saves the record of the already-extracted stemcell in the local filesystem.
diff --git a/mtools/mplotqueries/mplotqueries.py b/mtools/mplotqueries/mplotqueries.py index <HASH>..<HASH> 100755 --- a/mtools/mplotqueries/mplotqueries.py +++ b/mtools/mplotqueries/mplotqueries.py @@ -105,7 +105,7 @@ class MPlotQueriesTool(LogFileTool): self.args['group'] = 'filename' plot_instance = self.plot_types[self.args['type']](args=self.args, unknown_args=self.unknown_args) - + for logfile in self.logfiles: start = None @@ -115,6 +115,9 @@ class MPlotQueriesTool(LogFileTool): if not start: start = logline.datetime + if logline.datetime: + end = logline.datetime + if multiple_files: # amend logline object with filename for group by filename logline.filename = logfile.name @@ -140,8 +143,6 @@ class MPlotQueriesTool(LogFileTool): line_accepted = True plot_instance.add_line(logline) - end = logline.datetime - # store start and end for each logfile self.logfile_ranges.append( (start, end) )
fix for mplotqueries to not fail if the last line is empty.
diff --git a/kubetest/kops.go b/kubetest/kops.go index <HASH>..<HASH> 100644 --- a/kubetest/kops.go +++ b/kubetest/kops.go @@ -470,7 +470,7 @@ func (k kops) Up() error { } // TODO: Once this gets support for N checks in a row, it can replace the above node readiness check - if err := control.FinishRunning(exec.Command(k.path, "validate", "cluster", k.cluster, "--wait", "5m")); err != nil { + if err := control.FinishRunning(exec.Command(k.path, "validate", "cluster", k.cluster, "--wait", "15m")); err != nil { return fmt.Errorf("kops validate cluster failed: %v", err) }
Update kubetest/kops.go
diff --git a/core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AbstractCluster.java b/core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AbstractCluster.java index <HASH>..<HASH> 100644 --- a/core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AbstractCluster.java +++ b/core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AbstractCluster.java @@ -461,7 +461,7 @@ public abstract class AbstractCluster extends Cluster { * @return the provider */ protected ProviderInfo selectPinpointProvider(String targetIP, List<ProviderInfo> providerInfos) { - ProviderInfo tp = ProviderHelper.toProviderInfo(targetIP); + ProviderInfo tp = convertToProviderInfo(targetIP); // 存在注册中心provider才会遍历 if (CommonUtils.isNotEmpty(providerInfos)) { for (ProviderInfo providerInfo : providerInfos) { @@ -476,6 +476,10 @@ public abstract class AbstractCluster extends Cluster { return tp; } + protected ProviderInfo convertToProviderInfo(String targetIP) { + return ProviderHelper.toProviderInfo(targetIP); + } + /** * 找不到可用的服务列表的异常 *
refactor:extract method in AbstractCluster (#<I>) * refactor:extract method
diff --git a/htmresearch/frameworks/layers/l2_l4_inference.py b/htmresearch/frameworks/layers/l2_l4_inference.py index <HASH>..<HASH> 100644 --- a/htmresearch/frameworks/layers/l2_l4_inference.py +++ b/htmresearch/frameworks/layers/l2_l4_inference.py @@ -131,6 +131,7 @@ class L4L2Experiment(object): inputSize=1024, numInputBits=20, externalInputSize=1024, + numExternalInputBits=20, L2Overrides=None, L4RegionType="py.ExtendedTMRegion", L4Overrides=None, @@ -162,6 +163,9 @@ class L4L2Experiment(object): @param externalInputSize (int) Size of the lateral input to L4 regions + @param numExternalInputBits (int) + Number of ON bits in the external input patterns + @param L2Overrides (dict) Parameters to override in the L2 region @@ -219,7 +223,7 @@ class L4L2Experiment(object): "sensorInputSize": inputSize, "L4RegionType": L4RegionType, "L4Params": self.getDefaultL4Params(L4RegionType, inputSize, - numInputBits), + numExternalInputBits), "L2Params": self.getDefaultL2Params(inputSize, numInputBits), }
set default L4 params based on number of ON bits in external input
diff --git a/dist/keo.js b/dist/keo.js index <HASH>..<HASH> 100644 --- a/dist/keo.js +++ b/dist/keo.js @@ -148,7 +148,7 @@ function runTimeout(fun) { return setTimeout(fun, 0); } try { - // when when somebody has screwed with setTimeout but no I.E. maddness + // when when somebody has screwed with setTimeout but no I.E. madness return cachedSetTimeout(fun, 0); } catch (e) { try { @@ -171,7 +171,7 @@ function runClearTimeout(marker) { return clearTimeout(marker); } try { - // when when somebody has screwed with setTimeout but no I.E. maddness + // when when somebody has screwed with setTimeout but no I.E. madness return cachedClearTimeout(marker); } catch (e) { try { @@ -4121,4 +4121,4 @@ module.exports = require("axios"); module.exports = require("react-dom"); /***/ }) -/******/ ]); \ No newline at end of file +/******/ ]);
docs: Fix simple typo, maddness -> madness There is a small typo in dist/keo.js. Should read `madness` rather than `maddness`.
diff --git a/lib/OpenLayers/Control/LayerSwitcher.js b/lib/OpenLayers/Control/LayerSwitcher.js index <HASH>..<HASH> 100644 --- a/lib/OpenLayers/Control/LayerSwitcher.js +++ b/lib/OpenLayers/Control/LayerSwitcher.js @@ -22,10 +22,10 @@ OpenLayers.Control.LayerSwitcher.prototype = Object.extend( new OpenLayers.Control(), { /** @type String */ - activeColor: OpenLayers.Control.LayerSwitcher.ACTIVE_COLOR, + activeColor: "", /** @type String */ - nonActiveColor: OpenLayers.Control.LayerSwitcher.NONACTIVE_COLOR, + nonActiveColor: "", /** @@ -33,6 +33,8 @@ OpenLayers.Control.LayerSwitcher.prototype = */ initialize: function() { OpenLayers.Control.prototype.initialize.apply(this, arguments); + this.activeColor = OpenLayers.Control.LayerSwitcher.ACTIVE_COLOR; + this.nonActiveColor = OpenLayers.Control.LayerSwitcher.NONACTIVE_COLOR; }, /**
forgot that these declarations are still only statically initialized. even though the chance of somebody *modifying* one of these strings (rather than just replacing it) is rather low... we might as well do things the right way git-svn-id: <URL>
diff --git a/spec/unit/hooks_spec.rb b/spec/unit/hooks_spec.rb index <HASH>..<HASH> 100644 --- a/spec/unit/hooks_spec.rb +++ b/spec/unit/hooks_spec.rb @@ -94,6 +94,7 @@ describe 'Flor unit' do it 'may filter on point:/p:' do +begin ms0 = [] @unit.hook(point: 'execute') { |m| ms0 << Flor.dup(m); [] } ms1 = [] @@ -108,6 +109,12 @@ describe 'Flor unit' do ms0.collect { |m| m['point'] }.uniq).to eq(%w[ execute ]) expect( ms1.collect { |m| m['point'] }.uniq).to eq(%w[ execute terminated ]) +rescue (defined?(Java::JavaLang::Exception) ? Java::JavaLang::Exception : Exception) => ex + puts "=" * 80 + p ex.inspect + puts ex.backtrace + puts "-" * 80 +end end it 'may filter on domain:/d:' do
Gather info about JRuby thread-safety in hook spec
diff --git a/src/Laravel/Cashier/CashierServiceProvider.php b/src/Laravel/Cashier/CashierServiceProvider.php index <HASH>..<HASH> 100644 --- a/src/Laravel/Cashier/CashierServiceProvider.php +++ b/src/Laravel/Cashier/CashierServiceProvider.php @@ -11,7 +11,7 @@ class CashierServiceProvider extends ServiceProvider { */ public function boot() { - $this->loadViewsFrom('cashier', __DIR__.'/../../views'); + $this->loadViewsFrom(__DIR__.'/../../views', 'cashier'); } /** diff --git a/src/Laravel/Cashier/Invoice.php b/src/Laravel/Cashier/Invoice.php index <HASH>..<HASH> 100644 --- a/src/Laravel/Cashier/Invoice.php +++ b/src/Laravel/Cashier/Invoice.php @@ -326,7 +326,7 @@ class Invoice { */ protected function writeViewForImaging(array $data, $storagePath) { - $storagePath = $storagePath ?: storage_path().'/meta'; + $storagePath = $storagePath ?: storage_path().'/framework'; $this->files->put($path = $storagePath.'/'.md5($this->id).'.pdf', $this->render($data));
Fix a few L5 bugs.
diff --git a/src/Module.php b/src/Module.php index <HASH>..<HASH> 100644 --- a/src/Module.php +++ b/src/Module.php @@ -19,7 +19,7 @@ use Cawa\Core\DI; use Cawa\Events\DispatcherFactory; use Cawa\Events\TimerEvent; use Cawa\Log\Event; -use Cawa\Orm\TraitSerializable; +use Cawa\Orm\SerializableTrait; use Cawa\Router\Route; use Cawa\Session\SessionFactory; @@ -27,7 +27,7 @@ class Module extends \Cawa\App\Module { use SessionFactory; use DispatcherFactory; - use TraitSerializable; + use SerializableTrait; /** * @return bool
Rename TraitXxx to XxxTrait
diff --git a/feature_stream.go b/feature_stream.go index <HASH>..<HASH> 100644 --- a/feature_stream.go +++ b/feature_stream.go @@ -184,14 +184,14 @@ func (stream *Stream) Flush() error { func (stream *Stream) ensure(minimal int) { available := stream.Available() if available < minimal { - if stream.n > 1024 { - stream.Flush() - } stream.growAtLeast(minimal) } } func (stream *Stream) growAtLeast(minimal int) { + if stream.out != nil { + stream.Flush() + } toGrow := len(stream.buf) if toGrow < minimal { toGrow = minimal
ensure buffer flushed to io.Writer
diff --git a/src/select.js b/src/select.js index <HASH>..<HASH> 100644 --- a/src/select.js +++ b/src/select.js @@ -381,6 +381,10 @@ // Remove item from multiple select ctrl.removeChoice = function(index){ var removedChoice = ctrl.selected[index]; + + // if the choice is locked, can't remove it + if(removedChoice._uiSelectChoiceLocked) return; + var locals = {}; locals[ctrl.parserResult.itemName] = removedChoice;
Fix for backspace allowing removal of locked selections
diff --git a/test/test_datasets_utils.py b/test/test_datasets_utils.py index <HASH>..<HASH> 100644 --- a/test/test_datasets_utils.py +++ b/test/test_datasets_utils.py @@ -1,3 +1,4 @@ +import os import shutil import tempfile import torch @@ -11,12 +12,14 @@ class Tester(unittest.TestCase): temp_dir = tempfile.mkdtemp() url = "http://github.com/pytorch/vision/archive/master.zip" utils.download_url(url, temp_dir) + assert not len(os.listdir(temp_dir)) == 0, 'The downloaded root directory is empty after download.' shutil.rmtree(temp_dir) def test_download_url_retry_http(self): temp_dir = tempfile.mkdtemp() url = "https://github.com/pytorch/vision/archive/master.zip" utils.download_url(url, temp_dir) + assert not len(os.listdir(temp_dir)) == 0, 'The downloaded root directory is empty after download.' shutil.rmtree(temp_dir)
Test - Added downloaded directory not empty check in test_datasets_utils (#<I>)
diff --git a/src/main/java/net/bootsfaces/component/modal/ModalRenderer.java b/src/main/java/net/bootsfaces/component/modal/ModalRenderer.java index <HASH>..<HASH> 100644 --- a/src/main/java/net/bootsfaces/component/modal/ModalRenderer.java +++ b/src/main/java/net/bootsfaces/component/modal/ModalRenderer.java @@ -77,7 +77,7 @@ public class ModalRenderer extends CoreRenderer { rw.startElement("div", component); // modal rw.writeAttribute("id", component.getClientId(context), "id"); - String styleClasses = "modal" + " fade"; + String styleClasses = "modal"; if (modal.getStyleClass() != null) { styleClasses = modal.getStyleClass() + " " + styleClasses; }
remove 'fade' effect from modal
diff --git a/controller.go b/controller.go index <HASH>..<HASH> 100644 --- a/controller.go +++ b/controller.go @@ -1,12 +1,19 @@ package action_bar import ( - "github.com/qor/admin" "net/http" + + "github.com/qor/admin" ) func SwitchMode(context *admin.Context) { cookie := http.Cookie{Name: "qor-action-bar", Value: context.Request.URL.Query().Get("checked"), Path: "/", HttpOnly: true} http.SetCookie(context.Writer, &cookie) - http.Redirect(context.Writer, context.Request, "/", http.StatusFound) + + referrer := context.Request.Referer() + if referrer == "" { + referrer = "/" + } + + http.Redirect(context.Writer, context.Request, referrer, http.StatusFound) }
Redirect back to referrer url
diff --git a/Swat/exceptions/SwatException.php b/Swat/exceptions/SwatException.php index <HASH>..<HASH> 100644 --- a/Swat/exceptions/SwatException.php +++ b/Swat/exceptions/SwatException.php @@ -173,6 +173,34 @@ class SwatException extends Exception } // }}} + // {{{ public function processAndContinue() + + /** + * Processes this exception and continues execution + * + * Processing involves displaying errors, logging errors and sending + * error message emails + */ + public function processAndContinue() + { + $this->process(false, true); + } + + // }}} + // {{{ public function processAndExit() + + /** + * Processes this exception and stops execution + * + * Processing involves displaying errors, logging errors and sending + * error message emails + */ + public function processAndExit() + { + $this->process(true, true); + } + + // }}} // {{{ public function log() /**
Convenience methods for SwatException. svn commit r<I>
diff --git a/src/port-manager.js b/src/port-manager.js index <HASH>..<HASH> 100644 --- a/src/port-manager.js +++ b/src/port-manager.js @@ -92,6 +92,12 @@ fdom.port.Manager.prototype.onMessage = function(flow, message) { } this.createLink(origin, message.name, new fdom.port[message.service](message.args)); + } else if (message.request === 'bindport') { + this.createLink({id: message.id}, + 'custom' + message.port, + new fdom.port[message.service](message.args), + 'default', + true); } else if (message.request === 'delegate') { // Initate Delegation. if (this.delegate === null) {
add back in bind-port command. it's in use by the runtime.
diff --git a/tests/data/ar/Customer.php b/tests/data/ar/Customer.php index <HASH>..<HASH> 100644 --- a/tests/data/ar/Customer.php +++ b/tests/data/ar/Customer.php @@ -51,6 +51,11 @@ class Customer extends ActiveRecord return $this->hasMany(OrderWithNullFK::className(), ['customer_id' => 'id'])->orderBy('created_at'); } + public function getOrdersWithItems() + { + return $this->hasMany(Order::className(), ['customer_id' => 'id'])->with('orderItems'); + } + public function afterSave($insert, $changedAttributes) { ActiveRecordTest::$afterSaveInsert = $insert;
Added test/data/ar/Customer::getOrderWithItems in order to fix test compatibility
diff --git a/test/server.test.js b/test/server.test.js index <HASH>..<HASH> 100644 --- a/test/server.test.js +++ b/test/server.test.js @@ -60,18 +60,18 @@ async function checkOut (name, args) { let result = await check(name, args, { }, 'kill') let out = result[0] let exit = result[1] + expect(out).toMatchSnapshot() if (exit !== 0) { throw new Error(`Fall with:\n${ out }`) } - expect(out).toMatchSnapshot() } async function checkError (name, args) { let result = await check(name, args) let out = result[0] let exit = result[1] - expect(exit).toEqual(1) expect(out).toMatchSnapshot() + expect(exit).toEqual(1) } afterEach(() => {
Improve server test debuggability on Travis CI
diff --git a/lib/janky/build.rb b/lib/janky/build.rb index <HASH>..<HASH> 100644 --- a/lib/janky/build.rb +++ b/lib/janky/build.rb @@ -243,6 +243,10 @@ module Janky self.class.base_url + "#{repo_name}/#{branch_name}" end + def room_id + repository.room_id + end + def repo_id repository.id end
Fix Chat Notifications Previously `room_id` was being passed to `speak` as undefined and the notification send was failing.
diff --git a/lib/cronlib.php b/lib/cronlib.php index <HASH>..<HASH> 100644 --- a/lib/cronlib.php +++ b/lib/cronlib.php @@ -208,7 +208,7 @@ function cron_run() { if ($DB->count_records('user_preferences', array('name'=>'create_password', 'value'=>'1'))) { mtrace('Creating passwords for new users...'); $newusers = $DB->get_recordset_sql("SELECT u.id as id, u.email, u.firstname, - u.lastname, u.username, + u.lastname, u.username, u.lang, p.id as prefid FROM {user} u JOIN {user_preferences} p ON u.id=p.userid
MDL-<I> use user's lang when sending new emails
diff --git a/test/helpers/cons.go b/test/helpers/cons.go index <HASH>..<HASH> 100644 --- a/test/helpers/cons.go +++ b/test/helpers/cons.go @@ -318,7 +318,7 @@ var ciliumCLICommands = map[string]string{ "cilium status --all-controllers": "status.txt", "cilium kvstore get cilium --recursive": "kvstore_get.txt", - "hubble observe --since 4h -o json": "hubble_observe.txt", + "hubble observe --since 4h -o jsonpb": "hubble_observe.json", } // ciliumKubCLICommands these commands are the same as `ciliumCLICommands` but @@ -333,7 +333,7 @@ var ciliumKubCLICommands = map[string]string{ "cilium policy get": "policy_get.txt", "cilium status --all-controllers": "status.txt", - "hubble observe --since 4h -o json": "hubble_observe.txt", + "hubble observe --since 4h -o jsonpb": "hubble_observe.json", } // ciliumKubCLICommandsKVStore contains commands related to querying the kvstore.
test: Use hubble's jsonpb output in artifacts hubble observe now supports [1] reading flows from stdin if they are in jsonpb format. We should therefore emit jsonpb artifact files for tests, to be able to feed those files back into hubble observe. That will allow us to use hubble observe's filters and different output format. 1 - <URL>
diff --git a/test/core/cache.js b/test/core/cache.js index <HASH>..<HASH> 100644 --- a/test/core/cache.js +++ b/test/core/cache.js @@ -118,7 +118,7 @@ describe('Core: Cache', function(){ should.equal(null, load_resp); done(); }); - }, 1001); + }, 2001); }); }); });
ensure that loading from api.cache will re-set the key to expire
diff --git a/flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosResourceManager.java b/flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosResourceManager.java index <HASH>..<HASH> 100755 --- a/flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosResourceManager.java +++ b/flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosResourceManager.java @@ -839,7 +839,7 @@ public class MesosResourceManager extends ResourceManager<RegisteredMesosWorkerN @Override public void disconnected(SchedulerDriver driver) { - runAsyncWithoutFencing(new Runnable() { + runAsync(new Runnable() { @Override public void run() { MesosResourceManager.this.disconnected(new Disconnected());
[FLINK-<I>] Remove unfenced execution of Disconnected message from MesosResourceManager This closes #<I>.
diff --git a/bcbio/pipeline/merge.py b/bcbio/pipeline/merge.py index <HASH>..<HASH> 100644 --- a/bcbio/pipeline/merge.py +++ b/bcbio/pipeline/merge.py @@ -64,7 +64,8 @@ def merge_bam_files(bam_files, work_dir, config): out_file = os.path.join(work_dir, os.path.basename(sorted(bam_files)[0])) picard = broad.runner_from_config(config) if len(bam_files) == 1: - os.symlink(bam_files[0], out_file) + if not os.path.exists(out_file): + os.symlink(bam_files[0], out_file) else: picard.run_fn("picard_merge", bam_files, out_file) for b in bam_files:
Avoid merging BAM files when only one file present during no alignment processing
diff --git a/cassiopeia/datastores/kernel/common.py b/cassiopeia/datastores/kernel/common.py index <HASH>..<HASH> 100644 --- a/cassiopeia/datastores/kernel/common.py +++ b/cassiopeia/datastores/kernel/common.py @@ -38,7 +38,15 @@ class KernelSource(DataSource): url = f"{self._server_url}:{self._port}/{endpoint}" try: result, headers = self._client.get(url=url, parameters=parameters, connection=connection) - result = json.loads(result.decode()) + + # Ensure compatibility with both Curl and Requests based clients + if isinstance(result, bytes): + result = json.loads(result.decode()) + elif isinstance(result, str): + result = json.loads(result) + + if not isinstance(result, dict): + raise ValueError("Unexpected type returned from HTTPClient: {}".format(type(result))) except HTTPError as error: # The error handlers didn't work, so raise an appropriate error. new_error_type = _ERROR_CODES[error.code]
Ensure Kernel pipeline is compatible with all HTTPClients
diff --git a/lib/detector.js b/lib/detector.js index <HASH>..<HASH> 100644 --- a/lib/detector.js +++ b/lib/detector.js @@ -136,14 +136,27 @@ Detector.prototype._detectMagicNumbers = function(syntaxTree, contents) { return; } + var line = lines[node.loc.start.line - 1]; + var startColumn = node.loc.start.column; + var endColumn = node.loc.end.column; + + // fix columns, since acorn counts parens in their location + if (line.slice(startColumn, startColumn + 1) === '(') { + startColumn += 1; + } + + if (line.slice(endColumn - 1, endColumn) === ')') { + endColumn -= 1; + } + self.emit('found', { value: node.value, file: node.loc.source, fileLength: fileLength, lineNumber: node.loc.start.line, - lineSource: lines[node.loc.start.line - 1], - startColumn: node.loc.start.column, - endColumn: node.loc.end.column, + lineSource: line, + startColumn: startColumn, + endColumn: endColumn, surroundingLines: utils.getSurroundingLines(node, lines) }); };
Fix columns when surrounded by parens
diff --git a/tests/unit/src/Engine/Solr/SolrMapperTest.php b/tests/unit/src/Engine/Solr/SolrMapperTest.php index <HASH>..<HASH> 100644 --- a/tests/unit/src/Engine/Solr/SolrMapperTest.php +++ b/tests/unit/src/Engine/Solr/SolrMapperTest.php @@ -67,4 +67,30 @@ class SolrMapperTest extends PHPUnit_Framework_TestCase $this->mapper->delete($identityStub); } + + public function testFind() + { + $rawDataStub = $this->getMockBuilder('\G4\DataMapper\Common\RawData') + ->disableOriginalConstructor() + ->getMock(); + + $this->adapterMock + ->expects($this->once()) + ->method('select') + ->willReturn($rawDataStub); + + $this->assertSame($rawDataStub, $this->mapper->find($this->getMock('\G4\DataMapper\Common\Identity'))); + } + + public function testFindException() + { + $this->adapterMock + ->expects($this->once()) + ->method('select') + ->will($this->throwException(new \Exception())); + + $this->expectException('\Exception'); + + $this->mapper->find($this->getMock('\G4\DataMapper\Common\Identity')); + } } \ No newline at end of file
<I> - Added methods to test find method in SolrMapper.
diff --git a/lib/flipper/cloud/dsl.rb b/lib/flipper/cloud/dsl.rb index <HASH>..<HASH> 100644 --- a/lib/flipper/cloud/dsl.rb +++ b/lib/flipper/cloud/dsl.rb @@ -17,6 +17,11 @@ module Flipper def sync_secret @cloud_configuration.sync_secret end + + def inspect + inspect_id = ::Kernel::format "%x", (object_id * 2) + %(#<#{self.class}:0x#{inspect_id} @cloud_configuration=#{cloud_configuration.inspect}, flipper=#{__getobj__.inspect}>) + end end end end
Make dsl inspect more accurately Before it would show inspect for the flipper instance
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ required = ['args'] setup( name='clint', version=clint.__version__, - description='Python Command-line Application Tools', + description='Python Command Line Interface Tools', long_description=open('README.rst').read() + '\n\n' + open('HISTORY.rst').read(), author='Kenneth Reitz',
Update setup.py clint = "Command Line Interface Tools" tells me the README
diff --git a/modules/casper.js b/modules/casper.js index <HASH>..<HASH> 100644 --- a/modules/casper.js +++ b/modules/casper.js @@ -742,9 +742,14 @@ Casper.prototype.getPageContent = function getPageContent() { */ Casper.prototype.getCurrentUrl = function getCurrentUrl() { "use strict"; - return decodeURIComponent(this.evaluate(function _evaluate() { + var url = this.evaluate(function _evaluate() { return document.location.href; - })); + }); + try { + return decodeURIComponent(url); + } catch (e) { + return url; + } }; /**
fixed edge case when current url couldn't be decoded
diff --git a/lib/poleica/version.rb b/lib/poleica/version.rb index <HASH>..<HASH> 100644 --- a/lib/poleica/version.rb +++ b/lib/poleica/version.rb @@ -1,5 +1,5 @@ # -*- encoding: utf-8 -*- # Poleica namespace module Poleica - VERSION = '0.10.0' + VERSION = '0.10.1.fix1' end # module Poleica
Bump to <I>.fix1
diff --git a/service/http.proxy/src/main/java/org/kaazing/gateway/service/http/proxy/HttpProxyService.java b/service/http.proxy/src/main/java/org/kaazing/gateway/service/http/proxy/HttpProxyService.java index <HASH>..<HASH> 100644 --- a/service/http.proxy/src/main/java/org/kaazing/gateway/service/http/proxy/HttpProxyService.java +++ b/service/http.proxy/src/main/java/org/kaazing/gateway/service/http/proxy/HttpProxyService.java @@ -25,6 +25,7 @@ import javax.annotation.Resource; import org.kaazing.gateway.resource.address.uri.URIUtils; import org.kaazing.gateway.service.ServiceContext; import org.kaazing.gateway.service.proxy.AbstractProxyService; +import org.kaazing.gateway.util.feature.EarlyAccessFeatures; /** * Http proxy service @@ -42,6 +43,7 @@ public class HttpProxyService extends AbstractProxyService<HttpProxyServiceHandl @Override public void init(ServiceContext serviceContext) throws Exception { + EarlyAccessFeatures.HTTP_PROXY_SERVICE.assertEnabled(configuration, serviceContext.getLogger()); super.init(serviceContext); Collection<String> connectURIs = serviceContext.getConnects(); if (connectURIs == null || connectURIs.isEmpty()) {
Added back the EarlyAccessFeature for ProxyService
diff --git a/js/acx.js b/js/acx.js index <HASH>..<HASH> 100644 --- a/js/acx.js +++ b/js/acx.js @@ -163,12 +163,12 @@ module.exports = class acx extends Exchange { request['limit'] = limit; // default = 300 } const orderbook = await this.publicGetDepth (this.extend (request, params)); - const timestamp = this.safeIntegerProduct (orderbook, 'timestamp', 1000); + const timestamp = this.safeTimestamp (orderbook, 'timestamp'); return this.parseOrderBook (orderbook, timestamp); } parseTicker (ticker, market = undefined) { - const timestamp = this.safeIntegerProduct (ticker, 'at', 1000); + const timestamp = this.safeTimestamp (ticker, 'at'); ticker = ticker['ticker']; let symbol = undefined; if (market) {
acx safeTimestamp
diff --git a/springfox-swagger2/src/main/java/springfox/documentation/swagger2/web/Swagger2ControllerWebFlux.java b/springfox-swagger2/src/main/java/springfox/documentation/swagger2/web/Swagger2ControllerWebFlux.java index <HASH>..<HASH> 100644 --- a/springfox-swagger2/src/main/java/springfox/documentation/swagger2/web/Swagger2ControllerWebFlux.java +++ b/springfox-swagger2/src/main/java/springfox/documentation/swagger2/web/Swagger2ControllerWebFlux.java @@ -88,7 +88,7 @@ public class Swagger2ControllerWebFlux { return new ResponseEntity<>(HttpStatus.NOT_FOUND); } Swagger swagger = mapper.mapDocumentation(documentation); - swagger.basePath("/"); + swagger.basePath(isEmpty(request.getPath().contextPath().value()) ? "/" : request.getPath().contextPath().value()); if (isEmpty(swagger.getHost())) { swagger.host(request.getURI().getAuthority()); }
Set the basePath using the request context path if present This allows the X-Forwarded-Prefix header to work correctly
diff --git a/shillelagh/src/main/java/shillelagh/internal/ShillelaghInjector.java b/shillelagh/src/main/java/shillelagh/internal/ShillelaghInjector.java index <HASH>..<HASH> 100644 --- a/shillelagh/src/main/java/shillelagh/internal/ShillelaghInjector.java +++ b/shillelagh/src/main/java/shillelagh/internal/ShillelaghInjector.java @@ -4,7 +4,7 @@ import java.util.HashMap; import java.util.Iterator; /** Class in charge of creating all the code injected into other classes */ -public class ShillelaghInjector { +public final class ShillelaghInjector { // I'm not really happy with the code in here, but then again, I'm writing Java in Strings...
made ShillelaghInjector final
diff --git a/es7/index.js b/es7/index.js index <HASH>..<HASH> 100644 --- a/es7/index.js +++ b/es7/index.js @@ -16,6 +16,7 @@ require('../modules/es7.object.lookup-getter'); require('../modules/es7.object.lookup-setter'); require('../modules/es7.map.to-json'); require('../modules/es7.set.to-json'); +require('../modules/es7.global'); require('../modules/es7.system.global'); require('../modules/es7.error.is-error'); require('../modules/es7.math.clamp'); diff --git a/library/es7/index.js b/library/es7/index.js index <HASH>..<HASH> 100644 --- a/library/es7/index.js +++ b/library/es7/index.js @@ -16,6 +16,7 @@ require('../modules/es7.object.lookup-getter'); require('../modules/es7.object.lookup-setter'); require('../modules/es7.map.to-json'); require('../modules/es7.set.to-json'); +require('../modules/es7.global'); require('../modules/es7.system.global'); require('../modules/es7.error.is-error'); require('../modules/es7.math.clamp');
add `global` to one missed entry point
diff --git a/src/main/java/stormpot/qpool/QAllocThread.java b/src/main/java/stormpot/qpool/QAllocThread.java index <HASH>..<HASH> 100644 --- a/src/main/java/stormpot/qpool/QAllocThread.java +++ b/src/main/java/stormpot/qpool/QAllocThread.java @@ -73,7 +73,10 @@ class QAllocThread<T extends Poolable> extends Thread { dealloc(slot); } else if (slot != null) { dealloc(slot); - alloc(slot); // TODO not covered + alloc(slot); + // mutation testing might note that the above alloc() call can be + // removed... that's okay, it's really just an optimisation that + // prevents us from creating new slots all the time - we reuse them. } } } catch (InterruptedException _) { diff --git a/src/test/java/stormpot/basicpool/BasicPool.java b/src/test/java/stormpot/basicpool/BasicPool.java index <HASH>..<HASH> 100644 --- a/src/test/java/stormpot/basicpool/BasicPool.java +++ b/src/test/java/stormpot/basicpool/BasicPool.java @@ -238,7 +238,7 @@ implements LifecycledPool<T>, ResizablePool<T> { public void release(Poolable obj) { bpool.lock.lock(); if (!claimed) { - bpool.lock.unlock(); // TODO not covered + bpool.lock.unlock(); return; } expired();
deal with the TODOs from the mutation testing.
diff --git a/dallinger/experiment_server/gunicorn.py b/dallinger/experiment_server/gunicorn.py index <HASH>..<HASH> 100644 --- a/dallinger/experiment_server/gunicorn.py +++ b/dallinger/experiment_server/gunicorn.py @@ -60,7 +60,7 @@ class StandaloneServer(Application): config = get_config() workers = config.get("threads") if workers == "auto": - workers = str(multiprocessing.cpu_count() * 2 + 1) + workers = str(multiprocessing.cpu_count() + 1) host = config.get("host") mode = config.get("mode")
Reduce default gunicorn worker count.
diff --git a/test/spec/ol/interaction/modifyinteraction.test.js b/test/spec/ol/interaction/modifyinteraction.test.js index <HASH>..<HASH> 100644 --- a/test/spec/ol/interaction/modifyinteraction.test.js +++ b/test/spec/ol/interaction/modifyinteraction.test.js @@ -243,6 +243,7 @@ goog.require('ol.Feature'); goog.require('ol.Map'); goog.require('ol.MapBrowserPointerEvent'); goog.require('ol.View'); +goog.require('ol.events.condition'); goog.require('ol.geom.Point'); goog.require('ol.geom.Polygon'); goog.require('ol.interaction.Modify');
interaction/modify: Add missing goog.require() to test
diff --git a/source/Core/Edition/EditionSelector.php b/source/Core/Edition/EditionSelector.php index <HASH>..<HASH> 100644 --- a/source/Core/Edition/EditionSelector.php +++ b/source/Core/Edition/EditionSelector.php @@ -62,10 +62,10 @@ class EditionSelector $edition = static::COMMUNITY; - if (OXID_VERSION_EE) { + if (defined('OXID_VERSION_EE') && OXID_VERSION_EE) { $edition = static::ENTERPRISE; } - if (OXID_VERSION_PE_PE) { + if (defined('OXID_VERSION_PE_PE') && OXID_VERSION_PE_PE) { $edition = static::PROFESSIONAL; }
Check if constants is defined If constants was not yet defined, professional edition will be enabled.
diff --git a/iamport/client.py b/iamport/client.py index <HASH>..<HASH> 100644 --- a/iamport/client.py +++ b/iamport/client.py @@ -134,6 +134,10 @@ class Iamport(object): return self._post(url, kwargs) + def pay_schedule_get(self, merchant_id=''): + url = '{}subscribe/payments/schedule{}'.format(self.imp_url, merchant_id) + return self._get(url) + def pay_unschedule(self, **kwargs): url = '{}subscribe/payments/unschedule'.format(self.imp_url) if 'customer_uid' not in kwargs:
Implement pay_schedule_get function for checking scheduled payments
diff --git a/charmhelpers/contrib/charmsupport/nrpe.py b/charmhelpers/contrib/charmsupport/nrpe.py index <HASH>..<HASH> 100644 --- a/charmhelpers/contrib/charmsupport/nrpe.py +++ b/charmhelpers/contrib/charmsupport/nrpe.py @@ -210,7 +210,7 @@ class NRPE(object): super(NRPE, self).__init__() self.config = config() self.nagios_context = self.config['nagios_context'] - if 'nagios_servicegroups' in self.config and self.config['nagios_servicegroups'] != '': + if 'nagios_servicegroups' in self.config and not self.config['nagios_servicegroups']: self.nagios_servicegroups = self.config['nagios_servicegroups'] else: self.nagios_servicegroups = self.nagios_context
[bradm] Nicer way of expressing the nagios servicegroup fix, thanks to gnuoy
diff --git a/app/computed/debounce.js b/app/computed/debounce.js index <HASH>..<HASH> 100644 --- a/app/computed/debounce.js +++ b/app/computed/debounce.js @@ -1,8 +1,6 @@ -import { run } from '@ember/runloop'; +import { debounce } from '@ember/runloop'; import { computed } from '@ember/object'; -const { debounce } = run; - // Use this if you want a property to debounce // another property with a certain delay. // This means that every time this prop changes,
Fix deprecated use of `run.debounce` (#<I>)
diff --git a/src/spec.js b/src/spec.js index <HASH>..<HASH> 100644 --- a/src/spec.js +++ b/src/spec.js @@ -387,6 +387,19 @@ test("createInstance allows setting default props", async () => { expect(onResolve).toHaveBeenCalledWith("done") }) +test("custom instances also have helper components", async () => { + const promiseFn = () => resolveTo("done") + const CustomAsync = createInstance({ promiseFn }) + const { getByText } = render( + <CustomAsync> + <CustomAsync.Loading>loading</CustomAsync.Loading> + <CustomAsync.Resolved>resolved</CustomAsync.Resolved> + </CustomAsync> + ) + await waitForElement(() => getByText("loading")) + await waitForElement(() => getByText("resolved")) +}) + test("an unrelated change in props does not update the Context", async () => { let one let two
Add test for compound components on custom instance.
diff --git a/ue4cli/UnrealManagerBase.py b/ue4cli/UnrealManagerBase.py index <HASH>..<HASH> 100644 --- a/ue4cli/UnrealManagerBase.py +++ b/ue4cli/UnrealManagerBase.py @@ -36,7 +36,9 @@ class UnrealManagerBase(object): """ # Set the new root directory - ConfigurationManager.setConfigKey('rootDirOverride', os.path.abspath(rootDir)) + rootDir = os.path.abspath(rootDir) + ConfigurationManager.setConfigKey('rootDirOverride', rootDir) + print('Set engine root path override: {}'.format(rootDir)) # Check that the specified directory is valid and warn the user if it is not try:
Print specified path in setroot to make errors easier to spot
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ deps = ['fxos-appgen>=0.2.10', 'marionette_client>=0.7.1.1', 'marionette_extension >= 0.4', 'mozdevice >= 0.33', - 'mozlog >= 1.8', + 'mozlog == 1.8', 'moznetwork >= 0.24', 'mozprocess >= 0.18', 'wptserve >= 1.0.1',
Freeze mozlog version because of proposed API changes.
diff --git a/client/lib/wpcom-undocumented/lib/undocumented.js b/client/lib/wpcom-undocumented/lib/undocumented.js index <HASH>..<HASH> 100644 --- a/client/lib/wpcom-undocumented/lib/undocumented.js +++ b/client/lib/wpcom-undocumented/lib/undocumented.js @@ -902,23 +902,6 @@ Undocumented.prototype.getPaymentMethods = function ( query, fn ) { }; /** - * Return a list of third-party services that WordPress.com can integrate with - * - * @param {Function} fn The callback function - * @returns {Promise} A Promise to resolve when complete - */ -Undocumented.prototype.metaKeyring = function ( fn ) { - debug( '/meta/external-services query' ); - return this.wpcom.req.get( - { - path: '/meta/external-services/', - apiVersion: '1.1', - }, - fn - ); -}; - -/** * Return a list of third-party services that WordPress.com can integrate with for a specific site * * @param {number|string} siteId The site ID or domain
WPCOM Undocumented: Remove metaKeyring (#<I>)
diff --git a/src/client/voice/receiver/VoiceReceiver.js b/src/client/voice/receiver/VoiceReceiver.js index <HASH>..<HASH> 100644 --- a/src/client/voice/receiver/VoiceReceiver.js +++ b/src/client/voice/receiver/VoiceReceiver.js @@ -161,6 +161,25 @@ class VoiceReceiver extends EventEmitter { return; } data = Buffer.from(data); + + // Strip RTP Header Extensions (one-byte only) + if (data[0] === 0xBE && data[1] === 0xDE && data.length > 4) { + const headerExtensionLength = data.readUInt16BE(2); + let offset = 4; + for (let i = 0; i < headerExtensionLength; i++) { + const byte = data[offset]; + offset++; + if (byte === 0) { + continue; + } + offset += 1 + (0b1111 & (byte >> 4)); + } + while (data[offset] === 0) { + offset++; + } + data = data.slice(offset); + } + if (this.opusStreams.get(user.id)) this.opusStreams.get(user.id)._push(data); /** * Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).
backporting the fix for RTP header extensions (#<I>)
diff --git a/lib/Doctrine/DBAL/Schema/ForeignKeyConstraint.php b/lib/Doctrine/DBAL/Schema/ForeignKeyConstraint.php index <HASH>..<HASH> 100644 --- a/lib/Doctrine/DBAL/Schema/ForeignKeyConstraint.php +++ b/lib/Doctrine/DBAL/Schema/ForeignKeyConstraint.php @@ -128,6 +128,16 @@ class ForeignKeyConstraint extends AbstractAsset implements Constraint } /** + * Gets the options associated with this constraint + * + * @return array + */ + public function getOptions() + { + return $this->_options; + } + + /** * Foreign Key onUpdate status * * @return string|null
Added getter for ForeignKeyConstraint
diff --git a/application/configs/deploy.rb b/application/configs/deploy.rb index <HASH>..<HASH> 100644 --- a/application/configs/deploy.rb +++ b/application/configs/deploy.rb @@ -7,7 +7,10 @@ set :linked_dirs, %w{ } set :keep_releases, 3 + load "application/configs/deploy.rb" Dir.glob("garp/deploy/tasks/*.cap").each { |r| load r } load "garp/deploy/garp3.cap" + +set :tmp_dir, "/tmp/#{fetch(:application)}-#{fetch(:stage)}"
Added environment to temp path, to prevent permission problems between environments
diff --git a/src/sdk/pynni/nni/compression/torch/builtin_quantizers.py b/src/sdk/pynni/nni/compression/torch/builtin_quantizers.py index <HASH>..<HASH> 100644 --- a/src/sdk/pynni/nni/compression/torch/builtin_quantizers.py +++ b/src/sdk/pynni/nni/compression/torch/builtin_quantizers.py @@ -5,7 +5,7 @@ import logging import torch from .compressor import Quantizer, QuantGrad, QuantType -__all__ = ['NaiveQuantizer', 'QAT_Quantizer', 'DoReFaQuantizer'] +__all__ = ['NaiveQuantizer', 'QAT_Quantizer', 'DoReFaQuantizer', 'BNNQuantizer'] logger = logging.getLogger(__name__)
export for default (#<I>)
diff --git a/src/Codeception/Module/PhpBrowser.php b/src/Codeception/Module/PhpBrowser.php index <HASH>..<HASH> 100644 --- a/src/Codeception/Module/PhpBrowser.php +++ b/src/Codeception/Module/PhpBrowser.php @@ -134,9 +134,9 @@ class PhpBrowser extends InnerBrowser implements Remote, MultiSession * * @param string $name the name of the header to delete. */ - public function deleteHeader($header) + public function deleteHeader($name) { - $this->client->deleteHeader($header); + $this->client->deleteHeader($name); } public function amHttpAuthenticated($username, $password)
Parameter changed to $name deleteHeader was supposed to have $name instead of $header
diff --git a/lib/classes/persistent.php b/lib/classes/persistent.php index <HASH>..<HASH> 100644 --- a/lib/classes/persistent.php +++ b/lib/classes/persistent.php @@ -274,12 +274,13 @@ abstract class persistent { final public static function properties_definition() { global $CFG; - static $def = null; - if ($def !== null) { - return $def; + static $cachedef = []; + if (isset($cachedef[static::class])) { + return $cachedef[static::class]; } - $def = static::define_properties(); + $cachedef[static::class] = static::define_properties(); + $def = &$cachedef[static::class]; $def['id'] = array( 'default' => 0, 'type' => PARAM_INT,
MDL-<I> core: make static cache compatible with PHP<I>
diff --git a/src/Generator/ProductToImageSitemapArrayGenerator.php b/src/Generator/ProductToImageSitemapArrayGenerator.php index <HASH>..<HASH> 100644 --- a/src/Generator/ProductToImageSitemapArrayGenerator.php +++ b/src/Generator/ProductToImageSitemapArrayGenerator.php @@ -36,7 +36,7 @@ final class ProductToImageSitemapArrayGenerator /** @var ProductImageInterface $image */ foreach ($product->getImages() as $image) { - if (!$image->hasFile() || !$image->getPath()) { + if (!$image->getPath()) { continue; }
Add image when path is set, not only when SplInfo is present
diff --git a/src/Behat/Mink/Driver/GoutteDriver.php b/src/Behat/Mink/Driver/GoutteDriver.php index <HASH>..<HASH> 100644 --- a/src/Behat/Mink/Driver/GoutteDriver.php +++ b/src/Behat/Mink/Driver/GoutteDriver.php @@ -44,6 +44,10 @@ class GoutteDriver extends BrowserKitDriver } /** + * Gets the Goutte client. + * + * The method is overwritten only to provide the appropriate return type hint. + * * @return Client */ public function getClient()
Added the reason to overwrite getClient
diff --git a/apps/editing-toolkit/editing-toolkit-plugin/event-countdown-block/blocks/src/edit.js b/apps/editing-toolkit/editing-toolkit-plugin/event-countdown-block/blocks/src/edit.js index <HASH>..<HASH> 100644 --- a/apps/editing-toolkit/editing-toolkit-plugin/event-countdown-block/blocks/src/edit.js +++ b/apps/editing-toolkit/editing-toolkit-plugin/event-countdown-block/blocks/src/edit.js @@ -55,6 +55,7 @@ const edit = ( { attributes, setAttributes, className } ) => { onClick={ onToggle } aria-expanded={ isOpen } aria-live="polite" + isSecondary > { label } </Button>
Event Countdown Block: Update date picker button to use secondary styling (#<I>)
diff --git a/package/yapsy/__init__.py b/package/yapsy/__init__.py index <HASH>..<HASH> 100644 --- a/package/yapsy/__init__.py +++ b/package/yapsy/__init__.py @@ -36,7 +36,18 @@ should get you a fully working plugin management system:: for pluginInfo in simplePluginManager.getAllPlugins(): simplePluginManager.activatePluginByName(pluginInfo.name) - +.. note:: The ``plugin_info`` object (typically an instance of +``IPlugin``) plays as *the entry point of each plugin*. That's also +where |yapsy| ceases to guide you: it's up to you to define what your +plugins can do and how you want to talk to them ! Talking to your +plugin will then look very much like the following:: + + # Trigger 'some action' from the loaded plugins + for pluginInfo in simplePluginManager.getAllPlugins(): + pluginInfo.plugin_object.doSomething(...) + + + .. _extend: Extensibility @@ -74,7 +85,14 @@ the manager about that before collecting plugins:: "Visualization" : IVisualisation, }) +.. note:: Communicating with the plugins belonging to a given category +might then be achieved with some code looking like the following:: + + # Trigger 'some action' from the "Visualization" plugins + for pluginInfo in simplePluginManager.getPluginsOfCategory("Visualization"): + pluginInfo.plugin_object.doSomething(...) + Enhance the manager's interface -------------------------------
Add some more code samples and explicit notes about how to communicate with a plugin once it is loaded
diff --git a/test/specs/dom_components/model/Symbols.js b/test/specs/dom_components/model/Symbols.js index <HASH>..<HASH> 100644 --- a/test/specs/dom_components/model/Symbols.js +++ b/test/specs/dom_components/model/Symbols.js @@ -43,7 +43,14 @@ describe('Symbols', () => { wrapper.components().reset(); }); - // TODO check that clone itself doesn't create symbols + test("Simple clone doesn't create any symbol", () => { + const comp = wrapper.append(simpleComp)[0]; + const cloned = comp.clone(); + [comp, cloned].forEach(item => { + expect(item.__getSymbol()).toBeFalsy(); + expect(item.__getSymbols()).toBeFalsy(); + }); + }); test('Create symbol from a component', () => { const comp = wrapper.append(simpleComp)[0];
Add test for the clone against symbols
diff --git a/mautrix/util/message_send_checkpoint.py b/mautrix/util/message_send_checkpoint.py index <HASH>..<HASH> 100644 --- a/mautrix/util/message_send_checkpoint.py +++ b/mautrix/util/message_send_checkpoint.py @@ -70,6 +70,7 @@ CHECKPOINT_TYPES = { EventType.ROOM_REDACTION, EventType.ROOM_MESSAGE, EventType.ROOM_ENCRYPTED, + EventType.ROOM_MEMBER, EventType.STICKER, EventType.REACTION, EventType.CALL_INVITE,
Add m.room.member to checkpoint types
diff --git a/karma.conf.js b/karma.conf.js index <HASH>..<HASH> 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -2,11 +2,17 @@ // Generated on Thu Aug 11 2016 22:09:45 GMT+0200 (CEST) module.exports = function(config) { - config.set({ + var configuration = { // base path that will be used to resolve all patterns (eg. files, exclude) basePath: '', + customLaunchers: { + Chrome_travis_ci: { + base: 'Chrome', + flags: ['--no-sandbox'] + } + }, // frameworks to use // available frameworks: https://npmjs.org/browse/keyword/karma-adapter @@ -69,5 +75,12 @@ module.exports = function(config) { // Concurrency level // how many browser should be started simultaneous concurrency: Infinity - }) + }; + + if (process.env.TRAVIS) { + configuration.browsers = ['Chrome_travis_ci']; + } + + config.set(configuration); + }
Added custom browser for travis
diff --git a/src/main/java/com/ibm/stocator/fs/cos/COSAPIClient.java b/src/main/java/com/ibm/stocator/fs/cos/COSAPIClient.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/ibm/stocator/fs/cos/COSAPIClient.java +++ b/src/main/java/com/ibm/stocator/fs/cos/COSAPIClient.java @@ -1699,16 +1699,16 @@ public class COSAPIClient implements IStoreClient { LOG.debug("ProgressEvent received: " + progressEvent.toString()); if (progressEvent.getEventType() - == ProgressEventType.TRANSFER_STARTED_EVENT) { + == ProgressEventType.CLIENT_REQUEST_STARTED_EVENT) { LOG.debug("Started to copy: " + src + " -> " + dst); } if (progressEvent.getEventType() - == ProgressEventType.TRANSFER_COMPLETED_EVENT) { + == ProgressEventType.CLIENT_REQUEST_SUCCESS_EVENT) { LOG.debug("Completed copy: " + src + " -> " + dst); doneSignal.countDown(); } if (progressEvent.getEventType() - == ProgressEventType.TRANSFER_FAILED_EVENT) { + == ProgressEventType.CLIENT_REQUEST_FAILED_EVENT) { LOG.debug("Failed upload: " + src + " -> " + dst); doneSignal.countDown(); }
fix progressEvent received to align with aws s3 behavior
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -96,13 +96,16 @@ Texture.prototype.paint = function(geom) { var self = this; geom.faces.forEach(function(face, i) { var c = face.vertexColors[0]; - var index = self.materialIndex[Math.floor(c.b*255 + c.g*255*255 + c.r*255*255*255) - 1][0]; + var index = Math.floor(c.b*255 + c.g*255*255 + c.r*255*255*255); + index = self.materialIndex[Math.floor(Math.max(0, index - 1) % self.materialIndex.length)][0]; + // BACK, FRONT, TOP, BOTTOM, LEFT, RIGHT if (face.normal.z === 1) index += 1; else if (face.normal.y === 1) index += 2; else if (face.normal.y === -1) index += 3; else if (face.normal.x === -1) index += 4; else if (face.normal.x === 1) index += 5; + face.materialIndex = index; }); };
Fix for paint and force publish, whoops :)
diff --git a/lib/rails_admin/engine.rb b/lib/rails_admin/engine.rb index <HASH>..<HASH> 100644 --- a/lib/rails_admin/engine.rb +++ b/lib/rails_admin/engine.rb @@ -11,7 +11,7 @@ require 'rails_admin' module RailsAdmin class Engine < Rails::Engine isolate_namespace RailsAdmin - initializer "RailsAdmin precompile hook" do |app| + initializer "RailsAdmin precompile hook", :group => :assets do |app| app.config.assets.precompile += ['rails_admin/rails_admin.js', 'rails_admin/rails_admin.css', 'rails_admin/jquery.colorpicker.js', 'rails_admin/jquery.colorpicker.css'] end
Trigger asset precompile hook even if initialize_on_precompile is set to false
diff --git a/lib/contextual_link_helpers.rb b/lib/contextual_link_helpers.rb index <HASH>..<HASH> 100644 --- a/lib/contextual_link_helpers.rb +++ b/lib/contextual_link_helpers.rb @@ -27,7 +27,7 @@ module ContextualLinkHelpers # Link generation case action when 'new' - return icon_link_to(action, send("new_#{model_name}_path"), :remote => true) + return icon_link_to(action, send("new_#{model_name}_path")) when 'show' return icon_link_to(action, send("#{model_name}_path", resource)) when 'edit'
Don't use AJAX for context_action 'new'.
diff --git a/okhttp/src/main/java/com/squareup/okhttp/Headers.java b/okhttp/src/main/java/com/squareup/okhttp/Headers.java index <HASH>..<HASH> 100644 --- a/okhttp/src/main/java/com/squareup/okhttp/Headers.java +++ b/okhttp/src/main/java/com/squareup/okhttp/Headers.java @@ -19,7 +19,6 @@ package com.squareup.okhttp; import com.squareup.okhttp.internal.http.HttpDate; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.Date; import java.util.List; @@ -118,7 +117,7 @@ public final class Headers { public Builder newBuilder() { Builder result = new Builder(); - result.namesAndValues.addAll(Arrays.asList(namesAndValues)); + Collections.addAll(result.namesAndValues, namesAndValues); return result; }
Skip allocating a wrapper list for copying.
diff --git a/spec/job/adapters/torque_spec.rb b/spec/job/adapters/torque_spec.rb index <HASH>..<HASH> 100644 --- a/spec/job/adapters/torque_spec.rb +++ b/spec/job/adapters/torque_spec.rb @@ -193,7 +193,7 @@ describe OodCore::Job::Adapters::Torque do end context "with :start_time" do - before { adapter.submit(script: build_script(start_time: 1478631234)) } + before { adapter.submit(script: build_script(start_time: Time.new(2016, 11, 8, 13, 53, 54).to_i)) } it { expect(pbs).to have_received(:submit_string).with(content, queue: nil, headers: {Execution_Time: "201611081353.54"}, resources: {}, envvars: {}) } end
dynamically set timestamp Fixes #6
diff --git a/lib/handlebars/vm.js b/lib/handlebars/vm.js index <HASH>..<HASH> 100644 --- a/lib/handlebars/vm.js +++ b/lib/handlebars/vm.js @@ -615,7 +615,9 @@ Handlebars.VM = { return new Handlebars.JavaScriptCompiler().compile(environment); }, invokePartial: function(partial, name, context, helpers, partials) { - if(partial instanceof Function) { + if(partial === undefined) { + throw new Handlebars.Exception("The partial " + name + " could not be found"); + } else if(partial instanceof Function) { return partial(context, helpers, partials); } else { partials[name] = Handlebars.VM.compile(partial);
If the partial is not found, an exception should be thrown
diff --git a/findbugs/src/java/edu/umd/cs/findbugs/ba/obl/ObligationSet.java b/findbugs/src/java/edu/umd/cs/findbugs/ba/obl/ObligationSet.java index <HASH>..<HASH> 100644 --- a/findbugs/src/java/edu/umd/cs/findbugs/ba/obl/ObligationSet.java +++ b/findbugs/src/java/edu/umd/cs/findbugs/ba/obl/ObligationSet.java @@ -53,8 +53,18 @@ public class ObligationSet { public void remove(Obligation obligation) throws NonexistentObligationException { short count = countList[obligation.getId()]; - if (count <= 0) - throw new NonexistentObligationException(obligation); + + // It is possible to remove a nonexistent obligation. + // Generally this indicates buggy code, e.g. + // InputStream in = null; + // try { + // in = new FileInputStream(...); + // } catch (IOException e) { + // in.close(); // in might be null! + // } +// if (count <= 0) +// throw new NonexistentObligationException(obligation); + invalidate(); countList[obligation.getId()] = (short)(count - 1); }
Don't throw exception indicating that a nonexistent obligation is being removed. This can arise, possibly because of buggy code that tries to close a resource that has not been opened. git-svn-id: <URL>
diff --git a/Locale.php b/Locale.php index <HASH>..<HASH> 100644 --- a/Locale.php +++ b/Locale.php @@ -27,22 +27,16 @@ class Locale extends \Locale { /** * Caches the countries in different locales. - * - * @var array */ protected static $countries = array(); /** * Caches the languages in different locales. - * - * @var array */ protected static $languages = array(); /** * Caches the different locales. - * - * @var array */ protected static $locales = array();
[DI] minor docblock fixes
diff --git a/fedmsg/consumers/ircbot.py b/fedmsg/consumers/ircbot.py index <HASH>..<HASH> 100644 --- a/fedmsg/consumers/ircbot.py +++ b/fedmsg/consumers/ircbot.py @@ -172,6 +172,9 @@ class IRCBotConsumer(FedmsgConsumer): super(IRCBotConsumer, self).__init__(hub) + if not getattr(self, '_initialized', False): + return + irc_settings = hub.config.get('irc') for settings in irc_settings: network = settings.get('network', 'irc.freenode.net')
Fix regression in ircbot.
diff --git a/src/Modus/Template/Helper/Messages.php b/src/Modus/Template/Helper/Messages.php index <HASH>..<HASH> 100644 --- a/src/Modus/Template/Helper/Messages.php +++ b/src/Modus/Template/Helper/Messages.php @@ -22,12 +22,16 @@ class Messages extends AbstractHelper { protected function getErrors() { $message = $this->segment->getFlash('failure'); - return '<div class="failure">' . $message . '</div>'; + if($message) { + return '<div class="failure">' . $message . '</div>'; + } } protected function getMessages() { $message = $this->segment->getFlash('success'); - return '<div class="success">' . $message . '</div>'; + if($message) { + return '<div class="success">' . $message . '</div>'; + } } } \ No newline at end of file
Checking that a message exists before returning the HTML.
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,6 +1,5 @@ require 'simplecov' require 'coveralls' -require 'squib' SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ SimpleCov::Formatter::HTMLFormatter, @@ -8,12 +7,15 @@ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ ] SimpleCov.start +require 'squib' + RSpec.configure do |config| config.mock_with :rspec do |mocks| mocks.verify_partial_doubles = true end end + def test_file(str) "#{File.expand_path(File.dirname(__FILE__))}/data/#{str}" end
Fixing overzealous coverage issue
diff --git a/src/org/parosproxy/paros/network/ConnectionParam.java b/src/org/parosproxy/paros/network/ConnectionParam.java index <HASH>..<HASH> 100644 --- a/src/org/parosproxy/paros/network/ConnectionParam.java +++ b/src/org/parosproxy/paros/network/ConnectionParam.java @@ -360,7 +360,7 @@ public class ConnectionParam extends AbstractParam { String host = sub.getString(AUTH_HOST_NAME_KEY, ""); if ("".equals(host)) { - break; + continue; } HostAuthentication auth = new HostAuthentication(
Changed ConnectionParam to keep trying loading other authentication credentials even if one is wrong.
diff --git a/lib/kamerling.rb b/lib/kamerling.rb index <HASH>..<HASH> 100644 --- a/lib/kamerling.rb +++ b/lib/kamerling.rb @@ -1,3 +1,5 @@ +require 'logger' + require_relative 'kamerling/core_extensions' include Kamerling::CoreExtensions::Main diff --git a/lib/kamerling/server.rb b/lib/kamerling/server.rb index <HASH>..<HASH> 100644 --- a/lib/kamerling/server.rb +++ b/lib/kamerling/server.rb @@ -1,6 +1,3 @@ -require 'gserver' -require 'logger' - module Kamerling class Server def initialize addrs: req(:addrs), logger: Logger.new('/dev/null'), servers: servers_from(addrs, logger)
Server: promote dependencies to global file
diff --git a/languages/de/tl_module.php b/languages/de/tl_module.php index <HASH>..<HASH> 100644 --- a/languages/de/tl_module.php +++ b/languages/de/tl_module.php @@ -34,7 +34,7 @@ $GLOBALS['TL_LANG']['tl_module']['mobile_menu_disableNavigation'] = [ ]; $GLOBALS['TL_LANG']['tl_module']['mobile_menu_parentTogglers'] = [ 'Eltern-Menüpunkte nur als Toggler verwenden', - 'Bewirkt, daß die Menüpunkte mit Untermenüs nur als Toggler verwendet werden können. Damit ist es nicht möglich, eine Seite mit Untermenüs durch Klick auszuwählen.', + 'Bewirkt, dass die Menüpunkte mit Untermenüs nur als Toggler verwendet werden können. Damit ist es nicht möglich, eine Seite mit Untermenüs durch Klick auszuwählen.', ]; $GLOBALS['TL_LANG']['tl_module']['mobile_menu_closeOnLinkClick'] = [ 'Menü beim Klick auf einen Link schließen.',
Fixed a typo in the German labels
diff --git a/requesting.go b/requesting.go index <HASH>..<HASH> 100644 --- a/requesting.go +++ b/requesting.go @@ -132,6 +132,11 @@ func (p *Peer) applyNextRequestState() bool { } } for req := range next.Requests { + // This could happen if the peer chokes us between the next state being generated, and us + // trying to transmit the state. + if p.peerChoking && !p.peerAllowedFast.Contains(bitmap.BitIndex(req.Index)) { + continue + } more, err := p.request(req) if err != nil { panic(err)
Filter next requests application for peer state changes
diff --git a/src/test/java/io/humble/video/SourceFormatTest.java b/src/test/java/io/humble/video/SourceFormatTest.java index <HASH>..<HASH> 100644 --- a/src/test/java/io/humble/video/SourceFormatTest.java +++ b/src/test/java/io/humble/video/SourceFormatTest.java @@ -17,7 +17,7 @@ public class SourceFormatTest { assertEquals("aiff", f.getName()); assertEquals("Audio IFF", f.getLongName()); List<Codec.ID> l = f.getSupportedCodecs(); - assertEquals(17, l.size()); + assertTrue(17 < l.size()); } @Test
fix test and make more robust to future ffmpeg changes.
diff --git a/CKEditorAsset.php b/CKEditorAsset.php index <HASH>..<HASH> 100644 --- a/CKEditorAsset.php +++ b/CKEditorAsset.php @@ -9,7 +9,7 @@ use yii\web\View; * @author MrAnger */ class CKEditorAsset extends AssetBundle { - public $sourcePath = "@bower/ckeditor#full"; + public $sourcePath = "@vendor/ckeditor"; public $js = [ 'ckeditor.js',
Change require ckeditor package version
diff --git a/vyper/old_codegen/context.py b/vyper/old_codegen/context.py index <HASH>..<HASH> 100644 --- a/vyper/old_codegen/context.py +++ b/vyper/old_codegen/context.py @@ -244,12 +244,11 @@ class Context: # more sanity check, that the types match # _check(all(l.typ == r.typ for (l, r) in zip(args_lll, sig.args)) - num_provided_args = len(args_lll) - total_args = len(sig.args) + num_provided_kwargs = len(args_lll) - len(sig.base_args) num_kwargs = len(sig.default_args) - args_needed = total_args - num_provided_args + kwargs_needed = num_kwargs - num_provided_kwargs - kw_vals = list(sig.default_values.values())[: num_kwargs - args_needed] + kw_vals = list(sig.default_values.values())[:kwargs_needed] return sig, kw_vals
fix calculation of kwargs needed
diff --git a/src/View.php b/src/View.php index <HASH>..<HASH> 100644 --- a/src/View.php +++ b/src/View.php @@ -1002,6 +1002,8 @@ class View implements jsExpressionable /** @var array Cached stickyGet arguments */ public $_stickyArgsCached = null; + public $_triggerBy = null; + /** * Build an URL which this view can use for call-backs. It should * be guaranteed that requesting returned URL would at some point call @@ -1021,8 +1023,9 @@ class View implements jsExpressionable * * @return array */ - public function _getStickyArgs() + public function _getStickyArgs($triggerBy) { + $this->_triggerBy = $triggerBy; if ($this->_stickyArgsCached === null) { if ($this->owner && $this->owner instanceof self) { $this->_stickyArgsCached = array_merge($this->owner->_getStickyArgs($triggerBy), $this->stickyArgs); @@ -1046,7 +1049,8 @@ class View implements jsExpressionable if ($this->_stickyArgsCached) { throw new Exception([ 'Unable to set stickyGet after url() has been used here or by a child', - 'name' => $name, + 'urlBy'=>$this->_triggerBy, + 'stickyBy' => $name, ]); }
record which view had url() called on it (for debugging)
diff --git a/python/ppo/trainer.py b/python/ppo/trainer.py index <HASH>..<HASH> 100755 --- a/python/ppo/trainer.py +++ b/python/ppo/trainer.py @@ -71,7 +71,7 @@ class Trainer(object): idx = info.agents.index(agent) if not info.local_done[idx]: if self.use_observations: - history['observations'].append(info.observations[idx]) + history['observations'].append([info.observations[0][idx]]) if self.use_states: history['states'].append(info.states[idx]) if self.is_continuous:
Fix for multi-agent with observations
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -170,6 +170,22 @@ exports.static = function(directory, options) { console.warn(`Snockets skipping ${filePath}:\n ${err}`); } + // Snockets (watcher) + if (watcher) { + try { + // Get all files in the snockets chain + const compiledChain = snockets.getCompiledChain(filePath, options.snockets); + + // Add each file of the snockets chain to the watcher + compiledChain.forEach(c => { + watcher.add(c.filename); + }); + } catch(err) { + // Snockets can't parse, so just pass the js file along + console.warn(`Snockets skipping watch for ${filePath}:\n ${err}`); + } + } + // Babel try { let result = babel.transformSync(data, {
Watch all files in the snockets chain
diff --git a/mautrix/util/formatter/parser.py b/mautrix/util/formatter/parser.py index <HASH>..<HASH> 100644 --- a/mautrix/util/formatter/parser.py +++ b/mautrix/util/formatter/parser.py @@ -166,6 +166,9 @@ class MatrixParser(Generic[T]): async def color_to_fstring(self, node: HTMLNode, ctx: RecursionContext, color: str) -> T: return await self.tag_aware_parse_node(node, ctx) + async def spoiler_to_fstring(self, node: HTMLNode, ctx: RecursionContext, reason: str) -> T: + return await self.tag_aware_parse_node(node, ctx) + async def node_to_fstring(self, node: HTMLNode, ctx: RecursionContext) -> T: custom = await self.custom_node_to_fstring(node, ctx) if custom: @@ -190,6 +193,13 @@ class MatrixParser(Generic[T]): return (await self.tag_aware_parse_node(node, ctx)).append("\n") elif node.tag in ("font", "span"): try: + spoiler = node.attrib["data-mx-spoiler"] + except KeyError: + pass + else: + return await self.spoiler_to_fstring(node, ctx, spoiler) + + try: color = node.attrib["color"] except KeyError: try:
Add support for parsing spoilers
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -74,7 +74,7 @@ try: from setuptools.command.develop import develop as _develop class develop(_develop): def run(self, *args): - #self.execute(_build_sim_unicorn, (), msg='Building sim_unicorn') + self.execute(_build_sim_unicorn, (), msg='Building sim_unicorn') _develop.run(self, *args) cmdclass['develop'] = develop
I accidentally commented out the build line for sim_unicorn and then committed it. undo that.
diff --git a/lib/flint.js b/lib/flint.js index <HASH>..<HASH> 100644 --- a/lib/flint.js +++ b/lib/flint.js @@ -507,7 +507,7 @@ Flint.prototype.auditBots = function() { // exit rooms where bot is only member if(this.auditCounter === (this.auditDelay - 1)) { _.forEach(this.bots, bot => { - if(bot.memberships.length === 0 && bot.isGroup) { + if(bot.memberships.length === 0 && bot.isGroup && !bot.isTeam) { bot.exit(); } });
Tweaked audit of empty rooms to ignore team rooms