diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/examples/simple_pyramid_chat/chatter2/views.py b/examples/simple_pyramid_chat/chatter2/views.py
index <HASH>..<HASH> 100644
--- a/examples/simple_pyramid_chat/chatter2/views.py
+++ b/examples/simple_pyramid_chat/chatter2/views.py
@@ -50,6 +50,10 @@ class ChatNamespace(BaseNamespace, NamedUsersRoomsMixin):
def recv_disconnect(self):
self.broadcast_event('user_disconnect')
self.disconnect(silent=True)
+
+ def on_join(self, channel):
+ self.join(channel)
+
def socketio_service(request): | Update examples/simple_pyramid_chat/chatter2/views.py
Added an on_join function allow joining of rooms. |
diff --git a/templatetags/smiley_tags.py b/templatetags/smiley_tags.py
index <HASH>..<HASH> 100644
--- a/templatetags/smiley_tags.py
+++ b/templatetags/smiley_tags.py
@@ -20,3 +20,4 @@ def replace_smileys(value):
return value
register.filter('smileys', replace_smileys)
+replace_smileys.is_safe = True | adding is_safe attribut to True for the tag, thanks dmishe |
diff --git a/angr/procedures/libc/realloc.py b/angr/procedures/libc/realloc.py
index <HASH>..<HASH> 100644
--- a/angr/procedures/libc/realloc.py
+++ b/angr/procedures/libc/realloc.py
@@ -23,8 +23,11 @@ class realloc(angr.SimProcedure):
self.return_type = self.ty_ptr(SimTypeTop(size))
addr = self.state.libc.heap_location
- v = self.state.memory.load(ptr, size_int)
- self.state.memory.store(addr, v)
+
+ if self.state.solver.eval(ptr) != 0:
+ v = self.state.memory.load(ptr, size_int)
+ self.state.memory.store(addr, v)
+
self.state.libc.heap_location += size_int
return addr | Fixed false memory read of address NULL |
diff --git a/models/classes/interface.ReadableResultStorage.php b/models/classes/interface.ReadableResultStorage.php
index <HASH>..<HASH> 100644
--- a/models/classes/interface.ReadableResultStorage.php
+++ b/models/classes/interface.ReadableResultStorage.php
@@ -53,6 +53,7 @@ interface taoResultServer_models_classes_ReadableResultStorage {
*/
public function getVariables($callId);
public function getVariable($callId, $variableIdentifier);
+ public function getVariableProperty($variableId, $property);
public function getTestTaker($deliveryResultIdentifier);
public function getDelivery($deliveryResultIdentifier); | add a method in readable interface to get a property of a variable |
diff --git a/lib/metrics/instruments/counter.rb b/lib/metrics/instruments/counter.rb
index <HASH>..<HASH> 100644
--- a/lib/metrics/instruments/counter.rb
+++ b/lib/metrics/instruments/counter.rb
@@ -2,7 +2,7 @@
module Metrics
module Instruments
class Counter < Base
- @counter_value
+
def initialize
@counter_value = 0
end | Removing un-needed line in Counter |
diff --git a/package.php b/package.php
index <HASH>..<HASH> 100644
--- a/package.php
+++ b/package.php
@@ -4,7 +4,7 @@
require_once 'PEAR/PackageFileManager2.php';
-$version = '1.4.65';
+$version = '1.4.66';
$notes = <<<EOT
No release notes for you!
EOT; | prepare for release of <I>
svn commit r<I> |
diff --git a/doc/source/conf.py b/doc/source/conf.py
index <HASH>..<HASH> 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -40,7 +40,7 @@ class Mock(object):
else:
return Mock()
-MOCK_MODULES = ['PyQt4.QtGui', 'PyQt4.QtCore']
+MOCK_MODULES = ["PyQt4", 'PyQt4.QtGui', 'PyQt4.QtCore']
for mod_name in MOCK_MODULES:
sys.modules[mod_name] = Mock() | #<I> This should definitely work |
diff --git a/app/models/social_networking/goal.rb b/app/models/social_networking/goal.rb
index <HASH>..<HASH> 100644
--- a/app/models/social_networking/goal.rb
+++ b/app/models/social_networking/goal.rb
@@ -1,8 +1,10 @@
module SocialNetworking
# Something to be completed by a Participant.
class Goal < ActiveRecord::Base
- ACTION_TYPES = %w( created completed )
- Actions = Struct.new(*ACTION_TYPES.map(&:to_sym)).new(*ACTION_TYPES)
+ # create a mini DSL for types of Goal actions
+ ACTION_TYPES = %w( created completed did_not_complete )
+ Actions = Struct.new(*ACTION_TYPES.map(&:to_sym))
+ .new(*(ACTION_TYPES.map { |t| t.gsub(/_/, " ") }))
belongs_to :participant
has_many :comments, as: "item"
@@ -13,6 +15,10 @@ module SocialNetworking
validate :not_due_in_the_past, on: :create
validate :due_before_membership_ends, on: :create
+ scope :did_not_complete, (lambda do
+ where(is_completed: false).where(arel_table[:due_on].lt(Date.today))
+ end)
+
def to_serialized
if due_on
{ | augment Goal to simplify finding and sharing past due Goals [#<I>] |
diff --git a/src/nu/validator/xml/UseCountingXMLReaderWrapper.java b/src/nu/validator/xml/UseCountingXMLReaderWrapper.java
index <HASH>..<HASH> 100644
--- a/src/nu/validator/xml/UseCountingXMLReaderWrapper.java
+++ b/src/nu/validator/xml/UseCountingXMLReaderWrapper.java
@@ -238,6 +238,8 @@ public final class UseCountingXMLReaderWrapper
"http://validator.nu/properties/style-in-body-found",
true);
}
+ } else if ("body".equals(localName)) {
+ inBody = true;
}
if (atts.getIndex("", "rel") > -1
&& ("link".equals(localName) || "a".equals(localName))) { | Fix bug in use-counter statistics code |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -285,7 +285,7 @@ FileStub.prototype.make = function() {
};
/**
- * Reverse make() stubbing.
+ * Undo make().
*/
FileStub.prototype.unlink = function() {
var name = this.get('name');
@@ -312,7 +312,7 @@ FileStub.prototype.unlink = function() {
fsStub.readdir.withArgs(name).throws(err);
fsStub.readdirSync.withArgs(name).throws(err);
- //delete fileStubMap[name];
+ delete fileStubMap[name];
};
var globalInjector = { | fix(unlink): Delete old stub map entry |
diff --git a/artist/plot.py b/artist/plot.py
index <HASH>..<HASH> 100644
--- a/artist/plot.py
+++ b/artist/plot.py
@@ -683,8 +683,6 @@ class PolarPlot(Plot):
coordinates in degrees. The y values are the r coordinates in
arbitrary units.
- Histogram plots do not work properly when using the polar class.
-
"""
def __init__(self, axis='', width=r'.67\linewidth', height=None): | Remove text from docstring which is no longer true |
diff --git a/discovery-client/src/main/java/io/micronaut/discovery/aws/route53/Route53ClientDiscoveryConfiguration.java b/discovery-client/src/main/java/io/micronaut/discovery/aws/route53/Route53ClientDiscoveryConfiguration.java
index <HASH>..<HASH> 100644
--- a/discovery-client/src/main/java/io/micronaut/discovery/aws/route53/Route53ClientDiscoveryConfiguration.java
+++ b/discovery-client/src/main/java/io/micronaut/discovery/aws/route53/Route53ClientDiscoveryConfiguration.java
@@ -34,10 +34,12 @@ import javax.annotation.Nullable;
* See https://docs.aws.amazon.com/Route53/latest/APIReference/overview-service-discovery.html for details info
*/
@Requires(env = Environment.AMAZON_EC2)
-@ConfigurationProperties("aws.route53.discovery.client")
+@Requires(property = Route53ClientDiscoveryConfiguration.PREFIX)
+@ConfigurationProperties(Route53ClientDiscoveryConfiguration.PREFIX)
public class Route53ClientDiscoveryConfiguration extends DiscoveryClientConfiguration {
public static final String SERVICE_ID = "route53";
+ public static final String PREFIX = "aws.route53.discovery.client";
private String awsServiceId; //ID of the service - required to find it
private String namespaceId; // used to filter a list of available services attached to a namespace | Add requires condition for Route<I>ClientDiscoveryConfiguration |
diff --git a/lib/mosql/tailer.rb b/lib/mosql/tailer.rb
index <HASH>..<HASH> 100644
--- a/lib/mosql/tailer.rb
+++ b/lib/mosql/tailer.rb
@@ -2,7 +2,7 @@ module MoSQL
class Tailer < Mongoriver::AbstractPersistentTailer
def self.create_table(db, tablename)
if !db.table_exists?(tablename)
- db.create_table?(tablename) do
+ db.create_table(tablename) do
column :service, 'TEXT'
column :timestamp, 'INTEGER'
column :position, 'BYTEA' | No need for conditional create_table? inside conditional |
diff --git a/activerecord/test/cases/attribute_methods_test.rb b/activerecord/test/cases/attribute_methods_test.rb
index <HASH>..<HASH> 100644
--- a/activerecord/test/cases/attribute_methods_test.rb
+++ b/activerecord/test/cases/attribute_methods_test.rb
@@ -132,6 +132,23 @@ class AttributeMethodsTest < ActiveRecord::TestCase
end
end
+ def test_read_attributes_after_type_cast_on_datetime
+ in_time_zone "Pacific Time (US & Canada)" do
+ record = @target.new
+
+ record.written_on = "2011-03-24"
+ assert_equal "2011-03-24", record.written_on_before_type_cast
+ assert_equal Time.zone.parse("2011-03-24"), record.written_on
+ assert_equal ActiveSupport::TimeZone["Pacific Time (US & Canada)"],
+ record.written_on.time_zone
+
+ record.save
+ record.reload
+
+ assert_equal Time.zone.parse("2011-03-24"), record.written_on
+ end
+ end
+
def test_hash_content
topic = Topic.new
topic.content = { "one" => 1, "two" => 2 } | adding a test for attributes after type cast. thanks nragaz. :heart: |
diff --git a/packages/@vue/cli-ui/tests/e2e/specs/test.js b/packages/@vue/cli-ui/tests/e2e/specs/test.js
index <HASH>..<HASH> 100644
--- a/packages/@vue/cli-ui/tests/e2e/specs/test.js
+++ b/packages/@vue/cli-ui/tests/e2e/specs/test.js
@@ -108,6 +108,6 @@ describe('Plugins', () => {
cy.get('.loading-screen .vue-ui-loading-indicator').should('be.visible')
cy.get('.prompts-list', { timeout: 250000 }).should('be.visible')
cy.get('[data-testid="finish-install"]').should('not.have.class', 'disabled').click()
- cy.get('.project-plugin-item').should('have.length', 3)
+ cy.get('.project-plugin-item', { timeout: 250000 }).should('have.length', 3)
})
}) | test: fix plugin install: command timeout |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -42,7 +42,7 @@ extras_require = {
"pytest-pythonpath>=0.3",
"pytest-watch>=4.2,<5",
"pytest-xdist>=1.29,<2",
- "setuptools>=36.2.0",
+ "setuptools>=38.6.0",
"tox>=1.8.0",
"tqdm>4.32,<5",
"twine>=1.13,<2",
@@ -57,13 +57,16 @@ extras_require['dev'] = (
+ extras_require['dev']
)
+with open('./README.md') as readme:
+ long_description = readme.read()
+
setup(
name='web3',
# *IMPORTANT*: Don't manually change the version here. Use the 'bumpversion' utility.
version='5.12.2',
description="""Web3.py""",
long_description_content_type='text/markdown',
- long_description_markdown_filename='README.md',
+ long_description=long_description,
author='Piper Merriam',
author_email='pipermerriam@gmail.com',
url='https://github.com/ethereum/web3.py', | updated markdown metadata and bumped setuptools to <I> |
diff --git a/lib/lemonad.js b/lib/lemonad.js
index <HASH>..<HASH> 100644
--- a/lib/lemonad.js
+++ b/lib/lemonad.js
@@ -97,6 +97,12 @@
return _.uniq(arguments);
};
+ L.existy = function(x) { return x != null; };
+
+ L.truthy = function(x) {
+ return (x !== false) && exists(x);
+ };
+
// Array selectors
// --------------- | Adding the 'Just a sketch' functions |
diff --git a/packages/docs/src/store/modules/notifications.js b/packages/docs/src/store/modules/notifications.js
index <HASH>..<HASH> 100644
--- a/packages/docs/src/store/modules/notifications.js
+++ b/packages/docs/src/store/modules/notifications.js
@@ -3,8 +3,6 @@ import { make } from 'vuex-pathify'
import { subDays } from 'date-fns'
import bucket from '@/plugins/cosmicjs'
-console.log(subDays(Date.now(), 40).getTime())
-
const state = {
all: [],
} | chore(notifications): remove dev code |
diff --git a/dev/com.ibm.ws.logging_fat/fat/src/com/ibm/ws/logging/fat/TimeBasedLogRolloverTest.java b/dev/com.ibm.ws.logging_fat/fat/src/com/ibm/ws/logging/fat/TimeBasedLogRolloverTest.java
index <HASH>..<HASH> 100644
--- a/dev/com.ibm.ws.logging_fat/fat/src/com/ibm/ws/logging/fat/TimeBasedLogRolloverTest.java
+++ b/dev/com.ibm.ws.logging_fat/fat/src/com/ibm/ws/logging/fat/TimeBasedLogRolloverTest.java
@@ -371,7 +371,7 @@ public class TimeBasedLogRolloverTest {
/*
* Tests that maxFileSize takes priority over timed log rollover.
- */
+ *
@Test
public void testMaxFileSizePriorityRolling() throws Exception {
setUp(server_xml, "testMaxFileSizeRolling");
@@ -403,6 +403,7 @@ public class TimeBasedLogRolloverTest {
//check Log is rolled over at next rollover time
checkForRolledLogsAtTime(getNextRolloverTime(0,1));
}
+ */
private static String getLogsDirPath() throws Exception {
return serverInUse.getDefaultLogFile().getParentFile().getAbsolutePath(); | fixing log rollover tests (#<I>) |
diff --git a/bin/importjs.js b/bin/importjs.js
index <HASH>..<HASH> 100755
--- a/bin/importjs.js
+++ b/bin/importjs.js
@@ -11,6 +11,8 @@ const packageJson = require('../package.json');
/**
* Grab lines from stdin or directly from the file.
+ * @param {String} pathToFile
+ * @param {Function} callback
*/
function getLines(pathToFile, callback) {
if (process.stdin.isTTY) {
@@ -29,6 +31,8 @@ function getLines(pathToFile, callback) {
/**
* Run a command/method on an importer instance
+ * @param {Function} executor
+ * @param {String} pathToFile
*/
function runCommand(executor, pathToFile) {
getLines(pathToFile, (lines) => { | Add JSDoc to bin/importjs.js
These comments will help future explorers more easily understand this
code. |
diff --git a/examples/gltf/index.js b/examples/gltf/index.js
index <HASH>..<HASH> 100644
--- a/examples/gltf/index.js
+++ b/examples/gltf/index.js
@@ -313,6 +313,8 @@ function handleMesh (mesh, gltf, basePath) {
if (primitive.material !== undefined) {
const material = gltf.materials[primitive.material]
materialCmp = handleMaterial(material, gltf, basePath)
+ } else {
+ materialCmp = renderer.material({})
}
let components = [ | Add default material if gltf mesh doesn’t have one |
diff --git a/src/Debug/Route/Wamp.php b/src/Debug/Route/Wamp.php
index <HASH>..<HASH> 100644
--- a/src/Debug/Route/Wamp.php
+++ b/src/Debug/Route/Wamp.php
@@ -170,6 +170,9 @@ class Wamp implements RouteInterface
*/
public function onShutdown()
{
+ if (!$this->metaPublished) {
+ return;
+ }
// publish a "we're done" message
$this->processLogEntry(new LogEntry(
$this->debug, | Wamp: only publish endOutput if we've published meta (begin output) |
diff --git a/bin/ugrid.js b/bin/ugrid.js
index <HASH>..<HASH> 100755
--- a/bin/ugrid.js
+++ b/bin/ugrid.js
@@ -135,8 +135,11 @@ if (wsport) {
sock.ws = true;
handleConnect(sock);
ws.on('close', function () {
- console.log('## connection end');
- if (sock.client) sock.client.sock = null;
+ console.log('## connection closed');
+ if (sock.client) {
+ pubmon({event: 'disconnect', uuid: sock.client.uuid});
+ sock.client.sock = null;
+ }
if (sock.crossIndex) delete crossbar[sock.crossIndex];
});
}); | ugrid.js: fix a bug where websocket close was not monitored
Former-commit-id: <I>a4f<I>d<I>df<I>a0ff3e3b<I>b<I>d4b7d<I> |
diff --git a/subliminal/converters/thesubdb.py b/subliminal/converters/thesubdb.py
index <HASH>..<HASH> 100644
--- a/subliminal/converters/thesubdb.py
+++ b/subliminal/converters/thesubdb.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from babelfish import LanguageReverseConverter
-from subliminal.exceptions import ConfigurationError
+
+from ..exceptions import ConfigurationError
class TheSubDBConverter(LanguageReverseConverter): | Use relative imports in thesubdb |
diff --git a/src/loaders/loader.js b/src/loaders/loader.js
index <HASH>..<HASH> 100644
--- a/src/loaders/loader.js
+++ b/src/loaders/loader.js
@@ -8,8 +8,10 @@ var ResourceLoader = require('resource-loader'),
* The new loader, extends Resource Loader by Chad Engler : https://github.com/englercj/resource-loader
*
* ```js
- * var loader = new PIXI.loader();
- *
+ * var loader = PIXI.loader;
+ * //or
+ * var loader = new PIXI.loaders.Loader();
+ *
* loader.add('bunny',"data/bunny.png");
*
* loader.once('complete',onAssetsLoaded); | fixes #<I> outdated loader docs |
diff --git a/test/e2e-api/admin/members.test.js b/test/e2e-api/admin/members.test.js
index <HASH>..<HASH> 100644
--- a/test/e2e-api/admin/members.test.js
+++ b/test/e2e-api/admin/members.test.js
@@ -365,7 +365,7 @@ describe('Members API', function () {
should.exist(importedMember2);
importedMember2.name.should.equal('test');
should(importedMember2.note).equal('test note');
- importedMember2.subscribed.should.equal(true);
+ importedMember2.subscribed.should.equal(false);
importedMember2.labels.length.should.equal(2);
testUtils.API.isISO8601(importedMember2.created_at).should.be.true();
importedMember2.created_at.should.equal('1991-10-02T20:30:31.000Z'); | Fixed Members importer tests
no-issue
These tests were incorrectly checking for a subscribed value of true,
and thus failed to catch the bug fixed in the previous commit. The tests
now reflect the intended behaviour. |
diff --git a/test/spec/FindReplace-test.js b/test/spec/FindReplace-test.js
index <HASH>..<HASH> 100644
--- a/test/spec/FindReplace-test.js
+++ b/test/spec/FindReplace-test.js
@@ -2303,7 +2303,7 @@ define(function (require, exports, module) {
var kgPath = SpecRunnerUtils.getTestPath("/spec/FindReplace-known-goods/" + options.inMemoryKGFolder + filePath),
kgFile = FileSystem.getFileForPath(kgPath);
return promisify(kgFile, "read").then(function (contents) {
- expect(doc.getText()).toEqual(contents);
+ expect(doc.getText(true)).toEqual(contents);
});
}), "check in memory file contents");
}); | Use original line endings when comparing in-memory doc to known goods in Replace in Files unit tests |
diff --git a/spec/unit/mongoid/document_spec.rb b/spec/unit/mongoid/document_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/mongoid/document_spec.rb
+++ b/spec/unit/mongoid/document_spec.rb
@@ -656,7 +656,7 @@ describe Mongoid::Document do
end
- describe "#root" do
+ describe "#_root" do
before do
@person = Person.new(:title => "Mr")
@@ -694,12 +694,32 @@ describe Mongoid::Document do
describe ".store_in" do
- before do
- Patient.store_in :population
+ context "on a parent class" do
+
+ before do
+ Patient.store_in :population
+ end
+
+ it "sets the collection name for the document" do
+ Patient.collection_name.should == "population"
+ end
+
end
- it "sets the collection name for the document" do
- Patient.collection_name.should == "population"
+ context "on a subclass" do
+
+ before do
+ Firefox.store_in :browsers
+ end
+
+ after do
+ Firefox.store_in :canvases
+ end
+
+ it "changes the collection name for the entire hierarchy" do
+ Canvas.collection_name.should == "browsers"
+ end
+
end
end | Adding specs for Document.store_in on subclasses |
diff --git a/src/txkube/_swagger.py b/src/txkube/_swagger.py
index <HASH>..<HASH> 100644
--- a/src/txkube/_swagger.py
+++ b/src/txkube/_swagger.py
@@ -785,6 +785,7 @@ class VersionedPClasses(object):
def __getattr__(self, name):
+ name = name.decode("ascii")
constant_fields = {}
if self.name_field is not None:
constant_fields[self.name_field] = name
diff --git a/src/txkube/test/test_swagger.py b/src/txkube/test/test_swagger.py
index <HASH>..<HASH> 100644
--- a/src/txkube/test/test_swagger.py
+++ b/src/txkube/test/test_swagger.py
@@ -703,7 +703,10 @@ class VersionedPClassesTests(TestCase):
``VersionedPClasses``.
"""
a = VersionedPClasses(self.spec, u"a", name_field=u"name")
- self.assertThat(a.foo().name, Equals(u"foo"))
+ self.assertThat(
+ a.foo().name,
+ MatchesAll(IsInstance(unicode), Equals(u"foo")),
+ )
def test_version(self): | Make sure that ``kind`` ends up as unicode. |
diff --git a/Infra/DependencyInjection/Compiler/ResolveDomainPass.php b/Infra/DependencyInjection/Compiler/ResolveDomainPass.php
index <HASH>..<HASH> 100644
--- a/Infra/DependencyInjection/Compiler/ResolveDomainPass.php
+++ b/Infra/DependencyInjection/Compiler/ResolveDomainPass.php
@@ -36,7 +36,7 @@ final class ResolveDomainPass implements CompilerPassInterface
self::register($container, DoctrineInfra\MappingCacheWarmer::class)
->setArgument('$dirname', '%msgphp.doctrine.mapping_cache_dirname%')
->setArgument('$mappingFiles', $mappingFiles)
- ->addTag('kernel.cache_warmer');
+ ->addTag('kernel.cache_warmer', ['priority' => 100]);
}
} | fix doctrine mapping error in prod mode (#<I>) |
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -96,6 +96,8 @@ exclude_patterns = [
'notebooks/Neural_Network_and_Data_Loading.ipynb',
'notebooks/score_matching.ipynb',
'notebooks/maml.ipynb',
+ # Fails with shape error in XL
+ 'notebooks/XLA_in_Python.ipnb'
]
# The name of the Pygments (syntax highlighting) style to use. | Temporarily disable XLA_in_Python notebook, pending fixing of bug
Issue: #<I> |
diff --git a/py3status/__init__.py b/py3status/__init__.py
index <HASH>..<HASH> 100755
--- a/py3status/__init__.py
+++ b/py3status/__init__.py
@@ -227,6 +227,10 @@ class I3status(Thread):
config[section_name].append(value)
line = '}'
+ # create an empty config for this module
+ if value not in config:
+ config[value] = {}
+
# detect internal modules to be loaded dynamically
if not self.valid_config_param(value):
config['py3_modules'].append(value) | make sure we have an empty config for every requested module on the order list |
diff --git a/src/MUIDataTable.js b/src/MUIDataTable.js
index <HASH>..<HASH> 100644
--- a/src/MUIDataTable.js
+++ b/src/MUIDataTable.js
@@ -760,10 +760,6 @@ class MUIDataTable extends React.Component {
searchText,
} = this.state;
- if (!data.length) {
- return false;
- }
-
const rowCount = this.options.count || displayData.length;
return (
diff --git a/src/MUIDataTableToolbar.js b/src/MUIDataTableToolbar.js
index <HASH>..<HASH> 100644
--- a/src/MUIDataTableToolbar.js
+++ b/src/MUIDataTableToolbar.js
@@ -94,6 +94,7 @@ class MUIDataTableToolbar extends React.Component {
"",
)
.slice(0, -1) + "\r\n";
+
const CSVBody = data
.reduce(
(soFar, row) => | #<I> Display empty table if no data is given (#<I>)
* display table even when data is empty
* fix bug in CSV export when data is empty |
diff --git a/tests/Unit/ContainerTest.php b/tests/Unit/ContainerTest.php
index <HASH>..<HASH> 100644
--- a/tests/Unit/ContainerTest.php
+++ b/tests/Unit/ContainerTest.php
@@ -657,6 +657,32 @@ class ContainerTest extends TestCase
$this->assertSame('firstsecondthird', $compositeContainer->get('first-second-third'));
}
+ public function testCircularReferenceExceptionWhileResolvingProviders(): void
+ {
+ $provider = new class() extends ServiceProvider {
+ public function register(Container $container): void
+ {
+ $container->set(ContainerInterface::class, static function (ContainerInterface $container) {
+ // E.g. wrapping container with proxy class
+ return $container;
+ });
+ $container->get(B::class);
+ }
+ };
+
+ $this->expectException(\RuntimeException::class);
+ new Container(
+ [
+ B::class => function () {
+ throw new \RuntimeException();
+ },
+ ],
+ [
+ $provider,
+ ]
+ );
+ }
+
private function getProxyContainer(ContainerInterface $container): ContainerInterface
{
return new class($container) extends AbstractContainerConfigurator implements ContainerInterface { | Add test for circular exception while resolving providers (#<I>)
This test reproduces `CircularReferenceException` while
running `yii serve` in `yiisoft/app`.
The test is extracted from <URL> |
diff --git a/spec/fixtures/rails/config/environment.rb b/spec/fixtures/rails/config/environment.rb
index <HASH>..<HASH> 100644
--- a/spec/fixtures/rails/config/environment.rb
+++ b/spec/fixtures/rails/config/environment.rb
@@ -41,5 +41,4 @@ Rails::Initializer.run do |config|
ENV['RACK_ENV'] = ENV['RAILS_ENV']
config.middleware.insert_after(ActionController::Failsafe, Rack::Lilypad, 'xxx')
- config.middleware.delete(ActionController::Failsafe) # so we can test re-raise
end
\ No newline at end of file
diff --git a/spec/rack/lilypad_spec.rb b/spec/rack/lilypad_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/rack/lilypad_spec.rb
+++ b/spec/rack/lilypad_spec.rb
@@ -74,10 +74,6 @@ describe Rack::Lilypad do
@http.should_receive(:post)
get "/pulse" rescue nil
end
-
- it "should re-raise the exception" do
- lambda { get "/pulse" }.should raise_error(TestError)
- end
it "should not do anything if non-production environment" do
ENV['RACK_ENV'] = 'development' | No need to test re-raise with Rails |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -62,6 +62,13 @@ var NavigationBar = React.createClass({
navigator: React.PropTypes.object.isRequired,
route: React.PropTypes.object.isRequired,
},
+
+ getDefaultProps: function() {
+ return {
+ shouldUpdate: false
+ }
+ },
+
/*
* If there are no routes in the stack, `hidePrev` isn't provided or false,
* and we haven't received `onPrev` click handler, return true
@@ -221,7 +228,7 @@ var NavigationBar = React.createClass({
customStyle = this.props.style;
return (
- <StaticContainer shouldUpdate={false}>
+ <StaticContainer shouldUpdate={this.props.shouldUpdate}>
<View style={[styles.navBarContainer, backgroundStyle, customStyle ]}>
{this.getTitleElement()}
{this.getLeftButtonElement()} | Allow "shouldUpdate" to be configurable
There should be a way to update the title or the buttons of the navigation bar if the user wants to. |
diff --git a/restcomm/restcomm.telephony/src/main/java/org/restcomm/connect/telephony/Call.java b/restcomm/restcomm.telephony/src/main/java/org/restcomm/connect/telephony/Call.java
index <HASH>..<HASH> 100644
--- a/restcomm/restcomm.telephony/src/main/java/org/restcomm/connect/telephony/Call.java
+++ b/restcomm/restcomm.telephony/src/main/java/org/restcomm/connect/telephony/Call.java
@@ -1412,7 +1412,7 @@ public final class Call extends UntypedActor {
}
private void onPlay(Play message, ActorRef self, ActorRef sender) {
- if (is(inProgress) || is(waitingForAnswer)) {
+ if (is(inProgress)) {
// Forward to media server controller
this.msController.tell(message, sender);
} | No play actions in 'waitingForAnswer' state |
diff --git a/src/main/java/net/wouterdanes/docker/maven/StartContainerMojo.java b/src/main/java/net/wouterdanes/docker/maven/StartContainerMojo.java
index <HASH>..<HASH> 100644
--- a/src/main/java/net/wouterdanes/docker/maven/StartContainerMojo.java
+++ b/src/main/java/net/wouterdanes/docker/maven/StartContainerMojo.java
@@ -33,7 +33,6 @@ import com.google.common.collect.Collections2;
import org.apache.maven.plugin.MojoExecution;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.InstantiationStrategy;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
@@ -64,10 +63,10 @@ public class StartContainerMojo extends AbstractPreVerifyDockerMojo {
this.containers = containers;
}
- @Component
+ @Parameter(defaultValue = "${project}", readonly = true)
private MavenProject project;
- @Component
+ @Parameter(defaultValue = "${mojoExecution}", readonly = true)
private MojoExecution mojoExecution;
@Override | Replaced deprecated @Component annotation with @Parameter annotation. |
diff --git a/src/tinydb_jsonorm/models.py b/src/tinydb_jsonorm/models.py
index <HASH>..<HASH> 100644
--- a/src/tinydb_jsonorm/models.py
+++ b/src/tinydb_jsonorm/models.py
@@ -43,12 +43,16 @@ class TinyJsonModel(Model):
def __init__(self, eid=None, *args, **kwargs):
super(TinyJsonModel, self).__init__(*args, **kwargs)
+
# When eid is informed we consider as existent record in the database
if eid is not None:
self.eid = eid
else:
- # Only generate cuid for new record objects eid == None
- self._cuid = uuidgen.cuid()
+ if '_cuid' in kwargs:
+ self._cuid = kwargs['_cuid']
+ else:
+ # Only generate cuid for new record objects eid == None and kwargs['_cuid'] == None
+ self._cuid = uuidgen.cuid()
@property
def id(self): | Fixed issue that occurred when using ListField type fields using data created from another TinyJsonModel table. At the time the master record was saved a new _cuid was generated for the sub record and this caused integrity issues in certain situations. |
diff --git a/resource_aws_launch_configuration.go b/resource_aws_launch_configuration.go
index <HASH>..<HASH> 100644
--- a/resource_aws_launch_configuration.go
+++ b/resource_aws_launch_configuration.go
@@ -144,15 +144,16 @@ func resourceAwsLaunchConfigurationRead(d *schema.ResourceData, meta interface{}
if err != nil {
return fmt.Errorf("Error retrieving launch configuration: %s", err)
}
+ if len(describConfs.LaunchConfigurations) == 0 {
+ d.SetId("")
+ return nil
+ }
// Verify AWS returned our launch configuration
- if len(describConfs.LaunchConfigurations) != 1 ||
- describConfs.LaunchConfigurations[0].Name != d.Id() {
- if err != nil {
- return fmt.Errorf(
- "Unable to find launch configuration: %#v",
- describConfs.LaunchConfigurations)
- }
+ if describConfs.LaunchConfigurations[0].Name != d.Id() {
+ return fmt.Errorf(
+ "Unable to find launch configuration: %#v",
+ describConfs.LaunchConfigurations)
}
lc := describConfs.LaunchConfigurations[0] | providers/aws: if LC not found, delete it [GH-<I>] |
diff --git a/lib/axiom/relation/operation/ungroup.rb b/lib/axiom/relation/operation/ungroup.rb
index <HASH>..<HASH> 100644
--- a/lib/axiom/relation/operation/ungroup.rb
+++ b/lib/axiom/relation/operation/ungroup.rb
@@ -50,7 +50,7 @@ module Axiom
operand.each do |tuple|
outer_tuple = tuple.project(@outer)
tuple[attribute].each do |inner_tuple|
- yield outer_tuple.extend(header, inner_tuple.to_ary)
+ yield outer_tuple.join(header, inner_tuple)
end
end
self | Change Ungroup#each to join the tuples rather than using extend |
diff --git a/lib/brcobranca/version.rb b/lib/brcobranca/version.rb
index <HASH>..<HASH> 100644
--- a/lib/brcobranca/version.rb
+++ b/lib/brcobranca/version.rb
@@ -2,5 +2,5 @@
#
module Brcobranca
- VERSION = '9.2.3'
+ VERSION = '9.2.4'
end | bump up version to <I> |
diff --git a/tests/e2e/test_e2e.py b/tests/e2e/test_e2e.py
index <HASH>..<HASH> 100644
--- a/tests/e2e/test_e2e.py
+++ b/tests/e2e/test_e2e.py
@@ -90,6 +90,9 @@ def test_incremental(caplog):
assert num_docs == max_docs
docs = corpus_parser.get_documents()
+ last_docs = corpus_parser.get_documents()
+
+ assert len(docs[0].sentences) == len(last_docs[0].sentences)
# Mention Extraction
part_ngrams = MentionNgramsPart(parts_by_doc=None, n_max=3)
@@ -242,9 +245,13 @@ def test_e2e(caplog):
logger.info("Sentences: {}".format(num_sentences))
# Divide into test and train
- docs = corpus_parser.get_documents()
+ docs = sorted(corpus_parser.get_documents())
+ last_docs = sorted(corpus_parser.get_last_documents())
+
ld = len(docs)
- assert ld == len(corpus_parser.get_last_documents())
+ assert ld == len(last_docs)
+ assert len(docs[0].sentences) == len(last_docs[0].sentences)
+
assert len(docs[0].sentences) == 799
assert len(docs[1].sentences) == 663
assert len(docs[2].sentences) == 784 | test(e2e): ensure sentences are accessible from the docs in get_last_documents |
diff --git a/src/tokenization-rules.js b/src/tokenization-rules.js
index <HASH>..<HASH> 100644
--- a/src/tokenization-rules.js
+++ b/src/tokenization-rules.js
@@ -100,7 +100,7 @@ exports.forNameVariable = compose(map((tk, idx, iterable) => {
// if last token is For and current token form a valid name
// type of token is changed from WORD to NAME
- if (lastToken.For && tk.WORD && tk.WORD.match(/^[a-zA-Z_][a-zA-Z0-9_]*$/)) {
+ if (lastToken.For && tk.WORD && isValidName(tk.WORD)) {
return copyTempObject(tk, {
NAME: tk.WORD,
loc: tk.loc
@@ -113,6 +113,8 @@ exports.forNameVariable = compose(map((tk, idx, iterable) => {
exports.functionName = compose(map((tk, idx, iterable) => {
// apply only on valid positions
// (start of simple commands)
+ // if token can form the name of a function,
+ // type of token is changed from WORD to NAME
if (
tk._.maybeStartOfSimpleCommand &&
tk.WORD && | further refactor of forNameVariable |
diff --git a/sprd/view/ProductImage.js b/sprd/view/ProductImage.js
index <HASH>..<HASH> 100644
--- a/sprd/view/ProductImage.js
+++ b/sprd/view/ProductImage.js
@@ -2,7 +2,7 @@ define(["xaml!sprd/view/Image", "sprd/data/ImageService"], function (Image, Imag
var viewIdExtractor = /\/views\/(\d+)/;
- var ProductImage = Image.inherit("sprd.view.ProductImage", {
+ return Image.inherit("sprd.view.ProductImage", {
defaults: {
/***
@@ -68,6 +68,4 @@ define(["xaml!sprd/view/Image", "sprd/data/ImageService"], function (Image, Imag
}.onChange('product', 'width', 'height', 'type', 'view', 'appearance')
});
-
- return ProductImage;
});
\ No newline at end of file | refactored ProductImage variable |
diff --git a/lib/CORL/configuration/file.rb b/lib/CORL/configuration/file.rb
index <HASH>..<HASH> 100644
--- a/lib/CORL/configuration/file.rb
+++ b/lib/CORL/configuration/file.rb
@@ -8,8 +8,8 @@ class File < Nucleon.plugin_class(:CORL, :configuration)
def normalize(reload)
super do
- _set(:search, Config.new)
- _set(:router, Config.new)
+ _set(:search, Config.new({}, {}, true, false))
+ _set(:router, Config.new({}, {}, true, false))
end
end | Fixing configuration file provider initialization to create deep merged search and router configs. |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -25,7 +25,7 @@ along with pyscard; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
-from distutils.util import get_platform
+import platform
import shlex
import subprocess
import sys
@@ -40,18 +40,13 @@ platform_libraries = []
platform_extra_compile_args = [] # ['-ggdb', '-O0']
platform_extra_link_args = [] # ['-ggdb']
-if get_platform() in ('win32', 'win-amd64'):
+if platform.system() == 'Windows':
platform__cc_defines = [('WIN32', '100')]
platform_swig_opts = ['-DWIN32']
platform_sources = ['smartcard/scard/scard.rc']
platform_libraries = ['winscard']
-elif 'cygwin-' in get_platform():
- platform__cc_defines = [('WIN32', '100')]
- platform_swig_opts = ['-DWIN32']
- platform_libraries = ['winscard']
-
-elif 'macosx-' in get_platform():
+elif platform.system() == 'Darwin':
platform__cc_defines = [('PCSCLITE', '1'),
('__APPLE__', '1')]
platform_swig_opts = ['-DPCSCLITE', '-D__APPLE__'] | setup.py: do not use deprecated distutils anymore
Fix:
setup.py:<I>: DeprecationWarning: The distutils package is deprecated and slated for removal in Python <I>. Use setuptools or check PEP <I> for potential alternatives
from distutils.util import get_platform |
diff --git a/src/main/java/com/semanticcms/file/servlet/impl/FileImpl.java b/src/main/java/com/semanticcms/file/servlet/impl/FileImpl.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/semanticcms/file/servlet/impl/FileImpl.java
+++ b/src/main/java/com/semanticcms/file/servlet/impl/FileImpl.java
@@ -80,7 +80,10 @@ final public class FileImpl {
// In accessible book, use attributes
isDirectory = resourceFile.isDirectory();
// When is a directory, must end in slash
- if(!file.getPath().endsWith(com.semanticcms.file.model.File.SEPARATOR_STRING)) {
+ if(
+ isDirectory
+ && !file.getPath().endsWith(com.semanticcms.file.model.File.SEPARATOR_STRING)
+ ) {
throw new IllegalArgumentException(
"References to directories must end in slash ("
+ com.semanticcms.file.model.File.SEPARATOR_CHAR | Pulling file out of core and making files be elements. |
diff --git a/src/Scheduler.php b/src/Scheduler.php
index <HASH>..<HASH> 100644
--- a/src/Scheduler.php
+++ b/src/Scheduler.php
@@ -44,7 +44,7 @@ class Scheduler extends ArrayObject
* @param string $name
* @param callable $job The job.
*/
- public function offsetSet(string $name, callable $job)
+ public function offsetSet($name, $job)
{
if (!is_callable($job)) {
throw new InvalidArgumentException('Each job must be callable'); | not allowed, because php :( |
diff --git a/core/src/elements/ons-segment.js b/core/src/elements/ons-segment.js
index <HASH>..<HASH> 100755
--- a/core/src/elements/ons-segment.js
+++ b/core/src/elements/ons-segment.js
@@ -140,6 +140,7 @@ export default class SegmentElement extends BaseElement {
<div class="segment__item">
<input type="radio" class="segment__input"
onclick="this.nextElementSibling.click()"
+ value="${index}"
name="${this._segmentId}"
${!this.hasAttribute('tabbar-id') && index === (parseInt(this.getAttribute('active-index')) || 0) ? 'checked' : ''}>
</div> | feat(ons-segment): Index as radio value. |
diff --git a/lib/github/ldap/membership_validators/base.rb b/lib/github/ldap/membership_validators/base.rb
index <HASH>..<HASH> 100644
--- a/lib/github/ldap/membership_validators/base.rb
+++ b/lib/github/ldap/membership_validators/base.rb
@@ -2,7 +2,12 @@ module GitHub
class Ldap
module MembershipValidators
class Base
- attr_reader :ldap, :groups
+
+ # Internal: The GitHub::Ldap object to search domains with.
+ attr_reader :ldap
+
+ # Internal: an Array of Net::LDAP::Entry group objects to validate with.
+ attr_reader :groups
# Public: Instantiate new validator.
#
@@ -25,6 +30,7 @@ module GitHub
def domains
@domains ||= ldap.search_domains.map { |base| ldap.domain(base) }
end
+ private :domains
end
end
end | Document attrs, make internal method private |
diff --git a/src/ShopifyApp/resources/database/migrations/2020_01_29_230905_create_shops_table.php b/src/ShopifyApp/resources/database/migrations/2020_01_29_230905_create_shops_table.php
index <HASH>..<HASH> 100644
--- a/src/ShopifyApp/resources/database/migrations/2020_01_29_230905_create_shops_table.php
+++ b/src/ShopifyApp/resources/database/migrations/2020_01_29_230905_create_shops_table.php
@@ -19,7 +19,9 @@ class CreateShopsTable extends Migration
$table->boolean('shopify_freemium')->default(false);
$table->integer('plan_id')->unsigned()->nullable();
- $table->softDeletes();
+ if (! Schema::hasColumn('users', 'deleted_at')) {
+ $table->softDeletes();
+ }
$table->foreign('plan_id')->references('id')->on('plans');
}); | Added check for if soft delete (#<I>)
* Added check for if soft delete is already enabled on users table for the migration
* StyleCI fix |
diff --git a/src/Fields/Text.php b/src/Fields/Text.php
index <HASH>..<HASH> 100644
--- a/src/Fields/Text.php
+++ b/src/Fields/Text.php
@@ -42,4 +42,16 @@ class Text extends Field
* @var string
*/
protected $type = 'text';
+
+ /**
+ * Set the character limit
+ *
+ * @return self
+ */
+ public function maxLength(int $length): self
+ {
+ $this->config->set('maxlength', $length);
+
+ return $this;
+ }
}
diff --git a/tests/Fields/TextTest.php b/tests/Fields/TextTest.php
index <HASH>..<HASH> 100644
--- a/tests/Fields/TextTest.php
+++ b/tests/Fields/TextTest.php
@@ -98,4 +98,10 @@ class TextTest extends TestCase
$field = Text::make('Append')->append('suffix')->toArray();
$this->assertSame('suffix', $field['append']);
}
+
+ public function testMaxLength()
+ {
+ $field = Text::make('Title with length')->maxLength(10)->toArray();
+ $this->assertEquals($field['maxlength'], 10);
+ }
} | feat: added maxLength for texts fields (#<I>)
* feat: added maxLength for texts fields
* fix: typo maxlength |
diff --git a/telemetry/telemetry/core/memory_cache_http_server.py b/telemetry/telemetry/core/memory_cache_http_server.py
index <HASH>..<HASH> 100644
--- a/telemetry/telemetry/core/memory_cache_http_server.py
+++ b/telemetry/telemetry/core/memory_cache_http_server.py
@@ -23,6 +23,9 @@ ResourceAndRange = namedtuple('ResourceAndRange', ['resource', 'byte_range'])
class MemoryCacheHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
+ protocol_version = 'HTTP/1.1' # override BaseHTTPServer setting
+ wbufsize = -1 # override StreamRequestHandler (a base class) setting
+
def do_GET(self):
"""Serve a GET request."""
resource_range = self.SendHead() | [Telemetry] Set same settings on memory cache http server that WPR sets.
It looks like the error that the windows dom_perf tests are hitting could be
caused by improperly closing the socket, which this might fix.
error: [Errno <I>] An established connection was aborted by the software in your host machine
BUG=<I>
Review URL: <URL> |
diff --git a/src/bin/nca-init.js b/src/bin/nca-init.js
index <HASH>..<HASH> 100644
--- a/src/bin/nca-init.js
+++ b/src/bin/nca-init.js
@@ -1,7 +1,6 @@
/*eslint no-console: 0 */
// @flow
-import fs from 'fs'
import chalk from 'chalk'
import AutoreleaseYml from '../lib/autorelease-yml'
import WorkingDirectory from '../lib/working-directory' | refactor for lint |
diff --git a/test/functional/sessions_tests.js b/test/functional/sessions_tests.js
index <HASH>..<HASH> 100644
--- a/test/functional/sessions_tests.js
+++ b/test/functional/sessions_tests.js
@@ -50,7 +50,7 @@ describe('Sessions', function() {
}
});
- describe.only('withSession', {
+ describe('withSession', {
metadata: { requires: { mongodb: '>3.6.0' } },
test: function() {
[ | chore(sessions): remove accidentally committed `.only` |
diff --git a/util/parser.py b/util/parser.py
index <HASH>..<HASH> 100644
--- a/util/parser.py
+++ b/util/parser.py
@@ -233,8 +233,11 @@ class Parser(object):
if len(splitLine) > 0 and splitLine[0].isdigit():
iterNumber = splitLine[0]
+
# Calculate the average number of iterations it took to converge
if (len(itersToConverge) > 0):
+ itersToConverge.append(int(iterNumber))
+ currentStep += 1
avgItersToConverge = float(sum(itersToConverge)) / len(itersToConverge)
# Record some of the data in the self.stdOutData | Fixing some minor corrections for calculating convergence rates. |
diff --git a/spec/project/object/helpers/file_references_factory_spec.rb b/spec/project/object/helpers/file_references_factory_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/project/object/helpers/file_references_factory_spec.rb
+++ b/spec/project/object/helpers/file_references_factory_spec.rb
@@ -170,6 +170,20 @@ module ProjectSpecs
ref.current_version.source_tree.should == '<group>'
@group.children.should.include(ref)
end
+
+ it 'resolves path to models in subfolders' do
+ group_path = fixture_path('CoreData')
+ group = @group.new_group('CoreData', group_path)
+
+ path = 'VersionedModel.xcdatamodeld'
+ ref = @factory.send(:new_xcdatamodeld, group, path, :group)
+
+ ref.current_version.isa.should == 'PBXFileReference'
+ ref.current_version.path.should.include 'VersionedModel 2.xcdatamodel'
+ ref.current_version.last_known_file_type.should == 'wrapper.xcdatamodel'
+ ref.current_version.source_tree.should == '<group>'
+ group.children.should.include(ref)
+ end
end
#-------------------------------------------------------------------------# | Added test case for resolving data model packages in subfolders |
diff --git a/bindings/vue/src/internal/optionsObjectHelper.js b/bindings/vue/src/internal/optionsObjectHelper.js
index <HASH>..<HASH> 100644
--- a/bindings/vue/src/internal/optionsObjectHelper.js
+++ b/bindings/vue/src/internal/optionsObjectHelper.js
@@ -59,7 +59,7 @@ const createComputedPropertiesFor = (targetClass) => {
// register a computed property
// which relay set/get operations to its corresponding property of DOM element
computed[propertyName] = {
- get() { return this.$el[propertyName].__vue__ || this.$el[propertyName]; },
+ get() { return (this.$el[propertyName] && this.$el[propertyName].__vue__) || this.$el[propertyName]; },
set(newValue) { this.$el[propertyName] = newValue; }
};
} | fix(vue): Property could return null. |
diff --git a/crnk-security/src/main/java/io/crnk/security/internal/DataRoomMatcher.java b/crnk-security/src/main/java/io/crnk/security/internal/DataRoomMatcher.java
index <HASH>..<HASH> 100644
--- a/crnk-security/src/main/java/io/crnk/security/internal/DataRoomMatcher.java
+++ b/crnk-security/src/main/java/io/crnk/security/internal/DataRoomMatcher.java
@@ -50,7 +50,7 @@ public class DataRoomMatcher {
public void verifyMatch(Object resource, HttpMethod method, SecurityProvider securityProvider) {
boolean match = checkMatch(resource, method, securityProvider);
if (!match) {
- LOGGER.error("dataroom prevented access to {} for {}", resource, method);
+ LOGGER.warn("dataroom prevented access to {} for {}", resource, method);
throw new ForbiddenException("not allowed to access resource");
}
} | reduce log level of dataroom filter to WARN
align with WARN for ForbiddenException (as any 4xx error) |
diff --git a/client/lxd_containers.go b/client/lxd_containers.go
index <HASH>..<HASH> 100644
--- a/client/lxd_containers.go
+++ b/client/lxd_containers.go
@@ -1388,7 +1388,7 @@ func (r *ProtocolLXD) GetContainerTemplateFile(containerName string, templateNam
}
// Send the request
- resp, err := r.http.Do(req)
+ resp, err := r.do(req)
if err != nil {
return nil, err
}
@@ -1432,7 +1432,7 @@ func (r *ProtocolLXD) setContainerTemplateFile(containerName string, templateNam
}
// Send the request
- resp, err := r.http.Do(req)
+ resp, err := r.do(req)
// Check the return value for a cleaner error
if resp.StatusCode != http.StatusOK {
_, _, err := lxdParseResponse(resp) | client: Always use the "do()" wrapper |
diff --git a/spec/lib/bumbleworks/worker/info_spec.rb b/spec/lib/bumbleworks/worker/info_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/lib/bumbleworks/worker/info_spec.rb
+++ b/spec/lib/bumbleworks/worker/info_spec.rb
@@ -202,6 +202,11 @@ describe Bumbleworks::Worker::Info do
allow(subject).to receive(:updated_at).and_return(frozen_time - 3)
expect(subject).not_to be_updated_since(frozen_time - 2)
end
+
+ it "returns true if updated_at same as given time" do
+ allow(subject).to receive(:updated_at).and_return(frozen_time - 3)
+ expect(subject).to be_updated_since(frozen_time - 3)
+ end
end
describe "#updated_recently?" do | More test coverage around last worker info update |
diff --git a/allennlp/commands/train.py b/allennlp/commands/train.py
index <HASH>..<HASH> 100644
--- a/allennlp/commands/train.py
+++ b/allennlp/commands/train.py
@@ -343,6 +343,7 @@ def train_model(
),
nprocs=num_procs,
)
+ archive_model(serialization_dir, files_to_archive=params.files_to_archive)
model = Model.load(params, serialization_dir)
return model
diff --git a/allennlp/tests/commands/train_test.py b/allennlp/tests/commands/train_test.py
index <HASH>..<HASH> 100644
--- a/allennlp/tests/commands/train_test.py
+++ b/allennlp/tests/commands/train_test.py
@@ -114,6 +114,7 @@ class TestTrain(AllenNlpTestCase):
assert "stdout_worker0.log" in serialized_files
assert "stderr_worker1.log" in serialized_files
assert "stdout_worker1.log" in serialized_files
+ assert "model.tar.gz" in serialized_files
# Check we can load the seralized model
assert load_archive(out_dir).model | Create model archive for multi-GPU training (#<I>)
* Create model archive for multi-GPU training
* Add test for model archive creation |
diff --git a/boolean/test_boolean.py b/boolean/test_boolean.py
index <HASH>..<HASH> 100644
--- a/boolean/test_boolean.py
+++ b/boolean/test_boolean.py
@@ -1025,6 +1025,16 @@ class OtherTestCase(unittest.TestCase):
exp = alg.parse('a and b or a and c')
assert set([alg.Symbol('a'), alg.Symbol('b'), alg.Symbol('c')]) == exp.literals
+ def test_literals_and_negation(self):
+ alg = BooleanAlgebra()
+ exp = alg.parse('a and not b and not not c')
+ assert set([alg.Symbol('a'), alg.parse('not b'), alg.parse('not c')]) == exp.literals
+
+ def test_symbols_and_negation(self):
+ alg = BooleanAlgebra()
+ exp = alg.parse('a and not b and not not c')
+ assert set([alg.Symbol('a'), alg.Symbol('b'), alg.Symbol('c')]) == exp.symbols
+
def test_objects_return_set_of_unique_Symbol_objs(self):
alg = BooleanAlgebra()
exp = alg.parse('a and b or a and c') | Add literals/symbols+negation tests |
diff --git a/plugin/kubernetes/setup.go b/plugin/kubernetes/setup.go
index <HASH>..<HASH> 100644
--- a/plugin/kubernetes/setup.go
+++ b/plugin/kubernetes/setup.go
@@ -2,7 +2,9 @@ package kubernetes
import (
"errors"
+ "flag"
"fmt"
+ "os"
"strconv"
"strings"
"time"
@@ -19,6 +21,13 @@ import (
)
func init() {
+ // Kubernetes plugin uses the kubernetes library, which uses glog (ugh), we must set this *flag*,
+ // so we don't log to the filesystem, which can fill up and crash CoreDNS indirectly by calling os.Exit().
+ // We also set: os.Stderr = os.Stdout in the setup function below so we output to standard out; as we do for
+ // all CoreDNS logging. We can't do *that* in the init function, because we, when starting, also barf some
+ // things to stderr.
+ flag.Set("logtostderr", "true")
+
caddy.RegisterPlugin("kubernetes", caddy.Plugin{
ServerType: "dns",
Action: setup,
@@ -26,6 +35,9 @@ func init() {
}
func setup(c *caddy.Controller) error {
+ // See comment in the init function.
+ os.Stderr = os.Stdout
+
k, err := kubernetesParse(c)
if err != nil {
return plugin.Error("kubernetes", err) | plugin/kubernetes: make glog log to standard output (#<I>)
Jump through all the hoops to make this work. |
diff --git a/cmd/telegraf/telegraf.go b/cmd/telegraf/telegraf.go
index <HASH>..<HASH> 100644
--- a/cmd/telegraf/telegraf.go
+++ b/cmd/telegraf/telegraf.go
@@ -103,7 +103,7 @@ func reloadLoop(
}()
err := runAgent(ctx, inputFilters, outputFilters)
- if err != nil {
+ if err != nil && err != context.Canceled {
log.Fatalf("E! [telegraf] Error running agent: %v", err)
}
} | Ignore context canceled error when reloading/stopping agent |
diff --git a/cmd/update-main.go b/cmd/update-main.go
index <HASH>..<HASH> 100644
--- a/cmd/update-main.go
+++ b/cmd/update-main.go
@@ -155,6 +155,10 @@ func downloadReleaseData(releaseChecksumURL string, timeout time.Duration) (data
client := &http.Client{
Timeout: timeout,
+ Transport: &http.Transport{
+ // need to close connection after usage.
+ DisableKeepAlives: true,
+ },
}
resp, err := client.Do(req)
@@ -164,6 +168,7 @@ func downloadReleaseData(releaseChecksumURL string, timeout time.Duration) (data
if resp == nil {
return data, fmt.Errorf("No response from server to download URL %s", releaseChecksumURL)
}
+ defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return data, fmt.Errorf("Error downloading URL %s. Response: %v", releaseChecksumURL, resp.Status) | Close client connection after checking for release update (#<I>) |
diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php
index <HASH>..<HASH> 100644
--- a/DependencyInjection/Configuration.php
+++ b/DependencyInjection/Configuration.php
@@ -188,7 +188,7 @@ class Configuration implements ConfigurationInterface
// we use the parent directory name in addition to the filename to
// determine the name of the driver (e.g. doctrine/orm)
- $validDrivers[] = substr($file->getPathname(), 1 + strlen($driverDir), -4);
+ $validDrivers[] = str_replace('\\','/',substr($file->getPathname(), 1 + strlen($driverDir), -4));
}
$node | Windows path compatibility:
Updated driver detection to work with Windows file paths, which have "\" instead of "/". |
diff --git a/mod/quiz/mod_form.php b/mod/quiz/mod_form.php
index <HASH>..<HASH> 100644
--- a/mod/quiz/mod_form.php
+++ b/mod/quiz/mod_form.php
@@ -23,10 +23,10 @@ class mod_quiz_mod_form extends moodleform_mod {
//-------------------------------------------------------------------------------
$mform->addElement('header', 'timinghdr', get_string('timing', 'form'));
- $mform->addElement('date_selector', 'timeopen', get_string("quizopen", "quiz"), array('optional'=>true));
+ $mform->addElement('date_time_selector', 'timeopen', get_string("quizopen", "quiz"), array('optional'=>true));
$mform->setHelpButton('timeopen', array('timeopen', get_string('quizopens', 'quiz'), 'quiz'));
- $mform->addElement('date_selector', 'timeclose', get_string("quizcloses", "quiz"), array('optional'=>true));
+ $mform->addElement('date_time_selector', 'timeclose', get_string("quizcloses", "quiz"), array('optional'=>true));
$mform->setHelpButton('timeclose', array('timeopen', get_string('quizcloses', 'quiz'), 'quiz')); | fixes (MDL-<I>) Quiz start and close times should allow the teacher to select a time as well as a date. |
diff --git a/openquake/hazardlib/geo/utils.py b/openquake/hazardlib/geo/utils.py
index <HASH>..<HASH> 100644
--- a/openquake/hazardlib/geo/utils.py
+++ b/openquake/hazardlib/geo/utils.py
@@ -585,10 +585,10 @@ def cartesian_to_spherical(vectors):
"""
rr = numpy.sqrt(numpy.sum(vectors * vectors, axis=-1))
xx, yy, zz = vectors.T
- lats = numpy.degrees(numpy.arcsin((zz / rr).clip(-1., 1.)))
+ lats = numpy.degrees(numpy.arcsin(numpy.clip(zz / rr, -1., 1.)))
lons = numpy.degrees(numpy.arctan2(yy, xx))
depths = EARTH_RADIUS - rr
- return lons.T, lats.T, depths
+ return lons.T, lats.T, depths.T
def triangle_area(e1, e2, e3): | Fixed misprint in cartesian_to_spherical |
diff --git a/src/rinoh/frontend/__init__.py b/src/rinoh/frontend/__init__.py
index <HASH>..<HASH> 100644
--- a/src/rinoh/frontend/__init__.py
+++ b/src/rinoh/frontend/__init__.py
@@ -22,7 +22,12 @@ class TreeNode(object):
@classmethod
def map_node(cls, node):
- return cls._mapping[cls.node_tag_name(node).replace('-', '_')](node)
+ node_name = cls.node_tag_name(node)
+ try:
+ return cls._mapping[node_name.replace('-', '_')](node)
+ except KeyError:
+ raise NotImplementedError("The '{}' node is not yet supported ({})"
+ .format(node_name, cls.__module__))
def __init__(self, doctree_node):
self.node = doctree_node | A more descriptive exception when a node is not mapped |
diff --git a/src/main/java/org/efaps/ui/wicket/components/menu/DropDownMenuPanel.java b/src/main/java/org/efaps/ui/wicket/components/menu/DropDownMenuPanel.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/efaps/ui/wicket/components/menu/DropDownMenuPanel.java
+++ b/src/main/java/org/efaps/ui/wicket/components/menu/DropDownMenuPanel.java
@@ -72,12 +72,9 @@ public class DropDownMenuPanel
Component item = null;
if (childItem.getReference() != null) {
childItem.setURL(childItem.getReference());
- if (childItem.getReference().equals(
- "/" + getSession().getApplication().getApplicationKey() + "/taskadmin?")) {
+ if (childItem.getReference().endsWith("/taskadmin")) {
item = new TaskAdminItem(_idGenerator.newChildId(), Model.of(childItem));
- }
- if (childItem.getReference().equals(
- "/" + getSession().getApplication().getApplicationKey() + "/connection?")) {
+ } else if (childItem.getReference().endsWith("/connection")) {
item = new ConnectionItem(_idGenerator.newChildId(), Model.of(childItem));
}
} | - Issue #<I>: Add a new GridPage |
diff --git a/lib/snaptoken/commands/diff.rb b/lib/snaptoken/commands/diff.rb
index <HASH>..<HASH> 100644
--- a/lib/snaptoken/commands/diff.rb
+++ b/lib/snaptoken/commands/diff.rb
@@ -46,7 +46,7 @@ class Snaptoken::Commands::Diff < Snaptoken::Commands::BaseCommand
patch = patches.map(&:to_s).join("\n")
patch.gsub!(/^ /, "|")
- output << "~~~\n\n"
+ output << "~~~\n\n" unless output.empty?
output << commit_message << "\n\n" unless commit_message.empty?
output << patch << "\n" unless patches.empty?
end | Don't render initial '~~~' in .leg files |
diff --git a/internal/service/dms/endpoint.go b/internal/service/dms/endpoint.go
index <HASH>..<HASH> 100644
--- a/internal/service/dms/endpoint.go
+++ b/internal/service/dms/endpoint.go
@@ -369,7 +369,7 @@ func ResourceEndpoint() *schema.Resource {
},
"ssl_security_protocol": {
Type: schema.TypeString,
- Required: true,
+ Optional: true,
ValidateFunc: validation.StringInSlice(dms.SslSecurityProtocolValue_Values(), false),
},
}, | r/aws_dms_endpoint: 'redis_settings.ssl_security_protocol' is Optional. |
diff --git a/slack/rtm/client.py b/slack/rtm/client.py
index <HASH>..<HASH> 100644
--- a/slack/rtm/client.py
+++ b/slack/rtm/client.py
@@ -141,6 +141,7 @@ class RTMClient(object):
def decorator(callback):
RTMClient.on(event=event, callback=callback)
+ return callback
return decorator
diff --git a/tests/rtm/test_rtm_client.py b/tests/rtm/test_rtm_client.py
index <HASH>..<HASH> 100644
--- a/tests/rtm/test_rtm_client.py
+++ b/tests/rtm/test_rtm_client.py
@@ -17,6 +17,14 @@ class TestRTMClient(unittest.TestCase):
def tearDown(self):
slack.RTMClient._callbacks = collections.defaultdict(list)
+ def test_run_on_returns_callback(self):
+ @slack.RTMClient.run_on(event="message")
+ def fn_used_elsewhere(**_unused_payload):
+ pass
+
+ self.assertIsNotNone(fn_used_elsewhere)
+ self.assertEqual(fn_used_elsewhere.__name__, "fn_used_elsewhere")
+
def test_run_on_annotation_sets_callbacks(self):
@slack.RTMClient.run_on(event="message")
def say_run_on(**payload): | Return callback from `RTMClient.run_on` (#<I>)
* Return callback from `RTMClient.run_on`
* Tidy up test
* Change param name to snake_case
Names are important 😄 |
diff --git a/claripy/backends/backend_z3.py b/claripy/backends/backend_z3.py
index <HASH>..<HASH> 100644
--- a/claripy/backends/backend_z3.py
+++ b/claripy/backends/backend_z3.py
@@ -118,6 +118,17 @@ class BackendZ3(SolverBackend):
symbolic |= s
variables |= v
+ # fix up many-arg __add__
+ if op_name == '__add__' and len(args) > 2:
+ many_args = args
+ last = args[-1]
+ rest = args[:-1]
+
+ a = A(op_name, rest[:2])
+ for b in rest[2:]:
+ a = A(op_name, [a,b])
+ args = [ a, last ]
+
return A(op_name, args), variables, symbolic, z3.Z3_get_bv_sort_size(ctx, z3_sort) if z3.Z3_get_sort_kind(ctx, z3_sort) == z3.Z3_BV_SORT else -1
def solver(self, timeout=None): | re-implement multi-arg __add__ support |
diff --git a/init.php b/init.php
index <HASH>..<HASH> 100644
--- a/init.php
+++ b/init.php
@@ -8,6 +8,7 @@ Author: Pods Framework Team
Author URI: https://pods.io/about/
Text Domain: pods
GitHub Plugin URI: https://github.com/pods-framework/pods
+Primary Branch: main
Copyright 2009-2019 Pods Foundation, Inc (email : contact@podsfoundation.org) | Add Primary Branch header for GitHub Updater
Since Pods' primary branch is now `main` in order for GitHub Updater to properly work the `Primary Branch` header needs to be added. |
diff --git a/rfhub/kwdb.py b/rfhub/kwdb.py
index <HASH>..<HASH> 100644
--- a/rfhub/kwdb.py
+++ b/rfhub/kwdb.py
@@ -14,6 +14,7 @@ import logging
import json
import re
import sys
+from operator import itemgetter
from watchdog.observers import Observer
from watchdog.observers.polling import PollingObserver
@@ -434,7 +435,7 @@ class KeywordTable(object):
cursor = self._execute(sql, (pattern,))
result = [(row[0], row[1], row[2], row[3], row[4])
for row in cursor.fetchall()]
- return list(set(result))
+ return list(sorted(result, key=itemgetter(2)))
def reset(self):
"""Remove all data from the database, but leave the tables intact""" | Fixed that random test failure:
Test, 'Verify that a query returns keyword documentation'
could randomly fail with 'Documentation for Keyword #2 != Documentation
for Keyword #1' as set() did not preserve the order
of the original list returned by the database query. |
diff --git a/lib/mws-rb/api/feeds.rb b/lib/mws-rb/api/feeds.rb
index <HASH>..<HASH> 100644
--- a/lib/mws-rb/api/feeds.rb
+++ b/lib/mws-rb/api/feeds.rb
@@ -18,7 +18,7 @@ module MWS
params = params.except(:merchant_id, :message_type, :message, :messages, :skip_schema_validation)
call(:submit_feed, params.merge!(
request_params: {
- format: "xml",
+ format: :xml,
headers: {
"Content-MD5" => xml_envelope.md5
}, | Fix format option used in the submit_feed method |
diff --git a/mod/quiz/report/reportlib.php b/mod/quiz/report/reportlib.php
index <HASH>..<HASH> 100644
--- a/mod/quiz/report/reportlib.php
+++ b/mod/quiz/report/reportlib.php
@@ -99,7 +99,9 @@ function quiz_report_qm_filter_subselect($quiz){
break;
}
if ($qmfilterattempts){
- $qmsubselect = "(SELECT id FROM {$CFG->prefix}quiz_attempts WHERE u.id = userid ORDER BY $qmorderby LIMIT 1)=qa.id";
+ $qmsubselect = "(SELECT id FROM {$CFG->prefix}quiz_attempts " .
+ "WHERE quiz = {$quiz->id} AND u.id = userid " .
+ "ORDER BY $qmorderby LIMIT 1)=qa.id";
} else {
$qmsubselect = '';
}
@@ -134,4 +136,4 @@ function quiz_report_highlighting_grading_method($quiz, $qmsubselect, $qmfilter)
('<span class="highlight">'.quiz_get_grading_option_name($quiz->grademethod).'</span>'))."</p>";
}
}
-?>
\ No newline at end of file
+?> | MDL-<I> "Quiz Report: the quiz report do not find the first attempt" needed to include quiz id in WHERE conditions.
merged from <I> branch. |
diff --git a/pilbox/image.py b/pilbox/image.py
index <HASH>..<HASH> 100644
--- a/pilbox/image.py
+++ b/pilbox/image.py
@@ -465,7 +465,7 @@ def main():
metavar="|".join(Image.POSITIONS), type=str)
define("filter", help="default filter to use when resizing",
metavar="|".join(Image.FILTERS), type=str)
- define("degree", help="the desired rotation degree", type=int)
+ define("degree", help="the desired rotation degree", type=str)
define("expand", help="expand image size to accomodate rotation", type=int)
define("rect", help="rectangle: x,y,w,h", type=str)
define("format", help="default format to use when saving", | Allow degree=auto for image command line |
diff --git a/activesupport/lib/active_support/file_evented_update_checker.rb b/activesupport/lib/active_support/file_evented_update_checker.rb
index <HASH>..<HASH> 100644
--- a/activesupport/lib/active_support/file_evented_update_checker.rb
+++ b/activesupport/lib/active_support/file_evented_update_checker.rb
@@ -31,9 +31,8 @@ module ActiveSupport
end
def execute
- @block.call
- ensure
@updated.make_false
+ @block.call
end
def execute_if_updated | reset the @updated flag before the callback invocation |
diff --git a/util/Factory.js b/util/Factory.js
index <HASH>..<HASH> 100644
--- a/util/Factory.js
+++ b/util/Factory.js
@@ -1,31 +1,21 @@
-'use strict';
-
import Registry from './Registry'
/*
- * Simple factory implementation.
- *
- * @class Factory
- * @extends Registry
- * @memberof module:util
- */
-function Factory() {
- Factory.super.call(this);
-}
-
-Factory.Prototype = function() {
+ Simple factory implementation.
+ @class Factory
+ @extends Registry
+*/
+class Factory extends Registry {
/**
- * Create an instance of the clazz with a given name.
- *
- * @param {String} name
- * @return A new instance.
- * @method create
- * @memberof module:Basics.Factory.prototype
- */
- this.create = function ( name ) {
+ Create an instance of the clazz with a given name.
+
+ @param {String} name
+ @return A new instance.
+ */
+ create(name) {
var clazz = this.get(name);
- if ( !clazz ) {
+ if (!clazz) {
throw new Error( 'No class registered by that name: ' + name );
}
// call the clazz providing the remaining arguments
@@ -33,10 +23,7 @@ Factory.Prototype = function() {
var obj = Object.create( clazz.prototype );
clazz.apply( obj, args );
return obj;
- };
-
-};
-
-Registry.extend(Factory);
+ }
+}
export default Factory; | Convert Factory to ES6. |
diff --git a/controller/Reporting.php b/controller/Reporting.php
index <HASH>..<HASH> 100644
--- a/controller/Reporting.php
+++ b/controller/Reporting.php
@@ -85,8 +85,8 @@ class Reporting extends ProctoringModule
if (count($sessions) > 1) {
$title = __('Detailed Session History of a selection');
} else {
- $session = new \core_kernel_classes_Resource($sessions[0]);
- $title = __('Detailed Session History of %s', $session->getLabel());
+ $deliveryExecution = \taoDelivery_models_classes_execution_ServiceProxy::singleton()->getDeliveryExecution($sessions[0]);
+ $title = __('Detailed Session History of %s', $deliveryExecution->getLabel());
}
$this->setData('title', $title); | fix issue for non ontology delivery executions |
diff --git a/ez_setup.py b/ez_setup.py
index <HASH>..<HASH> 100644
--- a/ez_setup.py
+++ b/ez_setup.py
@@ -115,8 +115,8 @@ def _do_download(version, download_base, to_dir, download_delay):
def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
to_dir=os.curdir, download_delay=15):
to_dir = os.path.abspath(to_dir)
- was_imported = 'pkg_resources' in sys.modules or \
- 'setuptools' in sys.modules
+ rep_modules = 'pkg_resources', 'setuptools'
+ imported = set(sys.modules).intersection(rep_modules)
try:
import pkg_resources
except ImportError:
@@ -127,7 +127,7 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
except pkg_resources.DistributionNotFound:
return _do_download(version, download_base, to_dir, download_delay)
except pkg_resources.VersionConflict as VC_err:
- if was_imported:
+ if imported:
msg = textwrap.dedent("""
The required version of setuptools (>={version}) is not available,
and can't be installed while this script is running. Please | Use sets to determine presence of imported modules. |
diff --git a/Logger/Logger.php b/Logger/Logger.php
index <HASH>..<HASH> 100644
--- a/Logger/Logger.php
+++ b/Logger/Logger.php
@@ -63,6 +63,6 @@ class Logger implements LoggerInterface
}
});
- $this->logger->info($this->prefix.json_encode($query));
+ $this->logger->debug($this->prefix.json_encode($query));
}
} | changed query logging to debug instead of info |
diff --git a/dist/RegularList.js b/dist/RegularList.js
index <HASH>..<HASH> 100644
--- a/dist/RegularList.js
+++ b/dist/RegularList.js
@@ -36,6 +36,9 @@ var RegularList = function (_List) {
}
_createClass(RegularList, [{
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps() {}
+ }, {
key: 'render',
value: function render() {
var _this2 = this;
diff --git a/lib/RegularList.js b/lib/RegularList.js
index <HASH>..<HASH> 100644
--- a/lib/RegularList.js
+++ b/lib/RegularList.js
@@ -3,6 +3,10 @@ import React, { PropTypes } from 'react';
import _ from 'lodash';
class RegularList extends List {
+ componentWillReceiveProps() {
+
+ }
+
render() {
const data = this.checkForModificationsAndReturnModifiedData(this.props.data);
const style = { | fix: do not check data for regular list |
diff --git a/robots/__init__.py b/robots/__init__.py
index <HASH>..<HASH> 100644
--- a/robots/__init__.py
+++ b/robots/__init__.py
@@ -1 +1 @@
-__version__ = "1.2rc1"
+__version__ = "2.0rc1" | This is really <I> kind of release |
diff --git a/salt/modules/saltutil.py b/salt/modules/saltutil.py
index <HASH>..<HASH> 100644
--- a/salt/modules/saltutil.py
+++ b/salt/modules/saltutil.py
@@ -513,6 +513,7 @@ def sync_all(saltenv=None, refresh=True):
ret['output'] = sync_output(saltenv, False)
ret['utils'] = sync_utils(saltenv, False)
ret['log_handlers'] = sync_log_handlers(saltenv, False)
+ ret['proxymodules'] = sync_proxymodules(saltenv, False)
if refresh:
refresh_modules()
return ret | Sync proxymodules with sync_all |
diff --git a/server/server.go b/server/server.go
index <HASH>..<HASH> 100644
--- a/server/server.go
+++ b/server/server.go
@@ -945,15 +945,15 @@ func (s *Server) serveLoop(srv *http.Server) error {
// updates. We want to keep the listening socket open as long as there are
// incoming requests (but no longer than 1 min).
//
-// Effective only for servers that serve >0.2 QPS in a steady state.
+// Effective only for servers that serve >0.1 QPS in a steady state.
func (s *Server) waitUntilNotServing() {
logging.Infof(s.Context, "Received SIGTERM, waiting for the traffic to stop...")
deadline := clock.Now(s.Context).Add(time.Minute)
for {
now := clock.Now(s.Context)
lastReq, ok := s.lastReqTime.Load().(time.Time)
- if !ok || now.Sub(lastReq) > 5*time.Second {
- logging.Infof(s.Context, "No requests in last 5 sec, proceeding with the shutdown...")
+ if !ok || now.Sub(lastReq) > 15*time.Second {
+ logging.Infof(s.Context, "No requests in the last 15 sec, proceeding with the shutdown...")
break
}
if now.After(deadline) { | [server] Wait longer for traffic to stop when shutting down.
Looks like 5 sec is not enough when using Envoy STRICT_DNS discovery
type with default DNS polling frequency (which is also accidentally
5 sec).
R=<EMAIL>
Change-Id: I2e<I>c0be5d<I>bf<I>dc<I>a<I>ec<I>
Reviewed-on: <URL> |
diff --git a/server/src/main/java/org/kaazing/gateway/server/context/resolve/GatewayContextResolver.java b/server/src/main/java/org/kaazing/gateway/server/context/resolve/GatewayContextResolver.java
index <HASH>..<HASH> 100644
--- a/server/src/main/java/org/kaazing/gateway/server/context/resolve/GatewayContextResolver.java
+++ b/server/src/main/java/org/kaazing/gateway/server/context/resolve/GatewayContextResolver.java
@@ -670,6 +670,13 @@ public class GatewayContextResolver {
}
serviceRegistry.register(acceptURI, serviceContext);
}
+
+ // check for query in each connectURI
+ for (URI connectURI : connectURIs) {
+ if (connectURI.getQuery() != null) {
+ throw new IllegalArgumentException("Query parameters are not allowed in connect");
+ }
+ }
}
for (ServiceContext ctxt : serviceContexts) { | Implemented check for query parameters in connect at gateway startup |
diff --git a/github.js b/github.js
index <HASH>..<HASH> 100644
--- a/github.js
+++ b/github.js
@@ -80,6 +80,8 @@
// -------
this.show = function(username, cb) {
+ var command = username ? "/users/"+username : "/user";
+
_request("GET", "/users/"+username, null, function(err, res) {
cb(err, res);
}); | added ability to get current users info
Added ability to get current users info without asking his name as like
this done here <URL> |
diff --git a/finagle-thrift/src/main/ruby/lib/finagle-thrift/tracer.rb b/finagle-thrift/src/main/ruby/lib/finagle-thrift/tracer.rb
index <HASH>..<HASH> 100644
--- a/finagle-thrift/src/main/ruby/lib/finagle-thrift/tracer.rb
+++ b/finagle-thrift/src/main/ruby/lib/finagle-thrift/tracer.rb
@@ -181,8 +181,14 @@ module Trace
DOUBLE = "DOUBLE"
STRING = "STRING"
- def self.to_thrift(v)
- FinagleThrift::AnnotationType::VALUE_MAP.index(v)
+ if {}.respond_to?(:key)
+ def self.to_thrift(v)
+ FinagleThrift::AnnotationType::VALUE_MAP.key(v)
+ end
+ else
+ def self.to_thrift(v)
+ FinagleThrift::AnnotationType::VALUE_MAP.index(v)
+ end
end
end
@@ -245,4 +251,4 @@ module Trace
end
end
-end
\ No newline at end of file
+end | [split] finagle-thrift gem: Hash#index is deprecated in Ruby <I>
RB_ID=<I> |
diff --git a/tests/test_JFS.py b/tests/test_JFS.py
index <HASH>..<HASH> 100644
--- a/tests/test_JFS.py
+++ b/tests/test_JFS.py
@@ -633,6 +633,11 @@ class TestJFSFolder:
assert all(isinstance(item, JFS.JFSFile) for item in dev.files())
assert all(isinstance(item, JFS.JFSFolder) for item in dev.folders())
+
+ @pytest.mark.xfail # TODO: restore this when bug #74 is squashed
+ def test_delete_and_restore():
+ # testing jottacloud delete and restore
+ dev = jfs.getObject('/Jotta/Sync')
newf = dev.mkdir('testdir')
assert isinstance(newf, JFS.JFSFolder)
oldf = newf.delete() | separate JFSFolder tests, and excpect restore tests to fail, waiting on #<I> |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -4,12 +4,12 @@ from setuptools import find_packages
setup(
name='django-db-pool',
- version='0.0.5',
+ version='0.0.6',
author=u'Greg McGuire',
author_email='gregjmcguire+github@gmail.com',
packages=find_packages(),
url='https://github.com/gmcguire/django-db-pool',
- license='BSD licence, see LICENCE',
+ license='BSD licence, see LICENSE',
description='Basic database persistance / connection pooling for Django + ' + \
'Postgres.',
long_description=open('README.md').read(),
@@ -25,7 +25,7 @@ setup(
],
zip_safe=False,
install_requires=[
- "Django>=1.3,<1.3.99",
+ "Django>=1.3,<1.4.99",
"psycopg2>=2.4",
],
) | Django <I> support |
diff --git a/lib/yaml/symbolmatrix.rb b/lib/yaml/symbolmatrix.rb
index <HASH>..<HASH> 100644
--- a/lib/yaml/symbolmatrix.rb
+++ b/lib/yaml/symbolmatrix.rb
@@ -14,23 +14,22 @@ module YAML
# Can I override initialize and call super anyways??
def initialize argument = nil
- if argument.nil?
- super
- else
- if argument.is_a? String
- if File.exist? argument
- from_file argument
- else
- from_yaml argument
- end
- else
- super argument
- end
- end
end
end
end
class SymbolMatrix
include YAML::SymbolMatrix
+
+ def initialize argument = nil
+ if argument.is_a? String
+ if File.exist? argument
+ from_file argument
+ else
+ from_yaml argument
+ end
+ else
+ merge! argument unless argument.nil?
+ end
+ end
end | <I>.x compatibility |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -46,7 +46,7 @@ Pager.prototype.set = function (i, buf) {
var page = this.pages[i]
- if (page) page.buffer = buf
+ if (page) page.buffer = truncate(buf, this.pageSize)
else page = this.pages[i] = new Page(i, buf)
}
@@ -70,6 +70,14 @@ function grow (list, index, len) {
return twice
}
+function truncate (buf, len) {
+ if (buf.length === len) return len
+ if (buf.length > len) return buf.slice(0, len)
+ var cpy = alloc(len)
+ buf.copy(cpy)
+ return cpy
+}
+
function alloc (size) {
if (Buffer.alloc) return Buffer.alloc(size)
var buf = new Buffer(size) | make sure page sizes are correct on set |
diff --git a/invenio_records_rest/schemas/json.py b/invenio_records_rest/schemas/json.py
index <HASH>..<HASH> 100644
--- a/invenio_records_rest/schemas/json.py
+++ b/invenio_records_rest/schemas/json.py
@@ -82,8 +82,8 @@ class RecordMetadataSchemaJSONV1(OriginalKeysMixin):
@post_load()
def inject_pid(self, data):
"""Inject context PID in the RECID field."""
- # Use the already deserialized "pid" field
- pid_value = data.get('pid')
+ # Remove already deserialized "pid" field
+ pid_value = data.pop('pid', None)
if pid_value:
pid_field = current_app.config['PIDSTORE_RECID_FIELD']
data.setdefault(pid_field, pid_value) | marshmallow: delete duplicated pid field
* Delete duplicated pid field from the loaded data since the ``pid``
field in the ``PersistentIdentifier`` object is a ``Generated``
field and therefore, it should not exists per se. |
diff --git a/SwatDB/SwatDB.php b/SwatDB/SwatDB.php
index <HASH>..<HASH> 100644
--- a/SwatDB/SwatDB.php
+++ b/SwatDB/SwatDB.php
@@ -478,6 +478,9 @@ class SwatDB extends SwatObject
$value_field = new SwatDBField($value_field, 'integer');
$bound_field = new SwatDBField($bound_field, 'integer');
+ // define here to prevent notice in debug statement
+ $insert_sql = '';
+
$delete_sql = 'delete from %s where %s = %s';
$delete_sql = sprintf($delete_sql, | Fix a PHP notice.
svn commit r<I> |
diff --git a/client/request.go b/client/request.go
index <HASH>..<HASH> 100644
--- a/client/request.go
+++ b/client/request.go
@@ -134,8 +134,7 @@ func (cli *Client) doRequest(ctx context.Context, req *http.Request) (serverResp
// Don't decorate context sentinel errors; users may be comparing to
// them directly.
- switch err {
- case context.Canceled, context.DeadlineExceeded:
+ if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {
return serverResp, err
} | Check for context error that is wrapped in url.Error |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.