diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index <HASH>..<HASH> 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -1769,14 +1769,15 @@ func DumpAllNamespaceInfo(c clientset.Interface, namespace string) { // 2. there are so many of them that working with them are mostly impossible // So we dump them only if the cluster is relatively small. maxNodesForDump := TestContext.MaxNodesToGather - if nodes, err := c.CoreV1().Nodes().List(metav1.ListOptions{}); err == nil { - if len(nodes.Items) <= maxNodesForDump { - dumpAllNodeInfo(c) - } else { - e2elog.Logf("skipping dumping cluster info - cluster too large") - } - } else { + nodes, err := c.CoreV1().Nodes().List(metav1.ListOptions{}) + if err != nil { e2elog.Logf("unable to fetch node list: %v", err) + return + } + if len(nodes.Items) <= maxNodesForDump { + dumpAllNodeInfo(c) + } else { + e2elog.Logf("skipping dumping cluster info - cluster too large") } }
Reduce indents of DumpAllNamespaceInfo() During cleanup of DumpAllNamespaceInfo(), the code was a little unreadable. This reduces the indents for the code readability.
diff --git a/lib/m4dbi/model.rb b/lib/m4dbi/model.rb index <HASH>..<HASH> 100644 --- a/lib/m4dbi/model.rb +++ b/lib/m4dbi/model.rb @@ -384,6 +384,9 @@ module M4DBI def save nil end + def save! + nil + end end # Define a new M4DBI::Model like this: diff --git a/spec/model.rb b/spec/model.rb index <HASH>..<HASH> 100644 --- a/spec/model.rb +++ b/spec/model.rb @@ -944,6 +944,13 @@ describe 'A found M4DBI::Model subclass instance' do end end + it 'does nothing on #save!' do + p = @m_post[ 1 ] + should.not.raise do + p.save! + end + end + end describe 'M4DBI::Model (relationships)' do
Added no-op Model#save! .
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -4,6 +4,14 @@ from setuptools import find_packages, setup py_version = sys.version_info[:2] +py_version_dotted = '{0.major}.{0.minor}'.format(sys.version_info) +supported_py_versions = ('2.7', '3.3', '3.4', '3.5') + + +if py_version_dotted not in supported_py_versions: + sys.stderr.write('WARNING: django-local-settings does not officially support Python ') + sys.stderr.write(py_version_dotted) + sys.stderr.write('\n') with open('VERSION') as version_fp:
Warn when installing into an unsupported Python version
diff --git a/applications/default/public/js/controllers.js b/applications/default/public/js/controllers.js index <HASH>..<HASH> 100644 --- a/applications/default/public/js/controllers.js +++ b/applications/default/public/js/controllers.js @@ -277,7 +277,23 @@ function InlineReferenceElementController($scope, $location, applicationState, C function InlineReferenceElementItemController($scope, $filter, applicationState, Choko) { $scope.editItem = function() { - $scope.setSubForm($scope.element.reference.type, !!$scope.element.reference.subtypes, $scope.item, $scope.key); + $scope.setSubForm($scope.typeName(), !!$scope.element.reference.subtypes, $scope.item, $scope.key); + }; + + $scope.typeName = function() { + var typeName = $scope.element.reference.type; + + // If it has subtypes, i.e. it's a polymorphic type, get the actual type + // being added to load the correct form. + if ($scope.element.reference.subtypes) { + $scope.element.reference.subtypes.forEach(function(subtype) { + if (subtype.shortName == $scope.item.type) { + typeName = subtype.name; + } + }); + } + + return typeName; }; }
Loading proper form for editing inline referenced items for polymorphic referenced types.
diff --git a/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/WarcIndexer.java b/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/WarcIndexer.java index <HASH>..<HASH> 100644 --- a/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/WarcIndexer.java +++ b/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/WarcIndexer.java @@ -136,6 +136,8 @@ public class WarcIndexer { pw.println(lines.next()); } pw.close(); + System.exit(1); + } catch (Exception e) { e.printStackTrace(); }
BUGFIX(ACC-<I>): was not setting exit status to non-zero when exceptions were caught... Uhg. git-svn-id: <URL>
diff --git a/runtime/kubernetes/kubernetes.go b/runtime/kubernetes/kubernetes.go index <HASH>..<HASH> 100644 --- a/runtime/kubernetes/kubernetes.go +++ b/runtime/kubernetes/kubernetes.go @@ -136,8 +136,12 @@ func (k *kubernetes) getService(labels map[string]string) ([]*service, error) { for _, item := range podList.Items { var status string - // inspect the - if item.Metadata.Name != name { + // check the name + if item.Metadata.Labels["name"] != name { + continue + } + // check the version + if item.Metadata.Labels["version"] != version { continue }
Fix labels for k8s (#<I>)
diff --git a/traverse.go b/traverse.go index <HASH>..<HASH> 100644 --- a/traverse.go +++ b/traverse.go @@ -43,8 +43,11 @@ func (r *Reader) Networks() *Networks { // in the database which are contained in a given network. // // Please note that a MaxMind DB may map IPv4 networks into several locations -// in an IPv6 database. This iterator will iterate over all of these -// locations separately. +// in an IPv6 database. This iterator will iterate over all of these locations +// separately. +// +// If the provided network is contained within a network in the database, the +// iterator will iterate over exactly one network, the containing network. func (r *Reader) NetworksWithin(network *net.IPNet) *Networks { ip := network.IP prefixLength, _ := network.Mask.Size()
Clarify behaviour of NetworksWithin() in the case where the network being searched is contained within another network.
diff --git a/engine/src/test/java/com/stratio/streaming/utils/ZKUtilsTestIT.java b/engine/src/test/java/com/stratio/streaming/utils/ZKUtilsTestIT.java index <HASH>..<HASH> 100644 --- a/engine/src/test/java/com/stratio/streaming/utils/ZKUtilsTestIT.java +++ b/engine/src/test/java/com/stratio/streaming/utils/ZKUtilsTestIT.java @@ -5,9 +5,8 @@ import static org.junit.Assert.*; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import com.stratio.streaming.commons.constants.STREAM_OPERATIONS; import com.stratio.streaming.commons.messages.StratioStreamingMessage; import com.stratio.streaming.service.StreamsHelper; @@ -17,6 +16,7 @@ import com.typesafe.config.ConfigFactory; /** * Created by aitor on 9/30/15. */ +@RunWith(JUnit4.class) public class ZKUtilsTestIT { private static Config conf;
added RunWith to ZKUtilsTest
diff --git a/media/boom/js/boom/page/settings.js b/media/boom/js/boom/page/settings.js index <HASH>..<HASH> 100644 --- a/media/boom/js/boom/page/settings.js +++ b/media/boom/js/boom/page/settings.js @@ -612,11 +612,11 @@ $.widget('boom.page', $.boom.page, { $.boom.page.settings.save( '/cms/page/settings/children/' + $.boom.page.options.id, - $(this).find('form').serialize() + $("form.b-form-settings").serialize() ).done(function() { $.boom.page.settings.save( url, - {csrf: $("this").find('input[name=csrf]').val(), sequences: sequences}, + {csrf: $("form.b-form-settings").find('input[name=csrf]').val(), sequences: sequences}, "Child page ordering saved, reloading page." ).done(function(){ setTimeout(function() {
Fixed bug with manually re-ordering child pages
diff --git a/modules/Cockpit/Controller/Media.php b/modules/Cockpit/Controller/Media.php index <HASH>..<HASH> 100755 --- a/modules/Cockpit/Controller/Media.php +++ b/modules/Cockpit/Controller/Media.php @@ -19,7 +19,11 @@ class Media extends \Cockpit\AuthController { $cmd = $this->param('cmd', false); $mediapath = $this->module('cockpit')->getGroupVar('finder.path', ''); - $this->root = rtrim($this->app->path("site:{$mediapath}"), '/'); + if (!$mediapath && !$this->module('cockpit')->isSuperAdmin()) { + $this->root = rtrim($this->app->path("#uploads:"), '/'); + } else { + $this->root = rtrim($this->app->path("site:{$mediapath}"), '/'); + } if (file_exists($this->root) && in_array($cmd, get_class_methods($this))){
fallback media/finder path to uploads folder if not set via config and is not admin
diff --git a/aws/resource_aws_budgets_budget.go b/aws/resource_aws_budgets_budget.go index <HASH>..<HASH> 100644 --- a/aws/resource_aws_budgets_budget.go +++ b/aws/resource_aws_budgets_budget.go @@ -371,10 +371,10 @@ func resourceAwsBudgetsBudgetNotificationRead(d *schema.ResourceData, meta inter for _, notificationOutput := range describeNotificationsForBudgetOutput.Notifications { setNotificationDefaults(notificationOutput) notification := make(map[string]interface{}) - notification["comparison_operator"] = *notificationOutput.ComparisonOperator - notification["threshold_type"] = *notificationOutput.ThresholdType - notification["threshold"] = *notificationOutput.Threshold - notification["notification_type"] = *notificationOutput.NotificationType + notification["comparison_operator"] = aws.StringValue(notificationOutput.ComparisonOperator) + notification["threshold_type"] = aws.StringValue(notificationOutput.ThresholdType) + notification["threshold"] = aws.Float64Value(notificationOutput.Threshold) + notification["notification_type"] = aws.StringValue(notificationOutput.NotificationType) subscribersOutput, err := conn.DescribeSubscribersForNotification(&budgets.DescribeSubscribersForNotificationInput{ BudgetName: aws.String(budgetName),
r/aws_budgets_budget: Make reading budget notifications safer
diff --git a/droneapi/module/api.py b/droneapi/module/api.py index <HASH>..<HASH> 100644 --- a/droneapi/module/api.py +++ b/droneapi/module/api.py @@ -386,11 +386,11 @@ class APIModule(mp_module.MPModule): def fix_targets(self, message): """Set correct target IDs for our vehicle""" - status = self.mpstate.status + settings = self.mpstate.settings if hasattr(message, 'target_system'): - message.target_system = status.target_system + message.target_system = settings.target_system if hasattr(message, 'target_component'): - message.target_component = status.target_component + message.target_component = settings.target_component def __on_change(self, *args): for a in args:
Fixed the error "AttributeError: 'MPStatus' object has no attribute 'target_system'" when trying to send a mavlink message.
diff --git a/intranet/apps/eighth/notifications.py b/intranet/apps/eighth/notifications.py index <HASH>..<HASH> 100644 --- a/intranet/apps/eighth/notifications.py +++ b/intranet/apps/eighth/notifications.py @@ -59,7 +59,7 @@ def signup_status_email(user, next_blocks): def absence_email(signup): user = signup.user - em = user.tj_email if user.tj_email else user.emails.first() if user.emails and user.emails.count() >= 1 else None + em = user.notification_email if em: emails = [em] else:
refactor(eighth): use user.notification_email for absence emails
diff --git a/frasco/request_params.py b/frasco/request_params.py index <HASH>..<HASH> 100644 --- a/frasco/request_params.py +++ b/frasco/request_params.py @@ -149,8 +149,7 @@ class RequestParam(object): return value.lower() not in ('False', 'false', 'no', '0') return bool(value) return type(value) - except Exception as e: - current_app.log_exception(e) + except: abort(400) def load(self, *values): diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup, find_packages setup( name='frasco', - version='1.0.12', + version='1.0.13', url='http://github.com/digicoop/frasco', license='MIT', author='Maxime Bouroumeau-Fuseau',
Remove exception logging when coercing value in request params
diff --git a/js/fcoin.js b/js/fcoin.js index <HASH>..<HASH> 100644 --- a/js/fcoin.js +++ b/js/fcoin.js @@ -209,7 +209,7 @@ module.exports = class fcoin extends Exchange { async fetchOrderBook (symbol = undefined, limit = undefined, params = {}) { await this.loadMarkets (); if (typeof limit !== 'undefined') { - if ((limit === 20) && (limit === 100)) { + if ((limit === 20) || (limit === 100)) { limit = 'L' + limit.toString (); } else { throw new ExchangeError (this.id + ' fetchOrderBook supports limit of 20, 100 or no limit. Other values are not accepted');
fcoin fetchOrderBook limit fix in the source js file
diff --git a/website/pages/en/index.js b/website/pages/en/index.js index <HASH>..<HASH> 100755 --- a/website/pages/en/index.js +++ b/website/pages/en/index.js @@ -400,7 +400,7 @@ const UsersSection = ({ language }) => { <img src="/images/npm_grey.svg" style={{ height: "100px" }} /> </a> <div style={{ marginLeft: ".7em", width: "260px" }}> - <p>More than 800 tools and integrations on npm</p> + <p>More than 900 tools and integrations on npm</p> <Button href="https://www.npmjs.com/browse/depended/prettier"> Install Them </Button> @@ -415,7 +415,7 @@ const UsersSection = ({ language }) => { <img src="/images/github_grey.svg" style={{ height: "100px" }} /> </a> <div style={{ marginLeft: ".7em", width: "260px" }}> - <p>More than 100,000 dependent repositories on GitHub</p> + <p>More than 130,000 dependent repositories on GitHub</p> <Button href="https://github.com/prettier/prettier/network/dependents"> Check Them Out </Button>
Edit metrics as seen at NPM/GitHub network (#<I>)
diff --git a/Logger/PropelLogger.php b/Logger/PropelLogger.php index <HASH>..<HASH> 100644 --- a/Logger/PropelLogger.php +++ b/Logger/PropelLogger.php @@ -73,7 +73,7 @@ class PropelLogger public function crit($message) { if (null !== $this->logger) { - $this->logger->crit($message); + $this->logger->critical($message); } } @@ -85,7 +85,7 @@ class PropelLogger public function err($message) { if (null !== $this->logger) { - $this->logger->err($message); + $this->logger->error($message); } } @@ -97,7 +97,7 @@ class PropelLogger public function warning($message) { if (null !== $this->logger) { - $this->logger->warn($message); + $this->logger->warning($message); } }
[Monolog] Mark old non-PSR3 methods as deprecated
diff --git a/src/components/Table/head/__test__/header.spec.js b/src/components/Table/head/__test__/header.spec.js index <HASH>..<HASH> 100644 --- a/src/components/Table/head/__test__/header.spec.js +++ b/src/components/Table/head/__test__/header.spec.js @@ -10,7 +10,7 @@ document.addEventListener = jest.fn((event, cb) => { const preventDefault = jest.fn(); describe('<Header />', () => { - it('should set the right class names in th element when sortable, isSelected, and is resizable are passed', () => { + it('should set the right class names in th element when sortable and isSelected are passed and is resizable', () => { const component = mount( <Header sortable
fix: fix some typo (#<I>)
diff --git a/salt/minion.py b/salt/minion.py index <HASH>..<HASH> 100644 --- a/salt/minion.py +++ b/salt/minion.py @@ -422,6 +422,7 @@ class MinionBase(object): ' {0}'.format(opts['master'])) if opts['master_shuffle']: shuffle(opts['master']) + opts['auth_tries'] = 0 # if opts['master'] is a str and we have never created opts['master_list'] elif isinstance(opts['master'], str) and ('master_list' not in opts): # We have a string, but a list was what was intended. Convert.
Set auth retry count to 0 if multimaster mode is failover
diff --git a/builtin/providers/aws/resource_aws_cloudwatch_log_group.go b/builtin/providers/aws/resource_aws_cloudwatch_log_group.go index <HASH>..<HASH> 100644 --- a/builtin/providers/aws/resource_aws_cloudwatch_log_group.go +++ b/builtin/providers/aws/resource_aws_cloudwatch_log_group.go @@ -117,17 +117,15 @@ func resourceAwsCloudWatchLogGroupUpdate(d *schema.ResourceData, meta interface{ } log.Printf("[DEBUG] Setting retention for CloudWatch Log Group: %q: %s", name, input) _, err = conn.PutRetentionPolicy(&input) - if err != nil { - return err - } } else { log.Printf("[DEBUG] Deleting retention for CloudWatch Log Group: %q", name) _, err = conn.DeleteRetentionPolicy(&cloudwatchlogs.DeleteRetentionPolicyInput{ LogGroupName: aws.String(name), }) - if err != nil { - return err - } + } + + if err != nil { + return err } }
provider/aws: Removal of duplicate error handling code in cloudwatch_log_group cloudwatch_log_group
diff --git a/chassis/util/validators.py b/chassis/util/validators.py index <HASH>..<HASH> 100644 --- a/chassis/util/validators.py +++ b/chassis/util/validators.py @@ -1,7 +1,7 @@ """Parameter Parsing and Validation for Chassis Applications.""" import re - +import six class ValidationError(Exception): """Raised when validation fails.""" @@ -62,7 +62,7 @@ class Boolean(BaseValidator): message = "Valid boolean required" def validate(self, value): - if isinstance(value, basestring): + if isinstance(value, six.string_types): value = value.lower() if value in self.truthy: @@ -91,7 +91,7 @@ class String(BaseValidator): documentation=documentation) def validate(self, value): - if not isinstance(value, basestring): + if not isinstance(value, six.string_types): self.fail() length = len(value)
Use six to fix 2.x / 3.x compatibility issue
diff --git a/platform/html5/html.js b/platform/html5/html.js index <HASH>..<HASH> 100644 --- a/platform/html5/html.js +++ b/platform/html5/html.js @@ -233,7 +233,8 @@ ElementPrototype.updateStyle = function() { 'padding-left': 'px', 'padding-top': 'px', 'padding-right': 'px', - 'padding-bottom': 'px' + 'padding-bottom': 'px', + 'padding': 'px' } var cache = this._context._styleCache
paddings added to CSSUnits map
diff --git a/fcm_django/apps.py b/fcm_django/apps.py index <HASH>..<HASH> 100644 --- a/fcm_django/apps.py +++ b/fcm_django/apps.py @@ -6,3 +6,4 @@ from fcm_django.settings import FCM_DJANGO_SETTINGS as SETTINGS class FcmDjangoConfig(AppConfig): name = "fcm_django" verbose_name = SETTINGS["APP_VERBOSE_NAME"] + default_auto_field = "django.db.models.BigAutoField"
Use BigAutoField as the default ID
diff --git a/Library/Phalcon/Migrations.php b/Library/Phalcon/Migrations.php index <HASH>..<HASH> 100644 --- a/Library/Phalcon/Migrations.php +++ b/Library/Phalcon/Migrations.php @@ -800,9 +800,7 @@ class " . $className . " extends Migration\n" . $sqlInstructions = explode(';', $rawSql); foreach ($sqlInstructions as $instruction) { if ($instruction !== "" && strpos($instruction, '_pkey" ON') === false) { - if ($rawSql !== '') { - $sql[] = '$this->' . $dbAdapter . '->execute(\'' . $rawSql . '\');'; - } + $sql[] = '$this->' . $dbAdapter . '->execute(\'' . $instruction . '\');'; } } } else {
Create table - Duplicated SQL Create table SQL is duplicated as many times as $sqlInstructions array count. We should add $instruction not $rawSql to $sql array. Also remove unnecessary check " $rawSql !== '' " as we checked (above) that " $instruction !== '' " which is part of $rawSql
diff --git a/eth/backend.go b/eth/backend.go index <HASH>..<HASH> 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -200,10 +200,13 @@ func makeExtraData(extra []byte) []byte { // CreateDB creates the chain database. func CreateDB(ctx *node.ServiceContext, config *Config, name string) (ethdb.Database, error) { db, err := ctx.OpenDatabase(name, config.DatabaseCache, config.DatabaseHandles) + if err != nil { + return nil, err + } if db, ok := db.(*ethdb.LDBDatabase); ok { db.Meter("eth/db/chaindata/") } - return db, err + return db, nil } // CreateConsensusEngine creates the required type of consensus engine instance for an Ethereum service
eth: gracefully error if database cannot be opened
diff --git a/moban_handlebars/engine.py b/moban_handlebars/engine.py index <HASH>..<HASH> 100644 --- a/moban_handlebars/engine.py +++ b/moban_handlebars/engine.py @@ -1,6 +1,6 @@ import sys -from moban import utils, file_system +from moban import file_system from pybars import Compiler PY2 = sys.version_info[0] == 2 @@ -16,6 +16,7 @@ class EngineHandlebars(object): self.template_dirs = template_dirs def get_template(self, template_file): + template_file = file_system.to_unicode(template_file) fs = file_system.get_multi_fs(self.template_dirs) actual_file = fs.geturl(template_file, purpose='fs') content = file_system.read_unicode(actual_file)
:green_heart: python file system 2 hates str
diff --git a/java/server/src/org/openqa/grid/internal/utils/SelfRegisteringRemote.java b/java/server/src/org/openqa/grid/internal/utils/SelfRegisteringRemote.java index <HASH>..<HASH> 100644 --- a/java/server/src/org/openqa/grid/internal/utils/SelfRegisteringRemote.java +++ b/java/server/src/org/openqa/grid/internal/utils/SelfRegisteringRemote.java @@ -63,7 +63,7 @@ public class SelfRegisteringRemote { try { JsonObject hubParameters = getHubConfiguration(); if (hubParameters.has(RegistrationRequest.TIME_OUT)){ - int timeout = hubParameters.get(RegistrationRequest.TIME_OUT).getAsInt() / 1000; + int timeout = hubParameters.get(RegistrationRequest.TIME_OUT).getAsInt(); nodeConfig.getConfiguration().put(RegistrationRequest.TIME_OUT, timeout); } if (hubParameters.has(RegistrationRequest.BROWSER_TIME_OUT)) {
Grid: Fixing timeout issue again... Why isn't it covered by tests? A rhetorical question...
diff --git a/test/bibtex/test_bibliography.rb b/test/bibtex/test_bibliography.rb index <HASH>..<HASH> 100644 --- a/test/bibtex/test_bibliography.rb +++ b/test/bibtex/test_bibliography.rb @@ -288,17 +288,21 @@ module BibTeX @book{b1, title = {FOO}, year = {2013}, - author = {Doe, John}} + author = {Doe, John}, + pages = {1-2}} @book{b2, title = {BAR}, year = {2013}, - author = {Doe, John}} + author = {Doe, John}, + pages = {1-3}, + } END @b = BibTeX.parse <<-END @book{b3, title = {FOO}, year = {2013}, - author = {Doe, Jane}} + author = {Doe, John}, + pages = {1-2}} END end @@ -311,6 +315,11 @@ module BibTeX assert @a.length > @a.uniq!(:author).length end + describe 'with block' do + it 'removes duplicate entries and returns the bibliography' do + assert @a.length > @a.uniq!(:author){|d,e| d+'|'+e.pages_from}.length + end + end end describe 'given a filter' do
Test Bibliography#uniq! with block
diff --git a/spec/integration/environment_setup_spec.rb b/spec/integration/environment_setup_spec.rb index <HASH>..<HASH> 100644 --- a/spec/integration/environment_setup_spec.rb +++ b/spec/integration/environment_setup_spec.rb @@ -17,6 +17,6 @@ describe 'Setting up environment' do end end - expect(schema[:users]).to be_instance_of(Axiom::Relation::Variable) + expect(schema[:users]).to be_instance_of(Axiom::Relation::Variable::Materialized) end end diff --git a/spec/unit/rom/repository/element_writer_spec.rb b/spec/unit/rom/repository/element_writer_spec.rb index <HASH>..<HASH> 100644 --- a/spec/unit/rom/repository/element_writer_spec.rb +++ b/spec/unit/rom/repository/element_writer_spec.rb @@ -14,5 +14,5 @@ describe Repository, '#[]=' do it { should eq(relation) } - it { should be_instance_of(Axiom::Relation::Variable) } + it { should be_instance_of(Axiom::Relation::Variable::Materialized) } end
Update tests to pass with latest memory adapter
diff --git a/lib/gollum/public/gollum/javascript/editor/gollum.editor.js b/lib/gollum/public/gollum/javascript/editor/gollum.editor.js index <HASH>..<HASH> 100755 --- a/lib/gollum/public/gollum/javascript/editor/gollum.editor.js +++ b/lib/gollum/public/gollum/javascript/editor/gollum.editor.js @@ -217,7 +217,15 @@ type: 'POST', success: function(){ $editorBody.removeClass('uploading'); - var text = '[[/' + uploadDest + '/' + file.name + ']]'; + var ext = file.name.split('.').pop().toLowerCase() + var image_ext = ['jpg', 'jpeg', 'tif', 'tiff', 'png', 'gif', 'svg', 'bmp'] + // Link directly to image files + if ((image_ext.indexOf(ext) > -1)) { + var text = '[[/' + uploadDest + '/' + file.name + ']]'; + } else { + // Add file name to tag for non-image files, to avoid broken image thumbnail + var text = '[[' + file.name + '|/' + uploadDest + '/' + file.name + ']]'; + } window.ace_editor.insert(text); }, error: function(r, textStatus) {
Handle non-image uploads correctly
diff --git a/src/DataSource.js b/src/DataSource.js index <HASH>..<HASH> 100644 --- a/src/DataSource.js +++ b/src/DataSource.js @@ -167,6 +167,10 @@ function DataSourceInput(ds) { ds._data = ds._data.concat(delta.add); } + if (delta.sort) { + ds._data.sort(delta.sort); + } + // if reflowing, add any other tuples not currently in changeset if (input.reflow) { delta.mod = delta.mod.concat(
DataSourceInput should apply sort function. For example, if the delta is populated by DataSourceListener.
diff --git a/go/vt/vtgate/planbuilder/route.go b/go/vt/vtgate/planbuilder/route.go index <HASH>..<HASH> 100644 --- a/go/vt/vtgate/planbuilder/route.go +++ b/go/vt/vtgate/planbuilder/route.go @@ -37,11 +37,6 @@ var _ logicalPlan = (*route)(nil) type route struct { gen4Plan - // Redirect may point to another route if this route - // was merged with it. The Resolve function chases - // this pointer till the last un-redirected route. - Redirect *route - // Select is the AST for the query fragment that will be // executed by this route. Select sqlparser.SelectStatement
refactor: remove unused field
diff --git a/test/test_server.rb b/test/test_server.rb index <HASH>..<HASH> 100644 --- a/test/test_server.rb +++ b/test/test_server.rb @@ -1,7 +1,7 @@ require 'helper' class TestServer < Test::Unit::TestCase - should "probably rename this file and start testing for real" do - flunk "hey buddy, you should probably rename this file and start testing for real" + should "run the test suite successfully" do + assert_equal 4, 2*2 end end
Fixed unit test to assert true until I can start writing actual unit tests
diff --git a/mapillary_tools/uploader.py b/mapillary_tools/uploader.py index <HASH>..<HASH> 100644 --- a/mapillary_tools/uploader.py +++ b/mapillary_tools/uploader.py @@ -512,7 +512,7 @@ def upload_file(filepath, root, url, permission, signature, key=None): else: s3_key = key + s3_filename - parameters = {"key": s3_key, "AWSAccessKeyId": "AKIAI2X3BJAT2W75HILA", "acl": "private", + parameters = {"key": s3_key, "AWSAccessKeyId": "AKIAILU27ZWSOZX2FZ7Q", "acl": "private", "policy": permission, "signature": signature, "Content-Type": "image/jpeg"} with open(filepath, "rb") as f:
fix: update key for s3 upload
diff --git a/Service/Import/ImportManager.php b/Service/Import/ImportManager.php index <HASH>..<HASH> 100644 --- a/Service/Import/ImportManager.php +++ b/Service/Import/ImportManager.php @@ -14,6 +14,7 @@ namespace ONGR\TranslationsBundle\Service\Import; use Elasticsearch\Common\Exceptions\BadRequest400Exception; use ONGR\ElasticsearchBundle\Service\Manager; use ONGR\ElasticsearchBundle\Service\Repository; +use ONGR\ElasticsearchDSL\Query\MatchQuery; use ONGR\TranslationsBundle\Document\Message; use ONGR\TranslationsBundle\Document\Translation; use Symfony\Component\Finder\Finder; @@ -126,9 +127,10 @@ class ImportManager { foreach ($this->translations as $domain => $keys) { foreach ($keys as $key => $transMeta) { - $document = $this->translationsRepo->findOneBy(['key' => $key]); - - if ($document) { + $search = $this->translationsRepo->createSearch(); + $search->addQuery(new MatchQuery('key', $key)); + $results = $this->translationsRepo->findDocuments($search); + if (count($results)) { continue; }
use search with match instead of query string
diff --git a/cmd/minikube/cmd/config/config.go b/cmd/minikube/cmd/config/config.go index <HASH>..<HASH> 100644 --- a/cmd/minikube/cmd/config/config.go +++ b/cmd/minikube/cmd/config/config.go @@ -176,6 +176,12 @@ var settings = []Setting{ callbacks: []setFn{EnableOrDisableAddon}, }, { + name: "insecure-registry", + set: SetBool, + validations: []setFn{IsValidAddon}, + callbacks: []setFn{EnableOrDisableAddon}, + }, + { name: "registry", set: SetBool, validations: []setFn{IsValidAddon},
[FEATURE] allow to set container-runtime via config
diff --git a/lib/httpServer/transports/http/index.js b/lib/httpServer/transports/http/index.js index <HASH>..<HASH> 100644 --- a/lib/httpServer/transports/http/index.js +++ b/lib/httpServer/transports/http/index.js @@ -626,7 +626,7 @@ function requestHandler(req, res) { if (isAsterisk) { path = '*'; } else { - urlInfo = url.parse(req.url, true, true); + urlInfo = url.parse(req.url, true); path = safeDecodePath(urlInfo.pathname); route = routers.http.get(path);
url.parse: slashesDenoteHost should be false URL paths should never include a host; therefore, this option is not needed. Solves an issue where double-slashes prefixed calls would return <I> instead of being properly routed.
diff --git a/cirq/circuits/circuit.py b/cirq/circuits/circuit.py index <HASH>..<HASH> 100644 --- a/cirq/circuits/circuit.py +++ b/cirq/circuits/circuit.py @@ -2004,8 +2004,8 @@ class Circuit(AbstractCircuit): """Inserts operations inline at frontier. Args: - operations: the operations to insert - start: the moment at which to start inserting the operations + operations: The operations to insert. + start: The moment at which to start inserting the operations. frontier: frontier[q] is the earliest moment in which an operation acting on qubit q can be placed. """ diff --git a/cirq/circuits/qasm_output.py b/cirq/circuits/qasm_output.py index <HASH>..<HASH> 100644 --- a/cirq/circuits/qasm_output.py +++ b/cirq/circuits/qasm_output.py @@ -167,6 +167,18 @@ class QasmOutput: precision: int = 10, version: str = '2.0', ) -> None: + """Representation of a circuit in QASM format. + + Args: + operations: Tree of operations to insert. + qubits: The qubits used in the operations. + header: A multi-line string that is placed in a comment at the top + of the QASM. + precision: The number of digits after the decimal to show for + numbers in the QASM code. + version: The QASM version to target. Objects may return different + QASM depending on version. + """ self.operations = tuple(ops.flatten_to_ops(operations)) self.qubits = qubits self.header = header
Add docstring for cirq.QasmOutput (#<I>) Adds docstring for `cirq.QasmOutput` and fixes formatting. Fixes #<I>.
diff --git a/lib/command/CommandClient.js b/lib/command/CommandClient.js index <HASH>..<HASH> 100644 --- a/lib/command/CommandClient.js +++ b/lib/command/CommandClient.js @@ -237,7 +237,8 @@ class CommandClient extends Client { } catch(err) {} // eslint-disable-line no-empty break; } - case "edit": { + case "edit": + default: { try { const resp = await action.execute(msg, activeMessage.args, userID); if(resp != null) {
Handle un-typed reaction buttons
diff --git a/src/main/java/org/opensextant/solrtexttagger/TermPrefixCursor.java b/src/main/java/org/opensextant/solrtexttagger/TermPrefixCursor.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/opensextant/solrtexttagger/TermPrefixCursor.java +++ b/src/main/java/org/opensextant/solrtexttagger/TermPrefixCursor.java @@ -77,7 +77,7 @@ class TermPrefixCursor { } else { // subsequent advance //append to existing assert !bufNeedsToBeCopied; - prefixBuf.grow(1 + word.length); + prefixBuf.grow(prefixBuf.length + 1 + word.length); prefixBuf.bytes[prefixBuf.length++] = SEPARATOR_CHAR; prefixBuf.append(word); if (seekPrefix()) {
Fixed ArrayIndexOutOfBoundsException reported by @mubaldino due to the prefixBuf array not growing sufficiently large.
diff --git a/src/Composer/Repository/Vcs/GitDriver.php b/src/Composer/Repository/Vcs/GitDriver.php index <HASH>..<HASH> 100644 --- a/src/Composer/Repository/Vcs/GitDriver.php +++ b/src/Composer/Repository/Vcs/GitDriver.php @@ -154,9 +154,9 @@ class GitDriver extends VcsDriver if (null === $this->tags) { $this->tags = array(); - $this->process->execute('git show-ref --tags', $output, $this->repoDir); + $this->process->execute('git show-ref --tags --dereference', $output, $this->repoDir); foreach ($output = $this->process->splitLines($output) as $tag) { - if ($tag && preg_match('{^([a-f0-9]{40}) refs/tags/(\S+)$}', $tag, $match)) { + if ($tag && preg_match('{^([a-f0-9]{40}) refs/tags/(\S+?)(\^\{\})?$}', $tag, $match)) { $this->tags[$match[2]] = $match[1]; } }
Fix handling of annotated tags and prefer them over lightweight tags, fixes #<I>
diff --git a/src/Asserts/EloquentAsserts.php b/src/Asserts/EloquentAsserts.php index <HASH>..<HASH> 100644 --- a/src/Asserts/EloquentAsserts.php +++ b/src/Asserts/EloquentAsserts.php @@ -92,7 +92,7 @@ trait EloquentAsserts $this->assertInstanceOf(BelongsTo::class, $belongsToRelation); $parentModel = $belongsToRelation->getRelated(); - $parentKey = $belongsToRelation->getOwnerKey(); + $parentKey = $parentModel->getKeyName(); $childForeignKey = $belongsToRelation->getForeignKey(); $parent = factory(get_class($parentModel))->create();
ITT: `assertEloquentBelongsTo` minor refactorings.
diff --git a/src/HTML5DOMDocument.php b/src/HTML5DOMDocument.php index <HASH>..<HASH> 100644 --- a/src/HTML5DOMDocument.php +++ b/src/HTML5DOMDocument.php @@ -107,7 +107,7 @@ class HTML5DOMDocument extends \DOMDocument $source = preg_replace('/&([a-zA-Z]*);/', 'html5-dom-document-internal-entity1-$1-end', $source); $source = preg_replace('/&#([0-9]*);/', 'html5-dom-document-internal-entity2-$1-end', $source); - $result = parent::loadHTML('<?xml encoding="utf-8" ?>' . $source, $options | LIBXML_NOENT); + $result = parent::loadHTML('<?xml encoding="utf-8" ?>' . $source, $options); if ($internalErrorsOptionValue === false) { libxml_use_internal_errors(false); }
LIBXML_NOENT is now not added by default.
diff --git a/js/browser.js b/js/browser.js index <HASH>..<HASH> 100644 --- a/js/browser.js +++ b/js/browser.js @@ -1807,6 +1807,11 @@ Browser.prototype.xfrmTier = function(tier, x , xs) { // Browser.prototype.spaceCheck = function(dontRefresh) { + if (!this.knownSpace || this.knownSpace.chr !== this.chr) { + this.refresh(); + return; + } + var width = ((this.viewEnd - this.viewStart)|0) + 1; var minExtraW = (width * this.minExtra) | 0; var maxExtraW = (width * this.maxExtra) | 0; @@ -1922,7 +1927,7 @@ Browser.prototype.setLocation = function(newMin, newMax, newChr) { this.updateRegion(); this.karyo.update(this.chr, this.viewStart, this.viewEnd); - this.refresh(); + this.spaceCheck(); this.xfrmTiers(this.tabMargin - ((1.0 * (this.viewStart - this.origin)) * this.scale), 1); // FIXME currently needed to set the highlight (!) this.storeStatus(); }
setLocation now does a spaceCheck instead of a refresh.
diff --git a/tilequeue/query/rawr.py b/tilequeue/query/rawr.py index <HASH>..<HASH> 100644 --- a/tilequeue/query/rawr.py +++ b/tilequeue/query/rawr.py @@ -1,5 +1,6 @@ from collections import namedtuple, defaultdict from shapely.geometry import box +from shapely.geometry import MultiLineString from shapely.geometry.polygon import orient from shapely.wkb import loads as wkb_loads from tilequeue.query.common import layer_properties @@ -603,7 +604,6 @@ def _lines_only(shape): between a line and a polygon. The main idea is to remove points, and any other geometry which might throw a wrench in the works. """ - from shapely.geometry import MultiLineString lines = _explode_lines(shape) if len(lines) == 1:
Move MultiLineString import to top.
diff --git a/lib/weechat/utilities.rb b/lib/weechat/utilities.rb index <HASH>..<HASH> 100644 --- a/lib/weechat/utilities.rb +++ b/lib/weechat/utilities.rb @@ -14,8 +14,17 @@ module Weechat return Weechat::WEECHAT_RC_OK end def self.apply_transformation(property, value, transformations) - transformation = transformations.find {|properties, transformation| - properties.include?(property.to_sym) + transformation = transformations.find {|properties, transformations| + properties.any? {|prop| + case prop + when Regexp + prop =~ property.to_s + when String, Symbol + prop.to_sym == property.to_sym + else + false + end + } } if transformation
refactored transformations to also support regexps
diff --git a/cmd/torrent/main.go b/cmd/torrent/main.go index <HASH>..<HASH> 100644 --- a/cmd/torrent/main.go +++ b/cmd/torrent/main.go @@ -27,8 +27,16 @@ var ( upload = flag.Bool("upload", true, "upload data to peers") ) +func usage() { + fmt.Fprintf(os.Stderr, "Usage: %s [flags] (magnet URI or .torrent file path)...\n", os.Args[0]) + os.Stderr.WriteString("Download using the BitTorrent network.\n") + + flag.PrintDefaults() +} + func main() { log.SetFlags(log.LstdFlags | log.Lshortfile) + flag.Usage = usage flag.Parse() client, err := torrent.NewClient(&torrent.Config{ DataDir: *downloadDir,
cmd/torrent: Nicer usage
diff --git a/debugtools/templatetags/debug_tags.py b/debugtools/templatetags/debug_tags.py index <HASH>..<HASH> 100644 --- a/debugtools/templatetags/debug_tags.py +++ b/debugtools/templatetags/debug_tags.py @@ -6,6 +6,7 @@ __author__ = "Diederik van der Boor" __license__ = "Apache License, Version 2" from django.core import context_processors +from django.core.exceptions import ObjectDoesNotExist from django.core.serializers import serialize from django.db.models.query import QuerySet from django.forms.forms import BoundField @@ -123,13 +124,13 @@ def _dump_var(object): if isinstance(value, property): try: attrs[name] = getattr(object, name) - except (TypeError, AttributeError) as e: + except (TypeError, AttributeError, ObjectDoesNotExist) as e: attrs[name] = e # Include representations which are relevant in template context. try: attrs['__str__'] = smart_str(object) # smart_str() avoids crashes because of unicode chars. - except (TypeError, AttributeError) as e: + except (TypeError, AttributeError, ObjectDoesNotExist) as e: attrs['__str__'] = e if hasattr(object, '__iter__'):
Trap ObjectDoesNotExist as well, to print inherited models properly.
diff --git a/pymatgen/io/cif.py b/pymatgen/io/cif.py index <HASH>..<HASH> 100644 --- a/pymatgen/io/cif.py +++ b/pymatgen/io/cif.py @@ -31,10 +31,6 @@ from pymatgen.electronic_structure.core import Magmom from pymatgen.core.operations import MagSymmOp from pymatgen.symmetry.maggroups import MagneticSpaceGroup -try: - from pybtex.database import BibliographyData, Entry -except ImportError: - BibliographyData, Entry = None, None """ Wrapper classes for Cif input and output from Structures. @@ -1111,7 +1107,6 @@ class CifParser: raise ValueError("Invalid cif file with no structures!") return structures - @requires(BibliographyData, "Bibliographic data extraction requires pybtex.") def get_bibtex_string(self): """ Get BibTeX reference from CIF file. @@ -1119,6 +1114,11 @@ class CifParser: :return: BibTeX string """ + try: + from pybtex.database import BibliographyData, Entry + except ImportError: + raise RuntimeError("Bibliographic data extraction requires pybtex.") + bibtex_keys = {'author': ('_publ_author_name', '_citation_author_name'), 'title': ('_publ_section_title', '_citation_title'), 'journal': ('_journal_name_full', '_journal_name_abbrev',
Move pybtex import into get_bibtex_string and simply fail instead of having a warning. Fixes #<I>
diff --git a/galpy/df/quasiisothermaldf.py b/galpy/df/quasiisothermaldf.py index <HASH>..<HASH> 100644 --- a/galpy/df/quasiisothermaldf.py +++ b/galpy/df/quasiisothermaldf.py @@ -1757,7 +1757,7 @@ class quasiisothermaldf(df): if self._voSet: out[:,2:5]= units.Quantity(out[:,2:5]*self._vo,unit=units.km/units.s) if self._roSet: - out[:,0:2]= units.Quantity(out[:,0:2]*self._ro,unit=units.km) + out[:,0:2]= units.Quantity(out[:,0:2]*self._ro,unit=units.kpc) return out @actionAngle_physical_input
fixed an error with R in unit of kpc
diff --git a/lib/middleware.js b/lib/middleware.js index <HASH>..<HASH> 100644 --- a/lib/middleware.js +++ b/lib/middleware.js @@ -110,7 +110,7 @@ module.exports = function(options){ fs.writeFile(cssPath, css, 'utf8', next); }); }, { - include_paths: [ sassDir ].concat(options.include_paths || []), + include_paths: [ sassDir ].concat(options.include_paths || options.includePaths || []), output_style: options.output_style || options.outputStyle }); });
added support for includePaths as well as include_paths to middleware.js
diff --git a/lib/jss.rb b/lib/jss.rb index <HASH>..<HASH> 100644 --- a/lib/jss.rb +++ b/lib/jss.rb @@ -52,7 +52,7 @@ module JSS require 'digest' require 'yaml' require 'open3' - require 'english' + require 'English' ################### ### Gems
Update jss.rb for immediate release
diff --git a/rlp/encode.go b/rlp/encode.go index <HASH>..<HASH> 100644 --- a/rlp/encode.go +++ b/rlp/encode.go @@ -45,12 +45,6 @@ type Encoder interface { EncodeRLP(io.Writer) error } -// ListSize returns the encoded size of an RLP list with the given -// content size. -func ListSize(contentSize uint64) uint64 { - return uint64(headsize(contentSize)) + contentSize -} - // Encode writes the RLP encoding of val to w. Note that Encode may // perform many small writes in some cases. Consider making w // buffered. diff --git a/rlp/raw.go b/rlp/raw.go index <HASH>..<HASH> 100644 --- a/rlp/raw.go +++ b/rlp/raw.go @@ -28,6 +28,12 @@ type RawValue []byte var rawValueType = reflect.TypeOf(RawValue{}) +// ListSize returns the encoded size of an RLP list with the given +// content size. +func ListSize(contentSize uint64) uint64 { + return uint64(headsize(contentSize)) + contentSize +} + // Split returns the content of first RLP value and any // bytes after the value as subslices of b. func Split(b []byte) (k Kind, content, rest []byte, err error) {
rlp: move ListSize to raw.go
diff --git a/build/transpile.js b/build/transpile.js index <HASH>..<HASH> 100644 --- a/build/transpile.js +++ b/build/transpile.js @@ -33,12 +33,14 @@ const commonRegexes = [ [ /\.deepExtend\s/g, '.deep_extend'], [ /\.safeFloat2\s/g, '.safe_float_2'], [ /\.safeInteger2\s/g, '.safe_integer_2'], + [ /\.safeIntegerProduct2\s/g, '.safe_integer_product_2'], [ /\.safeString2\s/g, '.safe_string_2'], [ /\.safeStringLower2\s/g, '.safe_string_lower_2'], [ /\.safeStringUpper2\s/g, '.safe_string_upper_2'], [ /\.safeValue2\s/g, '.safe_value_2'], [ /\.safeFloat\s/g, '.safe_float'], [ /\.safeInteger\s/g, '.safe_integer'], + [ /\.safeIntegerProduct\s/g, '.safe_integer_product'], [ /\.safeString\s/g, '.safe_string'], [ /\.safeStringLower\s/g, '.safe_string_lower'], [ /\.safeStringUpper\s/g, '.safe_string_upper'],
added safeIntegerProduct, safeIntegerProduct2 to build/transpile.js
diff --git a/girder/models/item.py b/girder/models/item.py index <HASH>..<HASH> 100644 --- a/girder/models/item.py +++ b/girder/models/item.py @@ -319,7 +319,8 @@ class Item(acl_mixin.AccessControlMixin, Model): item['meta'] = {} for field in fields: - del item['meta'][field] + if field in item['meta']: + del item['meta'][field] item['updated'] = datetime.datetime.utcnow()
Ignore deletion fields that are not present in the metadata
diff --git a/src/Traits/HasTranslations.php b/src/Traits/HasTranslations.php index <HASH>..<HASH> 100644 --- a/src/Traits/HasTranslations.php +++ b/src/Traits/HasTranslations.php @@ -70,4 +70,15 @@ trait HasTranslations return array_replace(parent::attributesToArray(), array_combine($keys, $values)); } + + /** + * Merge new translatable with existing translatable on the model. + * + * @param array $translatable + * @return void + */ + public function mergeTranslatable($translatable) + { + $this->translatable = array_merge($this->translatable, $translatable); + } }
Update HasTranslations.php (#<I>) This method allow merge translatable from extend class. It works like mergeCasts or mergeFillable methods.
diff --git a/lap/tests/test_arr_loop.py b/lap/tests/test_arr_loop.py index <HASH>..<HASH> 100755 --- a/lap/tests/test_arr_loop.py +++ b/lap/tests/test_arr_loop.py @@ -34,6 +34,7 @@ def prepare_sparse_cost(shape, cc, ii, jj, cost_limit): order = np.lexsort((jj_, ii_)) cc_ = cc_[order] kk_ = jj_[order] + ii_ = ii_.astype(np.intp) ii_ = np.bincount(ii_, minlength=shape[0]-1) ii_ = np.r_[[0], np.cumsum(ii_)] ii_ = ii_.astype(np.uint32)
Patch test failure on <I> bits.
diff --git a/test/index.js b/test/index.js index <HASH>..<HASH> 100644 --- a/test/index.js +++ b/test/index.js @@ -385,7 +385,7 @@ describe('sendEmail', function(){ }); it('should callback an error', function(done){ - this.timeout(5000); + this.timeout(10000); var calledTimes = 0; email.send(function (err) { calledTimes++; @@ -404,6 +404,7 @@ describe('sendEmail', function(){ key: process.env.NODE_SES_KEY , secret: process.env.NODE_SES_SECRET }); + this.timeout(10000); client.sendemail({ from: 'noreply@learnboost.com' @@ -565,7 +566,7 @@ describe('sendRawEmail', function(){ }); it('should callback an error', function(done){ - this.timeout(5000); + this.timeout(10000); var calledTimes = 0; email.send(function (err) { calledTimes++;
Increase remote AWS timeouts to allow tests to run on slower connections.
diff --git a/gems/aws-sdk-core/spec/aws/plugins/region_endpoint_spec.rb b/gems/aws-sdk-core/spec/aws/plugins/region_endpoint_spec.rb index <HASH>..<HASH> 100644 --- a/gems/aws-sdk-core/spec/aws/plugins/region_endpoint_spec.rb +++ b/gems/aws-sdk-core/spec/aws/plugins/region_endpoint_spec.rb @@ -35,7 +35,7 @@ module Aws expect(client_class.new.config.region).to eq('region-fallback2') end - it 'prefers AWS_DEFAULT_REGION to AWS_REGION or AMAZON_REGION' do + it 'prefers AWS_REGION to AMAZON_REGION or AWS_DEFAULT_REGION' do env['AWS_REGION'] = 'aws-region' env['AMAZON_REGION'] = 'amazon-region' env['AWS_DEFAULT_REGION'] = 'aws-default-region'
Fix the wrong description in spec test (#<I>)
diff --git a/pyqode/core/modes/outline.py b/pyqode/core/modes/outline.py index <HASH>..<HASH> 100644 --- a/pyqode/core/modes/outline.py +++ b/pyqode/core/modes/outline.py @@ -53,8 +53,12 @@ class OutlineMode(Mode, QtCore.QObject): self._jobRunner.request_job(self._run_analysis) def _run_analysis(self): - if self.enabled and self.editor and self.editor.toPlainText() and \ - self.editor.file: + try: + self.editor.toPlainText() + except RuntimeError: + # called by the timer after the editor got deleted + return + if self.enabled and self.editor.file: request_data = { 'code': self.editor.toPlainText(), 'path': self.editor.file.path,
Fix runtime error if editor got deleted before running the analysis This happen in OpenCobolIDE if user quickly open and close the preferences dialog.
diff --git a/glances/static_list.py b/glances/static_list.py index <HASH>..<HASH> 100644 --- a/glances/static_list.py +++ b/glances/static_list.py @@ -54,7 +54,7 @@ class GlancesStaticServer(object): for s in ['name', 'port', 'alias']: new_server[s] = config.get_value(self._section, '%s%s' % (postfix, s)) if new_server['name'] is not None: - # Manage optionnal information + # Manage optional information if new_server['port'] is None: new_server['port'] = '61209' new_server['username'] = 'glances'
docs: fix simple typo, optionnal -> optional There is a small typo in glances/static_list.py. Should read `optional` rather than `optionnal`.
diff --git a/GCR.py b/GCR.py index <HASH>..<HASH> 100644 --- a/GCR.py +++ b/GCR.py @@ -261,8 +261,10 @@ class BaseGenericCatalog(object): Return the first available quantity in the input arguments. Raise an error if none of them is available. """ - for q in quantities: + for i, q in enumerate(quantities): if self.has_quantity(q): + if i: + warnings.warn('{} not available; using {} instead'.format(quantities[0], q)) return q raise ValueError('None of these quantities exists')
warn if first choice is not available
diff --git a/examples/src/main/java/boofcv/examples/sfm/ExampleMultiviewSceneReconstruction.java b/examples/src/main/java/boofcv/examples/sfm/ExampleMultiviewSceneReconstruction.java index <HASH>..<HASH> 100644 --- a/examples/src/main/java/boofcv/examples/sfm/ExampleMultiviewSceneReconstruction.java +++ b/examples/src/main/java/boofcv/examples/sfm/ExampleMultiviewSceneReconstruction.java @@ -97,13 +97,11 @@ public class ExampleMultiviewSceneReconstruction { // Configure bundle adjustment ConfigTrustRegion configTR = new ConfigTrustRegion(); configTR.regionInitial = 1; - configTR.scalingMinimum=1e-5; - configTR.scalingMaximum=1e5; + configTR.hessianScaling = true; ConfigLevenbergMarquardt configLM = new ConfigLevenbergMarquardt(); configLM.dampeningInitial = 1e-12; - configLM.scalingMinimum=1e-5; - configLM.scalingMaximum=1e5; + configLM.hessianScaling = true; BundleAdjustmentSchur_DSCC sba = new BundleAdjustmentSchur_DSCC(configTR); // BundleAdjustmentShur_DSCC sba = new BundleAdjustmentShur_DSCC(configLM);
updated for change in ddogleg
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -5,19 +5,19 @@ try: import pypandoc long_description = pypandoc.convert('README.md', 'rst') except(IOError, ImportError): - long_description = open('README.md').read() + long_description = '' setup( name='julian', packages=['julian'], - version='0.13', + version='0.14', description='Simple library for converting between Julian calendar dates and datetime objects', long_description=long_description, author='Daniel Zawada', author_email='zawadadaniel@gmail.com', url='https://github.com/dannyzed/julian', - download_url='https://github.com/dannyzed/julian/tarball/0.13', + download_url='https://github.com/dannyzed/julian/tarball/0.14', keywords=['julian', 'calendar', 'datetime'], classifiers=[], ) \ No newline at end of file
Update to not use description if pandoc is not available
diff --git a/lib/service/service.go b/lib/service/service.go index <HASH>..<HASH> 100644 --- a/lib/service/service.go +++ b/lib/service/service.go @@ -1588,12 +1588,14 @@ func (process *TeleportProcess) initSSH() error { warnOnErr(s.Shutdown(payloadContext(payload))) } } - if conn.UseTunnel() { + if conn != nil && conn.UseTunnel() { agentPool.Stop() } - // Close BPF service. - warnOnErr(ebpf.Close()) + if ebpf != nil { + // Close BPF service. + warnOnErr(ebpf.Close()) + } log.Infof("Exited.") })
Prevent nil pointer panic on node shutdown If node hasn't fully initialized before getting stopped (such as when join token isn't valid), most pointer vars in `initSSH` will be nil. Handle that cleanly.
diff --git a/org/xbill/DNS/Record.java b/org/xbill/DNS/Record.java index <HASH>..<HASH> 100644 --- a/org/xbill/DNS/Record.java +++ b/org/xbill/DNS/Record.java @@ -523,25 +523,41 @@ hashCode() { return array.hashCode(); } +private Record +cloneRecord() { + try { + return (Record) clone(); + } + catch (CloneNotSupportedException e) { + throw new IllegalStateException(); + } +} + /** * Creates a new record identical to the current record, but with a different * name. This is most useful for replacing the name of a wildcard record. */ public Record withName(Name name) { - Record rec = null; if (!name.isAbsolute()) throw new RelativeNameException(name); - try { - rec = (Record) clone(); - } - catch (CloneNotSupportedException e) { - } + Record rec = cloneRecord(); rec.name = name; return rec; } /** + * Creates a new record identical to the current record, but with a different + * class. This is most useful for dynamic update. + */ +Record +withDClass(short dclass) { + Record rec = cloneRecord(); + rec.dclass = dclass; + return rec; +} + +/** * Compares this Record to another Object. * @param o The Object to be compared. * @return The value 0 if the argument is a record equivalent to this record;
Add a method to create a clone of a record with a different class. git-svn-id: <URL>
diff --git a/colo.js b/colo.js index <HASH>..<HASH> 100644 --- a/colo.js +++ b/colo.js @@ -38,7 +38,7 @@ } console.log.apply(console, args); }; - if (typeof define === 'undefined' && define.amd) { + if (typeof define !== 'undefined' && define.amd) { // amd define(function() { return {
Fixes check for AMD support.
diff --git a/check50.py b/check50.py index <HASH>..<HASH> 100755 --- a/check50.py +++ b/check50.py @@ -346,8 +346,12 @@ class TestCase(unittest.TestCase): def hash(self, filename): """Hashes a file using SHA-256.""" + + # Assert that file exists. if type(filename) == File: filename = filename.filename + self.exists(filename) + # https://stackoverflow.com/a/22058673 sha256 = hashlib.sha256() with open(filename, "rb") as f:
Add assertion that file to be hashed exists
diff --git a/siggen/cmd_fetch_data.py b/siggen/cmd_fetch_data.py index <HASH>..<HASH> 100644 --- a/siggen/cmd_fetch_data.py +++ b/siggen/cmd_fetch_data.py @@ -192,6 +192,9 @@ def cmdline(): # list of text; e.g. ["browser"] 'additional_minidumps': glom(raw_crash, 'additional_minisumps', default=[]), + + # pull out the original signature if there was one + 'original_signature': glom(processed_crash, 'signature', default='') } print(json.dumps(crash_data, indent=2))
Add original_signature to crash_data This will get ignored by signify and signature generation, but it'll make it easier for us to compare one set of signatures to another set of signatures.
diff --git a/rake-tasks/gecko_sdks.rb b/rake-tasks/gecko_sdks.rb index <HASH>..<HASH> 100644 --- a/rake-tasks/gecko_sdks.rb +++ b/rake-tasks/gecko_sdks.rb @@ -40,7 +40,7 @@ class GeckoSDKs next ensure - rm_rf path if path && File.exist?(path) + rm_rf sdk if sdk && File.exist?(sdk) end end end @@ -74,7 +74,7 @@ class GeckoSDKs end end else - puts "Unpacking: #{File.basename path}" + puts "Unpacking: #{File.basename path} to #{destination}" sh "tar", "jxf", path, "-C", destination end end
EranMes: Delete the temporary SDK file, not the one we just extracted. r<I>
diff --git a/Twig/SyliusResourceExtension.php b/Twig/SyliusResourceExtension.php index <HASH>..<HASH> 100644 --- a/Twig/SyliusResourceExtension.php +++ b/Twig/SyliusResourceExtension.php @@ -63,7 +63,7 @@ class SyliusResourceExtension extends Twig_Extension { $label = null === $label ? $property : $label; $route = null === $route ? $this->request->attributes->get('_route') : $route; - $routeParameters = empty($routeParameters) ? $this->request->attributes->get('_route_parameters') : $routeParameters; + $routeParameters = empty($routeParameters) ? $this->request->attributes->get('_route_parameters', array()) : $routeParameters; $sorting = $this->request->get('sorting'); @@ -76,7 +76,7 @@ class SyliusResourceExtension extends Twig_Extension $order = null === $order ? 'asc' : $order; $url = $this->router->generate($route, array_merge( - array('sorting' => array($property => $order), $routeParameters) + array('sorting' => array($property => $order)), $routeParameters )); return sprintf('<a href="%s">%s</a>', $url, $label);
Fixed failed to build the route parameters in Twig extension
diff --git a/lib/active_scaffold/actions/mark.rb b/lib/active_scaffold/actions/mark.rb index <HASH>..<HASH> 100644 --- a/lib/active_scaffold/actions/mark.rb +++ b/lib/active_scaffold/actions/mark.rb @@ -13,10 +13,19 @@ module ActiveScaffold::Actions else do_demark_all end - do_list - respond_to_action(:list) + respond_to_action(:mark_all) end protected + + def mark_all_respond_to_html + do_list + list_respond_to_html + end + + def mark_all_respond_to_js + do_list + render :action => 'list.js' + end # We need to give the ActiveRecord classes a handle to currently marked records. We don't want to just pass the object, # because the object may change. So we give ActiveRecord a proc that ties to the @@ -46,5 +55,9 @@ module ActiveScaffold::Actions def mark_authorized? authorized_for?(:action => :read) end + + def mark_all_formats + (default_formats + active_scaffold_config.formats).uniq + end end end \ No newline at end of file
mark_all action get s its own respond methods
diff --git a/event.go b/event.go index <HASH>..<HASH> 100644 --- a/event.go +++ b/event.go @@ -10,10 +10,10 @@ import ( const maxEventPayloadSize = 10240 type Event struct { - Channel string `json:"channel"` - Name string `json:"name"` - Data string `json:"data"` - SocketId *string `json:"socket_id,omitempty"` + Channel string `json:"channel"` + Name string `json:"name"` + Data interface{} `json:"data"` + SocketId *string `json:"socket_id,omitempty"` } type eventPayload struct { @@ -60,7 +60,7 @@ func createTriggerBatchPayload(batch []Event, encryptionKey string) ([]byte, err } else { batch[idx].Data = string(dataBytes) } - if len(batch[idx].Data) > maxEventPayloadSize { + if len(batch[idx].Data.(string)) > maxEventPayloadSize { return nil, fmt.Errorf("Data of the event #%d in batch, must be smaller than 10kb", idx) } }
refactor TriggerBatch's Event.Data str->interface (#<I>) - it refactors TriggerBatch's API regarding Event.Data to be consistent with the Trigger's API , moving from a `string` type to a `interface{}` type. This allows any matching type to be passed in as a Payload.
diff --git a/lib/Doctrine/ODM/PHPCR/Translation/LocaleChooser/LocaleChooser.php b/lib/Doctrine/ODM/PHPCR/Translation/LocaleChooser/LocaleChooser.php index <HASH>..<HASH> 100644 --- a/lib/Doctrine/ODM/PHPCR/Translation/LocaleChooser/LocaleChooser.php +++ b/lib/Doctrine/ODM/PHPCR/Translation/LocaleChooser/LocaleChooser.php @@ -113,6 +113,11 @@ class LocaleChooser implements LocaleChooserInterface */ public function setLocale($locale) { + // Strip region from locale if not configured + if (! array_key_exists($locale, $this->localePreference) && strlen($locale) > 2) { + $locale = substr($locale, 0, 2); + } + if (! array_key_exists($locale, $this->localePreference)) { throw new \InvalidArgumentException("The locale '$locale' is not present in the list of available locales"); }
Avoid exception when locale contains region Strips the region from the locale code if only the country code has been configured
diff --git a/lib/externallib.php b/lib/externallib.php index <HASH>..<HASH> 100644 --- a/lib/externallib.php +++ b/lib/externallib.php @@ -644,7 +644,7 @@ class external_format_value extends external_value { . FORMAT_PLAIN . ' = PLAIN or ' . FORMAT_MARKDOWN . ' = MARKDOWN)'; - parent::__construct($type, $desc='', $required, $default); + parent::__construct(PARAM_INT, $desc, $required, $default); } }
MDL-<I> Web services : should force type of external_format_value structure
diff --git a/razorpay/utility/utility.py b/razorpay/utility/utility.py index <HASH>..<HASH> 100644 --- a/razorpay/utility/utility.py +++ b/razorpay/utility/utility.py @@ -6,7 +6,10 @@ class Utility(object): def __init__(self, client=None): self.client = client - def validate_signature(self, order_id, payment_id, razorpay_signature): + def validate_signature(self, parameters): + order_id = parameters['order_id'] + payment_id = parameters['payment_id'] + razorpay_signature = parameters['razorpay_signature'] msg = "{}|{}".format(order_id, payment_id) dig = hmac.new(key=self.client.auth[1], msg=msg,
[python-sdk] take params instead of individual ids
diff --git a/manticore/platforms/evm.py b/manticore/platforms/evm.py index <HASH>..<HASH> 100644 --- a/manticore/platforms/evm.py +++ b/manticore/platforms/evm.py @@ -2493,6 +2493,7 @@ class EVMWorld(Platform): raise TerminateState("REVERT", testcase=True) self.current.last_exception = None + self.current._push(0) # we are still on the CALL/CREATE self.current.pc += self.current.instruction.size
Push 0 on internal revert (#<I>)
diff --git a/packages/vaex-core/vaex/core/_version.py b/packages/vaex-core/vaex/core/_version.py index <HASH>..<HASH> 100644 --- a/packages/vaex-core/vaex/core/_version.py +++ b/packages/vaex-core/vaex/core/_version.py @@ -1,2 +1,2 @@ -__version_tuple__ = (0, 4, 4) -__version__ = '0.4.4' +__version_tuple__ = (0, 5, 0) +__version__ = '0.5.0'
Release <I> of vaex-core
diff --git a/diagnostics/diag.go b/diagnostics/diag.go index <HASH>..<HASH> 100644 --- a/diagnostics/diag.go +++ b/diagnostics/diag.go @@ -191,7 +191,11 @@ func (d *Diagnostics) getDiagnosticFromPeers(ctx context.Context, peers map[peer return } for d := range out { - respdata <- d + select { + case respdata <- d: + case <-ctx.Done(): + return + } } }(p) }
respect contexts when returning diagnostics responses License: MIT
diff --git a/qtmodern/windows.py b/qtmodern/windows.py index <HASH>..<HASH> 100644 --- a/qtmodern/windows.py +++ b/qtmodern/windows.py @@ -67,8 +67,6 @@ class ModernWindow(QWidget): self.setWindowTitle(w.windowTitle()) self.setGeometry(w.geometry()) - self.installEventFilter(self) - # Adding attribute to clean up the parent window when the child is closed self._w.setAttribute(Qt.WA_DeleteOnClose, True) self._w.destroyed.connect(self.__child_was_closed) @@ -146,13 +144,10 @@ class ModernWindow(QWidget): self._w = None # The child was deleted, remove the reference to it and close the parent window self.close() - def eventFilter(self, source, event): - if event.type() == QEvent.Close: - if not self._w: - return True - return self._w.close() - - return QWidget.eventFilter(self, source, event) + def closeEvent(self, event): + if not self._w: + return True + event.setAccepted(self._w.close()) def setWindowTitle(self, title): """ Set window title.
Set ModernWindow to set the event state equal to the child state
diff --git a/tests/unit/utils/network_test.py b/tests/unit/utils/network_test.py index <HASH>..<HASH> 100644 --- a/tests/unit/utils/network_test.py +++ b/tests/unit/utils/network_test.py @@ -251,8 +251,7 @@ class NetworkTestCase(TestCase): :return: ''' self.assertEqual(network._generate_minion_id(), - ['nodename', 'hostname', 'hostname.domainname.blank', - 'attrname', '1.2.3.4', '5.6.7.8']) + ['nodename', 'hostname', 'hostname.domainname.blank', '1.2.3.4', '5.6.7.8']) @patch('platform.node', MagicMock(return_value='hostname')) @patch('socket.gethostname', MagicMock(return_value='hostname'))
Test fix: look for attribute name only when other socket checks had failed
diff --git a/config/common.php b/config/common.php index <HASH>..<HASH> 100644 --- a/config/common.php +++ b/config/common.php @@ -16,6 +16,7 @@ return [ '@vendor/bower' => '@vendor/bower-asset', '@vendor/npm' => '@vendor/npm-asset', '@file' => '/file', + '@HIAM_SITE' => 'https://' . $params['hiam.site'], ], 'components' => [ 'cache' => [
Added `@HIAM_SITE` alias for better links to HIAM
diff --git a/vault/token_store.go b/vault/token_store.go index <HASH>..<HASH> 100644 --- a/vault/token_store.go +++ b/vault/token_store.go @@ -1308,9 +1308,7 @@ func (ts *TokenStore) handleCreateCommon( sysView := ts.System() - if role != nil && role.Period > 0 { - te.TTL = role.Period - } else if te.Period > 0 { + if te.Period > 0 { te.TTL = te.Period } else { // Set the default lease if not provided, root tokens are exempt
Don't check the role period again as we've checked it earlier and it may be greater than the te Period
diff --git a/js/bam/bamUtils.js b/js/bam/bamUtils.js index <HASH>..<HASH> 100644 --- a/js/bam/bamUtils.js +++ b/js/bam/bamUtils.js @@ -215,9 +215,11 @@ const BamUtils = { } if (refID < 0) { offset = blockEnd; - continue; // unmapped read + continue; // unmapped read, skip } else if (chrIdx !== undefined && (refID > chrIdx || pos > max)) { - return true; // off right edge, we're done + offset = blockEnd; + continue; + // return true; // off right edge, we're done } else if (chrIdx !== undefined && (refID < chrIdx)) { offset = blockEnd; continue; // ref ID to left of start, not sure this is possible
Possible workaround for issue #<I>
diff --git a/cerberus/cerberus.py b/cerberus/cerberus.py index <HASH>..<HASH> 100644 --- a/cerberus/cerberus.py +++ b/cerberus/cerberus.py @@ -285,10 +285,7 @@ class Validator(object): error = errors.ValidationError(document_path, schema_path, code, rule, constraint, value, info) - self._errors.append(error) - self._errors.sort() - self.document_error_tree += error - self.schema_error_tree += error + self._error([error]) def __get_child_validator(self, document_crumb=None, schema_crumb=None, **kwargs):
Reduces boilerplate for submitting errors
diff --git a/src/ChrisKonnertz/BBCode/BBCode.php b/src/ChrisKonnertz/BBCode/BBCode.php index <HASH>..<HASH> 100644 --- a/src/ChrisKonnertz/BBCode/BBCode.php +++ b/src/ChrisKonnertz/BBCode/BBCode.php @@ -67,9 +67,10 @@ class BBCode { * * @param string $text The BBCode string * @param bool $escape Escape HTML entities? (Only "<" and ">"!) + * @param bool $keepLines Replace line breaks? * @return string */ - public function render($text = null, $escape = true) + public function render($text = null, $escape = true, $keepLines = true) { if ($this->text !== null and $text === null) { $text = $this->text; @@ -89,6 +90,15 @@ class BBCode { for ($i = 0; $i < $len; $i++) { $char = $text[$i]; + if ($keepLines) { + if ($char == "\n") { + $html .= '<br/>'; + } + if ($char == "\r") { + continue; + } + } + if (! $escape or ($char != '<' and $char != '>')) { /* * $inTag == true means the current position is inside a tag
Can now convert line breaks "n\r\" to HTML breaks "<br/>"
diff --git a/commands/WebhookCommands.js b/commands/WebhookCommands.js index <HASH>..<HASH> 100644 --- a/commands/WebhookCommands.js +++ b/commands/WebhookCommands.js @@ -162,7 +162,7 @@ WebhookCommand.prototype = extend(BaseCommand.prototype, { data.event = eventName; data.url = url; data.deviceid = deviceID; - data.access_token = api._access_token; + //data.access_token = api._access_token; data.requestType = requestType || data.requestType; if (data.mydevices == undefined) { data.mydevices = true; diff --git a/lib/ApiClient.js b/lib/ApiClient.js index <HASH>..<HASH> 100644 --- a/lib/ApiClient.js +++ b/lib/ApiClient.js @@ -688,8 +688,10 @@ ApiClient.prototype = { var obj = { uri: this.baseUrl + "/v1/webhooks", method: "POST", - json: true, - form: obj + json: obj, + headers: { + "Authorization": "Bearer " + this._access_token + } }; console.log("Sending webhook request ", obj);
use a bearer token header so we can send this request as a JSON request, so we won't 'stringify' native types in the request body. Fixes <URL>
diff --git a/base62_test.go b/base62_test.go index <HASH>..<HASH> 100644 --- a/base62_test.go +++ b/base62_test.go @@ -127,7 +127,9 @@ func BenchmarkAppendDecodeBase62(b *testing.B) { id := []byte(New().String()) for i := 0; i != b.N; i++ { - appendDecodeBase62(a[:0], id) + b := [stringEncodedLength]byte{} + copy(b[:], id) + appendDecodeBase62(a[:0], b[:]) } }
fix appendDecodeBase<I> benchmark so it doesn't cause a memory allocation
diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index <HASH>..<HASH> 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -379,7 +379,7 @@ module ActiveRecord if options[:finder_sql] reflection.klass.find_by_sql(custom_finder_sql) else - find(:all) + scoped.all end records = options[:uniq] ? uniq(records) : records
Instead of doing find(:all) which does scoped.find(:all) which does scoped.all, just do scoped.all.
diff --git a/themes/pry-tepid-8.prytheme.rb b/themes/pry-tepid-8.prytheme.rb index <HASH>..<HASH> 100644 --- a/themes/pry-tepid-8.prytheme.rb +++ b/themes/pry-tepid-8.prytheme.rb @@ -0,0 +1,48 @@ +t = PryTheme.create name: 'pry-tepid-8', color_model: 8 do + author name: 'Kyrylo Silin', email: 'kyrylosilin@gmail.com' + description 'Warm colors with warm soul' + + define_theme do + class_ 'magenta' + class_variable 'magenta' + comment 'green' + constant 'magenta' + error 'black', 'magenta' + float 'green' + global_variable 'green' + inline_delimiter 'yellow' + instance_variable 'magenta' + integer 'green' + keyword 'yellow' + method 'yellow' + predefined_constant 'yellow' + symbol 'yellow' + + regexp do + self_ 'magenta' + char 'yellow' + content 'magenta' + delimiter 'magenta' + modifier 'yellow' + escape 'yellow' + end + + shell do + self_ 'magenta' + char 'yellow' + content 'magenta' + delimiter 'yellow' + escape 'yellow' + end + + string do + self_ 'magenta' + char 'yellow' + content 'magenta' + delimiter 'yellow' + escape 'yellow' + end + end +end + +PryTheme::ThemeList.add_theme(t)
Add "pry-tepid-8" theme
diff --git a/js/x-api.js b/js/x-api.js index <HASH>..<HASH> 100644 --- a/js/x-api.js +++ b/js/x-api.js @@ -62,6 +62,16 @@ H5P.XAPIEvent.prototype.setVerb = function(verb) { // Else: Fail silently... }; +H5P.XAPIEvent.prototype.getShortVerb = function() { + var statement = this.data.statement; + if ('verb' in statement) { + return statement.verb.id.slice(31); + } + else { + return null; + } +} + H5P.XAPIEvent.prototype.setObject = function(instance) { this.data.statement.object = { // TODO: Correct this. contentId might be vid
Add helper function to get verbs
diff --git a/components/popup/popup.js b/components/popup/popup.js index <HASH>..<HASH> 100644 --- a/components/popup/popup.js +++ b/components/popup/popup.js @@ -102,6 +102,7 @@ export default class Popup extends RingComponentWithShortcuts { }; static defaultProps = { + ['data-test']: 'ring-popup', shortcuts: true, hidden: false, onOutsideClick() {}, @@ -248,7 +249,7 @@ export default class Popup extends RingComponentWithShortcuts { }} > <div - data-test={this.props['data-test'] || 'ring-popup'} + data-test={this.props['data-test']} style={this.position()} ref={el => { this.popup = el;
RG-<I> Query assist popup always present in DOM with data-test='ring-popup' review fix Former-commit-id: <I>d<I>c<I>d<I>e1dfe<I>afcf7fcd<I>f<I>
diff --git a/src/view/helpers/contextMethods.js b/src/view/helpers/contextMethods.js index <HASH>..<HASH> 100644 --- a/src/view/helpers/contextMethods.js +++ b/src/view/helpers/contextMethods.js @@ -89,7 +89,7 @@ function getBinding () { } function setBinding ( value ) { - this.ractive.set( this.getBindingPath(), value ); + return this.ractive.set( this.getBindingPath(), value ); } // deprecated getters
return promise when setting bound value from context helper
diff --git a/third_party/forked/golang/reflect/deep_equal.go b/third_party/forked/golang/reflect/deep_equal.go index <HASH>..<HASH> 100644 --- a/third_party/forked/golang/reflect/deep_equal.go +++ b/third_party/forked/golang/reflect/deep_equal.go @@ -16,7 +16,7 @@ import ( // that type. type Equalities map[reflect.Type]reflect.Value -// For convenience, panics on errrors +// For convenience, panics on errors func EqualitiesOrDie(funcs ...interface{}) Equalities { e := Equalities{} if err := e.AddFuncs(funcs...); err != nil {
Fix Spelling error about [errrors]
diff --git a/rollbar-java/src/main/java/com/rollbar/notifier/util/ObjectsUtils.java b/rollbar-java/src/main/java/com/rollbar/notifier/util/ObjectsUtils.java index <HASH>..<HASH> 100644 --- a/rollbar-java/src/main/java/com/rollbar/notifier/util/ObjectsUtils.java +++ b/rollbar-java/src/main/java/com/rollbar/notifier/util/ObjectsUtils.java @@ -1,5 +1,8 @@ package com.rollbar.notifier.util; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.io.Closeable; import java.io.IOException; import java.util.Arrays; @@ -9,6 +12,8 @@ import java.util.Arrays; */ public class ObjectsUtils { + private static Logger logger = LoggerFactory.getLogger(ObjectsUtils.class); + public static boolean equals(Object object1, Object object2) { return object1 == object2 || object1 != null && object1.equals(object2); } @@ -31,7 +36,7 @@ public class ObjectsUtils { closeable.close(); } } catch (IOException e) { - e.printStackTrace(); + logger.error("Unable to close stream.", e); } } -} +} \ No newline at end of file
use a Logger for exceptions logging
diff --git a/spec/scheduler_spec.rb b/spec/scheduler_spec.rb index <HASH>..<HASH> 100644 --- a/spec/scheduler_spec.rb +++ b/spec/scheduler_spec.rb @@ -373,10 +373,10 @@ describe Rufus::Scheduler do it 'lists all the work threads in the pool' do @scheduler.in '0s' do - # nada + sleep(0.1) end @scheduler.in '0s' do - sleep(2) + sleep(2.0) end sleep 0.6 @@ -395,13 +395,13 @@ describe Rufus::Scheduler do it 'lists all the work threads in the pool' do @scheduler.in '0s' do - # nada + sleep(0.1) end @scheduler.in '0s' do - sleep(2) + sleep(2.0) end - sleep 0.4 + sleep 0.6 @scheduler.work_threads(:vacant).size.should == 1 end
fix scheduler_spec for Ruby <I>
diff --git a/session_security/urls.py b/session_security/urls.py index <HASH>..<HASH> 100644 --- a/session_security/urls.py +++ b/session_security/urls.py @@ -15,9 +15,12 @@ ie:: """ try: - from django.conf.urls import url + from django.urls import re_path as url except ImportError: - from django.conf.urls.defaults import url + try: + from django.conf.urls import url + except ImportError: + from django.conf.urls.defaults import url from .views import PingView
django.conf.urls.url() deprecated in Django <I> Results in the following warning: RemovedInDjango<I>Warning: django.conf.urls.url() is deprecated in favor of django.urls.re_path().
diff --git a/modules/custom/activity_creator/src/ActivityNotifications.php b/modules/custom/activity_creator/src/ActivityNotifications.php index <HASH>..<HASH> 100644 --- a/modules/custom/activity_creator/src/ActivityNotifications.php +++ b/modules/custom/activity_creator/src/ActivityNotifications.php @@ -106,7 +106,12 @@ class ActivityNotifications extends ControllerBase { elseif ($entity instanceof GroupContentInterface) { $linked_entity = $entity->getEntity(); $group = $entity->getGroup(); - if ($linked_entity->getEntityTypeId() === 'node' && $group->id()) { + // Contrary to what PHPStan says `getEntity` can return NULL within Open + // Social. This is because we're violating the group module's contract + // somewhere else. The maintainer of the group module has indicated the + // types are correct. + // See https://github.com/goalgorilla/open_social/pull/2948#issuecomment-1137102029 + if ($linked_entity !== NULL && $linked_entity->getEntityTypeId() === 'node' && $group->id()) { $entity_query = $this->entityTypeManager()->getStorage('activity')->getQuery(); $entity_query->condition('field_activity_entity.target_id', $linked_entity->id(), '='); $entity_query->condition('field_activity_entity.target_type', $linked_entity->getEntityTypeId(), '=');
Re-introduce an unneeded is NULL check It appears there's something in Open Social (our our tests) that makes `getEntity` return NULL even though it's not supposed to. This breaks all of our tests so we re-introduce the check with a comment for now and look at finding the root cause later.
diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/src/test/java/com/azure/resourcemanager/redis/RedisCacheOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-redis/src/test/java/com/azure/resourcemanager/redis/RedisCacheOperationsTests.java index <HASH>..<HASH> 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/src/test/java/com/azure/resourcemanager/redis/RedisCacheOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-redis/src/test/java/com/azure/resourcemanager/redis/RedisCacheOperationsTests.java @@ -203,6 +203,9 @@ public class RedisCacheOperationsTests extends RedisManagementTest { @Test public void canCRUDLinkedServers() throws Exception { + if (isPlaybackMode()) { + return; // TODO: fix playback random fail + } RedisCache rgg = redisManager
suppress random fail (#<I>)
diff --git a/sramongo/sra2mongo.py b/sramongo/sra2mongo.py index <HASH>..<HASH> 100644 --- a/sramongo/sra2mongo.py +++ b/sramongo/sra2mongo.py @@ -140,8 +140,7 @@ def fetch_sra(records, cache, runinfo_retmode='text', **kwargs): cache_runinfo = cache.get_cache(start, 'runinfo') if (cache_xml is not None) & (cache_runinfo is not None): - logger.info('Using cached {} to {} instead of downloading. ' - 'To force download please remove: {}'.format(start+1, end, cache.cachedir)) + logger.info('Using cached version for: {} to {}.'.format(start+1, end)) else: logger.info("Downloading record %i to %i" % (start+1, end)) attempt = 0 @@ -240,6 +239,7 @@ def main(): sra_query = query_sra(args.query) logger.info('Downloading documents') + logger.info('Saving to cache: {}'.format(cache.cachedir)) fetch_sra(sra_query, cache) logger.info('Adding documents to database')
Changes logging a little.