diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/icekit/api/base_tests.py b/icekit/api/base_tests.py index <HASH>..<HASH> 100644 --- a/icekit/api/base_tests.py +++ b/icekit/api/base_tests.py @@ -20,6 +20,7 @@ Image = apps.get_model('icekit_plugins_image.Image') class _BaseAPITestCase(APITestCase): API_NAME = None # Set to reverse-able name for API URLs API_IS_PUBLIC_READ = False + BASE_DATA = {} def __init__(self, *args, **kwargs): if not self.API_NAME: @@ -58,6 +59,11 @@ class _BaseAPITestCase(APITestCase): """ Pretty-print data to stdout, to help debugging unit tests """ print(json.dumps(data, indent=indent)) + def build_item_data(self, extend_data, base_data=None): + if base_data is None: + base_data = self.BASE_DATA + return dict(base_data, **extend_data) + def listing_url(self): """ Return the listing URL endpoint for this class's API """ return reverse('api:%s-list' % self.API_NAME)
#<I> Add test utility method to populate JSON data
diff --git a/snapshot/lib/snapshot/version.rb b/snapshot/lib/snapshot/version.rb index <HASH>..<HASH> 100644 --- a/snapshot/lib/snapshot/version.rb +++ b/snapshot/lib/snapshot/version.rb @@ -1,4 +1,4 @@ module Snapshot - VERSION = "1.16.0".freeze + VERSION = "1.16.1".freeze DESCRIPTION = "Automate taking localized screenshots of your iOS app on every device" end
[snapshot] Version bump - Updated xcpretty dependency - Updated spelling of _fastlane_
diff --git a/docs/simongesture.py b/docs/simongesture.py index <HASH>..<HASH> 100644 --- a/docs/simongesture.py +++ b/docs/simongesture.py @@ -10,6 +10,7 @@ import random, sys, time, pygame, math, moosegesture from pygame.locals import * +from moosegesture import UP, UPRIGHT, RIGHT, DOWNRIGHT, DOWN,DOWNLEFT, LEFT, UPLEFT FPS = 30 # frames per second. Increase to speed up the game. WINDOWWIDTH = 640 @@ -38,14 +39,6 @@ DOTRADIUS = 10 # size of dot MAXGESTURES = 100 # max number of gestures (no way the player will be able to memorize this many) # directional constants (made to be the same as moosegesture's -UP = 8 -UPRIGHT = 9 -RIGHT = 6 -DOWNRIGHT = 3 -DOWN = 2 -DOWNLEFT = 1 -LEFT = 4 -UPLEFT = 7 DIRECTIONS = (UP, UPRIGHT, RIGHT, DOWNRIGHT, DOWN, DOWNLEFT, LEFT, UPLEFT) # the blue hint arrow that shows what the most recent gesture the player made is.
Updated SimonGesture example to work with the moosegesture.py updates.
diff --git a/Renderer.js b/Renderer.js index <HASH>..<HASH> 100644 --- a/Renderer.js +++ b/Renderer.js @@ -207,7 +207,7 @@ Renderer.prototype.initNode = function (node) { node._globalTransform = Mat4.create() node._prevPosition = Vec3.copy(node.position) - if (node.mesh) { + if (node.mesh || node.vertexArray) { var material = node.material if (!material) { material = node.material = {} } if (!material.baseColorMap && (material.baseColor === undefined)) { material.baseColor = [0.95, 0.95, 0.95, 1] } @@ -218,8 +218,10 @@ Renderer.prototype.initNode = function (node) { // TODO: don't create mesh draw commands every frame node._drawCommand = cmdQueue.createDrawCommand({ - // TODO: implement vertex array support // vertexArray: isVertexArray ? meshNode.mesh : undefined, mesh: node.mesh, + vertexArray: node.vertexArray, + count: node.count, + primitiveType: node.primitiveType, modelMatrix: node._globalTransform, program: null, uniforms: material._uniforms,
Renderer added vertexArray rendering
diff --git a/django_freeradius/tests/base/test_models.py b/django_freeradius/tests/base/test_models.py index <HASH>..<HASH> 100644 --- a/django_freeradius/tests/base/test_models.py +++ b/django_freeradius/tests/base/test_models.py @@ -187,7 +187,7 @@ class BaseTestRadiusGroup(object): self.fail('ProtectedError not raised') def test_undefault_group(self): - group = self.radius_group_model.objects.get(default=1) + group = self.radius_group_model.objects.get(default=True) group.default = False try: group.full_clean()
[qa] Minor cleanup in test (1 > True)
diff --git a/pyramid_webassets/__init__.py b/pyramid_webassets/__init__.py index <HASH>..<HASH> 100644 --- a/pyramid_webassets/__init__.py +++ b/pyramid_webassets/__init__.py @@ -65,8 +65,15 @@ class PyramidResolver(Resolver): except ValueError as e: if ':' in item: e.message += '(%s)' % item - raise BundleError(e) + except AttributeError as e: # pragma: no cover + if e.message == "'NoneType' object has no attribute 'static_url'": + # render() has been called outside of a request + # e.g., to compile assets before handling requests + # and so failure is acceptable + pass + else: + raise class Environment(Environment): resolver_class = PyramidResolver
Allow render() to be called on a bundle outside of a request
diff --git a/src/cli/cms/editor/index.js b/src/cli/cms/editor/index.js index <HASH>..<HASH> 100755 --- a/src/cli/cms/editor/index.js +++ b/src/cli/cms/editor/index.js @@ -20,6 +20,7 @@ import { printInput, getAttributes, getLabel, + hint, createInputSource, createInputRich, createInputFile, @@ -58,6 +59,7 @@ export { printInput, getAttributes, getLabel, + hint, createInputSource, createInputRich, createInputFile,
enhancement: exposing the hint function to abe
diff --git a/src/scripts/dataset/dataset.store.js b/src/scripts/dataset/dataset.store.js index <HASH>..<HASH> 100644 --- a/src/scripts/dataset/dataset.store.js +++ b/src/scripts/dataset/dataset.store.js @@ -647,7 +647,7 @@ let datasetStore = Reflux.createStore({ this.updateDirectoryState(container._id, {children: children, loading: false}); }); } else { - file.modifiedName = container.dirPath + file.name; + file.modifiedName = container.dirPath ? container.dirPath + file.name : file.name; scitran.updateFile('projects', this.data.dataset._id, file, () => { let children = container.children; children.unshift({
Fix issue with adding files to base directory of a dataset.
diff --git a/scripts/test-isolated.js b/scripts/test-isolated.js index <HASH>..<HASH> 100755 --- a/scripts/test-isolated.js +++ b/scripts/test-isolated.js @@ -95,6 +95,7 @@ globby(patterns).then(paths => { FORCE_COLOR: '1', HOME: process.env.HOME, PATH: process.env.PATH, + TMPDIR: process.env.TMPDIR, USERPROFILE: process.env.USERPROFILE, }, }).then(onFinally, error => {
Ensure to expose TMPDIR to nested processes
diff --git a/lib/dynamic_image/model/dimensions.rb b/lib/dynamic_image/model/dimensions.rb index <HASH>..<HASH> 100644 --- a/lib/dynamic_image/model/dimensions.rb +++ b/lib/dynamic_image/model/dimensions.rb @@ -21,17 +21,14 @@ module DynamicImage private - def null_vector - Vector2d.new(0, 0) - end - def valid_vector_string?(str) (str && str =~ /^\d+x\d+$/) ? true : false end def vector(str) - return nil unless valid_vector_string?(str) - Vector2d.parse(str) + if valid_vector_string?(str) + Vector2d.parse(str) + end end end end
Don't leave crap laying around
diff --git a/bin/run.js b/bin/run.js index <HASH>..<HASH> 100755 --- a/bin/run.js +++ b/bin/run.js @@ -178,6 +178,9 @@ const results = zip(pool, tests).pipe( ); const emitter = new ResultsEmitter(results); +emitter.on('fail', function () { + process.exitCode = 1; +}); reporter(emitter, reporterOpts); function printVersion() {
feat: set exitCode to 1 when a test fails
diff --git a/src/vis/vis.js b/src/vis/vis.js index <HASH>..<HASH> 100644 --- a/src/vis/vis.js +++ b/src/vis/vis.js @@ -428,19 +428,24 @@ var Vis = View.extend({ }); if (!options.skipMapInstantiation) { - this.instantiateMap(); + this._instantiateMap(); } return this; }, - instantiateMap: function (invalidateMapSize) { + /** + * Force a map instantiation. + * Only expected to be called if {skipMapInstantiation} flag is set to true when vis is created. + */ + instantiateMap: function () { + this._instantiateMap(); + this.mapView.invalidateSize(); + }, + + _instantiateMap: function (invalidateMapSize) { this._dataviewsCollection.on('add reset remove', _.debounce(this._invalidateSizeOnDataviewsChanges, 10), this); this.map.instantiateMap(); - - if (invalidateMapSize) { - this.mapView.invalidateSize(); - } }, _newLayerModels: function (vizjson, map) {
Improve map instantiation mechanism Make the public method to not require any argument, and explain what it’s intended for.
diff --git a/activesupport/test/core_ext/kernel_test.rb b/activesupport/test/core_ext/kernel_test.rb index <HASH>..<HASH> 100644 --- a/activesupport/test/core_ext/kernel_test.rb +++ b/activesupport/test/core_ext/kernel_test.rb @@ -49,19 +49,3 @@ class KernelSuppressTest < ActiveSupport::TestCase suppress(LoadError, ArgumentError) { raise ArgumentError } end end - -class MockStdErr - attr_reader :output - def puts(message) - @output ||= [] - @output << message - end - - def info(message) - puts(message) - end - - def write(message) - puts(message) - end -end
Unused class for testing since <I>da<I>d<I>f8cfa<I>b<I>b4a<I>
diff --git a/src/Smf/Menu/Renderer/BootstrapNavRenderer.php b/src/Smf/Menu/Renderer/BootstrapNavRenderer.php index <HASH>..<HASH> 100644 --- a/src/Smf/Menu/Renderer/BootstrapNavRenderer.php +++ b/src/Smf/Menu/Renderer/BootstrapNavRenderer.php @@ -77,7 +77,8 @@ class BootstrapNavRenderer extends ListRenderer if (!is_null($item) && $options['depth'] !== 0 && $item->hasChildren() - && $item->getDisplayChildren()) { + && $item->getDisplayChildren() + && !is_null($result)) { $result->class = (array) $result->class; if ($this->getRealLevel($item, $options) === 1) {
skipping null result, when the item should not be displayed adding $result->class to null creates StdClass silently, yields error later in the code
diff --git a/src/qinfer/resamplers.py b/src/qinfer/resamplers.py index <HASH>..<HASH> 100644 --- a/src/qinfer/resamplers.py +++ b/src/qinfer/resamplers.py @@ -203,6 +203,6 @@ class LiuWestResampler(object): # particles represent the information that used to be stored in the # weights. This is done by SMCUpdater, and so we simply need to return # the new locations here. - return new_locs + return np.ones((w.shape[0],)) / w.shape[0], new_locs
Fixed problem w/ most recent merge.
diff --git a/hugolib/site.go b/hugolib/site.go index <HASH>..<HASH> 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -81,10 +81,10 @@ func (site *Site) Render() { site.timer.Step("render and write indexes") site.RenderLists() site.timer.Step("render and write lists") - site.RenderPages() - site.timer.Step("render pages") site.ProcessShortcodes() site.timer.Step("render shortcodes") + site.RenderPages() + site.timer.Step("render pages") site.RenderHomePage() site.timer.Step("render and write homepage") } @@ -178,9 +178,7 @@ func (s *Site) checkDirectories() { func (s *Site) ProcessShortcodes() { for i, _ := range s.Pages { - var bb bytes.Buffer - bb.WriteString(ShortcodesHandle(s.Pages[i].RenderedContent.String(), s.Pages[i], s.Tmpl)) - s.Pages[i].RenderedContent = &bb + s.Pages[i].Content = template.HTML(ShortcodesHandle(string(s.Pages[i].Content), s.Pages[i], s.Tmpl)) } }
rendering shortcodes earlier for better performance
diff --git a/karma.conf.ci.js b/karma.conf.ci.js index <HASH>..<HASH> 100644 --- a/karma.conf.ci.js +++ b/karma.conf.ci.js @@ -61,19 +61,19 @@ module.exports = function (config) { browserName: 'internet explorer', platform: 'Windows 8.1', version: '11' - } + }, //slIE10: { // base: 'SauceLabs', // browserName: 'internet explorer', // platform: 'Windows 8', // version: '10' //}, - //slIE9: { - // base: 'SauceLabs', - // browserName: 'internet explorer', - // platform: 'Windows 7', - // version: '9' - //} + slIE9: { + base: 'SauceLabs', + browserName: 'internet explorer', + platform: 'Windows 7', + version: '9' + } }; config.set({
Add IE9 to CI.
diff --git a/lib/curation_concerns/version.rb b/lib/curation_concerns/version.rb index <HASH>..<HASH> 100644 --- a/lib/curation_concerns/version.rb +++ b/lib/curation_concerns/version.rb @@ -1,3 +1,3 @@ module CurationConcerns - VERSION = "1.1.2".freeze + VERSION = "1.2.0".freeze end
Bump to version <I>
diff --git a/app/models/manager_refresh/inventory_collection_default.rb b/app/models/manager_refresh/inventory_collection_default.rb index <HASH>..<HASH> 100644 --- a/app/models/manager_refresh/inventory_collection_default.rb +++ b/app/models/manager_refresh/inventory_collection_default.rb @@ -72,6 +72,24 @@ class ManagerRefresh::InventoryCollectionDefault attributes.merge!(extra_attributes) end + def operating_systems(extra_attributes = {}) + attributes = { + :model_class => ::OperatingSystem, + :manager_ref => [:vm_or_template], + :association => :operating_systems, + :parent_inventory_collections => [:vms, :miq_templates], + } + + attributes[:targeted_arel] = lambda do |inventory_collection| + manager_uuids = inventory_collection.parent_inventory_collections.flat_map { |c| c.manager_uuids.to_a } + inventory_collection.parent.operating_systems.joins(:vm_or_template).where( + 'vms' => {:ems_ref => manager_uuids} + ) + end + + attributes.merge!(extra_attributes) + end + def disks(extra_attributes = {}) attributes = { :model_class => ::Disk,
Allowing OperatingSystem for CloudManager graph refresh Allowing OperatingSystem for CloudManager graph refresh Partially fixes BZ: <URL>
diff --git a/src/main/java/ca/jeb/common/gpb/ProtobufSerialization.java b/src/main/java/ca/jeb/common/gpb/ProtobufSerialization.java index <HASH>..<HASH> 100644 --- a/src/main/java/ca/jeb/common/gpb/ProtobufSerialization.java +++ b/src/main/java/ca/jeb/common/gpb/ProtobufSerialization.java @@ -85,7 +85,7 @@ public class ProtobufSerialization<G extends GeneratedMessage, P extends Object> } // 2. Call recursively if this is a ProtobufEntity - serializeProtobufEntity(value); + value = serializeProtobufEntity(value); String setter = "set" + JStringUtils.upperCaseFirst(fieldName); if (value instanceof Collection)
Assign value from the other serializer Assign value from the other serializer
diff --git a/classes/Gems/Tracker/Respondent.php b/classes/Gems/Tracker/Respondent.php index <HASH>..<HASH> 100644 --- a/classes/Gems/Tracker/Respondent.php +++ b/classes/Gems/Tracker/Respondent.php @@ -508,7 +508,11 @@ class Gems_Tracker_Respondent extends \Gems_Registry_TargetAbstract $respTrack->setReceptionCode($newCode, null, $this->currentUser->getUserId()); $respTrack->restoreTokens($oldCode, $newCode); $count++; - } + } else { + // If the code was not assigned to the track, still try to restore tokens + $tmpCount = $respTrack->restoreTokens($oldCode, $newCode); + $count = $count + min($tmpCount, 1); + } } } } @@ -541,4 +545,4 @@ class Gems_Tracker_Respondent extends \Gems_Registry_TargetAbstract $this->getReceptionCode() ); } -} \ No newline at end of file +}
Restore tokens with same code when restioring a respondent When the respondent code was not assigned to a track, the tokens for that track were not restored when restoring the respondent.
diff --git a/Kwf/Validate/NoTags.php b/Kwf/Validate/NoTags.php index <HASH>..<HASH> 100644 --- a/Kwf/Validate/NoTags.php +++ b/Kwf/Validate/NoTags.php @@ -10,16 +10,17 @@ class Kwf_Validate_NoTags extends Zend_Validate_Abstract public function isValid($value) { - if (!$value) return true; + $ret = true; if (!is_array($value)) { - $value = array($value); - } - foreach ($value as $key => $val) { - if (strip_tags($val) != $val || stripos($val, 'Content-Type:') !== false) { + if (strip_tags($value) != $value || stripos($value, 'Content-Type:') !== false) { $this->_error(self::INVALID_TAGS); - return false; + $ret = false; + } + } else { + foreach ($value as $val) { + $ret = $ret && $this->isValid($val); } } - return true; + return $ret; } }
NoTagsValidator: recursively check value if array This should also work for custom columnDEserialiser
diff --git a/Kwf/Auth/Adapter/Service.php b/Kwf/Auth/Adapter/Service.php index <HASH>..<HASH> 100644 --- a/Kwf/Auth/Adapter/Service.php +++ b/Kwf/Auth/Adapter/Service.php @@ -117,7 +117,7 @@ class Kwf_Auth_Adapter_Service implements Zend_Auth_Adapter_Interface private function _getCacheId() { - return 'login_brute_force_'.str_replace(array('.', ':'), array('_', '_'), $_SERVER['REMOTE_ADDR']); + return 'login_brute_force_'.preg_replace('/[^0-9a-z_]/', '_', $_SERVER['REMOTE_ADDR']); } private function _getCache()
Escape cacheId correctly REMOTE_ADDR can contain multiple ip adresses separated with ', ' (if set by a proxy)
diff --git a/lib/punchblock/call.rb b/lib/punchblock/call.rb index <HASH>..<HASH> 100644 --- a/lib/punchblock/call.rb +++ b/lib/punchblock/call.rb @@ -4,12 +4,20 @@ module Punchblock # This class represents an active Ozone call # class Call - attr_accessor :id + attr_accessor :id, :to, :headers def initialize(id, to, headers) @id = id @to = to - @headers = headers + # Ensure all our headers have lowercase names and convert to symbols + @headers = headers.inject({}) {|headers,pair| + headers[pair.shift.downcase.to_sym] = pair.shift + headers + } + end + + def to_s + "#<Punchblock::Call:#{@id}>" end end end
Ensure all headers have lowercase symbols for names
diff --git a/builder/builder-next/executor_unix.go b/builder/builder-next/executor_unix.go index <HASH>..<HASH> 100644 --- a/builder/builder-next/executor_unix.go +++ b/builder/builder-next/executor_unix.go @@ -15,6 +15,7 @@ import ( "github.com/moby/buildkit/solver/pb" "github.com/moby/buildkit/util/network" specs "github.com/opencontainers/runtime-spec/specs-go" + "github.com/sirupsen/logrus" ) const networkName = "bridge" @@ -100,10 +101,10 @@ func (iface *lnInterface) Set(s *specs.Spec) { func (iface *lnInterface) Close() error { <-iface.ready - err := iface.sbx.Delete() - if iface.err != nil { - // iface.err takes precedence over cleanup errors - return iface.err - } - return err + go func() { + if err := iface.sbx.Delete(); err != nil { + logrus.Errorf("failed to delete builder network sandbox: %v", err) + } + }() + return iface.err }
builder: delete sandbox in a goroutine for performance
diff --git a/app/Gruntfile.js b/app/Gruntfile.js index <HASH>..<HASH> 100644 --- a/app/Gruntfile.js +++ b/app/Gruntfile.js @@ -124,7 +124,7 @@ module.exports = function (grunt) { }, src: [ '<%= config.node %>/promise-polyfill/dist/polyfill.min.js', - '<%= config.node %>/whatwg-fetch/fetch.js' + '<%= config.node %>/whatwg-fetch/dist/fetch.umd.js' ], dest: '<%= config.public %>/js/polyfill.min.js' },
JBEAP-<I>: Use 'fetch.umd.js' as polyfill
diff --git a/lib/capybara/spec/session/has_current_path_spec.rb b/lib/capybara/spec/session/has_current_path_spec.rb index <HASH>..<HASH> 100644 --- a/lib/capybara/spec/session/has_current_path_spec.rb +++ b/lib/capybara/spec/session/has_current_path_spec.rb @@ -37,8 +37,24 @@ Capybara::SpecHelper.spec '#has_current_path?' do expect(@session).to have_current_path('/with_js?test=test') end - it "should compare the full url" do + it "should compare the full url if url: true is used" do expect(@session).to have_current_path(%r{\Ahttp://[^/]*/with_js\Z}, url: true) + domain_port = if @session.respond_to?(:server) && @session.server + "#{@session.server.host}:#{@session.server.port}" + else + "www.example.com" + end + expect(@session).to have_current_path("http://#{domain_port}/with_js", url: true) + end + + it "should not compare the full url if url: true is not passed" do + expect(@session).to have_current_path(%r{^/with_js\Z}) + expect(@session).to have_current_path('/with_js') + end + + it "should not compare the full url if url: false is passed" do + expect(@session).to have_current_path(%r{^/with_js\Z}, url: false) + expect(@session).to have_current_path('/with_js', url: false) end it "should ignore the query" do
Add tests for current_path matcher
diff --git a/salt/states/environ.py b/salt/states/environ.py index <HASH>..<HASH> 100644 --- a/salt/states/environ.py +++ b/salt/states/environ.py @@ -6,25 +6,24 @@ of the current salt process. # Import python libs import os -import logging # Import salt libs from salt._compat import string_types from salt.exceptions import SaltException -log = logging.getLogger(__name__) +__func_alias__ = { + 'set_': 'set' +} -# Define the module's virtual name -__virtualname__ = 'environ' def __virtual__(): ''' - No dependency checks, so just return the __virtualname__ + No dependency checks, and not renaming, just return True ''' - return __virtualname__ + return True -def set(name, value): +def set_(name, value): ''' Set the salt process environment variables. @@ -51,7 +50,7 @@ def set(name, value): - name: does_not_matter - value: foo: bar - baz: quux + baz: quux ''' ret = {'name': name, @@ -93,4 +92,3 @@ def set(name, value): ret['changes'] = environ_ret ret['comment'] = 'Environ values were set' return ret -
Lint fixes. * No need to define and return `__virtualname__` if not renaming the module. In this case, just return `True`. * Don't shaddow the buil-in `set` * Removed logging since it's not being used
diff --git a/lib/init/javascript.js b/lib/init/javascript.js index <HASH>..<HASH> 100644 --- a/lib/init/javascript.js +++ b/lib/init/javascript.js @@ -149,7 +149,7 @@ exportables.createSampleProgram = () => { } fs.copy(path.join(resources, filename), filename, () => { - log.info('Wrote "Hello World" to index.js'); + log.info('Created "index.js"'); resolve(); }); }); @@ -250,6 +250,8 @@ exportables.generateProject = (opts) => { return ctx; }) .then(exportables.createNpmrc) + .then(exportables.createTesselinclude) + .then(exportables.createSampleProgram) .then(exportables.loadNpm) .then(exportables.resolveNpmConfig) .then(exportables.buildJSON) @@ -259,8 +261,6 @@ exportables.generateProject = (opts) => { .then(JSON.parse) .then(exportables.getDependencies) .then(exportables.npmInstall) - .then(exportables.createTesselinclude) - .then(exportables.createSampleProgram) .catch(error => { log.error(error); });
Reorder t2 init to copy all of the pre-made files first.
diff --git a/Classes/Netlogix/JsonApiOrg/Property/TypeConverter/SchemaResource/ResourceConverter.php b/Classes/Netlogix/JsonApiOrg/Property/TypeConverter/SchemaResource/ResourceConverter.php index <HASH>..<HASH> 100644 --- a/Classes/Netlogix/JsonApiOrg/Property/TypeConverter/SchemaResource/ResourceConverter.php +++ b/Classes/Netlogix/JsonApiOrg/Property/TypeConverter/SchemaResource/ResourceConverter.php @@ -84,11 +84,11 @@ class ResourceConverter extends AbstractTypeConverter $source['type'] = $this->exposableTypeMap->getType($typeIdentifier); } - $arguments = []; if (array_key_exists('id', $source)) { - $arguments['__identity'] = $source['id']; + $arguments = $source['id']; + } else { + $arguments = []; } - $payload = $this->propertyMapper->convert($arguments, $this->exposableTypeMap->getClassName($source['type'])); $resourceInformation = $this->resourceMapper->findResourceInformation($payload);
ResourceConverter should rely on strings instead of identity array
diff --git a/lib/uv-rays/connection.rb b/lib/uv-rays/connection.rb index <HASH>..<HASH> 100644 --- a/lib/uv-rays/connection.rb +++ b/lib/uv-rays/connection.rb @@ -14,7 +14,7 @@ module UV tcp.start_read end else - tcp.reactor.lookup(server).then( + tcp.reactor.lookup(server, wait: false).then( proc { |result| UV.try_connect(tcp, handler, result[0][0], port) },
(connection) to use promises by default this is now a co-routine
diff --git a/inlineplz/linters/__init__.py b/inlineplz/linters/__init__.py index <HASH>..<HASH> 100644 --- a/inlineplz/linters/__init__.py +++ b/inlineplz/linters/__init__.py @@ -88,6 +88,7 @@ TRUSTED_INSTALL = [ [sys.executable, '-m', 'pip', 'install', '-e', '.'], [sys.executable, '-m', 'pip', 'install', '-r', 'requirements.txt'], [sys.executable, '-m', 'pip', 'install', '-r', 'requirements_dev.txt'], + [sys.executable, '-m', 'pip', 'install', '-r', 'requirements-dev.txt'], ['pipenv', 'install'] ]
install requirements-dev (#<I>)
diff --git a/src/Task/GitHubTasks.php b/src/Task/GitHubTasks.php index <HASH>..<HASH> 100644 --- a/src/Task/GitHubTasks.php +++ b/src/Task/GitHubTasks.php @@ -3,7 +3,6 @@ namespace Droath\ProjectX\Task; use Droath\RoboGitHub\Task\loadTasks as loadGitHubTasks; -use Robo\Common\IO; use Symfony\Component\Console\Helper\Table; use Symfony\Component\Console\Question\ChoiceQuestion; @@ -12,7 +11,6 @@ use Symfony\Component\Console\Question\ChoiceQuestion; */ class GitHubTasks extends GitHubTaskBase { - use IO; use loadGitHubTasks; /**
GH-<I>: Fix PHP strict warning in Github tasks.
diff --git a/babelapi/data_type.py b/babelapi/data_type.py index <HASH>..<HASH> 100644 --- a/babelapi/data_type.py +++ b/babelapi/data_type.py @@ -788,3 +788,5 @@ def is_timestamp_type(data_type): return isinstance(data_type, Timestamp) def is_union_type(data_type): return isinstance(data_type, Union) +def is_numeric_type(data_type): + return is_integer_type(data_type) or is_float_type(data_type) diff --git a/babelapi/generator/generator.py b/babelapi/generator/generator.py index <HASH>..<HASH> 100644 --- a/babelapi/generator/generator.py +++ b/babelapi/generator/generator.py @@ -77,6 +77,19 @@ class Generator(object): self.cur_indent -= dent @contextmanager + def block(self, header='', dent=None, delim=('{','}')): + if header: + self.emit_line('{} {}'.format(header, delim[0])) + else: + self.emit_line(delim[0]) + self.emit_empty_line() + + with self.indent(dent): + yield + + self.emit_line(delim[1]) + + @contextmanager def indent_to_cur_col(self): """ For the duration of the context manager, indentation will be set to the
Add some utility functions to babel Reviewed By: kelkabany
diff --git a/chess/engine.py b/chess/engine.py index <HASH>..<HASH> 100644 --- a/chess/engine.py +++ b/chess/engine.py @@ -60,18 +60,7 @@ except ImportError: return loop.run_until_complete(main) finally: try: - pending = _all_tasks(loop) - loop.run_until_complete(asyncio.gather(*pending, return_exceptions=True)) - for task in pending: - if task.cancelled(): - continue - if task.exception() is not None: - loop.call_exception_handler({ - "message": "unhandled exception during chess.engine._run() shutdown", - "exception": task.exception(), - "task": task, - }) - + loop.run_until_complete(asyncio.gather(*_all_tasks(loop), return_exceptions=True)) loop.run_until_complete(loop.shutdown_asyncgens()) finally: asyncio.set_event_loop(None)
Python <I>: Ignore exceptions from pending tasks
diff --git a/src/TableColumn/Delete.php b/src/TableColumn/Delete.php index <HASH>..<HASH> 100644 --- a/src/TableColumn/Delete.php +++ b/src/TableColumn/Delete.php @@ -20,15 +20,16 @@ class Delete extends Generic $this->table->app->terminate($reload->renderJSON()); }); + } + + public function getDataCellTemplate(\atk4\data\Field $f = null) + { $this->table->on('click', 'a.'.$this->short_name)->atkAjaxec([ 'uri' => $this->vp->getURL(), 'uri_options' => [$this->name => $this->table->jsRow()->data('id')], 'confirm' => (new \atk4\ui\jQuery())->attr('title'), ]); - } - public function getDataCellTemplate(\atk4\data\Field $f = null) - { return $this->app->getTag( 'a', ['href' => '#', 'title' => 'Delete {$'.$this->table->model->title_field.'}?', 'class' => $this->short_name],
perform on execution later, as it relies on table's url()
diff --git a/internal/http/server.go b/internal/http/server.go index <HASH>..<HASH> 100644 --- a/internal/http/server.go +++ b/internal/http/server.go @@ -90,7 +90,7 @@ func (srv *Server) Start(ctx context.Context) (err error) { if atomic.LoadUint32(&srv.inShutdown) != 0 { // To indicate disable keep-alives w.Header().Set("Connection", "close") - w.WriteHeader(http.StatusForbidden) + w.WriteHeader(http.StatusServiceUnavailable) w.Write([]byte(http.ErrServerClosed.Error())) w.(http.Flusher).Flush() return
fix: server in shutdown should return <I> instead of <I> (#<I>) various situations where the client is retrying the request server going through shutdown might incorrectly send <I> which is a non-retriable error, this PR allows for clients when they retry an attempt to go to another healthy pod or server in a distributed cluster - assuming it is a properly load-balanced setup.
diff --git a/src/java/voldemort/serialization/avro/versioned/AvroVersionedGenericSerializer.java b/src/java/voldemort/serialization/avro/versioned/AvroVersionedGenericSerializer.java index <HASH>..<HASH> 100644 --- a/src/java/voldemort/serialization/avro/versioned/AvroVersionedGenericSerializer.java +++ b/src/java/voldemort/serialization/avro/versioned/AvroVersionedGenericSerializer.java @@ -81,7 +81,11 @@ public class AvroVersionedGenericSerializer implements Serializer<Object> { datumWriter = new GenericDatumWriter<Object>(typeDef); datumWriter.write(object, encoder); encoder.flush(); - } catch(ArrayIndexOutOfBoundsException aIOBE) { + } catch(SerializationException sE) { + throw sE; + } catch(IOException e) { + throw new SerializationException(e); + } catch(Exception aIOBE) { // probably the object sent to us was not created using the latest // schema @@ -92,10 +96,6 @@ public class AvroVersionedGenericSerializer implements Serializer<Object> { Integer writerVersion = getSchemaVersion(writer); return toBytes(object, writer, writerVersion); - } catch(IOException e) { - throw new SerializationException(e); - } catch(SerializationException sE) { - throw sE; } finally { SerializationUtils.close(output); }
fixed try catch in versioned avro serializer
diff --git a/karma.conf.js b/karma.conf.js index <HASH>..<HASH> 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -38,6 +38,9 @@ module.exports = function (config) { logLevel: 'INFO', + // Default is 1000 but we can run into rate limit issues so bump it up to 10k + pollingTimeout: 10000, + // run the bundle through the webpack and sourcemap plugins preprocessors: { 'test/!(requirejs).test.js': ['webpack']
Stay within Browserstack rate limits BrowserStack dev recommended we increase the time between polls for test status to decrease the number of API calls we make.
diff --git a/Jakefile.js b/Jakefile.js index <HASH>..<HASH> 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -172,7 +172,7 @@ task('test', ['lint:spec'], function () { }, {async: true}) var pkg = new jake.PackageTask('EpicEditor', 'v' + VERSION, function () { - var fileList = [ 'epiceditor'] + var fileList = [ 'epiceditor', 'epiceditor/*', 'epiceditor/*/*', 'epiceditor/*/*/*'] this.packageDir = "docs/downloads" this.packageFiles.include(fileList); this.needZip = true; @@ -196,4 +196,4 @@ task('ascii', [], function () { " EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE \n" console.log(colorize(epicAscii, 'yellow')) console.log(colorize('EpicEditor - An Embeddable JavaScript Markdown Editor', 'yellow')) -}) \ No newline at end of file +})
hack for Jake traversal handling in pkg task
diff --git a/pervert/models.py b/pervert/models.py index <HASH>..<HASH> 100644 --- a/pervert/models.py +++ b/pervert/models.py @@ -99,8 +99,24 @@ class Editor(Model): def get_uuid(): return uuid.uuid4().hex +class UUIDField(CharField): + + def __init__(self, *args, **kwargs): + kwargs["max_length"] = 32 + kwargs["db_index"] = True + kwargs["primary_key"] = True + kwargs["default"] = get_uuid + super(UUIDField, self).__init__(*args, **kwargs) + + def contribute_to_class(self, cls, name): + assert not cls._meta.has_auto_field + super(UUIDField, self).contribute_to_class(cls, name) + cls._meta.has_auto_field = True + cls._meta.auto_field = self + class AbstractPervert(Model): + """ uid = CharField( max_length = 32, default = get_uuid, @@ -109,6 +125,9 @@ class AbstractPervert(Model): verbose_name = "unique ID", primary_key = True ) + """ + + uid = UUIDField() class Meta: abstract = True
Fix bug that threw an error when saving a form with inlines, had to create a UUIDField for that.
diff --git a/cmd/influxd/upgrade/upgrade.go b/cmd/influxd/upgrade/upgrade.go index <HASH>..<HASH> 100644 --- a/cmd/influxd/upgrade/upgrade.go +++ b/cmd/influxd/upgrade/upgrade.go @@ -357,8 +357,10 @@ func runUpgradeE(*cobra.Command, []string) error { options.source.walDir = v1Config.Data.WALDir options.source.dbURL = v1Config.dbURL() } else { - // Otherwise, assume a standard directory layout. + // Otherwise, assume a standard directory layout + // and the default port on localhost. options.source.populateDirs() + options.source.dbURL = (&configV1{}).dbURL() } err = validatePaths(&options.source, &options.target) @@ -453,7 +455,10 @@ func runUpgradeE(*cobra.Command, []string) error { ) } - log.Info("Upgrade successfully completed. Start service now") + log.Info( + "Upgrade successfully completed. Start the influxd service now, then log in", + zap.String("login_url", options.source.dbURL), + ) return nil }
fix(upgrade): add DB URL to log message at end up upgrade (#<I>)
diff --git a/src/js/TextFields/TextField.js b/src/js/TextFields/TextField.js index <HASH>..<HASH> 100644 --- a/src/js/TextFields/TextField.js +++ b/src/js/TextFields/TextField.js @@ -403,16 +403,6 @@ export default class TextField extends PureComponent { }; } - componentWillMount() { - const { value, defaultValue, resize } = this.props; - const v = typeof value !== 'undefined' ? value : defaultValue; - if (!resize || typeof document === 'undefined' || !v) { - return; - } - - this.setState({ width: this._calcWidth(v) }); - } - componentDidMount() { const { value, defaultValue, resize } = this.props; const v = typeof value !== 'undefined' ? value : defaultValue;
Removed the calcWidth in willMount for TextField There is no point in doing the willMount checl for resizing width and should wait until fully mounted to have access to the DOM nodes anyways.
diff --git a/GEOparse/GEOparse.py b/GEOparse/GEOparse.py index <HASH>..<HASH> 100755 --- a/GEOparse/GEOparse.py +++ b/GEOparse/GEOparse.py @@ -305,7 +305,13 @@ def parse_GDS_columns(lines, subsets): subset_ids = defaultdict(dict) for subsetname, subset in iteritems(subsets): for expid in subset.metadata["sample_id"][0].split(","): - pass + try: + subset_type = subset.get_type() + subset_ids[subset_type][expid] = \ + subset.metadata['description'][0] + except Exception as err: + logger.error("Error processing subsets: %s for subset %s" % ( + subset.get_type(), subsetname)) return df.join(DataFrame(subset_ids))
fix: #<I> Roll back to subset type check
diff --git a/lib/ews/connection.rb b/lib/ews/connection.rb index <HASH>..<HASH> 100644 --- a/lib/ews/connection.rb +++ b/lib/ews/connection.rb @@ -26,6 +26,8 @@ class Viewpoint::EWS::Connection # @example https://<site>/ews/Exchange.asmx # @param [Hash] opts Misc config options (mostly for developement) # @option opts [Fixnum] :ssl_verify_mode + # @option opts [Fixnum] :receive_timeout override the default receive timeout + # seconds # @option opts [Array] :trust_ca an array of hashed dir paths or a file def initialize(endpoint, opts = {}) @log = Logging.logger[self.class.name.to_s.to_sym] @@ -39,6 +41,7 @@ class Viewpoint::EWS::Connection @httpcli.ssl_config.verify_mode = opts[:ssl_verify_mode] if opts[:ssl_verify_mode] # Up the keep-alive so we don't have to do the NTLM dance as often. @httpcli.keep_alive_timeout = 60 + @httpcli.receive_timeout = opts[:receive_timeout] if opts[:receive_timeout] @endpoint = endpoint end
Add ability to override HTTPClient#receive_timeout
diff --git a/php/WP_CLI/Runner.php b/php/WP_CLI/Runner.php index <HASH>..<HASH> 100644 --- a/php/WP_CLI/Runner.php +++ b/php/WP_CLI/Runner.php @@ -421,8 +421,7 @@ class Runner { $pre_cmd = getenv( 'WP_CLI_SSH_PRE_CMD' ); if ( $pre_cmd ) { - $message = WP_CLI::colorize( "%yWP_CLI_SSH_PRE_CMD found, executing the following command(s) on the remote machine:%n\n" ) - . WP_CLI::colorize( '%Y' ) . $pre_cmd . WP_CLI::colorize( '%n' ); + $message = WP_CLI::warning( "WP_CLI_SSH_PRE_CMD found, executing the following command(s) on the remote machine:\n $pre_cmd" ); WP_CLI::log( $message );
Use warning instead of colorize to fix warning output
diff --git a/structr-core/src/main/java/org/structr/core/graph/GraphObjectModificationState.java b/structr-core/src/main/java/org/structr/core/graph/GraphObjectModificationState.java index <HASH>..<HASH> 100644 --- a/structr-core/src/main/java/org/structr/core/graph/GraphObjectModificationState.java +++ b/structr-core/src/main/java/org/structr/core/graph/GraphObjectModificationState.java @@ -192,7 +192,11 @@ public class GraphObjectModificationState implements ModificationEvent { } } - updateCache(); + // only update cache if key, prev and new values are null + // because that's when a relationship has been created / removed + if (key == null && previousValue == null && newValue == null) { + updateCache(); + } } public void delete(boolean passive) {
Modified GraphObjectModificationState to clear permission path cache only on actual changes to the path.
diff --git a/DrdPlus/Codes/Properties/CharacteristicForGameCode.php b/DrdPlus/Codes/Properties/CharacteristicForGameCode.php index <HASH>..<HASH> 100644 --- a/DrdPlus/Codes/Properties/CharacteristicForGameCode.php +++ b/DrdPlus/Codes/Properties/CharacteristicForGameCode.php @@ -14,7 +14,7 @@ class CharacteristicForGameCode extends AbstractCode const SHOOTING = CombatCharacteristicCode::SHOOTING; const ATTACK_NUMBER = 'attack_number'; - const DEFENSE_AGAINST_SHOOTING = 'defense_against_shooting'; + const DEFENSE_NUMBER_AGAINST_SHOOTING = 'defense_number_against_shooting'; const DEFENSE_NUMBER = 'defense_number'; const ENCOUNTER_RANGE = 'encounter_range'; const FIGHT = 'fight'; @@ -32,7 +32,7 @@ class CharacteristicForGameCode extends AbstractCode self::DEFENSE, self::SHOOTING, self::ATTACK_NUMBER, - self::DEFENSE_AGAINST_SHOOTING, + self::DEFENSE_NUMBER_AGAINST_SHOOTING, self::DEFENSE_NUMBER, self::ENCOUNTER_RANGE, self::FIGHT,
fix: Defense number against shooting renamed
diff --git a/docs/Router.js b/docs/Router.js index <HASH>..<HASH> 100644 --- a/docs/Router.js +++ b/docs/Router.js @@ -244,7 +244,7 @@ const RoutersContainer = withRouter(({ history, location, ...props }) => { <Switch> {getRoutes()} </Switch> - <ScrollToTop showUnder={160} style={{ bottom: 20 }}> + <ScrollToTop showUnder={160} style={{ bottom: 20, zIndex: 999 }}> <div className={`${prefixCls}-totop`}></div> </ScrollToTop> </div>
doc: Change scroll to top style.
diff --git a/code/CMSBatchAction.php b/code/CMSBatchAction.php index <HASH>..<HASH> 100644 --- a/code/CMSBatchAction.php +++ b/code/CMSBatchAction.php @@ -76,7 +76,7 @@ abstract class CMSBatchAction ); } - return Convert::raw2json($status); + return json_encode($status); } /** diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php index <HASH>..<HASH> 100644 --- a/code/LeftAndMain.php +++ b/code/LeftAndMain.php @@ -316,7 +316,7 @@ class LeftAndMain extends Controller implements PermissionProvider $combinedClientConfig['environment'] = Director::get_environment_type(); $combinedClientConfig['debugging'] = LeftAndMain::config()->uninherited('client_debugging'); - return Convert::raw2json($combinedClientConfig); + return json_encode($combinedClientConfig); } /** @@ -525,7 +525,7 @@ class LeftAndMain extends Controller implements PermissionProvider $data = array_merge($data, $extraData); } - $response = new HTTPResponse(Convert::raw2json($data)); + $response = new HTTPResponse(json_encode($data)); $response->addHeader('Content-Type', 'application/json'); return $response; }
FIX Replace usage of Convert JSON methods with json_encode and json_decode
diff --git a/d1_common_python/src/d1_common/__init__.py b/d1_common_python/src/d1_common/__init__.py index <HASH>..<HASH> 100644 --- a/d1_common_python/src/d1_common/__init__.py +++ b/d1_common_python/src/d1_common/__init__.py @@ -20,7 +20,7 @@ '''Shared code for DataONE Python libraries ''' -__version__ = "1.1.2" +__version__ = "1.1.2RC1" __all__ = [ 'const',
Updated version number to show that this is an RC.
diff --git a/lib/scripts/directive.js b/lib/scripts/directive.js index <HASH>..<HASH> 100644 --- a/lib/scripts/directive.js +++ b/lib/scripts/directive.js @@ -76,7 +76,6 @@ if (!$scope.colorMouse && !$scope.hueMouse && !$scope.opacityMouse && $scope.find(event.target).length === 0) { $scope.log('Color Picker: Document Click Event'); $scope.hide(); - $scope.$apply(); // mouse event on color grid } else if ($scope.colorMouse) { $scope.colorUp(event);
Don't trigger digest cycle as $scope.hide already triggers one
diff --git a/bridgesupport.js b/bridgesupport.js index <HASH>..<HASH> 100644 --- a/bridgesupport.js +++ b/bridgesupport.js @@ -122,10 +122,9 @@ function bridgesupport (fw, _global) { case 'constant': (function (name, type) { _global.__defineGetter__(name, function () { - var ptr = fw.lib.get(name) + var ptr = fw.lib.get(name) // TODO: Cache the pointer after the 1st call ptr._type = '^' + type var val = ptr.deref() - delete _global[name] return _global[name] = val }); })(node.attributes.name, getType(node));
The Constant getter cannot be cached after 1 call. The value can and probably will change throughout the lifetime of the program, and if the NULL pointer is cached for NSApp, and then a NSApplication is created, then we're fucked. That's what I ran into...
diff --git a/machina/apps/forum/views.py b/machina/apps/forum/views.py index <HASH>..<HASH> 100644 --- a/machina/apps/forum/views.py +++ b/machina/apps/forum/views.py @@ -54,7 +54,8 @@ class ForumView(PermissionRequiredMixin, ListView): def get_queryset(self): self.forum = self.get_forum() - qs = self.forum.topics.exclude(type=Topic.TYPE_CHOICES.topic_announce).select_related('poster') + qs = self.forum.topics.exclude(type=Topic.TYPE_CHOICES.topic_announce).exclude(approved=False) \ + .select_related('poster') return qs def get_controlled_object(self):
ForumView updated to hide topics that are not approved
diff --git a/leaflet-ajax.js b/leaflet-ajax.js index <HASH>..<HASH> 100644 --- a/leaflet-ajax.js +++ b/leaflet-ajax.js @@ -37,7 +37,7 @@ L.GeoJSON.AJAX=L.GeoJSON.extend({ request.open("GET",url); var _this=this; request.onreadystatechange = function(){ - if (request.readyState === 4 && request.status === 200 && request.getResponseHeader("Content-Type") === "application/json"){ + if (request.readyState === 4 && request.status === 200 ){ response = JSON.parse(request.responseText); _this.addData(response); }
geojson isn't always served with the json mime/type
diff --git a/openquake/baselib/performance.py b/openquake/baselib/performance.py index <HASH>..<HASH> 100644 --- a/openquake/baselib/performance.py +++ b/openquake/baselib/performance.py @@ -23,6 +23,7 @@ import getpass import operator import itertools from datetime import datetime +from decorator import decorator import psutil import numpy try: @@ -316,6 +317,23 @@ class Monitor(object): return '<%s>' % msg +def vectorize_arg(idx): + """ + Vectorize a function efficientlyif the argument with index `idx` contains + many repetitions. + """ + def caller(func, *args): + args = list(args) + uniq, inv = numpy.unique(args[idx], return_inverse=True) + res = [] + for arg in uniq: + args[idx] = arg + res.append(func(*args)) + return numpy.array(res)[inv] + + return decorator(caller) + + # numba helpers if numba:
Added decorator vectorize_arg
diff --git a/androlog/src/main/java/de/akquinet/android/androlog/Log.java b/androlog/src/main/java/de/akquinet/android/androlog/Log.java index <HASH>..<HASH> 100644 --- a/androlog/src/main/java/de/akquinet/android/androlog/Log.java +++ b/androlog/src/main/java/de/akquinet/android/androlog/Log.java @@ -1116,7 +1116,7 @@ public class Log { if (tag != null && result == null) { int index = tag.lastIndexOf("."); while (result == null && index > -1) { - result = logLevels.get(tag.substring(0, index - 1)); + result = logLevels.get(tag.substring(0, index)); index = tag.lastIndexOf(".", index - 1); } }
Misplaced -1. Sry.
diff --git a/system/Validation/Rules.php b/system/Validation/Rules.php index <HASH>..<HASH> 100644 --- a/system/Validation/Rules.php +++ b/system/Validation/Rules.php @@ -422,13 +422,13 @@ class Rules // Still here? Then we fail this test if // any of the fields are not present in $data - foreach ($fields as $field) { + foreach ($fields as $field) + { if ( - (strpos($field, '.') !== false && - empty(dot_array_search($field, $data))) || - (strpos($field, '.') === false && - (!array_key_exists($field, $data) || empty($data[$field]))) - ) { + (strpos($field, '.') !== false && empty(dot_array_search($field, $data))) || + (strpos($field, '.') === false && (! array_key_exists($field, $data) || empty($data[$field]))) + ) + { return false; } }
Update system/Validation/Rules.php
diff --git a/lib/puppet/functions/match.rb b/lib/puppet/functions/match.rb index <HASH>..<HASH> 100644 --- a/lib/puppet/functions/match.rb +++ b/lib/puppet/functions/match.rb @@ -30,6 +30,7 @@ # ~~~ ruby # $matches = ["abc123","def456"].match(/([a-z]+)([1-9]+)/) # # $matches contains [[abc123, abc, 123], [def456, def, 456]] +# ~~~ # # @since 4.0.0 # diff --git a/lib/puppet/parser/functions/match.rb b/lib/puppet/parser/functions/match.rb index <HASH>..<HASH> 100644 --- a/lib/puppet/parser/functions/match.rb +++ b/lib/puppet/parser/functions/match.rb @@ -34,6 +34,7 @@ $matches = "abc123".match(/([a-z]+)([1-9]+)/) ~~~ ruby $matches = ["abc123","def456"].match(/([a-z]+)([1-9]+)/) # $matches contains [[abc123, abc, 123], [def456, def, 456]] +~~~ - Since 4.0.0 DOC
(docs) Fix markup typo in the match function An unclosed code block was messing up the formatting in the function reference.
diff --git a/src/FileUploadsUtils.php b/src/FileUploadsUtils.php index <HASH>..<HASH> 100644 --- a/src/FileUploadsUtils.php +++ b/src/FileUploadsUtils.php @@ -243,7 +243,7 @@ class FileUploadsUtils ); if ($this->_fileStorageAssociation->save($fileStorEnt)) { - $this->_createThumbnails($fileStorEnt); + $this->createThumbnails($fileStorEnt); return $fileStorEnt; } @@ -334,7 +334,7 @@ class FileUploadsUtils * @param \Cake\ORM\Entity $entity File Entity * @return void */ - protected function _createThumbnails(Entity $entity) + public function createThumbnails(Entity $entity) { $this->_handleThumbnails($entity, 'ImageVersion.createVersion'); }
set method as public (task #<I>)
diff --git a/stomp/__main__.py b/stomp/__main__.py index <HASH>..<HASH> 100644 --- a/stomp/__main__.py +++ b/stomp/__main__.py @@ -48,6 +48,7 @@ class StompCLI(Cmd, ConnectionListener): self.verbose = verbose self.user = user self.passcode = passcode + self.__quit = False if ver == '1.0': self.conn = StompConnection10([(host, port)], wait_on_receipt=True) elif ver == '1.1': @@ -65,7 +66,6 @@ class StompCLI(Cmd, ConnectionListener): self.version = ver self.__subscriptions = {} self.__subscription_id = 1 - self.__quit = False def __print_async(self, frame_type, headers, body): """
Avoid AttributeError in CLI when connecting fails due to wrong authentication
diff --git a/algolia/analytics/responses_ab_testing.go b/algolia/analytics/responses_ab_testing.go index <HASH>..<HASH> 100644 --- a/algolia/analytics/responses_ab_testing.go +++ b/algolia/analytics/responses_ab_testing.go @@ -36,6 +36,7 @@ type ABTestResponse struct { ClickSignificance float64 `json:"clickSignificance"` ConversionSignificance float64 `json:"conversionSignificance"` CreatedAt time.Time `json:"createdAt"` + UpdatedAt time.Time `json:"updatedAt"` EndAt time.Time `json:"endAt"` Name string `json:"name"` Status string `json:"status"` @@ -57,5 +58,5 @@ type VariantResponse struct { TrackedSearchCount int `json:"trackedSearchCount"` TrafficPercentage int `json:"trafficPercentage"` UserCount int `json:"userCount"` - CustomSearchParameters *search.QueryParams `json:"customSearchParameters"` + CustomSearchParameters *search.QueryParams `json:"customSearchParameters,omitempty"` }
fix(analytics): add UpdatedAt field to ABTestResponse (#<I>)
diff --git a/bcbio/variation/freebayes.py b/bcbio/variation/freebayes.py index <HASH>..<HASH> 100644 --- a/bcbio/variation/freebayes.py +++ b/bcbio/variation/freebayes.py @@ -22,5 +22,14 @@ def run_freebayes(align_bam, ref_file, config, dbsnp=None, region=None, "-b", align_bam, "-v", tx_out_file, "-f", ref_file] if region: cl.extend(["-r", region]) - subprocess.check_call(cl) + try: + subprocess.check_call(cl) + # XXX Temporary, work around freebayes issue; need to recall these regions + # later so this is an ugly silent fix. Will need to grep for 'freebayes failed' + # https://github.com/ekg/freebayes/issues/22 + except subprocess.CalledProcessError: + with open(tx_out_file, "w") as out_handle: + out_handle.write("##fileformat=VCFv4.1\n" + "## No variants; freebayes failed\n" + "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\n") return out_file
Temporary workaround to skip chromosome calls with freebayes errors
diff --git a/lib/enyo/lib/git.js b/lib/enyo/lib/git.js index <HASH>..<HASH> 100644 --- a/lib/enyo/lib/git.js +++ b/lib/enyo/lib/git.js @@ -44,7 +44,7 @@ function update (dest, target, lib) { cli('updating %s and checking out %s', lib, target); return repo.remote_fetchAsync('origin').then(function () { return checkout(dest, target, lib).then(function () { - return repo.pullAsync().then(null, function (e) { + return repo.pullAsync('origin', target).then(null, function (e) { return reject('failed to merge remote for %s: %s', lib, e.message); }); });
ensure that it is actually pulling the correct target and merging when possible
diff --git a/src/test/java/com/relayrides/pushy/apns/ApnsClientTest.java b/src/test/java/com/relayrides/pushy/apns/ApnsClientTest.java index <HASH>..<HASH> 100644 --- a/src/test/java/com/relayrides/pushy/apns/ApnsClientTest.java +++ b/src/test/java/com/relayrides/pushy/apns/ApnsClientTest.java @@ -95,7 +95,7 @@ public class ApnsClientTest { @Before public void setUp() throws Exception { this.server = new MockApnsServer(EVENT_LOOP_GROUP); - this.server.start(PORT).await().isSuccess(); + this.server.start(PORT).await(); this.client = new ApnsClient<SimpleApnsPushNotification>( ApnsClientTest.getSslContextForTestClient(SINGLE_TOPIC_CLIENT_CERTIFICATE, SINGLE_TOPIC_CLIENT_PRIVATE_KEY), @@ -106,8 +106,8 @@ public class ApnsClientTest { @After public void tearDown() throws Exception { - this.client.disconnect().await().isSuccess(); - this.server.shutdown().await().isSuccess(); + this.client.disconnect().await(); + this.server.shutdown().await(); } @AfterClass
Removed some spurious calls to `isSuccess()`.
diff --git a/lib/booking_locations/location.rb b/lib/booking_locations/location.rb index <HASH>..<HASH> 100644 --- a/lib/booking_locations/location.rb +++ b/lib/booking_locations/location.rb @@ -52,7 +52,8 @@ module BookingLocations end def name_for(location_id) - location_for(location_id).name + found = location_for(location_id) + found ? found.name : '' end end end diff --git a/spec/location_spec.rb b/spec/location_spec.rb index <HASH>..<HASH> 100644 --- a/spec/location_spec.rb +++ b/spec/location_spec.rb @@ -84,6 +84,12 @@ RSpec.describe BookingLocations::Location do expect(subject.name_for('1d7c72fc-0c74-4418-8099-e1a4e704cb01')).to eq('Child CAB') end end + + context 'with a non-existent location ID' do + it 'returns an empty string' do + expect(subject.name_for('deadbeef-dead-beef-beef-deadbeefdead')).to eq('') + end + end end describe '#guider_name_for' do
Guard against location names This can happen when the requesting application has a reference to an outdated location.
diff --git a/src/Plugin.php b/src/Plugin.php index <HASH>..<HASH> 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -24,8 +24,8 @@ use Composer\Script\ScriptEvents; */ class Plugin implements PluginInterface, EventSubscriberInterface { - private const EXTRA_OPTION_NAME = 'config-plugin'; - private const EXTRA_DEV_OPTION_NAME = 'config-plugin-dev'; + const EXTRA_OPTION_NAME = 'config-plugin'; + const EXTRA_DEV_OPTION_NAME = 'config-plugin-dev'; /** * @var Package[] the array of active composer packages
Update Plugin.php to fix error in <I>
diff --git a/tag.go b/tag.go index <HASH>..<HASH> 100644 --- a/tag.go +++ b/tag.go @@ -216,6 +216,9 @@ func (t Tag) FormFrames() ([]byte, error) { frames.Reset() for id, f := range t.frames { + if id == "" { + return nil, errors.New("Uncorrect ID in frames") + } frameBody, err := f.Bytes() if err != nil { return nil, err @@ -237,6 +240,9 @@ func (t Tag) FormSequences() ([]byte, error) { frames.Reset() for id, s := range t.sequences { + if id == "" { + return nil, errors.New("Uncorrect ID in sequences") + } for _, f := range s.Frames() { frameBody, err := f.Bytes() if err != nil {
Add errors with uncorrect ids in frames/sequences
diff --git a/lib/ticket_evolution/core/connection.rb b/lib/ticket_evolution/core/connection.rb index <HASH>..<HASH> 100644 --- a/lib/ticket_evolution/core/connection.rb +++ b/lib/ticket_evolution/core/connection.rb @@ -40,7 +40,7 @@ module TicketEvolution @url ||= [].tap do |parts| parts << TicketEvolution::Connection.protocol parts << "://api." - parts << "#{@config[:mode]}." unless @config[:mode] == :production + parts << "#{@config[:mode]}." if @config[:mode].present? && @config[:mode].to_sym != :production parts << TicketEvolution::Connection.url_base end.join end diff --git a/spec/lib/ticket_evolution/core/connection_spec.rb b/spec/lib/ticket_evolution/core/connection_spec.rb index <HASH>..<HASH> 100644 --- a/spec/lib/ticket_evolution/core/connection_spec.rb +++ b/spec/lib/ticket_evolution/core/connection_spec.rb @@ -122,6 +122,12 @@ describe TicketEvolution::Connection do end describe "#url" do + context "mode is blank" do + subject { klass.new(valid_options.merge({:mode => nil}))} + + its(:url) { should == "https://api.ticketevolution.com" } + end + context "production" do subject { klass.new(valid_options.merge({:mode => :production}))}
a blank mode doesn't generate a 'api..ticketevo.com' URL
diff --git a/components/docked-panel-ng/docked-panel-ng.js b/components/docked-panel-ng/docked-panel-ng.js index <HASH>..<HASH> 100644 --- a/components/docked-panel-ng/docked-panel-ng.js +++ b/components/docked-panel-ng/docked-panel-ng.js @@ -155,8 +155,10 @@ angularModule.directive('rgDockedPanel', function rgDockedPanelDirective($parse) window.removeEventListener('resize', _onResize); }); - saveInitialPos(); - checkPanelPosition(); + scheduleRAF(() => { + saveInitialPos(); + checkPanelPosition(); + })(); }); }
RG-<I> wait for render before getting initial panel position
diff --git a/src/CLIResultPrinter.php b/src/CLIResultPrinter.php index <HASH>..<HASH> 100644 --- a/src/CLIResultPrinter.php +++ b/src/CLIResultPrinter.php @@ -74,7 +74,7 @@ class CLIResultPrinter implements ResultPrinterInterface foreach ($context->getErrors() as $error) { $this->output->writeln( sprintf( - '> <fg=red>%s</fg=red>', + '> <fg=red>[Error] %s</fg=red>', $error->getText() ) );
Adding [Error] to the printContext output.
diff --git a/src/controllers/CrudController.js b/src/controllers/CrudController.js index <HASH>..<HASH> 100644 --- a/src/controllers/CrudController.js +++ b/src/controllers/CrudController.js @@ -74,7 +74,7 @@ export default class CrudController { } }); remove.map(index => this[model].splice(index, 1)); - } else if (this[model] instanceof Model) { + } else if (this[model] instanceof Model && this[model].$dirty) { promises.push(this[this.$mapping[model]].save(this[model]).then(() => { done++; this.progress = (done / promises.length) * 100;
this, too, only if dirty
diff --git a/src/main/java/org/primefaces/component/treetable/TreeTableRenderer.java b/src/main/java/org/primefaces/component/treetable/TreeTableRenderer.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/primefaces/component/treetable/TreeTableRenderer.java +++ b/src/main/java/org/primefaces/component/treetable/TreeTableRenderer.java @@ -264,7 +264,7 @@ public class TreeTableRenderer extends DataRenderer { boolean hasPaginator = tt.isPaginator(); if (!(root instanceof TreeNode)) { - throw new FacesException("treeTable's value must be an instance of org.primefaces.model.TreeNode"); + throw new FacesException("treeTable's value must be an instance of " + TreeNode.class.getName()); } if (hasPaginator) {
Fix #<I> - dynamically get the full-qualified name of TreeNode
diff --git a/poem-jvm/src/javascript/movi/api/shape.js b/poem-jvm/src/javascript/movi/api/shape.js index <HASH>..<HASH> 100644 --- a/poem-jvm/src/javascript/movi/api/shape.js +++ b/poem-jvm/src/javascript/movi/api/shape.js @@ -120,8 +120,8 @@ MOVI.namespace("model"); this.childShapes = {}; // reset childShapes map // create shape object for each child and append to childShapes map - for(key in childSh) { - var child = childSh[key]; + for(var i = 0; i<childSh.length; i++) { + var child = childSh[i]; var subclass = _getSubclassForJSONObj(child, stencilset); child = new subclass(child, stencilset, this); this.childShapes[child.resourceId] = child;
Fixed bug that occurs when prototype was used along with the MOVI API git-svn-id: <URL>
diff --git a/autotest/mc_tests.py b/autotest/mc_tests.py index <HASH>..<HASH> 100644 --- a/autotest/mc_tests.py +++ b/autotest/mc_tests.py @@ -131,7 +131,7 @@ def from_dataframe_test(): pstc = Pst(pst) par = pstc.parameter_data - par.sort_values(by=parnme,ascending=False,inplace=True) + par.sort_values(by="parnme",ascending=False,inplace=True) cov = Cov.from_parameter_data(pstc) pe = ParameterEnsemble.from_gaussian_draw(pst=mc.pst,cov=cov) @@ -684,8 +684,8 @@ if __name__ == "__main__": #gaussian_draw_test() #parfile_test() # write_regul_test() - # from_dataframe_test() + from_dataframe_test() # ensemble_seed_test() # pnulpar_test() # enforce_test() - add_base_test() \ No newline at end of file + #add_base_test() \ No newline at end of file
bug fix in mc_test
diff --git a/src/Router/index.js b/src/Router/index.js index <HASH>..<HASH> 100644 --- a/src/Router/index.js +++ b/src/Router/index.js @@ -682,7 +682,7 @@ Router.prototype = { * @return {Boolean} */ isPublicFolder(url) { - return url.startsWith('/public') || + return url.startsWith('/public/') || url == '/robots.txt' || url == '/favicon.ico'; }
change check if is public route to only match routes inside /public/ not /publications
diff --git a/runtime/world.js b/runtime/world.js index <HASH>..<HASH> 100755 --- a/runtime/world.js +++ b/runtime/world.js @@ -47,7 +47,8 @@ function getDriverInstance() { case 'electron': { driver = new ElectronDriver(); - } break; + } + break; case 'chrome': { driver = new ChromeDriver(); @@ -223,18 +224,15 @@ module.exports = function () { return driver.close().then(function () { return driver.quit(); - }) - }).then(function () { - // If the test was aborted before eyes.close was called ends the test as aborted. - return eyes.abortIfNotClosed(); - }); + }).then(function () { + // If the test was aborted before eyes.close was called ends the test as aborted. + return eyes.abortIfNotClosed(); + }); + }) } return driver.close().then(function () { return driver.quit(); - }).then(function () { - // If the test was aborted before eyes.close was called ends the test as aborted. - return eyes.abortIfNotClosed(); - }); + }) }); };
Fix issue with promises in world.js only uses the abort method when test fails .
diff --git a/lib/et-orbi.rb b/lib/et-orbi.rb index <HASH>..<HASH> 100644 --- a/lib/et-orbi.rb +++ b/lib/et-orbi.rb @@ -137,13 +137,16 @@ p [ :get_tzone, :o, o ] return nil unless o.is_a?(String) s = unalias(o) +tzis = (s.match(/\AWET/) rescue nil) ? 'WET' : s p [ :get_tzone, :s, s, 0, get_offset_tzone(s) ] p [ :get_tzone, :s, s, 1, get_x_offset_tzone(s) ] p [ :get_tzone, :s, s, 2, begin; ::TZInfo::Timezone.get(s); rescue => r; r.to_s; end ] +p [ :get_tzone, :s, tzis, 2.1, begin; ::TZInfo::Timezone.get(tzis); rescue => r; r.to_s; end ] get_offset_tzone(s) || get_x_offset_tzone(s) || - (::TZInfo::Timezone.get(s) rescue nil) + (::TZInfo::Timezone.get(tzis) rescue nil) + #(::TZInfo::Timezone.get(s) rescue nil) end def render_nozone_time(seconds)
Try to truncate "WET-1WEST" to "WET"
diff --git a/salt/modules/pip.py b/salt/modules/pip.py index <HASH>..<HASH> 100644 --- a/salt/modules/pip.py +++ b/salt/modules/pip.py @@ -935,7 +935,7 @@ def upgrade(bin_env=None, if bin_env and os.path.isdir(bin_env): cmd_kwargs['env'] = {'VIRTUAL_ENV': bin_env} errors = False - for pkg in old: + for pkg in list_upgrades(bin_env=bin_env, user=user, cwd=cwd): result = __salt__['cmd.run_all'](' '.join(cmd+[pkg]), **cmd_kwargs) if result['retcode'] != 0: errors = True
ENH: Updated modules.pip.upgrade function to only upgrade packages which are out-of-date
diff --git a/controller/frontend/src/Controller/Frontend/Basket/Standard.php b/controller/frontend/src/Controller/Frontend/Basket/Standard.php index <HASH>..<HASH> 100644 --- a/controller/frontend/src/Controller/Frontend/Basket/Standard.php +++ b/controller/frontend/src/Controller/Frontend/Basket/Standard.php @@ -338,7 +338,7 @@ class Standard } - $provider = $manager->getProvider( $item, $code ); + $provider = $manager->getProvider( $item, $codeItem->getCode() ); if( $provider->isAvailable( $this->get() ) !== true ) { throw new \Aimeos\Controller\Frontend\Basket\Exception( sprintf( 'Requirements for coupon code "%1$s" aren\'t met', $code ) );
Only use coupon code from database (case sensitive)
diff --git a/sqlite3.go b/sqlite3.go index <HASH>..<HASH> 100644 --- a/sqlite3.go +++ b/sqlite3.go @@ -913,7 +913,7 @@ func (c *SQLiteConn) begin(ctx context.Context) (driver.Tx, error) { // - rwc // - memory // -// shared +// cache // SQLite Shared-Cache Mode // https://www.sqlite.org/sharedcache.html // Values: @@ -1910,7 +1910,7 @@ func (s *SQLiteStmt) exec(ctx context.Context, args []namedValue) (driver.Result resultCh <- result{r, err} }() select { - case rv := <- resultCh: + case rv := <-resultCh: return rv.r, rv.err case <-ctx.Done(): select { @@ -2011,7 +2011,7 @@ func (rc *SQLiteRows) Next(dest []driver.Value) error { resultCh <- rc.nextSyncLocked(dest) }() select { - case err := <- resultCh: + case err := <-resultCh: return err case <-rc.ctx.Done(): select {
fix typo in doc comment (#<I>)
diff --git a/src/main/java/org/jheaps/tree/DaryTreeAddressableHeap.java b/src/main/java/org/jheaps/tree/DaryTreeAddressableHeap.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/jheaps/tree/DaryTreeAddressableHeap.java +++ b/src/main/java/org/jheaps/tree/DaryTreeAddressableHeap.java @@ -63,32 +63,32 @@ public class DaryTreeAddressableHeap<K, V> implements AddressableHeap<K, V>, Ser * * @serial */ - private final Comparator<? super K> comparator; + protected final Comparator<? super K> comparator; /** * Size of the heap */ - private long size; + protected long size; /** * Root node of the heap */ - private Node root; + protected Node root; /** * Branching factor. Always a power of two. */ - private final int d; + protected final int d; /** * Base 2 logarithm of branching factor. */ - private final int log2d; + protected final int log2d; /** * Auxiliary for swapping children. */ - private Node[] aux; + protected Node[] aux; /** * Constructs a new, empty heap, using the natural ordering of its keys.
Changed access to protected for DaryTreeAddressableHeap
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -221,9 +221,15 @@ module.exports = (function () { teardown: function (connectionName, cb) { var closeConnection = function (connectionName) { var connection = me.connections[connectionName]; - if (connection.conn) connection.conn.close(function (err) { - if (err) console.error(err); - }); + if(connection) + if (connection.conn && typeof connection.conn.close == 'function') + connection.conn.close(function (err) { + if (err) console.error(err); + }); + else + connection.close(function (err) { + if (err) console.error(err); + }); delete me.connections[connectionName]; };
tearDown method verifies whether object instance has close method before attemptint to invoke connection.close() .Resolved Issue: <URL>
diff --git a/cassandra/cluster.py b/cassandra/cluster.py index <HASH>..<HASH> 100644 --- a/cassandra/cluster.py +++ b/cassandra/cluster.py @@ -44,6 +44,11 @@ try: except ImportError: from cassandra.io.asyncorereactor import AsyncoreConnection as DefaultConnection # NOQA +# Forces load of utf8 encoding module to avoid deadlock that occurs +# if code that is being imported tries to import the module in a seperate +# thread. +# See http://bugs.python.org/issue10923 +"".encode('utf8') log = logging.getLogger(__name__)
Fixed deadlock that occurs in a certain import scenario. When user code imports code that initiates a new connection, it could cause a deadlock when String.encode was called in a seperate thread (e.g. when reading messages from the cassandra server). See <URL>
diff --git a/src/arcrest/web/_base.py b/src/arcrest/web/_base.py index <HASH>..<HASH> 100644 --- a/src/arcrest/web/_base.py +++ b/src/arcrest/web/_base.py @@ -265,7 +265,7 @@ class BaseWebOperations(object): else: read = "" for data in self._chunk(response=resp, size=4096): - read += data.decode('ascii') + read += data.decode('utf') del data try: return json.loads(read.strip()) diff --git a/src/arcresthelper/publishingtools.py b/src/arcresthelper/publishingtools.py index <HASH>..<HASH> 100644 --- a/src/arcresthelper/publishingtools.py +++ b/src/arcresthelper/publishingtools.py @@ -2731,7 +2731,7 @@ class publishingtools(securityhandlerhelper): fURL = efs_config['URL'] if fURL is None: print("Item and layer not found or URL not in config") - continue + return None if 'DeleteInfo' in efs_config: if str(efs_config['DeleteInfo']['Delete']).upper() == "TRUE": resItm['DeleteDetails'] = fst.DeleteFeaturesFromFeatureLayer(url=fURL, sql=efs_config['DeleteInfo']['DeleteSQL'],chunksize=cs)
resolved bug in arcresthelper/publishingtools.py change decode from ASCII to UTF for encode response from a post to support non acsii codes
diff --git a/api/index.php b/api/index.php index <HASH>..<HASH> 100644 --- a/api/index.php +++ b/api/index.php @@ -362,7 +362,7 @@ $app->group('/push', function() use ($app) { /** * POST /push/registration */ - $app->post('/registration', function() { + $app->post('/registration', function() use ($app) { $data = $app->request->post('d') ?: $app->request->post('data') ?: $app->request->post(); return models\PushRegistration::create(array_merge($data, array('app_id' => $app->key->app_id))); }); @@ -370,7 +370,7 @@ $app->group('/push', function() use ($app) { /** * DELETE /push/registration */ - $app->delete('/registration', function() { + $app->delete('/registration', function() use ($app) { $data = $app->request->post('d') ?: $app->request->post('data') ?: $app->request->post(); return models\PushRegistration::create(array_merge($data, array('app_id' => $app->key->app_id))); });
minor fix at POST push/registration route. #<I>
diff --git a/Classes/JavascriptManager.php b/Classes/JavascriptManager.php index <HASH>..<HASH> 100644 --- a/Classes/JavascriptManager.php +++ b/Classes/JavascriptManager.php @@ -24,6 +24,7 @@ namespace ApacheSolrForTypo3\Solr; * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ +use ApacheSolrForTypo3\Solr\System\Configuration\TypoScriptConfiguration; use TYPO3\CMS\Core\Page\PageRenderer; use TYPO3\CMS\Core\Utility\GeneralUtility; @@ -37,30 +38,35 @@ class JavascriptManager const POSITION_HEADER = 'header'; const POSITION_FOOTER = 'footer'; const POSITION_NONE = 'none'; + /** * Javascript files to load. * * @var array */ protected static $files = []; + /** * Raw script snippets to load. * * @var array */ protected static $snippets = []; + /** * Javascript file configuration. * - * @var array + * @var TypoScriptConfiguration */ protected $configuration; + /** * Where to insert the JS, either header or footer * * @var string */ protected $javascriptInsertPosition; + /** * JavaScript tags to add to the page for the current instance *
[TASK] Fix scrutinizer issues in JavascriptManager
diff --git a/activerecord/lib/active_record/no_touching.rb b/activerecord/lib/active_record/no_touching.rb index <HASH>..<HASH> 100644 --- a/activerecord/lib/active_record/no_touching.rb +++ b/activerecord/lib/active_record/no_touching.rb @@ -43,6 +43,13 @@ module ActiveRecord end end + # Returns +true+ if the class has +no_touching+ set, +false+ otherwise. + # + # Project.no_touching do + # Project.first.no_touching? # true + # Message.first.no_touching? # false + # end + # def no_touching? NoTouching.applied_to?(self.class) end
Add example for no_touching? in active_record/no_touching for api docs [ci skip] There was no example code for ActiveRecord::NoTouching#no_touching?. This PR adds an example for the API docs.
diff --git a/gcloud_requests/requests_connection.py b/gcloud_requests/requests_connection.py index <HASH>..<HASH> 100644 --- a/gcloud_requests/requests_connection.py +++ b/gcloud_requests/requests_connection.py @@ -9,7 +9,7 @@ from gcloud.logging.connection import Connection as GCloudLoggingConnection from gcloud.pubsub.connection import Connection as GCloudPubSubConnection from gcloud.storage.connection import Connection as GCloudStorageConnection from google.rpc import status_pb2 -from requests.packages.urllib3 import Retry +from requests.packages.urllib3.util.retry import Retry from threading import local from . import logger
Use fully qualified urllib3 Retry import See shazow/urllib3#<I> for what is happening here
diff --git a/runtime/src/com4j/Variant.java b/runtime/src/com4j/Variant.java index <HASH>..<HASH> 100644 --- a/runtime/src/com4j/Variant.java +++ b/runtime/src/com4j/Variant.java @@ -763,6 +763,7 @@ public final class Variant extends Number { * Represents the special variant instance used for * missing parameters. */ + public static final Variant MISSING = new Variant(); /** * Generates a new Variant object, representing the VARIANT MISSING
Is this removal by accident? This is an incompatible change git-svn-id: <URL>
diff --git a/src/Resource.js b/src/Resource.js index <HASH>..<HASH> 100644 --- a/src/Resource.js +++ b/src/Resource.js @@ -16,6 +16,7 @@ var EventEmitter = require('eventemitter3'), * @param [options.loadType=Resource.LOAD_TYPE.XHR] {Resource.LOAD_TYPE} How should this resource be loaded? * @param [options.xhrType=Resource.XHR_RESPONSE_TYPE.DEFAULT] {Resource.XHR_RESPONSE_TYPE} How should the data being * loaded be interpreted when using XHR? + * @param [options.extra] {object} Extra info for middleware. */ function Resource(name, url, options) { EventEmitter.call(this); @@ -79,6 +80,13 @@ function Resource(name, url, options) { this.xhrType = options.xhrType; /** + * Extra info for middleware + * + * @member {object} + */ + this.extra = options.extra || {}; + + /** * The error that occurred while loading (if any). * * @member {Error}
Sometimes middleware needs extra info to parse the file. Required for retina and compressed textures support in pixi.js
diff --git a/js/crypto.js b/js/crypto.js index <HASH>..<HASH> 100644 --- a/js/crypto.js +++ b/js/crypto.js @@ -87,9 +87,9 @@ window.textsecure.crypto = new function() { priv[0] |= 0x0001; //TODO: fscking type conversion - return new Promise.resolve({ pubKey: prependVersion(toArrayBuffer(curve25519(priv))), privKey: privKey}); + return Promise.resolve({ pubKey: prependVersion(toArrayBuffer(curve25519(priv))), privKey: privKey}); } - + } var privToPub = function(privKey, isIdentity) { return testing_only.privToPub(privKey, isIdentity); } diff --git a/js/webcrypto.js b/js/webcrypto.js index <HASH>..<HASH> 100644 --- a/js/webcrypto.js +++ b/js/webcrypto.js @@ -73,7 +73,7 @@ window.crypto.subtle = (function() { function promise(implementation) { var args = Array.prototype.slice.call(arguments); args.shift(); - return new Promise.resolve(toArrayBuffer(implementation.apply(this, args))); + return Promise.resolve(toArrayBuffer(implementation.apply(this, args))); } // public interface functions
fixed 'TypeError: Promise.resolve is not a constructor' in Firefox
diff --git a/marshal.go b/marshal.go index <HASH>..<HASH> 100644 --- a/marshal.go +++ b/marshal.go @@ -1323,7 +1323,16 @@ func marshalUDT(info TypeInfo, value interface{}) ([]byte, error) { if !f.IsValid() { return nil, marshalErrorf("cannot marshal %T into %s", value, info) } else if f.Kind() == reflect.Ptr { - f = f.Elem() + if f.IsNil() { + n := -1 + buf = append(buf, byte(n>>24), + byte(n>>16), + byte(n>>8), + byte(n)) + continue + } else { + f = f.Elem() + } } data, err := Marshal(e.Type, f.Interface())
Encode the UDT field as null if the struct value is nil. Fixes #<I>.
diff --git a/src/Configuration/Options.php b/src/Configuration/Options.php index <HASH>..<HASH> 100644 --- a/src/Configuration/Options.php +++ b/src/Configuration/Options.php @@ -31,7 +31,7 @@ class Options /** * @var bool */ - private $shouldSkipConstructor; + private $shouldSkipConstructor = false; /** * @var PropertyAccessorInterface
Provide a default value for the skipping of the constructor
diff --git a/core/src/main/java/com/orientechnologies/orient/core/sql/query/OSQLSynchQuery.java b/core/src/main/java/com/orientechnologies/orient/core/sql/query/OSQLSynchQuery.java index <HASH>..<HASH> 100755 --- a/core/src/main/java/com/orientechnologies/orient/core/sql/query/OSQLSynchQuery.java +++ b/core/src/main/java/com/orientechnologies/orient/core/sql/query/OSQLSynchQuery.java @@ -84,6 +84,8 @@ public class OSQLSynchQuery<T extends Object> extends OSQLAsynchQuery<T> impleme result.add((T) r); } + ((OResultSet) result).setCompleted(); + if (!result.isEmpty()) { previousQueryParams = new HashMap<Object, Object>(queryParams); final ORID lastRid = ((OIdentifiable) result.get(result.size() - 1)).getIdentity();
Fixed issue when query was frozen on sharding
diff --git a/reader.go b/reader.go index <HASH>..<HASH> 100644 --- a/reader.go +++ b/reader.go @@ -541,7 +541,7 @@ func handleError(q *Reader, c *nsqConn, errMsg string) { break } err := q.ConnectToNSQ(addr) - if err != nil { + if err != nil && err != ErrAlreadyConnected { log.Printf("ERROR: failed to connect to %s - %s", addr, err.Error()) continue
handleError() loops if already connected
diff --git a/Tpg/ExtjsBundle/Tests/testrunner.js b/Tpg/ExtjsBundle/Tests/testrunner.js index <HASH>..<HASH> 100644 --- a/Tpg/ExtjsBundle/Tests/testrunner.js +++ b/Tpg/ExtjsBundle/Tests/testrunner.js @@ -13,7 +13,7 @@ var system = require('system'); * @param timeOutMillis the max amount of time to wait. If not specified, 3 sec is used. */ function waitFor(testFx, onReady, timeOutMillis) { - var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 3001, //< Default Max Timeout is 3s + var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 30001, //< Default Max Timeout is 3s start = new Date().getTime(), condition = false, interval = setInterval(function() {
Increase the timeout value for the waitFor function.
diff --git a/lmj/nn/trainer.py b/lmj/nn/trainer.py index <HASH>..<HASH> 100644 --- a/lmj/nn/trainer.py +++ b/lmj/nn/trainer.py @@ -62,6 +62,8 @@ class Trainer(object): best_iter = i best_params = [p.get_value().copy() for p in self.params] fmt += ' *' + else: + self.validation_stagnant() self.finish_iteration() except KeyboardInterrupt: logging.info('interrupted !') @@ -76,6 +78,9 @@ class Trainer(object): def finish_iteration(self): pass + def validation_stagnant(self): + pass + def evaluate(self, test_set): return np.mean([self.f_eval(*i) for i in test_set], axis=0) @@ -118,7 +123,7 @@ class SGD(Trainer): def learning_rate(self): return self.f_rate()[0] - def finish_iteration(self): + def validation_stagnant(self): self.f_finish()
During SGD training, only reduce the learning rate when validation fails to make an improvement.
diff --git a/src/PerrysLambda/ArrayBase.php b/src/PerrysLambda/ArrayBase.php index <HASH>..<HASH> 100644 --- a/src/PerrysLambda/ArrayBase.php +++ b/src/PerrysLambda/ArrayBase.php @@ -15,7 +15,7 @@ use PerrysLambda\IFieldConverter; * Base class for array-like types */ abstract class ArrayBase extends Property - implements \ArrayAccess, \SeekableIterator, IArrayable, ICloneable + implements \ArrayAccess, \SeekableIterator, IArrayable, ICloneable, \Countable { /** @@ -381,7 +381,7 @@ abstract class ArrayBase extends Property { return count($this->__data); } - + /** * Check for field by its name * @param mixed $field @@ -1161,6 +1161,18 @@ abstract class ArrayBase extends Property { $this->__iteratorindex = $position; } + + + // Countable --------------------------------------------------------------- + + + /** + * \Countable implementation + */ + public function count() + { + return $this->length(); + } }
Implement Countable interface into ArrayBase
diff --git a/lib/fluent/plugin/in_tail.rb b/lib/fluent/plugin/in_tail.rb index <HASH>..<HASH> 100644 --- a/lib/fluent/plugin/in_tail.rb +++ b/lib/fluent/plugin/in_tail.rb @@ -687,12 +687,12 @@ module Fluent::Plugin def convert(s) if @need_enc - s.encode(@encoding, @from_encoding) + s.encode!(@encoding, @from_encoding) else s end rescue - s.encode(@encoding, @from_encoding, :invalid => :replace, :undef => :replace) + s.encode!(@encoding, @from_encoding, :invalid => :replace, :undef => :replace) end def next_line
in_tail: Use encode! instead of encode to improve the performance