diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/openquake/calculators/disaggregation.py b/openquake/calculators/disaggregation.py index <HASH>..<HASH> 100644 --- a/openquake/calculators/disaggregation.py +++ b/openquake/calculators/disaggregation.py @@ -55,15 +55,13 @@ F32 = numpy.float32 def _check_curves(sid, rlzs, curves, imtls, poes_disagg): # there may be sites where the sources are too small to produce # an effect at the given poes_disagg - bad = 0 for rlz, curve in zip(rlzs, curves): for imt in imtls: max_poe = curve[imt].max() for poe in poes_disagg: if poe > max_poe: logging.warning(POE_TOO_BIG, sid, poe, max_poe, rlz, imt) - bad += 1 - return bool(bad) + return True def _matrix(matrices, num_trts, num_mag_bins):
Better logging [skip CI]
diff --git a/demo/js/dropzones.js b/demo/js/dropzones.js index <HASH>..<HASH> 100644 --- a/demo/js/dropzones.js +++ b/demo/js/dropzones.js @@ -57,13 +57,27 @@ } }) .on('dropactivate', function (event) { - addClass(event.target, '-drop-possible'); - event.target.textContent = 'Drop me here!'; + var active = event.target.getAttribute('active')|0; + // change style if it was previously not active + if (active === 0) { + addClass(event.target, '-drop-possible'); + event.target.textContent = 'Drop me here!'; + } + + event.target.setAttribute('active', active + 1); }) .on('dropdeactivate', function (event) { - removeClass(event.target, '-drop-possible'); - event.target.textContent = 'Dropzone'; + var active = event.target.getAttribute('active')|0; + + // change style if it was previously active + // but will no longer be active + if (active === 1) { + removeClass(event.target, '-drop-possible'); + event.target.textContent = 'Dropzone'; + } + + event.target.setAttribute('active', active - 1); }) .on('dragenter', function (event) { addClass(event.target, '-drop-over');
Count active drops in dropzones demo
diff --git a/lib/run/responder.js b/lib/run/responder.js index <HASH>..<HASH> 100644 --- a/lib/run/responder.js +++ b/lib/run/responder.js @@ -24,6 +24,7 @@ module.exports = function *(apiDefinition, result) { return { status: parseInt(response.statusCode), + type: accept, body: body }; }; diff --git a/lib/run/route.js b/lib/run/route.js index <HASH>..<HASH> 100644 --- a/lib/run/route.js +++ b/lib/run/route.js @@ -70,6 +70,7 @@ module.exports = function(apiDefinition, program) { console.log('\t--'.gray, 'Creating response'); const response = yield Responder.bind(this, apiDefinition, result); this.status = response.status; + this.type = response.type; this.body = response.body; }; };
Make sure to send along content-type to responses in Lambda run
diff --git a/src/java/voldemort/store/routed/RoutedStore.java b/src/java/voldemort/store/routed/RoutedStore.java index <HASH>..<HASH> 100644 --- a/src/java/voldemort/store/routed/RoutedStore.java +++ b/src/java/voldemort/store/routed/RoutedStore.java @@ -98,7 +98,7 @@ public class RoutedStore implements Store<ByteArray, byte[]> { private final StoreDefinition storeDef; private final FailureDetector failureDetector; - private RoutingStrategy routingStrategy; + private volatile RoutingStrategy routingStrategy; /** * Create a RoutedStoreClient
Add volatile to routingStrategy. It can be modified after initialisation and it's accessed from multiple threads.
diff --git a/vault/counters.go b/vault/counters.go index <HASH>..<HASH> 100644 --- a/vault/counters.go +++ b/vault/counters.go @@ -12,8 +12,11 @@ import ( const ( requestCounterDatePathFormat = "2006/01" - countersPath = systemBarrierPrefix + "counters" - requestCountersPath = "sys/counters/requests/" + + // This storage path stores both the request counters in this file, and the activity log. + countersSubPath = "counters/" + + requestCountersPath = "sys/counters/requests/" ) type counters struct { diff --git a/vault/logical_system.go b/vault/logical_system.go index <HASH>..<HASH> 100644 --- a/vault/logical_system.go +++ b/vault/logical_system.go @@ -141,6 +141,7 @@ func NewSystemBackend(core *Core, logger log.Logger) *SystemBackend { LocalStorage: []string{ expirationSubPath, + countersSubPath, }, }, }
Move "counters" path to the logical system's local path list. (#<I>)
diff --git a/nose/test_actionAngle.py b/nose/test_actionAngle.py index <HASH>..<HASH> 100644 --- a/nose/test_actionAngle.py +++ b/nose/test_actionAngle.py @@ -20,7 +20,7 @@ def test_actionAngleIsochrone_basic_actions(): assert numpy.fabs(js[2]) < 10.**-4., 'Close-to-circular orbit in the isochrone potential does not have small Jz' #Close-to-circular orbit, called with time R,vR,vT,z,vz= 1.01,0.01,1.,0.01,0.01 - js= aAI(Orbit([R,vR,vT,z,vz])(0.)) + js= aAI(Orbit([R,vR,vT,z,vz]),0.) assert numpy.fabs(js[0]) < 10.**-4., 'Close-to-circular orbit in the isochrone potential does not have small Jr' assert numpy.fabs(js[2]) < 10.**-4., 'Close-to-circular orbit in the isochrone potential does not have small Jz' return None
fix actionAngle w/ time call
diff --git a/spec/lib/danger/danger_core/environment_manager_spec.rb b/spec/lib/danger/danger_core/environment_manager_spec.rb index <HASH>..<HASH> 100644 --- a/spec/lib/danger/danger_core/environment_manager_spec.rb +++ b/spec/lib/danger/danger_core/environment_manager_spec.rb @@ -378,5 +378,19 @@ RSpec.describe Danger::EnvironmentManager, use: :ci_helper do expect(ui.string).to include("Travis note: If you have an open source project, you should ensure 'Display value in build log' enabled for these flags, so that PRs from forks work.") end + + context "cannot find request source" do + it "raises error" do + env = { "DANGER_USE_LOCAL_GIT" => "true" } + fake_ui = double("Cork::Board") + allow(Cork::Board).to receive(:new) { fake_ui } + allow(Danger::RequestSources::RequestSource).to receive(:available_request_sources) { [] } + + expect(fake_ui).to receive(:title) + expect(fake_ui).to receive(:puts).exactly(5).times + + expect { Danger::EnvironmentManager.new(env, nil) }.to raise_error(SystemExit) + end + end end end
Adds EnvironmentManager test to catch missing UI argument will still output to default UI
diff --git a/class.form.php b/class.form.php index <HASH>..<HASH> 100644 --- a/class.form.php +++ b/class.form.php @@ -2515,6 +2515,7 @@ STR; return $str; } + /*This function renders the form's javascript. This function is invoked within includes/js.php. The contents returned by this function are then placed in the document's head tag for xhtml strict compliance.*/ public function renderJS($returnString=false) { $str = ""; @@ -3115,6 +3116,7 @@ STR; return $str; } + /*This function renders the form's css. This function is invoked within includes/css.php. The contents returned by this function are then placed in the document's head tag for xhtml strict compliance.*/ public function renderCSS($returnString=false) { $str = ""; diff --git a/includes/js.php b/includes/js.php index <HASH>..<HASH> 100644 --- a/includes/js.php +++ b/includes/js.php @@ -2,6 +2,12 @@ session_start(); header("Content-Type: text/javascript"); +if(empty($_SESSION["pfbc-instances"][$_GET["id"]])) +{ + echo 'alert("php-form-builder-class Configuration Error: Session Not Started\n\nA session is required to generate this form\'s necessary javascript and stylesheet information. To correct, simply add session_start(); before any output in your script.");'; + exit(); +} + $path = "../class.form.php"; if(is_file($path))
Added javascript alerts within includes/js.php to provide helpful feedback on configuration issues. Added a few comments to class.form.php. git-svn-id: <URL>
diff --git a/Classes/Lib/Db.php b/Classes/Lib/Db.php index <HASH>..<HASH> 100644 --- a/Classes/Lib/Db.php +++ b/Classes/Lib/Db.php @@ -2,6 +2,7 @@ namespace TeaminmediasPluswerk\KeSearch\Lib; use TeaminmediasPluswerk\KeSearch\Plugins\SearchboxPlugin; +use TYPO3\CMS\Core\Context\Context; use TYPO3\CMS\Core\Database\ConnectionPool; use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; @@ -181,8 +182,10 @@ class Db implements \TYPO3\CMS\Core\SingletonInterface // add fe_groups to query $queryForSphinx .= ' @fe_group _group_NULL | _group_0'; - if (!empty($GLOBALS['TSFE']->gr_list)) { - $feGroups = GeneralUtility::trimExplode(',', $GLOBALS['TSFE']->gr_list, 1); + + $context = GeneralUtility::makeInstance(Context::class); + $feGroups = $context->getPropertyFromAspect('frontend.user', 'groupIds'); + if (count($feGroups)) { foreach ($feGroups as $key => $group) { $intval_positive_group = MathUtility::convertToPositiveInteger($group); if ($intval_positive_group) {
[TASK] use context api for fe user grouplist $GLOBALS['TSFE']->gr_list is deprecated; the group list ist fetched by the context api now
diff --git a/starter-app/src/main/java/ch/ralscha/starter/service/UserService.java b/starter-app/src/main/java/ch/ralscha/starter/service/UserService.java index <HASH>..<HASH> 100644 --- a/starter-app/src/main/java/ch/ralscha/starter/service/UserService.java +++ b/starter-app/src/main/java/ch/ralscha/starter/service/UserService.java @@ -17,8 +17,8 @@ import org.springframework.context.MessageSource; import org.springframework.context.annotation.Lazy; import org.springframework.data.domain.Page; import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.security.authentication.encoding.PasswordEncoder; import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Controller; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.StringUtils; @@ -134,7 +134,7 @@ public class UserService { if (!result.hasErrors()) { if (StringUtils.hasText(modifiedUser.getPasswordHash())) { - modifiedUser.setPasswordHash(passwordEncoder.encode(modifiedUser.getPasswordHash())); + modifiedUser.setPasswordHash(passwordEncoder.encodePassword(modifiedUser.getPasswordHash(), null)); } if (!options) {
use jasypt for password hashing
diff --git a/elasticsearch_dsl/__init__.py b/elasticsearch_dsl/__init__.py index <HASH>..<HASH> 100644 --- a/elasticsearch_dsl/__init__.py +++ b/elasticsearch_dsl/__init__.py @@ -1,5 +1,7 @@ from .query import Q from .filter import F +from .aggs import A +from .function import SF from .search import Search VERSION = (0, 0, 1)
Added more shortcuts to be importable from top-level
diff --git a/app/routes/application.js b/app/routes/application.js index <HASH>..<HASH> 100644 --- a/app/routes/application.js +++ b/app/routes/application.js @@ -81,6 +81,11 @@ let ApplicationRoute = Route.extend(ApplicationRouteMixin, ModalHelper, SetupUse } }, + beforeModel() { + let intl = this.get('intl'); + intl.setLocale('en'); + }, + model(params, transition) { let session = get(this, 'session'); let isAuthenticated = session && get(session, 'isAuthenticated');
Set default locale to 'en' on application
diff --git a/symphony/assets/admin.js b/symphony/assets/admin.js index <HASH>..<HASH> 100644 --- a/symphony/assets/admin.js +++ b/symphony/assets/admin.js @@ -38,23 +38,23 @@ var Symphony; if (y < movable.min) { t = movable.target.prev(); do { + movable.delta--; n = t.prev(); if (n.length === 0 || y >= (movable.min -= n.height())) { movable.target.insertBefore(t); break; } - movable.delta--; t = n; } while (true); } else if (y > movable.max) { t = movable.target.next(); do { + movable.delta++; n = t.next(); if (n.length === 0 || y <= (movable.max += n.height())) { movable.target.insertAfter(t); break; } - movable.delta++; t = n; } while (true); } else { @@ -116,7 +116,7 @@ var Symphony; }); }); - $('td, .subsection h4').live('click', function(e) { + $('.selectable td, .subsection h4').live('click', function(e) { if (movable.delta || !/^(?:td|h4)$/i.test(e.target.nodeName)) { return true; }
Fixed incorrect reordering delta reporting
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -67,11 +67,13 @@ setup_args = { 'long_description': long_description, 'author': "Brian Warner", 'author_email': "warner-buildbot@lothar.com", + 'maintainer': "Dustin J. Mitchell", + 'maintainer_email': "dustin@v.igoro.us", 'url': "http://buildbot.net/", 'license': "GNU GPL", # does this classifiers= mean that this can't be installed on 2.2/2.3? 'classifiers': [ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'Environment :: No Input/Output (Daemon)', 'Environment :: Web Environment', 'Intended Audience :: Developers',
mark as 5 - Production/Stable, and add me as a maintainer
diff --git a/proto/extensions.go b/proto/extensions.go index <HASH>..<HASH> 100644 --- a/proto/extensions.go +++ b/proto/extensions.go @@ -488,7 +488,7 @@ func SetExtension(pb Message, extension *ExtensionDesc, value interface{}) error } typ := reflect.TypeOf(extension.ExtensionType) if typ != reflect.TypeOf(value) { - return errors.New("proto: bad extension value type") + return fmt.Errorf("proto: bad extension value type. got: %T, want: %T", value, extension.ExtensionType) } // nil extension values need to be caught early, because the // encoder can't distinguish an ErrNil due to a nil extension
proto: return more useful error message in SetExtension (#<I>) Including the types that are mismatched, rather than just stating that there was a type mismatch makes the error easier to debug and fix.
diff --git a/state/backups/create.go b/state/backups/create.go index <HASH>..<HASH> 100644 --- a/state/backups/create.go +++ b/state/backups/create.go @@ -67,6 +67,8 @@ func create(args *createArgs) (*createResult, error) { // deleted at the end of this function. This includes the backup // archive file we built. However, the handle to that file in the // result will still be open and readable. + // If we ever support state machines on Windows, this will need to + // change (you can't delete open files on Windows). return result, nil }
Make a note about deleting open files on Windows.
diff --git a/lib/orchestrate.rb b/lib/orchestrate.rb index <HASH>..<HASH> 100644 --- a/lib/orchestrate.rb +++ b/lib/orchestrate.rb @@ -10,7 +10,9 @@ module Orchestrate persistence_adapter: Dynflow::PersistenceAdapters::Sequel.new(db_config), transaction_adapter: Dynflow::TransactionAdapters::ActiveRecord.new } - @world = Dynflow::World.new(world_options) + @world = Orchestrate::World.new(world_options).tap do + at_exit { @world.terminate!.wait } + end end def self.trigger(action, *args)
add graceful shutdown of Dynflow World
diff --git a/src/jsep.js b/src/jsep.js index <HASH>..<HASH> 100644 --- a/src/jsep.js +++ b/src/jsep.js @@ -352,7 +352,7 @@ case 'b': str += '\b'; break; case 'f': str += '\f'; break; case 'v': str += '\x0B'; break; - case '\\': str += '\\'; break; + default : str += ch; } } else { str += ch;
Update jsep.js (#<I>) gobbleStringLiteral small improvement
diff --git a/annotations/cypher.go b/annotations/cypher.go index <HASH>..<HASH> 100644 --- a/annotations/cypher.go +++ b/annotations/cypher.go @@ -89,7 +89,7 @@ func (s service) Read(contentUUID string) (thing interface{}, found bool, err er mapToResponseFormat(&results[idx]) } - return results, true, nil + return annotations(results), true, nil } //Delete removes all the annotations for this content. Ignore the nodes on either end - diff --git a/annotations/cypher_test.go b/annotations/cypher_test.go index <HASH>..<HASH> 100644 --- a/annotations/cypher_test.go +++ b/annotations/cypher_test.go @@ -619,7 +619,7 @@ func getAnnotationsService(t *testing.T, platformVersion string) service { func readAnnotationsForContentUUIDAndCheckKeyFieldsMatch(t *testing.T, contentUUID string, expectedAnnotations []annotation) { assert := assert.New(t) storedThings, found, err := annotationsDriver.Read(contentUUID) - storedAnnotations := storedThings.([]annotation) + storedAnnotations := storedThings.(annotations) assert.NoError(err, "Error finding annotations for contentUUID %s", contentUUID) assert.True(found, "Didn't find annotations for contentUUID %s", contentUUID)
Type consistency Always return the same type from Read()
diff --git a/dispatch/modules/content/models.py b/dispatch/modules/content/models.py index <HASH>..<HASH> 100644 --- a/dispatch/modules/content/models.py +++ b/dispatch/modules/content/models.py @@ -515,6 +515,7 @@ class Poll(Model): for answer in answers: try: answer_obj = PollAnswer.objects.get(poll=self, id=answer['id']) + answer_obj.name = answer['name'] except PollAnswer.DoesNotExist: answer_obj = PollAnswer(poll=self, name=answer['name']) answer_obj.save()
fixed save_answers to actually update the answer name
diff --git a/credhub/get.go b/credhub/get.go index <HASH>..<HASH> 100644 --- a/credhub/get.go +++ b/credhub/get.go @@ -30,7 +30,7 @@ func (ch *CredHub) GetAllVersions(name string) ([]credentials.Credential, error) return ch.makeMultiCredentialGetRequest(query) } -// Get returns the current credential version for a given credential name. The returned credential may be of any type. +// GetLatestVersion returns the current credential version for a given credential name. The returned credential may be of any type. func (ch *CredHub) GetLatestVersion(name string) (credentials.Credential, error) { var cred credentials.Credential err := ch.getCurrentCredential(name, &cred)
Fix method name in description [ci skip] [#<I>]
diff --git a/src/Resources/Refund.php b/src/Resources/Refund.php index <HASH>..<HASH> 100644 --- a/src/Resources/Refund.php +++ b/src/Resources/Refund.php @@ -49,6 +49,22 @@ class Refund extends BaseResource public $paymentId; /** + * The order id that was refunded. + * + * @var string|null + */ + public $orderId; + + /** + * The order lines contain the actual things the customer ordered. + * The lines will show the quantity, discountAmount, vatAmount and totalAmount + * refunded. + * + * @var array|object[]|null + */ + public $lines; + + /** * The settlement amount * * @var object
Added orderId and lines attributes
diff --git a/lib/moob/idrac6.rb b/lib/moob/idrac6.rb index <HASH>..<HASH> 100644 --- a/lib/moob/idrac6.rb +++ b/lib/moob/idrac6.rb @@ -17,7 +17,7 @@ class Idrac6 < BaseLom v6DHCPEnabled v6DHCPServers v6DNS1 v6DNS2 v6SiteLocal v6SiteLocal3 v6SiteLocal4 v6SiteLocal5 v6SiteLocal6 v6SiteLocal7 v6SiteLocal8 v6SiteLocal9 v6SiteLocal10 v6SiteLocal11 v6SiteLocal12 v6SiteLocal13 v6SiteLocal14 v6SiteLocal15 - ipmiLAN ipmiMinPriv ipmiKey + ipmiLAN ipmiMinPriv ] def initialize hostname, options = {}
don't fetch ipmiKey info don't fetch ipmiKey info, causes the HTTP request to hang on some configurations
diff --git a/tasks/zaproxy.js b/tasks/zaproxy.js index <HASH>..<HASH> 100644 --- a/tasks/zaproxy.js +++ b/tasks/zaproxy.js @@ -100,7 +100,8 @@ module.exports = function (grunt) { // Set up options. var options = this.options({ host: 'localhost', - port: '8080' + port: '8080', + apiKey: '7c3sdphhcg24l7hnjj0dgeg3as' }); var asyncDone = this.async(); @@ -114,11 +115,17 @@ module.exports = function (grunt) { } }; - var zaproxy = new ZapClient({ proxy: 'http://' + options.host + ':' + options.port }); + console.log('SERVER_HOST : ' + options.host); + console.log('SERVER_PORT : ' + options.port); + console.log('APIKEY : ' + options.apiKey); + + var options = { proxy: 'http://' + options.host + ':' + options.port, apikey: options.apiKey }; + + var zaproxy = new ZapClient(options); grunt.log.write('Stopping ZAProxy: '); zaproxy.core.shutdown(function (err) { if (err) { - grunt.log.writeln('ZAProxy does not appear to be running.'); + grunt.fail.warn('ZAProxy does not appear to be running: ' + JSON.stringify(err, null, 2)); done(); return; }
Add apikey in ZapClient
diff --git a/src/Authentication.php b/src/Authentication.php index <HASH>..<HASH> 100644 --- a/src/Authentication.php +++ b/src/Authentication.php @@ -120,6 +120,34 @@ class Authentication implements AuthenticationInterface public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { + $auth_result = $this->authenticatedUsingAdapters($request); + + if ($auth_result instanceof TransportInterface + && !$auth_result->isEmpty() + ) { + if ($auth_result instanceof AuthenticationTransportInterface) { + $this->setAuthenticatedUser($auth_result->getAuthenticatedUser()); + $this->setAuthenticatedWith($auth_result->getAuthenticatedWith()); + + $this->triggerEvent( + 'user_authenticated', + $auth_result->getAuthenticatedUser(), + $auth_result->getAuthenticatedWith() + ); + } + + $request = $auth_result->applyToRequest($request); + } + + $response = $handler->handle($request); + + if ($auth_result instanceof TransportInterface + && !$auth_result->isEmpty() + ) { + $response = $auth_result->applyToResponse($response); + } + + return $response; } /**
Make authentication utility a fully featured PSR-<I> middleware
diff --git a/test/StoragelessTest/Http/SessionMiddlewareTest.php b/test/StoragelessTest/Http/SessionMiddlewareTest.php index <HASH>..<HASH> 100644 --- a/test/StoragelessTest/Http/SessionMiddlewareTest.php +++ b/test/StoragelessTest/Http/SessionMiddlewareTest.php @@ -558,7 +558,7 @@ final class SessionMiddlewareTest extends TestCase public function validMiddlewaresProvider(): array { return $this->defaultMiddlewaresProvider() + [ - [ + 'from-constructor' => [ static function (): SessionMiddleware { return new SessionMiddleware( new Sha256(), @@ -580,12 +580,12 @@ final class SessionMiddlewareTest extends TestCase public function defaultMiddlewaresProvider(): array { return [ - [ + 'from-symmetric' => [ static function (): SessionMiddleware { return SessionMiddleware::fromSymmetricKeyDefaults('not relevant', 100); }, ], - [ + 'from-asymmetric' => [ static function (): SessionMiddleware { return SessionMiddleware::fromAsymmetricKeyDefaults( self::privateKey(),
Fix bug on plus operator over numeric-key arrays
diff --git a/gtk/gtk.go b/gtk/gtk.go index <HASH>..<HASH> 100644 --- a/gtk/gtk.go +++ b/gtk/gtk.go @@ -2478,7 +2478,7 @@ func (v *Container) ChildSetProperty(child IWidget, name string, value interface cstr := C.CString(name) defer C.free(unsafe.Pointer(cstr)) - C.gtk_container_child_set_property(v.native(), child.toWidget(), (*C.gchar)(cstr), (*C.GValue)(unsafe.Pointer(gv))) + C.gtk_container_child_set_property(v.native(), child.toWidget(), (*C.gchar)(cstr), (*C.GValue)(unsafe.Pointer(gv.Native()))) return nil }
Fix crash when using Container.ChildSetProperty. An example has been added to gotk3-examples (stack) to test this.
diff --git a/nosedjango/nosedjango.py b/nosedjango/nosedjango.py index <HASH>..<HASH> 100644 --- a/nosedjango/nosedjango.py +++ b/nosedjango/nosedjango.py @@ -139,11 +139,12 @@ class NoseDjango(Plugin): from django.conf import settings # If the user passed in --django-sqlite, use an in-memory sqlite db - settings.DATABASE_ENGINE = 'sqlite3' - settings.DATABASE_NAME = '' # in-memory database - settings.DATABASE_OPTIONS = {} - settings.DATABASE_USER = '' - settings.DATABASE_PASSWORD = '' + if self._use_sqlite: + settings.DATABASE_ENGINE = 'sqlite3' + settings.DATABASE_NAME = '' # in-memory database + settings.DATABASE_OPTIONS = {} + settings.DATABASE_USER = '' + settings.DATABASE_PASSWORD = '' settings.SOUTH_TESTS_MIGRATE = False # Do our custom testrunner stuff
Made the --django-sqlite option actually doing something instead of always using sqlite, regardless. Oops.
diff --git a/src/SignatureRequestRecipient.php b/src/SignatureRequestRecipient.php index <HASH>..<HASH> 100644 --- a/src/SignatureRequestRecipient.php +++ b/src/SignatureRequestRecipient.php @@ -58,6 +58,7 @@ class SignatureRequestRecipient extends Model implements IAdditionalDocuments 'ip', 'date_signed', 'date_created', + 'access', ]; /**
KSV | API-<I> | return access field to s2s recipient
diff --git a/code/libraries/koowa/database/adapter/mysqli.php b/code/libraries/koowa/database/adapter/mysqli.php index <HASH>..<HASH> 100644 --- a/code/libraries/koowa/database/adapter/mysqli.php +++ b/code/libraries/koowa/database/adapter/mysqli.php @@ -168,8 +168,8 @@ class KDatabaseAdapterMysqli extends KDatabaseAdapterAbstract * @return boolean */ public function active() - { - return is_resource($this->_connection) && $this->_connection->ping(); + { + return is_object($this->_connection) && @$this->_connection->ping(); } /**
Supress errors generated by ping method.
diff --git a/src/GrumPHP/Console/Command/ConfigureCommand.php b/src/GrumPHP/Console/Command/ConfigureCommand.php index <HASH>..<HASH> 100644 --- a/src/GrumPHP/Console/Command/ConfigureCommand.php +++ b/src/GrumPHP/Console/Command/ConfigureCommand.php @@ -246,9 +246,12 @@ class ConfigureCommand extends Command protected function getAvailableTasks() { $tasks = array( - '1' => 'phpcs', - '2' => 'phpspec', - '3' => 'phpunit', + '1' => 'behat', + '2' => 'blacklist', + '3' => 'phpcs', + '4' => 'phpcsfixer', + '5' => 'phpspec', + '6' => 'phpunit', ); return $tasks; }
Add all basic tasks to the configure command.
diff --git a/imutils/face_utils/facealigner.py b/imutils/face_utils/facealigner.py index <HASH>..<HASH> 100644 --- a/imutils/face_utils/facealigner.py +++ b/imutils/face_utils/facealigner.py @@ -1,5 +1,6 @@ # import the necessary packages -from .helpers import FACIAL_LANDMARKS_IDXS +from .helpers import FACIAL_LANDMARKS_68_IDXS +from .helpers import FACIAL_LANDMARKS_5_IDXS from .helpers import shape_to_np import numpy as np import cv2
Added support for Dlib’s 5-point facial landmark detector
diff --git a/nano.js b/nano.js index <HASH>..<HASH> 100644 --- a/nano.js +++ b/nano.js @@ -49,6 +49,9 @@ module.exports = exports = nano = function database_module(cfg) { if(cfg.proxy) { request = request.defaults({proxy: cfg.proxy}); // proxy support } + if(!cfg.jar) { + request = request.defaults({jar: false}); // use cookie jar + } if(!cfg.url) { console.error("bad cfg: using default=" + default_url); cfg = {url: default_url}; // if everything else fails, use default @@ -104,6 +107,11 @@ module.exports = exports = nano = function database_module(cfg) { , status_code , parsed , rh; + + if (opts.jar) { + req.jar = opts.jar; + } + if(opts.path) { req.uri += "/" + opts.path; }
Add ability to enable / disable cookie jar (global or per request)
diff --git a/rope/base/fscommands.py b/rope/base/fscommands.py index <HASH>..<HASH> 100644 --- a/rope/base/fscommands.py +++ b/rope/base/fscommands.py @@ -203,20 +203,21 @@ def read_str_coding(source): return _find_coding(source[:second]) -def _find_coding(first_two_lines): +def _find_coding(text): coding = 'coding' try: - start = first_two_lines.index(coding) + len(coding) - while start < len(first_two_lines): - if first_two_lines[start] not in '=: \t': - break + start = text.index(coding) + len(coding) + if text[start] not in '=:': + return + start += 1 + while start < len(text) and text[start].isspace(): start += 1 end = start - while end < len(first_two_lines): - c = first_two_lines[end] + while end < len(text): + c = text[end] if not c.isalnum() and c not in '-_': break end += 1 - return first_two_lines[start:end] + return text[start:end] except ValueError: pass
fscommands: better encoding extraction in _find_coding()
diff --git a/monolithe/specifications/repositorymanager.py b/monolithe/specifications/repositorymanager.py index <HASH>..<HASH> 100644 --- a/monolithe/specifications/repositorymanager.py +++ b/monolithe/specifications/repositorymanager.py @@ -148,7 +148,7 @@ class RepositoryManager (object): path = os.path.normpath("%s/%s" % (self._repository_path, "monolithe.ini")) try: data = base64.b64decode(self._repo.get_file_contents(path, ref=branch).content) - string_buffer = io.StringIO(data) + string_buffer = StringIO.StringIO(data) monolithe_config_parser = configparser.ConfigParser() monolithe_config_parser.readfp(string_buffer) return monolithe_config_parser
do not use io, there are some bugs with future
diff --git a/lib/jsonapi/link_builder.rb b/lib/jsonapi/link_builder.rb index <HASH>..<HASH> 100644 --- a/lib/jsonapi/link_builder.rb +++ b/lib/jsonapi/link_builder.rb @@ -127,12 +127,11 @@ module JSONAPI end def resource_path(source) - url = "#{resources_path(source.class)}" - - unless source.class.singleton? - url = "#{url}/#{source.id}" + if source.class.singleton? + resources_path(source.class) + else + "#{resources_path(source.class)}/#{source.id}" end - url end def resource_url(source)
Optimize resource_path generation to reduce string allocations
diff --git a/awslimitchecker/services/lambdafunc.py b/awslimitchecker/services/lambdafunc.py index <HASH>..<HASH> 100644 --- a/awslimitchecker/services/lambdafunc.py +++ b/awslimitchecker/services/lambdafunc.py @@ -117,16 +117,16 @@ class _LambdaService(_AwsService): return self.connect() lims = self.conn.get_account_settings()['AccountLimit'] - self.limits['Code Size Unzipped (MiB)']._set_api_limit( - (lims['CodeSizeUnzipped']/1048576)) - self.limits['Code Size Zipped (MiB)']._set_api_limit( - (lims['CodeSizeZipped']/1048576)) self.limits['Total Code Size (GiB)']._set_api_limit( (lims['TotalCodeSize']/1048576/1024)) + self.limits['Code Size Unzipped (MiB)']._set_api_limit( + (lims['CodeSizeUnzipped']/1048576)) self.limits['Unreserved Concurrent Executions']._set_api_limit( lims['UnreservedConcurrentExecutions']) self.limits['Concurrent Executions']._set_api_limit( lims['ConcurrentExecutions']) + self.limits['Code Size Zipped (MiB)']._set_api_limit( + (lims['CodeSizeZipped']/1048576)) def _construct_limits(self): self.limits = {}
PR #<I> - make order match between _construct_limits and _update_limits_from_api because I'm horribly pedantic
diff --git a/tests/Concise/Matcher/BooleanTest.php b/tests/Concise/Matcher/BooleanTest.php index <HASH>..<HASH> 100644 --- a/tests/Concise/Matcher/BooleanTest.php +++ b/tests/Concise/Matcher/BooleanTest.php @@ -22,4 +22,21 @@ class BooleanTest extends AbstractMatcherTestCase 'b is false' ); } + + public function failedMessages() + { + return array( + array('false', array(), 'Failed'), + array('? is true', array(false), 'Value is not true.'), + array('? is false', array(true), 'Value is not false.'), + ); + } + + /** + * @dataProvider failedMessages + */ + public function testFailedMessageForFalse($syntax, $args, $message) + { + $this->assertEquals($message, $this->matcher->match($syntax, $args)); + } }
Failed messages for boolean matchers
diff --git a/chess/pgn.py b/chess/pgn.py index <HASH>..<HASH> 100644 --- a/chess/pgn.py +++ b/chess/pgn.py @@ -1354,10 +1354,10 @@ def read_game(handle: TextIO, *, Visitor: Any = GameBuilder) -> Any: By using text mode, the parser does not need to handle encodings. It is the caller's responsibility to open the file with the correct encoding. - PGN files are usually ASCII or UTF-8 encoded. So, the following should - cover most relevant cases (ASCII, UTF-8, UTF-8 with BOM). + PGN files are usually ASCII or UTF-8 encoded, sometimes with BOM (which + this parser automatically ignores). - >>> pgn = open("data/pgn/kasparov-deep-blue-1997.pgn", encoding="utf-8-sig") + >>> pgn = open("data/pgn/kasparov-deep-blue-1997.pgn", encoding="utf-8") Use :class:`~io.StringIO` to parse games from a string.
User does not have to handle BOM anymore
diff --git a/lib/snapshot/collector.rb b/lib/snapshot/collector.rb index <HASH>..<HASH> 100644 --- a/lib/snapshot/collector.rb +++ b/lib/snapshot/collector.rb @@ -20,7 +20,8 @@ module Snapshot language_folder = File.join(Snapshot.config[:output_directory], language) FileUtils.mkdir_p(language_folder) - output_path = File.join(language_folder, [device_type, name].join("-") + ".png") + device_name = device_type.gsub(" ", "") + output_path = File.join(language_folder, [device_name, name].join("-") + ".png") from_path = File.join(attachments_path, filename) if $verbose Helper.log.info "Copying file '#{from_path}' to '#{output_path}'...".green
Updated naming of screenshots to not have spaces
diff --git a/test_project/test_project/urls.py b/test_project/test_project/urls.py index <HASH>..<HASH> 100644 --- a/test_project/test_project/urls.py +++ b/test_project/test_project/urls.py @@ -1,5 +1,6 @@ import time +from django.conf import settings from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: @@ -16,6 +17,8 @@ class SleepView(generic.TemplateView): return super(SleepView, self).get(request, *args, **kwargs) urlpatterns = patterns('', + url(r'^favicon\.ico$', generic.RedirectView.as_view( + url=settings.STATIC_URL + '/favicon.ico')), url(r'^$', generic.TemplateView.as_view(template_name='home.html')), url(r'^sleep/$', login_required( SleepView.as_view(template_name='home.html')), name='sleep'),
Get rid of the annoying 'Not Found: /favicon.ico' during test
diff --git a/pydle/async.py b/pydle/async.py index <HASH>..<HASH> 100644 --- a/pydle/async.py +++ b/pydle/async.py @@ -104,7 +104,7 @@ class EventLoop: self.run_thread = None self.handlers = {} self.future_timeout = FUTURE_TIMEOUT - self._registered_events = False + self._registered_events = set() self._future_timeouts = {} self._timeout_id = 0 self._timeout_handles = {} @@ -175,7 +175,7 @@ class EventLoop: def _update_events(self, fd): - if self._registered_events: + if fd in self._registered_events: self.io_loop.remove_handler(fd) events = 0 @@ -184,7 +184,7 @@ class EventLoop: events |= ident self.io_loop.add_handler(fd, self._do_on_event, events) - self._registered_events = True + self._registered_events.add(fd) def _do_on_event(self, fd, events): if fd not in self.handlers:
Fix issue with tracking event loop handler registration per FD.
diff --git a/lib/jaysus/base.rb b/lib/jaysus/base.rb index <HASH>..<HASH> 100644 --- a/lib/jaysus/base.rb +++ b/lib/jaysus/base.rb @@ -170,6 +170,18 @@ module Jaysus "#{send(self.class.model_base.primary_key)}" end + def to_json + {}.tap do |outer_hash| + outer_hash[self.class.store_file_dir_name.singularize] = {}.tap do |inner_hash| + self.class.model_base.attributes.each do |attribute| + if self.send(attribute).present? + inner_hash[attribute] = self.send(attribute) + end + end + end + end.to_json + end + def persisted? store_file.exist? end
overload to_json to only provide methods if they exist
diff --git a/lib/wed/wed.js b/lib/wed/wed.js index <HASH>..<HASH> 100644 --- a/lib/wed/wed.js +++ b/lib/wed/wed.js @@ -559,6 +559,11 @@ Editor.prototype._postInitialize = log.wrap(function () { this.decorator.startListening(this.$gui_root); + // Drag and drop not supported. + this.$gui_root.on("dragenter", false); + this.$gui_root.on("dragover", false); + this.$gui_root.on("drop", false); + this.$gui_root.on('wed-global-keydown', this._globalKeydownHandler.bind(this));
Turn off drag and drop in the editing area.
diff --git a/spyderlib/widgets/externalshell/monitor.py b/spyderlib/widgets/externalshell/monitor.py index <HASH>..<HASH> 100644 --- a/spyderlib/widgets/externalshell/monitor.py +++ b/spyderlib/widgets/externalshell/monitor.py @@ -23,7 +23,7 @@ from spyderlib.baseconfig import get_conf_path, get_supported_types, DEBUG from spyderlib.py3compat import getcwd, is_text_string, pickle, _thread -SUPPORTED_TYPES = get_supported_types() +SUPPORTED_TYPES = {} LOG_FILENAME = get_conf_path('monitor.log') @@ -48,6 +48,9 @@ def get_remote_data(data, settings, mode, more_excluded_names=None): * more_excluded_names: additional excluded names (list) """ from spyderlib.widgets.dicteditorutils import globalsfilter + global SUPPORTED_TYPES + if not SUPPORTED_TYPES: + SUPPORTED_TYPES = get_supported_types() assert mode in list(SUPPORTED_TYPES.keys()) excluded_names = settings['excluded_names'] if more_excluded_names is not None:
External Console: Prevent pandas from being imported too early when creating a console - This was making pandas to set an incorrect encoding for the console - See this SO question for the problem: <URL>
diff --git a/lib/sdl.rb b/lib/sdl.rb index <HASH>..<HASH> 100644 --- a/lib/sdl.rb +++ b/lib/sdl.rb @@ -23,7 +23,7 @@ end module SDL - VERSION = "1.2.0" + VERSION = "1.3.0" class PixelFormat
change constant SDL::VERSION
diff --git a/lib/chefspec/policyfile.rb b/lib/chefspec/policyfile.rb index <HASH>..<HASH> 100644 --- a/lib/chefspec/policyfile.rb +++ b/lib/chefspec/policyfile.rb @@ -23,7 +23,6 @@ module ChefSpec # def setup! policyfile_path = File.join(Dir.pwd, 'Policyfile.rb') - cbdir = File.join(@tmpdir, 'cookbooks') installer = ChefDK::PolicyfileServices::Install.new( policyfile: policyfile_path, @@ -40,7 +39,12 @@ module ChefSpec FileUtils.rm_rf(@tmpdir) exporter.run - ::RSpec.configure { |config| config.cookbook_path = cbdir } + ::RSpec.configure do |config| + config.cookbook_path = [ + File.join(@tmpdir, 'cookbooks'), + File.join(@tmpdir, 'cookbook_artifacts') + ] + end end #
Use both cookbooks and cookbook_artifacts as cookbook_dir in policyfile integration to support newer versions of chef-dk.
diff --git a/js/cw/unittest.js b/js/cw/unittest.js index <HASH>..<HASH> 100644 --- a/js/cw/unittest.js +++ b/js/cw/unittest.js @@ -615,7 +615,11 @@ cw.UnitTest.TestCase = function(methodName) {}; * Test cases subclass cw.UnitTest.TestCase with cw.Class. */ cw.Class.subclass(cw.UnitTest, 'TestCase', true/*overwriteOkay*/).pmethods({ - '__init__': function(methodName) { + '__init__': + /** + * @this {cw.UnitTest.TestCase} + */ + function(methodName) { /** * @type {string} * @private
js/cw/unittest.js: fix compiler warnings about 'global this'
diff --git a/tests/test_cli.py b/tests/test_cli.py index <HASH>..<HASH> 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -11,12 +11,14 @@ class TestCli(unittest.TestCase): self.captured_output = io.StringIO() sys.stdout = self.captured_output + def tearDown(self): + sys.stdout = sys.__stdout__ # Reset redirect. + def test_show_version(self): sys.argv = ["hrun", "-V"] with self.assertRaises(SystemExit) as cm: main() - sys.stdout = sys.__stdout__ # Reset redirect. self.assertEqual(cm.exception.code, 0) @@ -28,7 +30,6 @@ class TestCli(unittest.TestCase): with self.assertRaises(SystemExit) as cm: main() - sys.stdout = sys.__stdout__ # Reset redirect. self.assertEqual(cm.exception.code, 0)
test: Reset redirect in teardown
diff --git a/lib/locomotive/coal/resources/concerns/request.rb b/lib/locomotive/coal/resources/concerns/request.rb index <HASH>..<HASH> 100644 --- a/lib/locomotive/coal/resources/concerns/request.rb +++ b/lib/locomotive/coal/resources/concerns/request.rb @@ -51,7 +51,7 @@ module Locomotive::Coal::Resources parameters = parameters.merge(auth_token: credentials[:token]) if _token _connection.send(action, endpoint) do |request| - request.headers = _request_headers(parameters) + request.headers.merge!(_request_headers(parameters)) if %i(post put).include?(action) request.body = _encode_parameters(parameters) @@ -77,7 +77,7 @@ module Locomotive::Coal::Resources @_connection ||= Faraday.new(url: "#{uri.scheme}://#{uri.host}:#{uri.port}") do |faraday| faraday.request :multipart faraday.request :url_encoded # form-encode POST params - faraday.basic_auth uri.userinfo.values if uri.userinfo + faraday.basic_auth *uri.userinfo.split(':') if uri.userinfo faraday.use FaradayMiddleware::ParseJson, content_type: /\bjson$/
Fixed adding of faraday basic_auth param, fixed request headers
diff --git a/sprd/model/Delivery.js b/sprd/model/Delivery.js index <HASH>..<HASH> 100644 --- a/sprd/model/Delivery.js +++ b/sprd/model/Delivery.js @@ -97,9 +97,15 @@ define(["sprd/data/SprdModel", "js/data/Entity", "sprd/entity/Address", "sprd/mo errorCode: "atLeast8Digits", regEx: /(.*\d.*){8}/ }), + new RegExValidator({ + field: "email", + errorCode: 'emailError', + regEx: /^[^.@]+@[^.]{1,64}\.[^.]+$/ + }), new LengthValidator({ field: "email", - maxLength: 30 + errorCode: 'emailError', + maxLength: 255 }), new LengthValidator({ field: "phone",
DEV-<I> - Email field limited to <I> chars in new checkout
diff --git a/config/styleguide.config.js b/config/styleguide.config.js index <HASH>..<HASH> 100644 --- a/config/styleguide.config.js +++ b/config/styleguide.config.js @@ -6,7 +6,9 @@ const toggle = (newComponentPath, oldComponentPath) => ( process.env.NODE_ENV === 'production' ? oldComponentPath : newComponentPath ) -const compact = array => array.filter(element => element !== undefined) +const compact = array => ( // eslint-disable-line no-unused-vars + array.filter(element => element !== undefined) +) module.exports = { @@ -135,11 +137,11 @@ module.exports = { { name: 'Links', components() { - return compact([ - toggle(path.resolve('src/components/Link/Link.jsx')), - toggle(path.resolve('src/components/Link/ChevronLink/ChevronLink.jsx')), - toggle(path.resolve('src/components/Link/ButtonLink/ButtonLink.jsx')) - ]) + return [ + path.resolve('src/components/Link/Link.jsx'), + path.resolve('src/components/Link/ChevronLink/ChevronLink.jsx'), + path.resolve('src/components/Link/ButtonLink/ButtonLink.jsx') + ] } }, {
feat(link): untoggle display of Link Components for staging and production
diff --git a/src/Subfission/Cas/CasManager.php b/src/Subfission/Cas/CasManager.php index <HASH>..<HASH> 100644 --- a/src/Subfission/Cas/CasManager.php +++ b/src/Subfission/Cas/CasManager.php @@ -203,7 +203,7 @@ class CasManager { */ public function isAuthenticated() { - return phpCAS::isAuthenticated(); + return $this->config['cas_masquerade'] ? true : phpCAS::isAuthenticated(); } /**
Fixing bug referenced by issue #<I> (#<I>)
diff --git a/crypto/rsautil/rsautil.go b/crypto/rsautil/rsautil.go index <HASH>..<HASH> 100644 --- a/crypto/rsautil/rsautil.go +++ b/crypto/rsautil/rsautil.go @@ -1,7 +1,7 @@ package rsautil import ( - "crypto/md5" + "crypto/md5" // #nosec G501 "crypto/rand" "crypto/rsa" "encoding/base64" diff --git a/encoding/base10/base10.go b/encoding/base10/base10.go index <HASH>..<HASH> 100644 --- a/encoding/base10/base10.go +++ b/encoding/base10/base10.go @@ -2,7 +2,7 @@ package base10 import ( - "crypto/md5" + "crypto/md5" // #nosec G501 "math/big" ) diff --git a/encoding/base36/base36.go b/encoding/base36/base36.go index <HASH>..<HASH> 100644 --- a/encoding/base36/base36.go +++ b/encoding/base36/base36.go @@ -2,7 +2,7 @@ package base36 import ( - "crypto/md5" + "crypto/md5" // #nosec G501 "encoding/hex" "fmt" "strings"
lint: golangci: add point includes for `gosec.G<I>`
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -4,8 +4,16 @@ module.exports = function (statusCode) { statusCode || (statusCode = 301); return function (req, res, next) { - var routes = req.app.routes[req.method.toLowerCase()], - url, pathname, search, match; + var method = req.method.toLowerCase(), + hasSlash, match, pathname, routes, slash, url; + + // Skip when the request is neither a GET or HEAD. + if (!(method === 'get' || method === 'head')) { + next(); + return; + } + + routes = req.app.routes[method]; // Skip when no routes for the request method. if (!routes) {
Only attempt to handle GET and HEAD requests The way in which this middleware is attempting to handle requests by sending "blind" redirect responses only makes sense when the original request is either a GET or HEAD.
diff --git a/engineio/client.py b/engineio/client.py index <HASH>..<HASH> 100644 --- a/engineio/client.py +++ b/engineio/client.py @@ -335,8 +335,8 @@ class Client(object): """Establish or upgrade to a WebSocket connection with the server.""" if websocket is None: # pragma: no cover # not installed - self.logger.warning('websocket-client package not installed, only ' - 'polling transport is available') + self.logger.error('websocket-client package not installed, only ' + 'polling transport is available') return False websocket_url = self._get_engineio_url(url, engineio_path, 'websocket') if self.sid:
Report missing websocket client as an error in log (Fixes <URL>)
diff --git a/duradmin/src/main/webapp/js/spaces-manager.js b/duradmin/src/main/webapp/js/spaces-manager.js index <HASH>..<HASH> 100644 --- a/duradmin/src/main/webapp/js/spaces-manager.js +++ b/duradmin/src/main/webapp/js/spaces-manager.js @@ -1173,7 +1173,7 @@ $(function() { }).fail(function() { if (retrieveSpace.status == 404) { alert(params.spaceId + " does not exist."); - this._detailManager.showEmpty(); + that._detailManager.showEmpty(); } });
Fixes a minor null pointer exception.
diff --git a/dvc/repo/experiments/run.py b/dvc/repo/experiments/run.py index <HASH>..<HASH> 100644 --- a/dvc/repo/experiments/run.py +++ b/dvc/repo/experiments/run.py @@ -63,4 +63,6 @@ def run( ) except UnchangedExperimentError: # If experiment contains no changes, just run regular repro + kwargs.pop("queue", None) + kwargs.pop("checkpoint_resume", None) return {None: repo.reproduce(target=target, **kwargs)}
exp: fix bug where repro with run-cached stages may fail (#<I>)
diff --git a/simple_settings/core.py b/simple_settings/core.py index <HASH>..<HASH> 100644 --- a/simple_settings/core.py +++ b/simple_settings/core.py @@ -70,7 +70,7 @@ class _Settings(object): strategy = self._get_strategy_by_file(settings_file) if not strategy: raise RuntimeError( - 'Invalid setting file [{}]'.format(settings_file) + 'Invalid settings file [{}]'.format(settings_file) ) settings = strategy.load_settings_file(settings_file) self._dict.update(settings)
fix a simple typo in core file
diff --git a/src/oidcmsg/configure.py b/src/oidcmsg/configure.py index <HASH>..<HASH> 100644 --- a/src/oidcmsg/configure.py +++ b/src/oidcmsg/configure.py @@ -105,12 +105,12 @@ class Base(dict): return default def __setattr__(self, key, value): - if key in self and self.key: + if key in self and self.key is not None: raise KeyError('{} has already been set'.format(key)) super(Base, self).__setitem__(key, value) def __setitem__(self, key, value): - if key in self: + if key in self and self.key is not None: raise KeyError('{} has already been set'.format(key)) super(Base, self).__setitem__(key, value)
Allow an attribute to be set to None before being assigning a value.
diff --git a/docs/session.go b/docs/session.go index <HASH>..<HASH> 100644 --- a/docs/session.go +++ b/docs/session.go @@ -53,7 +53,7 @@ func NewSession(authConfig *AuthConfig, factory *requestdecorator.RequestFactory if err != nil { return nil, err } - if info.Standalone { + if info.Standalone && authConfig != nil && factory != nil { logrus.Debugf("Endpoint %s is eligible for private registry. Enabling decorator.", r.indexEndpoint.String()) dec := requestdecorator.NewAuthDecorator(authConfig.Username, authConfig.Password) factory.AddDecorator(dec)
What if authConfig or factory is Null?
diff --git a/devassistant/assistants/commands.py b/devassistant/assistants/commands.py index <HASH>..<HASH> 100644 --- a/devassistant/assistants/commands.py +++ b/devassistant/assistants/commands.py @@ -103,7 +103,8 @@ class GitHubCommand(object): if reponame in map(lambda x: x.name, user.get_repos()): raise exceptions.RunException('Repository already exists on GiHub.') else: - user.create_repo(reponame) + new_repo = user.create_repo(reponame) + logger.info('Your new repository: {0}'.format(new_repo.html_url)) except github.GithubException as e: raise exceptions.RunException('GitHub error: {0}'.format(e))
Output GH repo name after creation
diff --git a/chef/lib/chef/provider/service/redhat.rb b/chef/lib/chef/provider/service/redhat.rb index <HASH>..<HASH> 100644 --- a/chef/lib/chef/provider/service/redhat.rb +++ b/chef/lib/chef/provider/service/redhat.rb @@ -49,11 +49,11 @@ class Chef end def enable_service() - run_command(:command => "/sbin/chkconfig --add #{@new_resource.service_name}") + run_command(:command => "/sbin/chkconfig #{@new_resource.service_name} on") end def disable_service() - run_command(:command => "/sbin/chkconfig --del #{@new_resource.service_name}") + run_command(:command => "/sbin/chkconfig #{@new_resource.service_name} off") end end
Use accepted method to enable/disable services. This will withstand package upgrades.
diff --git a/java/client/src/org/openqa/selenium/firefox/FirefoxDriver.java b/java/client/src/org/openqa/selenium/firefox/FirefoxDriver.java index <HASH>..<HASH> 100644 --- a/java/client/src/org/openqa/selenium/firefox/FirefoxDriver.java +++ b/java/client/src/org/openqa/selenium/firefox/FirefoxDriver.java @@ -131,7 +131,8 @@ public class FirefoxDriver extends RemoteWebDriver { Objects.requireNonNull(options, "No options to construct executor from"); DriverService.Builder<?, ?> builder; - if (options.isLegacy()) { + if (! Boolean.parseBoolean(System.getProperty(DRIVER_USE_MARIONETTE, "true")) + || options.isLegacy()) { builder = XpiDriverService.builder() .withBinary(options.getBinary()) .withProfile(Optional.ofNullable(options.getProfile()).orElse(new FirefoxProfile()));
Restoring ability to use system property to force legacy mode or marionette. If we want to delete it we should deprecate it first.
diff --git a/src/PhpTokenizer.php b/src/PhpTokenizer.php index <HASH>..<HASH> 100644 --- a/src/PhpTokenizer.php +++ b/src/PhpTokenizer.php @@ -148,7 +148,6 @@ class PhpTokenizer implements TokenStreamProviderInterface { T_CONTINUE => TokenKind::ContinueKeyword, T_DECLARE => TokenKind::DeclareKeyword, T_DEFAULT => TokenKind::DefaultKeyword, - T_EXIT => TokenKind::DieKeyword, T_DO => TokenKind::DoKeyword, T_ECHO => TokenKind::EchoKeyword, T_ELSE => TokenKind::ElseKeyword, @@ -267,8 +266,6 @@ class PhpTokenizer implements TokenStreamProviderInterface { T_DNUMBER => TokenKind::FloatingLiteralToken, - T_CONSTANT_ENCAPSED_STRING => TokenKind::StringLiteralToken, - T_OPEN_TAG => TokenKind::ScriptSectionStartTag, T_OPEN_TAG_WITH_ECHO => TokenKind::ScriptSectionStartTag, T_CLOSE_TAG => TokenKind::ScriptSectionEndTag,
Remove duplicate array keys from PhpTokenizer.php Detected via static analysis When there are duplicate array keys, the last entry takes precedence (e.g. the removed T_EXIT line had the wrong value)
diff --git a/monodeploy.config.js b/monodeploy.config.js index <HASH>..<HASH> 100644 --- a/monodeploy.config.js +++ b/monodeploy.config.js @@ -2,7 +2,7 @@ module.exports = { access: 'infer', autoCommit: false, - changelogFilename: './CHANGELOG.md', + changelogFilename: 'CHANGELOG.md', // changesetFilename: 'needed?', changesetIgnorePatterns: ['**/*.test.js', '**/*.spec.{js,ts}', '**/*.{md,mdx}', '**/yarn.lock'], conventionalChangelogConfig: 'conventional-changelog-conventionalcommits',
refactor: updates changelog path
diff --git a/test/util/fonts/getCssRulesByProperty.js b/test/util/fonts/getCssRulesByProperty.js index <HASH>..<HASH> 100644 --- a/test/util/fonts/getCssRulesByProperty.js +++ b/test/util/fonts/getCssRulesByProperty.js @@ -112,7 +112,16 @@ describe('util/fonts/getCssRulesByProperty', function () { }); describe('shorthand font-property', function () { - it('register the longhand value from a shorthand', function () { + it('should ignore invalid shorthands', function () { + var result = getRules(['font-family', 'font-size'], 'h1 { font: 15px; }'); + + expect(result, 'to exhaustively satisfy', { + 'font-family': [], + 'font-size': [] + }); + }); + + it('register the longhand value from a valid shorthand', function () { var result = getRules(['font-family', 'font-size'], 'h1 { font: 15px serif; }'); expect(result, 'to exhaustively satisfy', {
Add test for dealing with invalid font shorthands
diff --git a/src/SQL/SQLStatement.php b/src/SQL/SQLStatement.php index <HASH>..<HASH> 100644 --- a/src/SQL/SQLStatement.php +++ b/src/SQL/SQLStatement.php @@ -181,6 +181,12 @@ class SQLStatement $join = new Join(); $closure($join); + if ($table instanceof Closure) { + $expr = new Expression(); + $table($expr); + $table = $expr; + } + if (!is_array($table)) { $table = array($table); } @@ -308,6 +314,14 @@ class SQLStatement public function addOrder(array $columns, string $order, string $nulls = null) { + foreach ($columns as &$column) { + if ($column instanceof Closure) { + $expr = new Expression(); + $column($expr); + $column = $expr; + } + } + $order = strtoupper($order); if ($order !== 'ASC' && $order !== 'DESC') {
Add support for closures in joins and orderBy
diff --git a/src/FormElement/Checkbox.php b/src/FormElement/Checkbox.php index <HASH>..<HASH> 100644 --- a/src/FormElement/Checkbox.php +++ b/src/FormElement/Checkbox.php @@ -14,9 +14,7 @@ class Checkbox extends AbstractFormElement protected function attachDefaultValidators(InputInterface $input, DOMElement $element) { // Make sure the submitted value is the same as the original - if ($element->hasAttribute('checked')) { - $input->getValidatorChain() - ->attach(new Validator\Identical($element->getAttribute('value'))); - } + $input->getValidatorChain() + ->attach(new Validator\Identical($element->getAttribute('value'))); } }
Checkbox should always check the submitted value
diff --git a/sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/placeholder/EncryptUpdateItemColumnPlaceholder.java b/sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/placeholder/EncryptUpdateItemColumnPlaceholder.java index <HASH>..<HASH> 100644 --- a/sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/placeholder/EncryptUpdateItemColumnPlaceholder.java +++ b/sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/placeholder/EncryptUpdateItemColumnPlaceholder.java @@ -58,7 +58,6 @@ public final class EncryptUpdateItemColumnPlaceholder implements ShardingPlaceho } @Override - @SuppressWarnings("all") public String toString() { if (Strings.isNullOrEmpty(assistedColumnName)) { return -1 != parameterMarkerIndex ? String.format("%s = ?", columnName) : String.format("%s = %s", columnName, toStringForColumnValue(columnValue));
delete @SuppressWarnings("all")
diff --git a/php/quail.php b/php/quail.php index <HASH>..<HASH> 100644 --- a/php/quail.php +++ b/php/quail.php @@ -163,7 +163,7 @@ class QuailTest { } function reportSingleSelector($selector) { - foreach(pq($selector) as $object) { + foreach($this->q($selector) as $object) { $this->objects[] = pq($object); } }
Added case-insensitivity to main selector.
diff --git a/core/src/ons/platform.js b/core/src/ons/platform.js index <HASH>..<HASH> 100644 --- a/core/src/ons/platform.js +++ b/core/src/ons/platform.js @@ -116,8 +116,6 @@ class Platform { window.screen.width === 812 && window.screen.height === 375 || // X, XS landscape window.screen.width === 414 && window.screen.height === 896 || // XS Max, XR portrait window.screen.width === 896 && window.screen.height === 414 || // XS Max, XR landscape - window.screen.width === 360 && window.screen.height === 780 || // 12 Mini portrait - window.screen.width === 780 && window.screen.height === 360 || // 12 Mini landscape window.screen.width === 390 && window.screen.height === 844 || // 12, 12 Pro portrait window.screen.width === 844 && window.screen.height === 390 || // 12, 12 Pro landscape window.screen.width === 428 && window.screen.height === 926 || // 12 Pro Max portrait
fix(platform): Remove incorrect sizes for <I> Mini in `isIPhoneX` The screen dimensions of the iPhone <I> Mini are <I> and <I>, but we were checking for <I> and <I>.
diff --git a/src/Administration/Resources/app/administration/test/e2e/cypress/integration/catalogue/sw-category/create.spec.js b/src/Administration/Resources/app/administration/test/e2e/cypress/integration/catalogue/sw-category/create.spec.js index <HASH>..<HASH> 100644 --- a/src/Administration/Resources/app/administration/test/e2e/cypress/integration/catalogue/sw-category/create.spec.js +++ b/src/Administration/Resources/app/administration/test/e2e/cypress/integration/catalogue/sw-category/create.spec.js @@ -108,7 +108,7 @@ describe('Category: Create several categories', () => { }); }); - it('@base @catalogue: create a subcategory', () => { + it('@base @catalogue @package: create a subcategory', () => { const page = new CategoryPageObject(); // Request we want to wait for later
NEXT-<I> - Added @package tag to create a subcategory in create.spec.js
diff --git a/tests/config.js b/tests/config.js index <HASH>..<HASH> 100644 --- a/tests/config.js +++ b/tests/config.js @@ -8,6 +8,7 @@ var testPages = [ , 'specs/extensible' , 'specs/extensible/plugin-debug' + , 'specs/misc/bootstrap-async' , 'specs/misc/data-api' , 'specs/misc/ie-cache' , 'specs/misc/utf8-in-gbk'
Add test specs for async bootstrap
diff --git a/src/Image/Transformation/Canvas.php b/src/Image/Transformation/Canvas.php index <HASH>..<HASH> 100644 --- a/src/Image/Transformation/Canvas.php +++ b/src/Image/Transformation/Canvas.php @@ -70,7 +70,7 @@ class Canvas extends Transformation implements InputSizeConstraint { $this->imagick->newImage($width, $height, $bg); $this->imagick->setImageFormat($original->getImageFormat()); - $this->imagick->setImageColorspace($original->getImageColorspace()); + $this->imagick->transformImageColorspace($original->getImageColorspace()); $originalGeometry = $original->getImageGeometry();
Use the correct method to properly set the colorspace of the canvas Resolves #<I>
diff --git a/jenkins/plugin/src/main/java/com/hp/octane/plugins/jenkins/bridge/BridgesService.java b/jenkins/plugin/src/main/java/com/hp/octane/plugins/jenkins/bridge/BridgesService.java index <HASH>..<HASH> 100644 --- a/jenkins/plugin/src/main/java/com/hp/octane/plugins/jenkins/bridge/BridgesService.java +++ b/jenkins/plugin/src/main/java/com/hp/octane/plugins/jenkins/bridge/BridgesService.java @@ -16,7 +16,7 @@ import java.util.List; /** * Created by gullery on 05/08/2015. - * <p/> + * <p> * Bridge Service meant to provide an abridged connectivity functionality * The only APIs to be exposed is the basic management of abridged clients */
tech: fixing the java doc format
diff --git a/collections_extended/range_map.py b/collections_extended/range_map.py index <HASH>..<HASH> 100644 --- a/collections_extended/range_map.py +++ b/collections_extended/range_map.py @@ -168,12 +168,14 @@ class RangeMap(Container): start_index -= 1 start = prev_key if stop is None: - stop = _last new_keys = [start] stop_index = len(self._ordered_keys) else: stop_index = bisect_left(self._ordered_keys, stop) - new_keys = [start, stop] + if stop_index != len(self._ordered_keys) and self._ordered_keys[stop_index] == stop: + new_keys = [start] + else: + new_keys = [start, stop] self._key_mapping[stop] = self.__getitem(stop) for key in self._ordered_keys[start_index:stop_index]: del self._key_mapping[key]
test_delitem_consecutive test passes.
diff --git a/src/dataviews/histogram-dataview-model.js b/src/dataviews/histogram-dataview-model.js index <HASH>..<HASH> 100644 --- a/src/dataviews/histogram-dataview-model.js +++ b/src/dataviews/histogram-dataview-model.js @@ -60,7 +60,7 @@ module.exports = DataviewModelBase.extend({ this._updateURLBinding(); // When original data gets fetched - this._originalData.bind('sync', this._onDataChanged, this); + this._originalData.bind('change:data', this._onSynced, this); this._originalData.once('change:data', this._updateBindings, this); this.on('change:column', this._onColumnChanged, this); @@ -280,7 +280,7 @@ module.exports = DataviewModelBase.extend({ this._originalData.setUrl(this.get('url')); }, - _onDataChanged: function (model) { + _onSynced: function (model) { this.set({ aggregation: model.get('aggregation'), bins: model.get('bins'),
Revert sync to change:data
diff --git a/core-bundle/contao/library/Contao/Image.php b/core-bundle/contao/library/Contao/Image.php index <HASH>..<HASH> 100644 --- a/core-bundle/contao/library/Contao/Image.php +++ b/core-bundle/contao/library/Contao/Image.php @@ -354,10 +354,13 @@ class Image break; } - // Resizing will most likely fail if there is no viewBox attribute + // Set the viewBox attribute from the original dimensions if (!$svgElement->hasAttribute('viewBox')) { - \System::log('Image "' . $image . '" does not have a "viewBox" attribute', __METHOD__, TL_ERROR); + $origWidth = $svgElement->getAttribute('width'); + $origHeight = $svgElement->getAttribute('height'); + + $svgElement->setAttribute('viewBox', '0 0 ' . intval($origWidth) . ' ' . intval($origHeight)); } $svgElement->setAttribute('width', $width . 'px');
[Core] Add the "viewBox" attribute if not present (see #<I>)
diff --git a/archunit/src/main/java/com/tngtech/archunit/core/domain/JavaClass.java b/archunit/src/main/java/com/tngtech/archunit/core/domain/JavaClass.java index <HASH>..<HASH> 100644 --- a/archunit/src/main/java/com/tngtech/archunit/core/domain/JavaClass.java +++ b/archunit/src/main/java/com/tngtech/archunit/core/domain/JavaClass.java @@ -761,7 +761,7 @@ public class JavaClass implements HasName.AndFullName, HasAnnotations, HasModifi } /** - * @return {@link JavaAnnotation} of all imported classes that have the type of this class. + * @return All imported {@link JavaAnnotation JavaAnnotations} that have the annotation type of this class. */ @PublicAPI(usage = ACCESS) public Set<JavaAnnotation> getAnnotationsWithTypeOfSelf() {
Review: Unify Javadoc Issue: #<I>
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -25,11 +25,11 @@ class TestCommand(Command): suite = unittest.TestSuite() if self.test == '*': print('Running all tests') - import test - for tst in test.__all__: - suite.addTests(unittest.TestLoader().loadTestsFromName('test.%s' % tst)) + import stomp.test + for tst in stomp.test.__all__: + suite.addTests(unittest.TestLoader().loadTestsFromName('stomp.test.%s' % tst)) else: - suite = unittest.TestLoader().loadTestsFromName('test.%s' % self.test) + suite = unittest.TestLoader().loadTestsFromName('stomp.test.%s' % self.test) unittest.TextTestRunner(verbosity=2).run(suite)
fix for running unit tests in py versions < 3
diff --git a/tracer/tracer.py b/tracer/tracer.py index <HASH>..<HASH> 100644 --- a/tracer/tracer.py +++ b/tracer/tracer.py @@ -742,7 +742,8 @@ class Tracer(object): args, stdin=subprocess.PIPE, stdout=stdout_f, - stderr=devnull) + stderr=devnull, + env=os.environ) _, _ = p.communicate(self.input) else: l.info("tracing as pov file") @@ -751,7 +752,8 @@ class Tracer(object): args, stdin=in_s, stdout=stdout_f, - stderr=devnull) + stderr=devnull, + env=os.environ) for write in self.pov_file.writes: out_s.send(write) time.sleep(.01)
Patched in environment variable support for the call to qemu. This allows the caller to do things like set LD_PRELOAD before tracing. In some cases this is required in order to run the target binary
diff --git a/lib/jasmine_rails/runner.rb b/lib/jasmine_rails/runner.rb index <HASH>..<HASH> 100644 --- a/lib/jasmine_rails/runner.rb +++ b/lib/jasmine_rails/runner.rb @@ -7,6 +7,8 @@ module JasmineRails # raises an exception if any errors are encountered while running the testsuite def run(spec_filter = nil) override_rails_config do + require 'phantomjs' + include_offline_asset_paths_helper html = get_spec_runner(spec_filter) runner_path = JasmineRails.tmp_dir.join('runner.html')
Fixes the fact the gem was never required
diff --git a/valohai_yaml/validation.py b/valohai_yaml/validation.py index <HASH>..<HASH> 100644 --- a/valohai_yaml/validation.py +++ b/valohai_yaml/validation.py @@ -34,11 +34,9 @@ class LocalRefResolver(RefResolver): def resolve_from_url(self, url): local_match = self.local_scope_re.match(url) if local_match: - local_filename = os.path.join(SCHEMATA_DIRECTORY, local_match.group(1)) - with open(local_filename, 'r', encoding='utf-8') as infp: - schema = json.load(infp) - self.store[url] = schema - return schema + schema = get_schema(name=local_match.group(1)) + self.store[url] = schema + return schema raise NotImplementedError('remote URL resolution is not supported for security reasons') # pragma: no cover
Use `get_schema` in the resolver too
diff --git a/src/helper/Links.php b/src/helper/Links.php index <HASH>..<HASH> 100644 --- a/src/helper/Links.php +++ b/src/helper/Links.php @@ -35,7 +35,9 @@ class Links extends AbstractHelper public function add(array $attribs = array()) { $attr = $this->attribs($attribs); - $this->links[] = "<link$attr />"; + if( strlen( $attr ) > 0 ) { + $this->links[] = "<link $attr/>"; + } } public function get()
if there is no $attr , then no need of <link />
diff --git a/request-server.go b/request-server.go index <HASH>..<HASH> 100644 --- a/request-server.go +++ b/request-server.go @@ -174,6 +174,15 @@ func (rs *RequestServer) packetWorker( request = NewRequest("Stat", request.Filepath) rpkt = request.call(rs.Handlers, pkt) } + case *sshFxpExtendedPacket: + switch expkt := pkt.SpecificPacket.(type) { + default: + rpkt = statusFromError(pkt, ErrSshFxOpUnsupported) + case *sshFxpExtendedPacketPosixRename: + request := NewRequest("Rename", expkt.Oldpath) + request.Target = expkt.Newpath + rpkt = request.call(rs.Handlers, pkt) + } case hasHandle: handle := pkt.getHandle() request, ok := rs.getRequest(handle) @@ -187,7 +196,7 @@ func (rs *RequestServer) packetWorker( rpkt = request.call(rs.Handlers, pkt) request.close() default: - return errors.Errorf("unexpected packet type %T", pkt) + rpkt = statusFromError(pkt, ErrSshFxOpUnsupported) } rs.pktMgr.readyPacket(
sftp: support rename extension for server Previously if a client makes an unsupported operation, like a POSIX rename, it would exit the server. Both support POSIX rename, and do not abort the connection if there is an unsupported operation is made by the client.
diff --git a/generators/dbh-constants.js b/generators/dbh-constants.js index <HASH>..<HASH> 100644 --- a/generators/dbh-constants.js +++ b/generators/dbh-constants.js @@ -11,8 +11,8 @@ const constants = { filesWithNamingStrategy: [ './pom.xml', './src/main/resources/config/application.yml', - './src/test/resources/config/application.yml', - './gradle/liquibase.gradle', + './src/test/resources/config/application.yml'/*, + './gradle/liquibase.gradle',*/ ],
Comment out ref to gradle file while refactoring search&replace
diff --git a/internal/service/networkfirewall/logging_configuration_test.go b/internal/service/networkfirewall/logging_configuration_test.go index <HASH>..<HASH> 100644 --- a/internal/service/networkfirewall/logging_configuration_test.go +++ b/internal/service/networkfirewall/logging_configuration_test.go @@ -745,13 +745,17 @@ func testAccNetworkFirewallLoggingConfigurationS3BucketDependencyConfig(rName st return fmt.Sprintf(` resource "aws_s3_bucket" "test" { bucket = %q - acl = "private" force_destroy = true lifecycle { create_before_destroy = true } } + +resource "aws_s3_bucket_acl" "test" { + bucket = aws_s3_bucket.test.id + acl = "private" +} `, rName) } @@ -839,10 +843,14 @@ EOF resource "aws_s3_bucket" "logs" { bucket = %[1]q - acl = "private" force_destroy = true } +resource "aws_s3_bucket_acl" "logs_acl" { + bucket = aws_s3_bucket.logs.id + acl = "private" +} + resource "aws_kinesis_firehose_delivery_stream" "test" { depends_on = [aws_iam_role_policy.test] name = %[2]q
tests/networkfirewall: update to aws_s3_bucket_acl
diff --git a/peer.py b/peer.py index <HASH>..<HASH> 100644 --- a/peer.py +++ b/peer.py @@ -77,10 +77,6 @@ from .constants import ( ) -_ReceivedMsgCallbackType = Callable[ - ['BasePeer', protocol.Command, protocol._DecodedMsgType], None] - - async def handshake(remote: Node, privkey: datatypes.PrivateKey, peer_class: 'Type[BasePeer]', @@ -259,6 +255,12 @@ class BasePeer: if finished_callback is not None: finished_callback(self) + def is_finished(self) -> bool: + return self._finished.is_set() + + async def wait_until_finished(self) -> bool: + return await self._finished.wait() + def close(self): """Close this peer's reader/writer streams.
p2p: New Peer methods to check if it's finished
diff --git a/source/lib/workbook/builder.js b/source/lib/workbook/builder.js index <HASH>..<HASH> 100644 --- a/source/lib/workbook/builder.js +++ b/source/lib/workbook/builder.js @@ -19,10 +19,14 @@ let addRootContentTypesXML = (promiseObj) => { let contentTypesAdded = []; promiseObj.wb.sheets.forEach((s, i) => { if (s.drawingCollection.length > 0) { + let extensionsAdded = []; s.drawingCollection.drawings.forEach((d) => { - let typeRef = d.contentType + '.' + d.extension; - if (contentTypesAdded.indexOf(typeRef) < 0) { - xml.ele('Default').att('ContentType', d.contentType).att('Extension', d.extension); + if (extensionsAdded.indexOf(d.extension) < 0) { + let typeRef = d.contentType + '.' + d.extension; + if (contentTypesAdded.indexOf(typeRef) < 0) { + xml.ele('Default').att('ContentType', d.contentType).att('Extension', d.extension); + } + extensionsAdded.push(d.extension); } }); }
fixed issue where workbook would fail to open if more than one image with the same extension had been added
diff --git a/src/test/java/net/snowflake/client/jdbc/ConnectionIT.java b/src/test/java/net/snowflake/client/jdbc/ConnectionIT.java index <HASH>..<HASH> 100644 --- a/src/test/java/net/snowflake/client/jdbc/ConnectionIT.java +++ b/src/test/java/net/snowflake/client/jdbc/ConnectionIT.java @@ -166,14 +166,15 @@ public class ConnectionIT extends BaseJDBCTest { @Test public void testDataCompletenessInLowMemory() throws Exception { try (Connection connection = getConnection()) { - for (int i = 0; i < 10; i++) { + for (int i = 0; i < 6; i++) { int resultSize = 1000000 + i; Statement statement = connection.createStatement(); statement.execute("ALTER SESSION SET CLIENT_MEMORY_LIMIT=10"); ResultSet resultSet = statement.executeQuery( - "SELECT * FROM \"SNOWFLAKE_SAMPLE_DATA\".\"TPCDS_SF100TCL\".\"CUSTOMER_ADDRESS\" limit " - + resultSize); + "select randstr(80, random()) from table(generator(rowcount => " + + resultSize + + "))"); int size = 0; while (resultSet.next()) {
Fix testDataCompletenessInLowMemory test on jenkins (#<I>)
diff --git a/tests/AlgoliaSearch/Tests/SearchFacetTest.php b/tests/AlgoliaSearch/Tests/SearchFacetTest.php index <HASH>..<HASH> 100644 --- a/tests/AlgoliaSearch/Tests/SearchFacetTest.php +++ b/tests/AlgoliaSearch/Tests/SearchFacetTest.php @@ -75,8 +75,9 @@ class SearchFacetTest extends AlgoliaSearchTestCase ) ); - $this->index->setSettings($settings); + $settingsTask = $this->index->setSettings($settings); $task = $this->index->addObjects($objects); + $this->index->waitTask($settingsTask['taskID']); $this->index->waitTask($task['taskID']); # Straightforward search.
test(facets): Add waitTask for setSettings
diff --git a/command/agent/command.go b/command/agent/command.go index <HASH>..<HASH> 100644 --- a/command/agent/command.go +++ b/command/agent/command.go @@ -241,6 +241,12 @@ func (c *Command) setupAgent(config *Config, logOutput io.Writer) *Agent { serfConfig.QuiescentPeriod = time.Second serfConfig.UserCoalescePeriod = 3 * time.Second serfConfig.UserQuiescentPeriod = time.Second + if config.ReconnectInterval != 0 { + serfConfig.ReconnectInterval = config.ReconnectInterval + } + if config.ReconnectTimeout != 0 { + serfConfig.ReconnectTimeout = config.ReconnectTimeout + } // Start Serf c.Ui.Output("Starting Serf agent...")
agent: Actually pass-through the reconnect configs
diff --git a/lib/nydp/version.rb b/lib/nydp/version.rb index <HASH>..<HASH> 100644 --- a/lib/nydp/version.rb +++ b/lib/nydp/version.rb @@ -1,3 +1,3 @@ module Nydp - VERSION = "0.2.1" + VERSION = "0.2.2" end
version: bump to <I>
diff --git a/app/index.js b/app/index.js index <HASH>..<HASH> 100644 --- a/app/index.js +++ b/app/index.js @@ -62,16 +62,14 @@ function Generator(args, options, config) { } util.inherits(Generator, BBBGenerator); -util.inherits(Generator, InitGenerator); /** * Command prompt questions + * Note: Directly extend these functions on the generator prototype as Yeoman run every + * attached method (e.g.: `.hasOwnProperty()`) */ -Generator.prototype.askFor = function askFor() { - InitGenerator.prototype.askFor.call(this); -}; - +Generator.prototype.askFor = InitGenerator.prototype.askFor; Generator.prototype.saveConfig = InitGenerator.prototype.saveConfig; /**
Simplify inheriting Init generator methods in the app generator
diff --git a/pkg_test.go b/pkg_test.go index <HASH>..<HASH> 100644 --- a/pkg_test.go +++ b/pkg_test.go @@ -241,7 +241,7 @@ func TestLevel(t *testing.T) { func TestSettings(t *testing.T) { RegisterDurationFunc(func(d time.Duration) string { - return fmt.Sprintf("%ds", d.Seconds()) + return fmt.Sprintf("%gs", d.Seconds()) }) SetTimeFormat(time.RFC1123)
get <I>% go vet
diff --git a/integration/pvtdata/pvtdata_test.go b/integration/pvtdata/pvtdata_test.go index <HASH>..<HASH> 100644 --- a/integration/pvtdata/pvtdata_test.go +++ b/integration/pvtdata/pvtdata_test.go @@ -68,16 +68,16 @@ var _ bool = Describe("PrivateData", func() { testCleanup(network, process) }) - Describe("Dissemination when pulling is disabled", func() { + Describe("Dissemination when pulling and reconciliation are disabled", func() { BeforeEach(func() { By("setting up the network") network = initThreeOrgsSetup(true) - By("setting the pull retry threshold to 0 on all peers") - // set pull retry threshold to 0 + By("setting the pull retry threshold to 0 and disabling reconciliation on all peers") for _, p := range network.Peers { core := network.ReadPeerConfig(p) core.Peer.Gossip.PvtData.PullRetryThreshold = 0 + core.Peer.Gossip.PvtData.ReconciliationEnabled = false network.WritePeerConfig(p, core) }
[FAB-<I>] Fix CI flake due to unexpected pvtdata reconciliation In private data dissemination test, a test flake may happen if unexpected pvtdata reconciliation is triggered (timing issue) so that additional peers receive the private data.
diff --git a/ctz_go1.9.go b/ctz_go1.9.go index <HASH>..<HASH> 100644 --- a/ctz_go1.9.go +++ b/ctz_go1.9.go @@ -1,3 +1,5 @@ +// +build go1.9 + package roaring import "math/bits" diff --git a/popcnt_go1.9.go b/popcnt_go1.9.go index <HASH>..<HASH> 100644 --- a/popcnt_go1.9.go +++ b/popcnt_go1.9.go @@ -1,3 +1,5 @@ +// +build go1.9 + package roaring import "math/bits"
Attempt to fix build constraints for _go<I>.go files
diff --git a/spec/compiler.js b/spec/compiler.js index <HASH>..<HASH> 100644 --- a/spec/compiler.js +++ b/spec/compiler.js @@ -38,6 +38,22 @@ describe('compiler', function() { }, Error, 'You must pass a string or Handlebars AST to Handlebars.compile. You passed [object Object]'); }); + it('should include the location in the error (row and column)', function() { + try { + Handlebars.compile(' \n {{#if}}\n{{/def}}')(); + equal(true, false, 'Statement must throw exception. This line should not be executed.'); + } catch (err) { + equal(err.message, 'if doesn\'t match def - 2:5', 'Checking error message'); + if (Object.getOwnPropertyDescriptor(err, 'column').writable) { + // In Safari 8, the column-property is read-only. This means that even if it is set with defineProperty, + // its value won't change (https://github.com/jquery/esprima/issues/1290#issuecomment-132455482) + // Since this was neither working in Handlebars 3 nor in 4.0.5, we only check the column for other browsers. + equal(err.column, 5, 'Checking error column'); + } + equal(err.lineNumber, 2, 'Checking error row'); + } + }); + it('can utilize AST instance', function() { equal(Handlebars.compile({ type: 'Program',
Testcase to verify that compile-errors have a column-property Related to #<I> The test ensures that the property is there, because it is important to some people.
diff --git a/tests/unit/test_dwave_sampler.py b/tests/unit/test_dwave_sampler.py index <HASH>..<HASH> 100644 --- a/tests/unit/test_dwave_sampler.py +++ b/tests/unit/test_dwave_sampler.py @@ -143,12 +143,10 @@ class TestDwaveSampler(unittest.TestCase): self.assertEqual(len(w), 0) MockClient.reset_mock() - sampler = DWaveSampler(solver_features={'qpu': True}) - MockClient.from_config.assert_called_once_with(solver={'qpu': True}) + solver = {'qpu': True, 'num_qubits__gt': 1000} + sampler = DWaveSampler(solver_features=solver) + MockClient.from_config.assert_called_once_with(solver=solver) - MockClient.reset_mock() - sampler = DWaveSampler(solver_features={'software': True}) - MockClient.from_config.assert_called_once_with(solver={'software': True}) def test_sample_ising_variables(self):
Simplify dwave sample deprecation test