diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/microfs.py b/microfs.py index <HASH>..<HASH> 100644 --- a/microfs.py +++ b/microfs.py @@ -247,7 +247,7 @@ def get(filename, target=None, serial=None): "f = open('{}', 'rb')".format(filename), "r = f.read", "result = True", - "while result:\n result = r(32)\n if result:\n " + "while result:\n result = r(32)\n if result:\n ", "uart.write(result)\n", "f.close()", ]
Add missing comma to list of commands in 'get'.
diff --git a/fs/archive/tarfs/__init__.py b/fs/archive/tarfs/__init__.py index <HASH>..<HASH> 100644 --- a/fs/archive/tarfs/__init__.py +++ b/fs/archive/tarfs/__init__.py @@ -239,12 +239,14 @@ class TarSaver(base.ArchiveSaver): mtime = int(mtime) tar_info.mtime = mtime - for tarattr, infoattr in attr_map.items(): - if getattr(info, infoattr) is not None: - setattr(tar_info, tarattr, getattr(info, infoattr)) + if info.has_namespace('access'): + for tarattr, infoattr in attr_map.items(): + if getattr(info, infoattr) is not None: + setattr(tar_info, tarattr, getattr(info, infoattr)) + tar_info.mode = getattr(info.permissions, 'mode', 0o420) + tar_info.size = info.size - tar_info.mode = getattr(info.permissions, 'mode', 0o420) tar_info.type = type_map.get(info.type, tarfile.REGTYPE) if not info.is_dir:
Fix Info properties requiring some namespaces since fs <I>
diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -59,12 +59,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.8.44'; - const VERSION_ID = 20844; + const VERSION = '2.8.45-DEV'; + const VERSION_ID = 20845; const MAJOR_VERSION = 2; const MINOR_VERSION = 8; - const RELEASE_VERSION = 44; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 45; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '11/2018'; const END_OF_LIFE = '11/2019';
bumped Symfony version to <I>
diff --git a/addon/components/mdl-button.js b/addon/components/mdl-button.js index <HASH>..<HASH> 100644 --- a/addon/components/mdl-button.js +++ b/addon/components/mdl-button.js @@ -36,6 +36,6 @@ export default BaseComponent.extend(RippleSupport, { }, click() { - this.sendAction(this); + this.sendAction('action', this); } });
Fix mdl-button not triggering primary action
diff --git a/trollsift/version.py b/trollsift/version.py index <HASH>..<HASH> 100644 --- a/trollsift/version.py +++ b/trollsift/version.py @@ -21,4 +21,4 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. """Version file. """ -__version__ = "0.3.0" +__version__ = "0.4.0a0.dev0"
Update version to <I>a0.dev0
diff --git a/twilio/rest/resources/base.py b/twilio/rest/resources/base.py index <HASH>..<HASH> 100644 --- a/twilio/rest/resources/base.py +++ b/twilio/rest/resources/base.py @@ -1,4 +1,5 @@ import logging +logger = logging.getLogger('twilio') import os import platform @@ -181,7 +182,7 @@ class Resource(object): kwargs['timeout'] = self.timeout resp = make_twilio_request(method, uri, auth=self.auth, **kwargs) - logging.debug(resp.content) + logger.debug(resp.content) if method == "DELETE": return resp, {}
Set the name of the logger to twilio
diff --git a/gnotty/static/js/gnotty.js b/gnotty/static/js/gnotty.js index <HASH>..<HASH> 100644 --- a/gnotty/static/js/gnotty.js +++ b/gnotty/static/js/gnotty.js @@ -1,4 +1,6 @@ +WEB_SOCKET_SWF_LOCATION = '/static/WebSocketMain.swf'; + /* Manages a connection to an IRC room - takes an options objects @@ -98,7 +100,7 @@ var gnotty = function(options) { var timeout = setTimeout(function() { alert('Took too long to connect, please try again'); location.reload(); - }, 10000); + }, 20000); // Clear the joining progress bar and join timeout. If joining // was successfull, finish the progress animation off first.
Increate connect timeout - flashsockets take a lot longer
diff --git a/src/Illuminate/Support/helpers.php b/src/Illuminate/Support/helpers.php index <HASH>..<HASH> 100755 --- a/src/Illuminate/Support/helpers.php +++ b/src/Illuminate/Support/helpers.php @@ -662,6 +662,10 @@ if (! function_exists('env')) { return; } + if (($valueLength = strlen($value)) > 1 && $value[0] === '"' && $value[$valueLength - 1] === '"') { + return substr($value, 1, -1); + } + return $value; }) ->getOrCall(function () use ($default) {
[<I>] Fix quoted environment variable parsing
diff --git a/web/src/main/java/org/jboss/as/metadata/parser/servlet/TaglibMetaDataParser.java b/web/src/main/java/org/jboss/as/metadata/parser/servlet/TaglibMetaDataParser.java index <HASH>..<HASH> 100644 --- a/web/src/main/java/org/jboss/as/metadata/parser/servlet/TaglibMetaDataParser.java +++ b/web/src/main/java/org/jboss/as/metadata/parser/servlet/TaglibMetaDataParser.java @@ -58,10 +58,10 @@ public class TaglibMetaDataParser extends MetaDataElementParser { final Element element = Element.forName(reader.getLocalName()); switch (element) { case TAGLIB_URI: - taglib.setTaglibUri(reader.getElementText().trim()); + taglib.setTaglibUri(reader.getElementText()); break; case TAGLIB_LOCATION: - taglib.setTaglibLocation(reader.getElementText().trim()); + taglib.setTaglibLocation(reader.getElementText()); break; default: throw unexpectedElement(reader); }
Remove the trims, the staxmapper will do that eventually (STXM-3).
diff --git a/src/FieldHandlers/PhoneFieldHandler.php b/src/FieldHandlers/PhoneFieldHandler.php index <HASH>..<HASH> 100644 --- a/src/FieldHandlers/PhoneFieldHandler.php +++ b/src/FieldHandlers/PhoneFieldHandler.php @@ -29,6 +29,4 @@ class PhoneFieldHandler extends BaseFieldHandler return $dbFields; } - - }
Fixed CS (task #<I>)
diff --git a/Controller/CustomerController.php b/Controller/CustomerController.php index <HASH>..<HASH> 100644 --- a/Controller/CustomerController.php +++ b/Controller/CustomerController.php @@ -524,10 +524,10 @@ class CustomerController extends BaseFrontController /** * @param $token * - * @return \Symfony\Component\HttpFoundation\Response - * * @throws \Exception * @throws \Propel\Runtime\Exception\PropelException + * + * @return \Symfony\Component\HttpFoundation\Response */ public function confirmCustomerAction($token) { diff --git a/Controller/FeedController.php b/Controller/FeedController.php index <HASH>..<HASH> 100644 --- a/Controller/FeedController.php +++ b/Controller/FeedController.php @@ -51,9 +51,9 @@ class FeedController extends BaseFrontController * @param $id string The id of the parent element. The id of the main parent category for catalog context. * The id of the content folder for content context * - * @return Response - * * @throws \RuntimeException + * + * @return Response */ public function generateAction($context, $lang, $id) {
Fix BaseTaxType annotation order (#<I>) * Fix BaseTaxType annotation order * Fix php cs annotation order * Fix ci and lock ci versions
diff --git a/views/js/portableLib/OAT/util/tooltip.js b/views/js/portableLib/OAT/util/tooltip.js index <HASH>..<HASH> 100644 --- a/views/js/portableLib/OAT/util/tooltip.js +++ b/views/js/portableLib/OAT/util/tooltip.js @@ -36,8 +36,8 @@ define([ if (contentId) { $content = $container.find('#' + contentId); if ($content.length) { - var targetHeight = parseInt($($target.get(0)).css('height'), 10), - targetFontSize = parseInt($($target.get(0)).css('fontSize'), 10); + var targetHeight = parseInt($target.css('height'), 10), + targetFontSize = parseInt($target.css('fontSize'), 10); /** * Tooltip may be attached to a phrase which is spread into 2 or more lines. For this case we apply
Removed excessive wrapping of the element.
diff --git a/stellar_base/transaction.py b/stellar_base/transaction.py index <HASH>..<HASH> 100644 --- a/stellar_base/transaction.py +++ b/stellar_base/transaction.py @@ -31,7 +31,8 @@ class Transaction(object): self.operations = opts.get('operations') or [] def add_operation(self, operation): - self.operations.append(operation) + if operation not in self.operations: + self.operations.append(operation) def to_xdr_object(self): source_account = account_xdr_object(self.source) diff --git a/stellar_base/transaction_envelope.py b/stellar_base/transaction_envelope.py index <HASH>..<HASH> 100644 --- a/stellar_base/transaction_envelope.py +++ b/stellar_base/transaction_envelope.py @@ -21,7 +21,8 @@ class TransactionEnvelope(object): assert isinstance(keypair, Keypair) tx_hash = self.hash_meta() sig = keypair.sign_decorated(tx_hash) - self.signatures.append(sig) + if sig not in self.signatures: + self.signatures.append(sig) return self def hash_meta(self):
keep ops in Tx and signatures in Envelope unique
diff --git a/xflate/meta/writer.go b/xflate/meta/writer.go index <HASH>..<HASH> 100644 --- a/xflate/meta/writer.go +++ b/xflate/meta/writer.go @@ -206,10 +206,12 @@ func (mw *Writer) encodeBlock(final FinalMode) (err error) { mw.bw.WriteBits(0, 3) // Empty HCLen code } mw.bw.WriteBits(2, 3) // Final HCLen code + mw.bw.WriteBits(0, 1) // First HLit code must be zero // Encode data segment. cnts := mw.computeCounts(buf, 1<<uint(huffLen), final != FinalNil, inv) - val, pre := 0, 0 + cnts[0]++ // Remove first zero bit, treated as part of the header + val, pre := 0, -1 for len(cnts) > 0 { if cnts[0] == 0 { cnts = cnts[1:] @@ -220,7 +222,7 @@ func (mw *Writer) encodeBlock(final FinalMode) (err error) { cnt := cur * cnts[0] // Count as positive integer switch { - case pre != 0 && cur < 0 && cnt >= minRepZero: // Use repeated zero code + case cur < 0 && cnt >= minRepZero: // Use repeated zero code if val = maxRepZero; val > cnt { val = cnt }
xflate/meta: make first symZero part of the header Logically, there is no change, but this is done to make it match the specification a little more closely.
diff --git a/tests.py b/tests.py index <HASH>..<HASH> 100644 --- a/tests.py +++ b/tests.py @@ -58,8 +58,8 @@ def test_abort_transaction_on_failure(app): assert db['answer'] == 42 1/0 - with app.test_request_context(): - assert 'answer' not in db + with app.test_request_context(): + assert 'answer' not in db def test_abort_transaction_if_doomed(app):
pass tests on <I>/<I>
diff --git a/tests/phpbu-laravel/Configuration/TranslatorTest.php b/tests/phpbu-laravel/Configuration/TranslatorTest.php index <HASH>..<HASH> 100644 --- a/tests/phpbu-laravel/Configuration/TranslatorTest.php +++ b/tests/phpbu-laravel/Configuration/TranslatorTest.php @@ -22,7 +22,13 @@ class TranslatorTest extends \PHPUnit_Framework_TestCase $configuration = $translator->translate(new Proxy($config)); $backups = $configuration->getBackups(); - $this->assertEquals(2, count($backups)); + $this->assertCount(2, $backups); + + /** @var \phpbu\App\Configuration\Backup $backup */ + foreach ($backups as $backup) { + $this->assertInstanceOf('\\phpbu\\App\\Configuration\\Backup\\Source', $backup->getSource()); + $this->assertInstanceOf('\\phpbu\\App\\Configuration\\Backup\\Target', $backup->getTarget()); + } } /**
Added some assertions to make sure a valid 'Configuration' is returned
diff --git a/gomock/controller_test.go b/gomock/controller_test.go index <HASH>..<HASH> 100644 --- a/gomock/controller_test.go +++ b/gomock/controller_test.go @@ -720,14 +720,14 @@ func TestDuplicateFinishCallFails(t *testing.T) { rep.assertFatal(ctrl.Finish, "Controller.Finish was called more than once. It has to be called exactly once.") } -func TestTestNoHelper(t *testing.T) { +func TestNoHelper(t *testing.T) { ctrlNoHelper := gomock.NewController(NewErrorReporter(t)) // doesn't panic ctrlNoHelper.T.Helper() } -func TestTestWithHelper(t *testing.T) { +func TestWithHelper(t *testing.T) { withHelper := &HelperReporter{TestReporter: NewErrorReporter(t)} ctrlWithHelper := gomock.NewController(withHelper)
gomock: removes typo in Test names
diff --git a/dvc/__init__.py b/dvc/__init__.py index <HASH>..<HASH> 100644 --- a/dvc/__init__.py +++ b/dvc/__init__.py @@ -10,7 +10,7 @@ import os import warnings -VERSION_BASE = "0.27.1" +VERSION_BASE = "0.28.0" __version__ = VERSION_BASE PACKAGEPATH = os.path.abspath(os.path.dirname(__file__))
dvc: bump to <I>
diff --git a/keanu-project/src/main/java/io/improbable/keanu/vertices/Vertex.java b/keanu-project/src/main/java/io/improbable/keanu/vertices/Vertex.java index <HASH>..<HASH> 100644 --- a/keanu-project/src/main/java/io/improbable/keanu/vertices/Vertex.java +++ b/keanu-project/src/main/java/io/improbable/keanu/vertices/Vertex.java @@ -15,16 +15,16 @@ import java.util.Set; public abstract class Vertex<T> implements Observable<T> { private final VertexId id = new VertexId(); + private final long[] initialShape; + private final Observable<T> observation; + private Set<Vertex> children = Collections.emptySet(); private Set<Vertex> parents = Collections.emptySet(); private T value; - private long[] initialShape; - private final Observable<T> observation; private VertexLabel label = null; public Vertex() { - this.initialShape = Tensor.SCALAR_SHAPE; - this.observation = Observable.observableTypeFor(this.getClass()); + this(Tensor.SCALAR_SHAPE); } public Vertex(long[] initialShape) {
use single constructor in vertex cause it's cleaner
diff --git a/iterator.go b/iterator.go index <HASH>..<HASH> 100644 --- a/iterator.go +++ b/iterator.go @@ -316,6 +316,19 @@ func (it *Iterator) ValidForPrefix(prefix []byte) bool { // Close would close the iterator. It is important to call this when you're done with iteration. func (it *Iterator) Close() { it.iitr.Close() + + // It is important to wait for the fill goroutines to finish. Otherwise, we might leave zombie + // goroutines behind, which are waiting to acquire file read locks after DB has been closed. + waitFor := func(l list) { + item := l.pop() + for item != nil { + item.wg.Wait() + item = l.pop() + } + } + waitFor(it.waste) + waitFor(it.data) + // TODO: We could handle this error. _ = it.txn.db.vlog.decrIteratorCount() }
Bug Fix for #<I> Wait for goroutines to finish before closing iterator. This ensures that we don't have zombie goroutines waiting to read from closed files.
diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js index <HASH>..<HASH> 100644 --- a/app/assets/config/manifest.js +++ b/app/assets/config/manifest.js @@ -0,0 +1,3 @@ +//= link_directory ../javascripts/comfy/cms .js +//= link_directory ../stylesheets/comfy/cms .css +//= link_directory ../fonts/comfy/cms .eot
will this works with sprokets 4?
diff --git a/mod/quiz/report/overview/report.php b/mod/quiz/report/overview/report.php index <HASH>..<HASH> 100644 --- a/mod/quiz/report/overview/report.php +++ b/mod/quiz/report/overview/report.php @@ -607,17 +607,18 @@ document.getElementById("noscriptmenuaction").style.display = "none"; echo "</td>\n"; echo '</tr></table>'; } - } else if ($download == 'Excel' or $download == 'ODS') { - $workbook->close(); - exit; - } else if ($download == 'CSV') { - exit; } } else { if (!$download) { $table->print_html(); } } + if ($download == 'Excel' or $download == 'ODS') { + $workbook->close(); + exit; + } else if ($download == 'CSV') { + exit; + } if (!$download) { // Print display options $mform->set_data($displayoptions +compact('detailedmarks', 'pagesize'));
For the overview report : MDL-<I> "Option to only show / export final grade" and MDL-<I> "Make it clear which student attempt gives the final grade, if the scoring method is first, last or highest score" fixed a small problem I noticed in this patch.
diff --git a/src/Renderer/Block.php b/src/Renderer/Block.php index <HASH>..<HASH> 100644 --- a/src/Renderer/Block.php +++ b/src/Renderer/Block.php @@ -81,8 +81,10 @@ class Block * @param string $string * @return string */ + // @codingStandardsIgnoreStart public function __($string) { + // @codingStandardsIgnoreEnd return $string; } }
Issue #<I>: Exclude __() method name from phpcs checks
diff --git a/skus/m1small/const.go b/skus/m1small/const.go index <HASH>..<HASH> 100644 --- a/skus/m1small/const.go +++ b/skus/m1small/const.go @@ -14,5 +14,5 @@ const ( ClientLeaseOwner = "pez-stage" //ProcurementMetaFieldRequestID -- fieldname for a defined metadata field for //requestid - ProcurementMetaFieldRequestID = "request_id" + ProcurementMetaFieldRequestID = "requestid" ) diff --git a/skus/m1small/m1small.go b/skus/m1small/m1small.go index <HASH>..<HASH> 100644 --- a/skus/m1small/m1small.go +++ b/skus/m1small/m1small.go @@ -98,6 +98,7 @@ func (s *SkuM1Small) Procurement() *taskmanager.Task { // ReStock -- this will grab a requestid from procurementMeta and call the innkeeper client to deprovision. func (s *SkuM1Small) ReStock() (tm *taskmanager.Task) { + lo.G.Debug("ProcurementMeta: ", s.ProcurementMeta) requestID := s.ProcurementMeta[ProcurementMetaFieldRequestID].(string) lo.G.Debug("requestID: ", requestID)
[#<I>] adding debug and correcting fieldname
diff --git a/Classes/Search/AccessComponent.php b/Classes/Search/AccessComponent.php index <HASH>..<HASH> 100644 --- a/Classes/Search/AccessComponent.php +++ b/Classes/Search/AccessComponent.php @@ -52,10 +52,6 @@ class Tx_Solr_Search_AccessComponent extends Tx_Solr_Search_AbstractComponent im ); $this->query->setSiteHashFilter($allowedSites); - if ($this->searchConfiguration['query.']['searchBelowPageIds']) { - $this->query->setRootlineFilter($this->searchConfiguration['query.']['searchBelowPageIds']); - } - $this->query->setUserAccessGroups(explode(',', $GLOBALS['TSFE']->gr_list)); // must generate default endtime, @see http://forge.typo3.org/issues/44276
Revert [FEATURE] Allow limiting search to certain page-branches * documentation missing * wrong location - not related to access restrictions
diff --git a/src/ol/interaction/interaction.js b/src/ol/interaction/interaction.js index <HASH>..<HASH> 100644 --- a/src/ol/interaction/interaction.js +++ b/src/ol/interaction/interaction.js @@ -2,6 +2,7 @@ goog.provide('ol.interaction.Interaction'); +goog.require('goog.Disposable'); goog.require('ol.MapBrowserEvent'); goog.require('ol.animation.pan'); goog.require('ol.animation.rotate'); @@ -12,9 +13,12 @@ goog.require('ol.easing'); /** * @constructor + * @extends {goog.Disposable} */ ol.interaction.Interaction = function() { + goog.base(this); }; +goog.inherits(ol.interaction.Interaction, goog.Disposable); /**
Let's at least be disposable, so we can clean up after ourselves
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import setup setup( name='requests-facebook', - version='0.3.0', + version='0.4.0', install_requires=['requests>=1.0.0'], author='Mike Helmick', author_email='me@michaelhelmick.com',
Upgrade requests-facebook version to <I>
diff --git a/src/Illuminate/Collections/LazyCollection.php b/src/Illuminate/Collections/LazyCollection.php index <HASH>..<HASH> 100644 --- a/src/Illuminate/Collections/LazyCollection.php +++ b/src/Illuminate/Collections/LazyCollection.php @@ -1274,7 +1274,7 @@ class LazyCollection implements CanBeEscapedWhenCastToString, Enumerable /** * Sort through each item with a callback. * - * @param (callable(TValue, TValue): bool)|null|int $callback + * @param (callable(TValue, TValue): int)|null|int $callback * @return static */ public function sort($callback = null) diff --git a/types/Support/LazyCollection.php b/types/Support/LazyCollection.php index <HASH>..<HASH> 100644 --- a/types/Support/LazyCollection.php +++ b/types/Support/LazyCollection.php @@ -627,7 +627,7 @@ assertType('Illuminate\Support\LazyCollection<int, User>', $collection->sort(fun assertType('User', $userA); assertType('User', $userB); - return true; + return 1; })); assertType('Illuminate\Support\LazyCollection<int, User>', $collection->sort());
Update type in LazyCollection as well
diff --git a/exporters/readers/hubstorage_reader.py b/exporters/readers/hubstorage_reader.py index <HASH>..<HASH> 100644 --- a/exporters/readers/hubstorage_reader.py +++ b/exporters/readers/hubstorage_reader.py @@ -57,7 +57,6 @@ class HubstorageReader(BaseReader): self.read_option('project_id'), self.read_option('collection_name'))) self.last_position = 0 - @retry(wait_exponential_multiplier=500, wait_exponential_max=10000, stop_max_attempt_number=10) def scan_collection(self): return next(self.batches)
remove line without effect (connection issues and retry are already handled by collection scanner)
diff --git a/src/SQL/Builder/DropSchemaObjectsSQLBuilder.php b/src/SQL/Builder/DropSchemaObjectsSQLBuilder.php index <HASH>..<HASH> 100644 --- a/src/SQL/Builder/DropSchemaObjectsSQLBuilder.php +++ b/src/SQL/Builder/DropSchemaObjectsSQLBuilder.php @@ -29,7 +29,6 @@ final class DropSchemaObjectsSQLBuilder return array_merge( $this->buildTableStatements($schema->getTables()), $this->buildSequenceStatements($schema->getSequences()), - $this->buildNamespaceStatements($schema->getNamespaces()), ); } @@ -60,24 +59,4 @@ final class DropSchemaObjectsSQLBuilder return $statements; } - - /** - * @param list<string> $namespaces - * - * @return list<string> - * - * @throws Exception - */ - private function buildNamespaceStatements(array $namespaces): array - { - $statements = []; - - if ($this->platform->supportsSchemas()) { - foreach ($namespaces as $namespace) { - $statements[] = $this->platform->getDropSchemaSQL($namespace); - } - } - - return $statements; - } }
Do not drop schemas in DropSchemaObjectsSQLBuilder Although `CreateSchemaSqlCollector` creates the namespaces declared in the schema, `DropSchemaObjectsSQLBuilder` does not drop them. We will keep it the same in `DropSchemaObjectsSQLBuilder` for backward compatibility.
diff --git a/src/viewer.js b/src/viewer.js index <HASH>..<HASH> 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -427,7 +427,7 @@ $.Viewer = function( options ) { } // Add updatePixelDensityRatio to resize event - $.addEvent( window, 'resize', this.updatePixelDensityRatio.bind(this) ); + $.addEvent( window, 'resize', this._updatePixelDensityRatio.bind(this) ); //Instantiate a navigator if configured if ( this.showNavigator){ @@ -1614,8 +1614,9 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, /** * Update pixel density ration, clears all tiles and triggers updates for * all items. + * @private */ - updatePixelDensityRatio: function() { + _updatePixelDensityRatio: function() { var previusPixelDensityRatio = $.pixelDensityRatio; var currentPixelDensityRatio = $.getCurrentPixelDensityRatio(); if (previusPixelDensityRatio !== currentPixelDensityRatio) {
fix: made updatePixelDensityRatio private Prefixed it with a underscore and added @private annotation
diff --git a/models/user.go b/models/user.go index <HASH>..<HASH> 100644 --- a/models/user.go +++ b/models/user.go @@ -91,7 +91,7 @@ type User struct { // Counters NumFollowers int - NumFollowing int `xorm:"NOT NULL"` + NumFollowing int `xorm:"NOT NULL DEFAULT 0"` NumStars int NumRepos int
Add default for NumFollowing field (fixes #<I>) We set the default value for the non-NULL field NumFollowing of the User model to 0, which stops an error when the ORM tries to sync.
diff --git a/code/product/variations/ProductVariation.php b/code/product/variations/ProductVariation.php index <HASH>..<HASH> 100644 --- a/code/product/variations/ProductVariation.php +++ b/code/product/variations/ProductVariation.php @@ -140,15 +140,12 @@ class ProductVariation extends DataObject implements Buyable { return $title; } - //this is used by TableListField to access attribute values. - public function AttributeProxy(){ - $do = new DataObject(); - if($this->AttributeValues()->exists()){ - foreach($this->AttributeValues() as $value){ - $do->{'Val'.$value->Type()->Name} = $value->Value; - } - } - return $do; + public function getCategoryIDs() { + return $this->Product() ? $this->Product()->getCategoryIDs() : array(); + } + + public function getCategories() { + return $this->Product() ? $this->Product()->getCategories() : new ArrayList(); } public function canPurchase($member = null, $quantity = 1) {
FIX: added missing getCategoryIDs and getCategories functions to ProductVariations. relates to 7eee4a<I>c<I>cf<I>a<I>d<I>f7a5c8c<I>fa
diff --git a/mpop/imageo/geo_image.py b/mpop/imageo/geo_image.py index <HASH>..<HASH> 100644 --- a/mpop/imageo/geo_image.py +++ b/mpop/imageo/geo_image.py @@ -244,6 +244,16 @@ class GeoImage(mpop.imageo.image.Image): def add_overlay(self, color = (0, 0, 0)): """Add coastline and political borders to image, using *color*. """ + import warnings + warnings.warn( + """The GeoImage.add_overlay method is deprecated and should not be + used anymore. To add coastlines, borders and rivers to your images, + use pycoast instead: + http://pycoast.googlecode.com + """, + DeprecationWarning) + + import acpgimage import _acpgpilext import pps_array2image
Deprecating add_overlay in favor of pycoast.
diff --git a/lib/action_pager/pager.rb b/lib/action_pager/pager.rb index <HASH>..<HASH> 100644 --- a/lib/action_pager/pager.rb +++ b/lib/action_pager/pager.rb @@ -15,6 +15,11 @@ module ActionPager end def scoped + warn "[DEPRECATION] `scoped` is deprecated. Please use `current_collection` instead." + current_collection + end + + def current_collection if collection.is_a?(Array) collection.drop(offset).first(per_page) else # for ActiveRecord::Relation and other OR mapper collections
deprecate scoped method in favor of current_collection
diff --git a/prestans/types.py b/prestans/types.py index <HASH>..<HASH> 100644 --- a/prestans/types.py +++ b/prestans/types.py @@ -1023,6 +1023,9 @@ class Model(DataCollection): minified_keys = minified_keys + sublist overflow = overflow - len(sublist) + if prefix == '': + minified_keys.sort(key=len, reverse=False) + return minified_keys
Refined alogrithm for rewriting
diff --git a/classes/Gems/Tracker/Snippets/ImportTrackSnippetAbstract.php b/classes/Gems/Tracker/Snippets/ImportTrackSnippetAbstract.php index <HASH>..<HASH> 100644 --- a/classes/Gems/Tracker/Snippets/ImportTrackSnippetAbstract.php +++ b/classes/Gems/Tracker/Snippets/ImportTrackSnippetAbstract.php @@ -543,7 +543,7 @@ class ImportTrackSnippetAbstract extends \MUtil_Snippets_WizardFormSnippetAbstra * Set what to do when the form is 'finished'. * * @return \MUtil_Snippets_Standard_ModelImportSnippet - * / + */ protected function setAfterSaveRoute() { $filename = $this->getExportBatch(false)->getSessionVariable('filename'); @@ -568,7 +568,7 @@ class ImportTrackSnippetAbstract extends \MUtil_Snippets_WizardFormSnippetAbstra * Performs the validation. * * @return boolean True if validation was OK and data should be saved. - * / + */ protected function validateForm() { if (2 == $this->currentStep) {
Update ImportTrackSnippetAbstract.php Removed extra space at the end of the docblock to fix syntax highlighting
diff --git a/client/js/app/stores/ExplorerStore.js b/client/js/app/stores/ExplorerStore.js index <HASH>..<HASH> 100644 --- a/client/js/app/stores/ExplorerStore.js +++ b/client/js/app/stores/ExplorerStore.js @@ -126,8 +126,10 @@ function _create(attrs) { function _update(id, updates) { var newModel = _.assign({}, _explorers[id], updates); + // If we're no longer doing an email extraction, remove the latest and email field. if (!_.isNull(newModel.query.latest) && !ExplorerUtils.isEmailExtraction(newModel)) { newModel.query.latest = null; + newModel.query.email = null; } if (updates.id && updates.id !== id) { _explorers[updates.id] = newModel;
Clear email field after analysis type changes from extraction to something else.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,7 @@ -from setuptools import setup +from distutils.core import setup + +with open('README.md') as file: + long_description = file.read() setup( name='boatd_client', @@ -6,13 +9,12 @@ setup( author='Louis Taylor', author_email='kragniz@gmail.com', description=('Python wrapper for the boatd API, used to write behavior scripts.'), + long_description=long_description, license='GPL', keywords='boat sailing wrapper rest', url='https://github.com/boatd/python-boatd', packages=['boatd_client'], requires=['docopt'], - test_requires=['nose', 'HTTPretty'], - test_suite='nose.collector', classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers',
Update setup.py for pypi
diff --git a/lib/Model/Table.php b/lib/Model/Table.php index <HASH>..<HASH> 100644 --- a/lib/Model/Table.php +++ b/lib/Model/Table.php @@ -623,10 +623,11 @@ class Model_Table extends Model { $this->hook('afterModify'); if($this->_save_as===false)return $this->unload(); + $id=$this->id; if($this->_save_as)$this->unload(); $o=$this->_save_as?:$this; - return $o->load($this->id); + return $o->load($id); } /** @obsolete. Use set() then save(). */ function update($data=array()){ // obsolete
$model->saveAs() don't load record back saveAs can't load data record at the end, because it's unloaded first and later we try to load it back, but $this->id is not defined anymore.
diff --git a/src/Recorder.php b/src/Recorder.php index <HASH>..<HASH> 100644 --- a/src/Recorder.php +++ b/src/Recorder.php @@ -62,7 +62,7 @@ class Recorder if ($configurationFile) { $this->loadConfig($configurationFile); } - $this->formatter = new ResponseFormatter($this->config['marker_header']); + $this->formatter = new ResponseFormatter(isset($this->config['marker_header']) ? $this->config['marker_header'] : false); } /**
Fix checking for marker_header when no config file supplied.
diff --git a/src/main/java/hex/rf/RandomForest.java b/src/main/java/hex/rf/RandomForest.java index <HASH>..<HASH> 100644 --- a/src/main/java/hex/rf/RandomForest.java +++ b/src/main/java/hex/rf/RandomForest.java @@ -173,7 +173,7 @@ public class RandomForest { strata, ARGS.verbose, ARGS.exclusive); - DRF drf = (DRF) drfResult.get(); // block on all nodes! + DRF drf = drfResult.get(); // block on all nodes! RFModel model = UKV.get(modelKey, new RFModel()); Utils.pln("[RF] Random forest finished in "+ drf._t_main);
Unnecessary cast removed.
diff --git a/src/AssertInterface.php b/src/AssertInterface.php index <HASH>..<HASH> 100644 --- a/src/AssertInterface.php +++ b/src/AssertInterface.php @@ -4,6 +4,7 @@ namespace Peridot\Leo; use \Exception; use Peridot\Leo\Formatter\Formatter; use Peridot\Leo\Matcher\EqualMatcher; +use Peridot\Leo\Matcher\ExceptionMatcher; use Peridot\Leo\Matcher\SameMatcher; class AssertInterface @@ -41,18 +42,14 @@ class AssertInterface } } - public function throws(callable $actual, $exceptionType, $exceptionMessage = '') + public function throws(callable $func, $exceptionType, $exceptionMessage = '') { - try { - call_user_func_array($actual, $this->arguments); - } catch (Exception $e) { - $message = $e->getMessage(); - if ($exceptionMessage && $exceptionMessage != $message) { - throw new Exception("wrong exception message"); - } - if (!$e instanceof $exceptionType) { - throw new Exception("no exception"); - } + $matcher = new ExceptionMatcher($func); + $matcher->setExpectedMessage($exceptionMessage); + $match = $matcher->match($exceptionType); + $this->formatter->setMatch($match); + if (! $match->isMatch()) { + throw new Exception($this->formatter->getMessage($matcher->getTemplate())); } }
use ExceptionMatcher in AssertInterface
diff --git a/backupdb/management/commands/restoredb.py b/backupdb/management/commands/restoredb.py index <HASH>..<HASH> 100644 --- a/backupdb/management/commands/restoredb.py +++ b/backupdb/management/commands/restoredb.py @@ -6,7 +6,6 @@ import os from django.core.management.base import CommandError from django.conf import settings -from django.db import close_connection from backupdb.utils.commands import BaseBackupDbCommand from backupdb.utils.exceptions import RestoreError @@ -54,16 +53,11 @@ class Command(BaseBackupDbCommand): 'understanding how restoration is failing in the case that it ' 'is.' ), - ), - ) + ) def handle(self, *args, **options): super(Command, self).handle(*args, **options) - # Django is querying django_content_types in a hanging transaction - # Because of this psql can't drop django_content_types and just hangs - close_connection() - # Ensure backup dir present if not os.path.exists(BACKUP_DIR): raise CommandError("Backup dir '{0}' does not exist!".format(BACKUP_DIR))
Fix restoredb for newer versions of Django close_connection has been gone since Django <I>. The code seems to run fine without it though! Whatever hanging transaction was happening before seems to no longer be an issue.
diff --git a/graphdb/SQLiteGraphDB/__init__.py b/graphdb/SQLiteGraphDB/__init__.py index <HASH>..<HASH> 100644 --- a/graphdb/SQLiteGraphDB/__init__.py +++ b/graphdb/SQLiteGraphDB/__init__.py @@ -120,10 +120,12 @@ class SQLiteGraphDB(object): ''' sqlite based graph database for storing native python objects and their relationships to each other ''' def __init__(self, path=':memory:', autostore=True, autocommit=True): + assert isinstance(autostore, bool), autostore # autostore needs to be a boolean + assert isinstance(autocommit, bool), autocommit # autocommit needs to be a boolean if path != ':memory:': self._create_file(path) self._state = read_write_state_machine() - self._autostore = True + self._autostore = autostore self._autocommit = autocommit self._path = path self._connections = better_default_dict(lambda s=self:sqlite3.connect(s._path)) @@ -173,7 +175,7 @@ class SQLiteGraphDB(object): @staticmethod def _create_file(path=''): ''' creates a file at the given path and sets the permissions to user only read/write ''' - from os.path import isfile + assert isinstance(path, str), path # path needs to be a string if not isfile(path): # only do the following if the file doesn't exist yet from os import chmod from stat import S_IRUSR, S_IWUSR
added some type safety, better imports and fixed autostore
diff --git a/test/rails_app/app/models/user.rb b/test/rails_app/app/models/user.rb index <HASH>..<HASH> 100644 --- a/test/rails_app/app/models/user.rb +++ b/test/rails_app/app/models/user.rb @@ -30,7 +30,6 @@ class User < PARENT_MODEL_CLASS validates_presence_of :encrypted_password, :if => :password_required? end - include ::ActiveModel::MassAssignmentSecurity devise :database_authenticatable, :registerable, :validatable, :confirmable, :invitable, :recoverable attr_accessor :callback_works, :bio
remove ::ActiveModel::MassAssignmentSecurity from tests
diff --git a/activerecord/lib/active_record/middleware/database_selector/resolver.rb b/activerecord/lib/active_record/middleware/database_selector/resolver.rb index <HASH>..<HASH> 100644 --- a/activerecord/lib/active_record/middleware/database_selector/resolver.rb +++ b/activerecord/lib/active_record/middleware/database_selector/resolver.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require "active_record/middleware/database_selector/resolver/session" +require "active_support/core_ext/numeric/time" module ActiveRecord module Middleware
Make AR::Middleware::DatabaseSelector loadable without full core ext
diff --git a/packages/bonde-admin-canary/src/components/Form/FormGraphQL.js b/packages/bonde-admin-canary/src/components/Form/FormGraphQL.js index <HASH>..<HASH> 100644 --- a/packages/bonde-admin-canary/src/components/Form/FormGraphQL.js +++ b/packages/bonde-admin-canary/src/components/Form/FormGraphQL.js @@ -102,6 +102,7 @@ export class FormGraphQLv2 extends React.Component { } FormGraphQLv2.propTypes = { + children: PropTypes.node, mutation: PropTypes.func.isRequired, mutationVariables: PropTypes.object, query: PropTypes.func,
chore(admin-canary): eslint propTypes FormGraphQL
diff --git a/src/models/room-member.js b/src/models/room-member.js index <HASH>..<HASH> 100644 --- a/src/models/room-member.js +++ b/src/models/room-member.js @@ -298,6 +298,12 @@ function calculateDisplayName(selfUserId, displayName, roomState) { return selfUserId; } + // First check if the displayname is something we consider truthy + // after stripping it of zero width characters and padding spaces + if (!utils.removeHiddenChars(displayName)) { + return selfUserId; + } + if (!roomState) { return displayName; }
re-add empty check after removing hidden chars
diff --git a/src/org/zaproxy/zap/view/ScanPanel.java b/src/org/zaproxy/zap/view/ScanPanel.java index <HASH>..<HASH> 100644 --- a/src/org/zaproxy/zap/view/ScanPanel.java +++ b/src/org/zaproxy/zap/view/ScanPanel.java @@ -526,11 +526,7 @@ public abstract class ScanPanel extends AbstractPanel { getStartScanButton().setEnabled(false); getStopScanButton().setEnabled(true); getPauseScanButton().setEnabled(true); - if (scanThread.isPaused()) { - getPauseScanButton().setSelected(true); - } else { - getPauseScanButton().setSelected(false); - } + getPauseScanButton().setSelected(scanThread.isPaused()); getProgressBar().setEnabled(true); } else { resetScanButtonsAndProgressBarStates(true);
Tidy up, replaced, in ScanPanel, an (unnecessary) if statement with direct use of the evaluated boolean value.
diff --git a/spec/policies/renalware/event_type_policy_spec.rb b/spec/policies/renalware/event_type_policy_spec.rb index <HASH>..<HASH> 100644 --- a/spec/policies/renalware/event_type_policy_spec.rb +++ b/spec/policies/renalware/event_type_policy_spec.rb @@ -5,7 +5,7 @@ module Renalware describe EventTypePolicy, type: :policy do subject { described_class } - permissions :new? do + permissions :new?, :create?, :index?, :edit?, :destroy? do it "grants access if user super_admin" do expect(subject).to permit(FactoryGirl.create(:user, :super_admin)) end @@ -17,6 +17,10 @@ module Renalware it "denies access if user clinician" do expect(subject).to_not permit(FactoryGirl.create(:user, :clinician)) end + + it "denies access if user read_only" do + expect(subject).to_not permit(FactoryGirl.create(:user, :read_only)) + end end end
Added remaining actions for event_type policy permissions.
diff --git a/order/client_test.go b/order/client_test.go index <HASH>..<HASH> 100644 --- a/order/client_test.go +++ b/order/client_test.go @@ -144,6 +144,8 @@ func TestOrder(t *testing.T) { if o.Meta["foo"] != "bar" { t.Error("Order metadata not set") } + + coupon.Del(c.ID) } func TestOrderUpdate(t *testing.T) {
Properly delete the coupon at the end of the test.
diff --git a/fontbakery-check-ttf.py b/fontbakery-check-ttf.py index <HASH>..<HASH> 100755 --- a/fontbakery-check-ttf.py +++ b/fontbakery-check-ttf.py @@ -1144,7 +1144,9 @@ def main(): # ---------------------------------------------------- fb.new_check("Checking fsSelection REGULAR bit") check_bit_entry(font, "OS/2", "fsSelection", - "Regular" in style, + "Regular" in style or \ + (style in STYLE_NAMES and + style not in RIBBI_STYLE_NAMES), bitmask=FSSEL_REGULAR, bitname="REGULAR")
fixing criteria to fsSelection REGULAR bit check issue #<I>
diff --git a/smartfilesorter/actionrules/moveto.py b/smartfilesorter/actionrules/moveto.py index <HASH>..<HASH> 100644 --- a/smartfilesorter/actionrules/moveto.py +++ b/smartfilesorter/actionrules/moveto.py @@ -26,15 +26,19 @@ class MoveTo(ActionRule): # If the file exists in the destination directory, append _NNN to the name where NNN is # a zero padded number. Starts at _001 while os.path.exists(new_filename): - # if filename ends in _NNN, start there + # if filename ends in _NNN, start at that number filename, extension = os.path.splitext(os.path.basename(new_filename)) if filename[-4] == '_' and filename[-3:].isdigit(): - current = int(filename[-3:]) + 1 + # Split the number off the filename and increment it, handle suffixes longer than 3 numbers + current = filename.split('_')[-1] + filename_root = filename[0:-len(current)] + current = int(current) + 1 new_filename = os.path.join(self.destination, - (filename[:-4] + + (filename_root + "_{0:03d}".format(current) + extension)) else: + # No number suffix found in the filename, just start at _001 new_filename = os.path.join(self.destination, (filename + "_001" + extension))
MoveTo - better number handling Better handling for number suffixes in filename. Now will handle numbers > <I>, by extending them. Ex: _<I>.txt, _<I>.txt, _<I>.txt, etc)
diff --git a/filestore/filestore.go b/filestore/filestore.go index <HASH>..<HASH> 100644 --- a/filestore/filestore.go +++ b/filestore/filestore.go @@ -54,6 +54,7 @@ func (store FileStore) UseIn(composer *tusd.StoreComposer) { composer.UseGetReader(store) composer.UseTerminater(store) composer.UseLocker(store) + composer.UseConcater(store) } func (store FileStore) NewUpload(info tusd.FileInfo) (id string, err error) {
Expose concatenation support in filestore
diff --git a/test/client.js b/test/client.js index <HASH>..<HASH> 100644 --- a/test/client.js +++ b/test/client.js @@ -203,6 +203,17 @@ describe('Client Unit Tests', function() { }); }); + describe('#images', function() { + it('should have image object', function(){ + smartsheet.should.have.property('images'); + Object.keys(smartsheet.images).should.be.length(1); + }); + + it('should have get methods', function() { + smartsheet.images.should.have.property('listImageUrls'); + }); + }); + describe('#search', function () { it('should have search object', function () { smartsheet.should.have.property('search');
Update sanity tests to include the 'images' object.
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -46,8 +46,10 @@ function ApiClient(config) { // add each model to the ApiClient Object.keys(models).forEach(function(modelName) { - self.__defineGetter__(modelName, function(){ - return models[modelName](self) + Object.defineProperty(self, modelName, { + get: function() { return models[modelName](self) }, + enumerable:true, + configurable:true }) }) _.extend(this, models)
changed how getters are being defined to the more standards complient defineProperty
diff --git a/builtin/providers/cloudstack/resource_cloudstack_vpc.go b/builtin/providers/cloudstack/resource_cloudstack_vpc.go index <HASH>..<HASH> 100644 --- a/builtin/providers/cloudstack/resource_cloudstack_vpc.go +++ b/builtin/providers/cloudstack/resource_cloudstack_vpc.go @@ -161,7 +161,10 @@ func resourceCloudStackVPCRead(d *schema.ResourceData, meta interface{}) error { p := cs.Address.NewListPublicIpAddressesParams() p.SetVpcid(d.Id()) p.SetIssourcenat(true) - p.SetProjectid(v.Projectid) + if project, ok := d.GetOk("project"); ok { + p.SetProjectid(v.Projectid) + } + l, e := cs.Address.ListPublicIpAddresses(p) if (e == nil) && (l.Count == 1) { d.Set("source_nat_ip", l.PublicIpAddresses[0].Ipaddress)
Only set projectID if it is set
diff --git a/lems/sim/runnable.py b/lems/sim/runnable.py index <HASH>..<HASH> 100644 --- a/lems/sim/runnable.py +++ b/lems/sim/runnable.py @@ -187,6 +187,9 @@ class Runnable(Reflective): #print sorted(self.__dict__.keys()) #print ".........." #print self.__dict__[group_name] + # Force group_name attribute to be a list before we append to it. + if type(self.__dict__[group_name]) is not list: + self.__dict__[group_name] = [self.__dict__[group_name]] self.__dict__[group_name].append(child) child.parent = self
Check if group_name corresponds to a list before adding to that list
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ setup( url="https://github.com/sergey-aganezov-jr/bg", classifiers=[ "Development Status :: 2 - Pre-Alpha", - "License :: OSI Approved :: GPLv3", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3',
fixed unsupported classifiers in setup.py files
diff --git a/Pair/PairManager.php b/Pair/PairManager.php index <HASH>..<HASH> 100644 --- a/Pair/PairManager.php +++ b/Pair/PairManager.php @@ -59,7 +59,7 @@ class PairManager if ($ratio <= 0) { throw new MoneyException("ratio has to be strictly positive"); } - $ratioList = $this->storage->loadRatioList(); + $ratioList = $this->storage->loadRatioList(true); $ratioList[$currency->getName()] = $ratio; $ratioList[$this->getReferenceCurrencyCode()] = (float) 1; $this->storage->saveRatioList($ratioList); @@ -134,4 +134,4 @@ class PairManager } -} \ No newline at end of file +}
When updating multiple currencies only the last one is updated This fix will prevent incorrect behavior.
diff --git a/ui/src/components/carousel/QCarousel.js b/ui/src/components/carousel/QCarousel.js index <HASH>..<HASH> 100644 --- a/ui/src/components/carousel/QCarousel.js +++ b/ui/src/components/carousel/QCarousel.js @@ -175,9 +175,7 @@ export default Vue.extend({ h('div', { staticClass: 'q-carousel__slides-container', directives: this.panelDirectives - }, [ - this.__getPanelContent(h) - ]) + }, this.__getPanelContent(h)) ].concat(this.__getContent(h))) } }, diff --git a/ui/src/components/stepper/QStepper.js b/ui/src/components/stepper/QStepper.js index <HASH>..<HASH> 100644 --- a/ui/src/components/stepper/QStepper.js +++ b/ui/src/components/stepper/QStepper.js @@ -86,9 +86,7 @@ export default Vue.extend({ h('div', { staticClass: 'q-stepper__content q-panel-parent', directives: this.panelDirectives - }, [ - this.__getPanelContent(h) - ]) + }, this.__getPanelContent(h)) ) },
refactor(panel): Improve panels render method
diff --git a/pypercube/expression.py b/pypercube/expression.py index <HASH>..<HASH> 100644 --- a/pypercube/expression.py +++ b/pypercube/expression.py @@ -220,6 +220,30 @@ class MetricExpression(object): """ return CompoundMetricExpression(self).__truediv__(right) + def __eq__(self, other): + """ + >>> e1 = EventExpression('request') + >>> e2 = EventExpression('other') + >>> m1 = MetricExpression('sum', e1) + >>> m2 = MetricExpression('sum', e1) + >>> m1 == m2 + True + >>> m2 = MetricExpression('sum', e2) + >>> m1 == m2 + False + >>> m1 = MetricExpression('sum', e2) + >>> m1 == m2 + True + >>> m1 = MetricExpression('min', e2) + >>> m1 == m2 + False + >>> m2 = MetricExpression('min', e2) + >>> m1 == m2 + True + """ + return self.metric_type == other.metric_type and \ + self.event_expression == other.event_expression + class Sum(MetricExpression): """A "sum" metric."""
Implement __eq__ for MetricExpression
diff --git a/server/tcp.go b/server/tcp.go index <HASH>..<HASH> 100644 --- a/server/tcp.go +++ b/server/tcp.go @@ -69,7 +69,7 @@ func handleConnection(conn net.Conn, errChan chan<- error) { // to connected tcp client (non-blocking) go func() { for msg := range proxy.Pipe { - lumber.Info("Got message - %#v", msg) + lumber.Trace("Got message - %#v", msg) // if the message fails to encode its probably a syntax issue and needs to // break the loop here because it will never be able to encode it; this will // disconnect the client.
Prevent unintended log spam Resolves #<I>
diff --git a/src/rfx/backend.py b/src/rfx/backend.py index <HASH>..<HASH> 100644 --- a/src/rfx/backend.py +++ b/src/rfx/backend.py @@ -308,7 +308,7 @@ class EngineCli(rfx.Base): """get an object. see --help""" obj_name = parsed['name'] try: - obj = Engine(base=self).get_object(obj_type, obj_name, raise_error=True) + obj = self.rcs.get(obj_type, obj_name) if argv and argv[0]: key = argv[0] if key[:4] == 'obj.':
switching to direct self.rcs
diff --git a/echo_test.go b/echo_test.go index <HASH>..<HASH> 100644 --- a/echo_test.go +++ b/echo_test.go @@ -457,7 +457,7 @@ func request(method, path string, e *Echo) (int, string) { } func TestHTTPError(t *testing.T) { - err := NewHTTPError(400, map[string]interface{}{ + err := NewHTTPError(http.StatusBadRequest, map[string]interface{}{ "code": 12, }) assert.Equal(t, "code=400, message=map[code:12]", err.Error())
echo: use HTTP status codes constants where applicable (#<I>)
diff --git a/internal/sysutil/sysutil.go b/internal/sysutil/sysutil.go index <HASH>..<HASH> 100644 --- a/internal/sysutil/sysutil.go +++ b/internal/sysutil/sysutil.go @@ -9,5 +9,5 @@ import "golang.org/x/sys/unix" func RlimitStack() (cur uint64, err error) { var r unix.Rlimit err = unix.Getrlimit(unix.RLIMIT_STACK, &r) - return r.Cur, err + return uint64(r.Cur), err // Type conversion because Cur is one of uint64, int64 depending on unix flavor. }
internal/sysutil: Fix build error on FreeBSD due to Rlimit.Cur type mismatch. (#<I>) Document why type conversion is necessary. Otherwise, it's not clear that it's neccessary, and we we wouldn't be able to catch breakage if it were removed.
diff --git a/lib/fastlane/actions/read_podspec.rb b/lib/fastlane/actions/read_podspec.rb index <HASH>..<HASH> 100644 --- a/lib/fastlane/actions/read_podspec.rb +++ b/lib/fastlane/actions/read_podspec.rb @@ -6,9 +6,10 @@ module Fastlane class ReadPodspecAction < Action def self.run(params) + Actions.verify_gem!('cocoapods') + path = params[:path] - - # will fail if cocoapods is not installed + require 'cocoapods-core' spec = Pod::Spec.from_file(path).to_hash diff --git a/lib/fastlane/documentation/actions_list.rb b/lib/fastlane/documentation/actions_list.rb index <HASH>..<HASH> 100644 --- a/lib/fastlane/documentation/actions_list.rb +++ b/lib/fastlane/documentation/actions_list.rb @@ -87,7 +87,7 @@ module Fastlane if required_count > 0 puts "#{required_count} of the available parameters are required".magenta - puts "They are marked using an asterix *".magenta + puts "They are marked with an asterix *".magenta end else puts "No available options".yellow
Improved read_podspec action when cocoapods isn't installed
diff --git a/lxd/state/testing.go b/lxd/state/testing.go index <HASH>..<HASH> 100644 --- a/lxd/state/testing.go +++ b/lxd/state/testing.go @@ -28,7 +28,7 @@ func NewTestState(t *testing.T) (*State, func()) { osCleanup() } - state := NewState(context.TODO(), node, cluster, nil, os, nil, nil, nil, firewall.New(), nil) + state := NewState(context.TODO(), node, cluster, nil, os, nil, nil, nil, firewall.New(), nil, nil, func() {}) return state, cleanup }
lxd/state: Update tests with NewState usage
diff --git a/core/server/data/db/backup.js b/core/server/data/db/backup.js index <HASH>..<HASH> 100644 --- a/core/server/data/db/backup.js +++ b/core/server/data/db/backup.js @@ -18,8 +18,9 @@ writeExportFile = function writeExportFile(exportResult) { }; const readBackup = async (filename) => { - // TODO: prevent from directory traversal - need to sanitize the filename probably on validation layer - var backupPath = path.resolve(urlUtils.urlJoin(config.get('paths').contentPath, 'data', filename)); + const parsedFileName = path.parse(filename); + const sanitized = `${parsedFileName.name}${parsedFileName.ext}`; + const backupPath = path.resolve(urlUtils.urlJoin(config.get('paths').contentPath, 'data', sanitized)); const exists = await fs.pathExists(backupPath);
Added input sanitization for backup path - We need to limit the allowed filename accepted by the method to avoid opening up path traversal attack
diff --git a/ext_localconf.php b/ext_localconf.php index <HASH>..<HASH> 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -23,7 +23,6 @@ $extensionConfiguration = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( ); $bootstrapPackageConfiguration = $extensionConfiguration->get('bootstrap_package'); - /*************** * PageTS */
[BUGFIX] Remove empty line to match cgl
diff --git a/jaxrs/src/main/java/com/ning/billing/jaxrs/resources/InvoiceResource.java b/jaxrs/src/main/java/com/ning/billing/jaxrs/resources/InvoiceResource.java index <HASH>..<HASH> 100644 --- a/jaxrs/src/main/java/com/ning/billing/jaxrs/resources/InvoiceResource.java +++ b/jaxrs/src/main/java/com/ning/billing/jaxrs/resources/InvoiceResource.java @@ -182,7 +182,7 @@ public class InvoiceResource extends JaxRsResourceBase { } @DELETE - @Path("/{invoiceId:" + UUID_PATTERN + "}" + "/{invoiceItemId:" + UUID_PATTERN + "/cba") + @Path("/{invoiceId:" + UUID_PATTERN + "}" + "/{invoiceItemId:" + UUID_PATTERN + "}/cba") @Consumes(APPLICATION_JSON) @Produces(APPLICATION_JSON) public Response deleteCBA(@PathParam("invoiceId") final String invoiceId,
jaxrs: fix typo in DELETE cba endpoint
diff --git a/np/quickarrays.py b/np/quickarrays.py index <HASH>..<HASH> 100755 --- a/np/quickarrays.py +++ b/np/quickarrays.py @@ -154,7 +154,6 @@ class NPQuickTypeShortcut(object): class NPQuickMatrixCreator(object): def __init__(self, dtype_shortcut = None): - self._shortcut_name = 'np.m' self.dtype = np_quick_types.get(dtype_shortcut, None) def __getitem__(self, arg): @@ -162,7 +161,10 @@ class NPQuickMatrixCreator(object): return array(data, dtype=self.dtype).reshape((-1, columns)) def __repr__(self): - return "<np quick matrix creator>" + if self.dtype: + return "<np quick matrix creator for type %s>" % repr(self.dtype.__name__) + else: + return "<np quick matrix creator>" class npmodule(types.ModuleType):
repr fix for future typed matrices
diff --git a/library/WT/Stats.php b/library/WT/Stats.php index <HASH>..<HASH> 100644 --- a/library/WT/Stats.php +++ b/library/WT/Stats.php @@ -1596,7 +1596,7 @@ class WT_Stats { ." `##individuals` AS indi" ." WHERE" ." indi.i_id=birth.d_gid AND" - ." indi.i_gedrec NOT LIKE '%\\n1 DEAT%' AND" + ." indi.i_gedcom NOT LIKE '%\\n1 DEAT%' AND" ." birth.d_file={$this->_ged_id} AND" ." birth.d_file=indi.i_file AND" ." birth.d_fact IN ('BIRT', 'CHR', 'BAPM', '_BRTM') AND"
#<I> - statistics oldest living people
diff --git a/library/src/main/java/com/github/ksoichiro/android/observablescrollview/ObservableRecyclerView.java b/library/src/main/java/com/github/ksoichiro/android/observablescrollview/ObservableRecyclerView.java index <HASH>..<HASH> 100644 --- a/library/src/main/java/com/github/ksoichiro/android/observablescrollview/ObservableRecyclerView.java +++ b/library/src/main/java/com/github/ksoichiro/android/observablescrollview/ObservableRecyclerView.java @@ -142,6 +142,7 @@ public class ObservableRecyclerView extends RecyclerView implements Scrollable { mPrevFirstVisibleChildHeight = firstVisibleChild.getHeight(); } else if (firstVisiblePosition == 0) { mPrevFirstVisibleChildHeight = firstVisibleChild.getHeight(); + mPrevScrolledChildrenHeight = 0; } if (mPrevFirstVisibleChildHeight < 0) { mPrevFirstVisibleChildHeight = 0;
ObservableRecyclerView: set mPrevScrolledChildrenHeight to 0 when scrolled to top. This should fix the issue that mScrollY becomes a negative value after fast scrolled down and up to top.
diff --git a/public/hft/0.x.x/scripts/commonui.js b/public/hft/0.x.x/scripts/commonui.js index <HASH>..<HASH> 100644 --- a/public/hft/0.x.x/scripts/commonui.js +++ b/public/hft/0.x.x/scripts/commonui.js @@ -296,6 +296,10 @@ define([ title: "HappyFunTimes", msg: "Touch To Restart", }, function() { + dialog.modal({ + title: "HappyFunTimes", + msg: "...restarting...", + }); var redirCookie = new Cookie("redir"); var url = redirCookie.get() || "http://happyfuntimes.net"; console.log("goto: " + url);
make commonui show ...restarting... when restarting
diff --git a/PhpAmqpLib/Connection/AbstractConnection.php b/PhpAmqpLib/Connection/AbstractConnection.php index <HASH>..<HASH> 100644 --- a/PhpAmqpLib/Connection/AbstractConnection.php +++ b/PhpAmqpLib/Connection/AbstractConnection.php @@ -419,14 +419,16 @@ class AbstractConnection extends AbstractChannel $pkt->write_octet(0xCE); - while ($body !== '') { - $bodyStart = ($this->frame_max - 8); - $payload = mb_substr($body, 0, $bodyStart, 'ASCII'); - $body = (string)mb_substr($body, $bodyStart, mb_strlen($body, 'ASCII') - $bodyStart, 'ASCII'); + // memory efficiency: walk the string instead of biting it. good for very large packets (100+mb) + $position = 0; + $bodyLength = mb_strlen($body,'8bit'); + while ($position <= $bodyLength) { + $payload = mb_substr($body, $position, $this->frame_max - 8, '8bit'); + $position += $this->frame_max - 8; $pkt->write_octet(3); $pkt->write_short($channel); - $pkt->write_long(mb_strlen($payload, 'ASCII')); + $pkt->write_long(mb_strlen($payload, '8bit')); $pkt->write($payload);
changed the way prepare content splits the body. now should be a bit more memory efficient
diff --git a/dosagelib/output.py b/dosagelib/output.py index <HASH>..<HASH> 100644 --- a/dosagelib/output.py +++ b/dosagelib/output.py @@ -23,9 +23,9 @@ class Output(object): """Write an informational message.""" self.write(s, level=level) - def debug(self, s): + def debug(self, s, level=2): """Write a debug message.""" - self.write(s, level=2, color='white') + self.write(s, level=level, color='white') def warn(self, s): """Write a warning message."""
Allow debug level to be set.
diff --git a/roaring_test.go b/roaring_test.go index <HASH>..<HASH> 100644 --- a/roaring_test.go +++ b/roaring_test.go @@ -2177,7 +2177,7 @@ func TestReverseIterator(t *testing.T) { i := bm.ReverseIterator() assert.True(t, i.HasNext()) - assert.EqualValues(t, MaxUint32, i.Next()) + assert.EqualValues(t, uint32(MaxUint32), i.Next()) assert.False(t, i.HasNext()) }) }
Fixed tests for GOARCH=<I>
diff --git a/hawtio-maven-plugin/src/main/java/io/hawt/maven/TestMojo.java b/hawtio-maven-plugin/src/main/java/io/hawt/maven/TestMojo.java index <HASH>..<HASH> 100644 --- a/hawtio-maven-plugin/src/main/java/io/hawt/maven/TestMojo.java +++ b/hawtio-maven-plugin/src/main/java/io/hawt/maven/TestMojo.java @@ -35,10 +35,10 @@ import org.apache.maven.plugins.annotations.ResolutionScope; @Mojo(name = "test", defaultPhase = LifecyclePhase.TEST_COMPILE, requiresDependencyResolution = ResolutionScope.TEST) public class TestMojo extends CamelMojo { - // TODO: parse args to find class and test name - - private String className = "com.foo.MyRouteTest"; + @Parameter(property = "hawtio.className", required = true) + private String className; + @Parameter(property = "hawtio.testName") private String testName; /**
#<I>: Polished
diff --git a/chainlet/chainlink.py b/chainlet/chainlink.py index <HASH>..<HASH> 100644 --- a/chainlet/chainlink.py +++ b/chainlet/chainlink.py @@ -187,6 +187,8 @@ class ChainLinker(object): else: _elements.append(element) if any(isinstance(element, ParallelChain) for element in _elements): + if len(_elements) == 1: + return _elements[0] return MetaChain(_elements) return LinearChain(_elements)
linker returns parallel link if there are no more elements
diff --git a/crosscat/utils/sample_utils.py b/crosscat/utils/sample_utils.py index <HASH>..<HASH> 100644 --- a/crosscat/utils/sample_utils.py +++ b/crosscat/utils/sample_utils.py @@ -349,18 +349,22 @@ def create_component_model(column_metadata, column_hypers, suffstats): modeltype = column_metadata['modeltype'] if modeltype == 'normal_inverse_gamma': component_model_constructor = CCM.p_ContinuousComponentModel + component_model = component_model_constructor(column_hypers, count, + **suffstats) elif modeltype == 'symmetric_dirichlet_discrete': component_model_constructor = MCM.p_MultinomialComponentModel # FIXME: this is a hack if suffstats is not None: suffstats = dict(counts=suffstats) + component_model = component_model_constructor(column_hypers, count, + **suffstats) elif modeltype == 'vonmises': component_model_constructor = CYCM.p_CyclicComponentModel + component_model = component_model_constructor(column_hypers, count, + **suffstats) else: assert False, \ "create_component_model: unknown modeltype: %s" % modeltype - component_model = component_model_constructor(column_hypers, count, - **suffstats) return component_model def create_cluster_model(zipped_column_info, row_partition_model,
Distribute if over its continuation.
diff --git a/ella/newman/media/js/newman.js b/ella/newman/media/js/newman.js index <HASH>..<HASH> 100644 --- a/ella/newman/media/js/newman.js +++ b/ella/newman/media/js/newman.js @@ -275,7 +275,6 @@ $( function() { if ( ($this).val() ) has_files = true; }); if (has_files) { - ;;; alert('file present'); // Shave off the names from suggest-enhanced hidden inputs $form.find('input:hidden').each( function() { if ($form.find( '#'+$(this).attr('id')+'_suggest' ).length == 0) return; @@ -819,7 +818,7 @@ $(function(){ open_overlay = function(content_type, selection_callback) { $('#'+xhr.original_options.target_id+' tbody a') .unbind('click') .click( function(evt) { - var clicked_id = $(this).attr('href').replace(/\/$/,''); + var clicked_id = /\d+(?=\/$)/.exec( $(this).attr('href') )[0]; try { xhr.original_options.selection_callback(clicked_id, {evt: evt}); } catch(e) { carp('Failed running overlay callback', e); }
Made the method for taking ID from changelist hrefs more robust.
diff --git a/lime/wrappers/scikit_image.py b/lime/wrappers/scikit_image.py index <HASH>..<HASH> 100755 --- a/lime/wrappers/scikit_image.py +++ b/lime/wrappers/scikit_image.py @@ -20,9 +20,6 @@ class BaseWrapper(object): self.target_fn = target_fn self.target_params = target_params - self.target_fn = target_fn - self.target_params = target_params - def _check_params(self, parameters): """Checks for mistakes in 'parameters'
Remove duplicated lines in wrappers/scikit_image.py
diff --git a/manager_utils/manager_utils.py b/manager_utils/manager_utils.py index <HASH>..<HASH> 100644 --- a/manager_utils/manager_utils.py +++ b/manager_utils/manager_utils.py @@ -421,7 +421,7 @@ class ManagerUtilsQuerySet(QuerySet): Overrides Django's update method to emit a post_bulk_operation signal when it completes. """ ret_val = super(ManagerUtilsQuerySet, self).update(**kwargs) - post_bulk_operation.send(sender=self, model=self.model) + post_bulk_operation.send(sender=self.model, model=self.model) return ret_val
fixed sender issue in post bulk operation
diff --git a/symphony/lib/toolkit/class.frontendpage.php b/symphony/lib/toolkit/class.frontendpage.php index <HASH>..<HASH> 100644 --- a/symphony/lib/toolkit/class.frontendpage.php +++ b/symphony/lib/toolkit/class.frontendpage.php @@ -537,7 +537,7 @@ class FrontendPage extends XSLTPage $this->setXML($xml); $xsl = '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">' . - ' <xsl:import href="' . str_replace('\\', '/', str_replace(' ', '%20', $page['filelocation'])) . '"/>' . + ' <xsl:import href="' . str_replace(array('\\', ' '), array('/', '%20'), $page['filelocation']) . '"/>' . '</xsl:stylesheet>'; $this->setXSL($xsl, false);
Simplified replace of backslashes and whitespace in xsl pathes
diff --git a/src/filesystem/implementation.js b/src/filesystem/implementation.js index <HASH>..<HASH> 100644 --- a/src/filesystem/implementation.js +++ b/src/filesystem/implementation.js @@ -1924,7 +1924,6 @@ function isUint32(value) { // Validator for mode_t (the S_* constants). Valid numbers or octal strings // will be masked with 0o777 to be consistent with the behavior in POSIX APIs. function validateAndMaskMode(value, def, callback) { - console.log('Passed in mode: ' + value); if(typeof def === 'function') { callback = def; def = undefined; @@ -1932,7 +1931,6 @@ function validateAndMaskMode(value, def, callback) { if (isUint32(value)) { let newMode = value & FULL_READ_WRITE_EXEC_PERMISSIONS; - console.log('Masked mode: ' + newMode); return value & FULL_READ_WRITE_EXEC_PERMISSIONS; } @@ -1953,7 +1951,6 @@ function validateAndMaskMode(value, def, callback) { return false; } var parsed = parseInt(value, 8); - console.log('Parsed + Masekd mode: ' + parsed & FULL_READ_WRITE_EXEC_PERMISSIONS); return parsed & FULL_READ_WRITE_EXEC_PERMISSIONS; }
removed some console.logs because travis-ci complained
diff --git a/sensorimotor/sensorimotor/temporal_pooler_monitor_mixin.py b/sensorimotor/sensorimotor/temporal_pooler_monitor_mixin.py index <HASH>..<HASH> 100644 --- a/sensorimotor/sensorimotor/temporal_pooler_monitor_mixin.py +++ b/sensorimotor/sensorimotor/temporal_pooler_monitor_mixin.py @@ -115,13 +115,17 @@ class TemporalPoolerMonitorMixin(MonitorMixinBase): Returns metric made of values from the stability confusion matrix. (See `getDataStabilityConfusion`.) - TODO: Exclude diagonals - @return (Metric) Stability confusion metric """ data = self.getDataStabilityConfusion() - numberLists = [item for sublist in data.values() for item in sublist] - numbers = [item for sublist in numberLists for item in sublist] + numbers = [] + + for matrix in data.values(): + for i in xrange(len(matrix)): + for j in xrange(len(matrix[i])): + if i != j: # Ignoring diagonal + numbers.append(matrix[i][j]) + return Metric(self, "stability confusion", numbers)
Exclude diagonals in stability confusion matrix
diff --git a/test/event-emitters.js b/test/event-emitters.js index <HASH>..<HASH> 100644 --- a/test/event-emitters.js +++ b/test/event-emitters.js @@ -10,7 +10,9 @@ describe('Angular-wrapped PouchDB event emitters', function() { function rawPut(cb) { function put($window) { var rawDB = new $window.PouchDB('db'); - var doc = {_id: 'test'}; + var doc = { + _id: 'test' + }; rawDB.put(doc, function(err, result) { if (err) { throw err;
style: resolve more lint warnings
diff --git a/features/step_definitions/stop.steps.js b/features/step_definitions/stop.steps.js index <HASH>..<HASH> 100644 --- a/features/step_definitions/stop.steps.js +++ b/features/step_definitions/stop.steps.js @@ -11,8 +11,8 @@ module.exports = function() { request(url) .get('/') .end(function(error, response) { - expect(error).to.not.equal(undefined); - expect(error.code).to.equal('ECONNREFUSED'); + expect(error, 'Error should be provided from access on stopped process.').to.not.equal(undefined); + expect(error.code, 'Error code should be provided as \'EXONNREFUSED\' on access of stopped process.').to.equal('ECONNREFUSED'); callback(); }); });
loader expectations on stop spec steps for understanding why travis CI is failing but works locally.
diff --git a/tests/FiniteStateMachine/VerifyLog/ReasonTest.php b/tests/FiniteStateMachine/VerifyLog/ReasonTest.php index <HASH>..<HASH> 100644 --- a/tests/FiniteStateMachine/VerifyLog/ReasonTest.php +++ b/tests/FiniteStateMachine/VerifyLog/ReasonTest.php @@ -6,9 +6,7 @@ require_once(dirname(__FILE__) . implode(DIRECTORY_SEPARATOR, explode('/', '/../ * public function test_VerifyLog_Reason_TheFirstPosition_NotInit_ThrowsException * public function test_VerifyLog_Reason_TheLastPosition_NotSleep_ThrowsException * public function test_VerifyLog_Reason_Init_NotAtTheFirstPosition_ThrowsException - * public function test_VerifyLog_Reason_Action_AtTheFirstPosition_ThrowsException * public function test_VerifyLog_Reason_Action_AtTheLastPosition_ThrowsException - * public function test_VerifyLog_Reason_Reset_AtTheFirstPosition_ThrowsException * public function test_VerifyLog_Reason_Reset_AtTheLastPosition_ThrowsException * public function test_VerifyLog_Reason_Wakeup_NotAfterSleep_ThrowsException * public function test_VerifyLog_Reason_Sleep_NotAtTheLastPosition_NotBeforeWakeup_ThrowsException
#1: Fsm_VerifyLog_Reason_InitTest: test_VerifyLog_Reason_Action_AtTheFirstPosition_ThrowsException() and test_VerifyLog_Reason_Reset_AtTheFirstPosition_ThrowsException() methods have been eliminated because of the test of test_VerifyLog_Reason_TheFirstPosition_NotInit_ThrowsException() method
diff --git a/src/Dash.php b/src/Dash.php index <HASH>..<HASH> 100644 --- a/src/Dash.php +++ b/src/Dash.php @@ -63,7 +63,7 @@ class Dash return $htmlString ; } - public function countRouteUri() { + public function routeUri() { return explode("/", Route::current()->uri()); } diff --git a/src/resources/views/layouts/layout.blade.php b/src/resources/views/layouts/layout.blade.php index <HASH>..<HASH> 100644 --- a/src/resources/views/layouts/layout.blade.php +++ b/src/resources/views/layouts/layout.blade.php @@ -33,7 +33,7 @@ </head> <body> -<div id="wrapper" class="{{ (count(Dash::countRouteUri()) > 1 ) ? "toggled" : "" }} dash-sidebar"> +<div id="wrapper" class="{{ (count(Dash::routeUri()) > 1 ) ? "toggled" : "" }} dash-sidebar"> <!-- Sidebar --> <div id="sidebar-wrapper"> <ul class="sidebar-nav"> @@ -98,6 +98,7 @@ <div class="container-fluid"> {{ Html::dashMessages() }} </div> + @yield("content") </main>
WIP -Testing routes
diff --git a/lib/fastlane/setup.rb b/lib/fastlane/setup.rb index <HASH>..<HASH> 100644 --- a/lib/fastlane/setup.rb +++ b/lib/fastlane/setup.rb @@ -43,12 +43,11 @@ module Fastlane def copy_existing_files files_to_copy.each do |current| - if File.exist?(current) - file_name = File.basename(current) - to_path = File.join(folder, file_name) - Helper.log.info "Moving '#{current}' to '#{to_path}'".green - FileUtils.mv(current, to_path) - end + next unless File.exist?(current) + file_name = File.basename(current) + to_path = File.join(folder, file_name) + Helper.log.info "Moving '#{current}' to '#{to_path}'".green + FileUtils.mv(current, to_path) end end
Rubocop - Style/Next: Use next to skip iteration
diff --git a/byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java b/byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java index <HASH>..<HASH> 100644 --- a/byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java +++ b/byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java @@ -692,9 +692,11 @@ public interface JavaConstant { * @return The method descriptor of this method handle representation. */ public String getDescriptor() { - if (handleType.isField()) { - return returnType.getDescriptor(); - } else { + switch (handleType) { + case PUT_FIELD: + case PUT_STATIC_FIELD: + return parameterTypes.get(0).getDescriptor(); + default: StringBuilder stringBuilder = new StringBuilder().append('('); for (TypeDescription parameterType : parameterTypes) { stringBuilder.append(parameterType.getDescriptor());
Returns the proper descriptor for field-mutating MethodHandle constants to fix #<I>
diff --git a/lib/parse/amd.js b/lib/parse/amd.js index <HASH>..<HASH> 100644 --- a/lib/parse/amd.js +++ b/lib/parse/amd.js @@ -105,9 +105,13 @@ AMD.prototype.parseFile = function (filename) { AMD.prototype.addOptimizedModules = function (filename) { var self = this; - amdetective(this.getFileSource(filename)).forEach(function (obj) { + amdetective(this.getFileSource(filename)) + .filter(function(obj) { + var id = obj.name; + return id !== 'require' && id !== 'exports' && id !== 'module' && !id.match(/\.?\w\!/) && !self.isExcluded(id); + }) + .forEach(function (obj) { if (!self.isExcluded(obj.name)) { - self.tree[obj.name] = obj.deps.filter(function(id) { return id !== 'require' && id !== 'exports' && id !== 'module' && !id.match(/\.?\w\!/) && !self.isExcluded(id); });
added plugin filtering and excludes to optimized packages
diff --git a/kernel/classes/ezcontentclassattribute.php b/kernel/classes/ezcontentclassattribute.php index <HASH>..<HASH> 100644 --- a/kernel/classes/ezcontentclassattribute.php +++ b/kernel/classes/ezcontentclassattribute.php @@ -64,9 +64,18 @@ class eZContentClassAttribute extends eZPersistentObject $this->DataTextI18nList->initDefault(); // Make sure datatype gets final say if attribute should be translatable - if ( $this->attribute('can_translate') && !$this->dataType()->isTranslatable() ) + if ( isset( $row['can_translate'] ) && $row['can_translate'] ) { - $this->setAttribute('can_translate', 0); + $datatype = $this->dataType(); + if ( $datatype instanceof eZDataType ) + { + if ( !$datatype->isTranslatable() ) + $this->setAttribute('can_translate', 0); + } + else + { + eZDebug::writeError( 'Could not get instance of datatype: ' . $row['data_type_string'], __METHOD__ ); + } } }
Fix: Fatal error on non object in Unit test Normal execution is not touched by this, this is caused by something on ci server and/or in unit tests.
diff --git a/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/command/get/OServerCommandGetConnect.java b/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/command/get/OServerCommandGetConnect.java index <HASH>..<HASH> 100644 --- a/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/command/get/OServerCommandGetConnect.java +++ b/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/command/get/OServerCommandGetConnect.java @@ -156,6 +156,8 @@ public class OServerCommandGetConnect extends OServerCommandAuthenticatedDbAbstr json.endCollection(1, true); } + json.writeAttribute(1, false, "currentUser", db.getUser().getName()); + json.beginCollection(1, false, "users"); OUser user; for (ODocument doc : db.getMetadata().getSecurity().getUsers()) {
OrientDB Server: added "currentUser" property on connect
diff --git a/modules/deprecateObjectProperties.js b/modules/deprecateObjectProperties.js index <HASH>..<HASH> 100644 --- a/modules/deprecateObjectProperties.js +++ b/modules/deprecateObjectProperties.js @@ -5,8 +5,9 @@ let useMembrane = false if (__DEV__) { try { - Object.defineProperty({}, 'x', { get() { return true } }).x - useMembrane = true + if (Object.defineProperty({}, 'x', { get() { return true } }).x) { + useMembrane = true + } } catch(e) { } } @@ -26,7 +27,7 @@ export default function deprecateObjectProperties(object, message) { } else { Object.defineProperty(membrane, prop, { configurable: false, - enumerable: true, + enumerable: false, get() { warning(false, message) return object[prop]
Make deprecated properties non-enumerable This avoids spurious deprecation warnings in dev tools.
diff --git a/androidsvg/src/main/java/com/caverock/androidsvg/CSSParser.java b/androidsvg/src/main/java/com/caverock/androidsvg/CSSParser.java index <HASH>..<HASH> 100644 --- a/androidsvg/src/main/java/com/caverock/androidsvg/CSSParser.java +++ b/androidsvg/src/main/java/com/caverock/androidsvg/CSSParser.java @@ -1118,6 +1118,8 @@ class CSSParser // Returns true if 'deviceMediaType' matches one of the media types in 'mediaList' private static boolean mediaMatches(List<MediaType> mediaList, MediaType rendererMediaType) { + if (mediaList.size() == 0) // No specific media specified, so match all + return true; for (MediaType type: mediaList) { if (type == MediaType.all || type == rendererMediaType) return true;
Issue #<I>. Fixed problem where CSS @import was failing if you didn't supply a media type.
diff --git a/src/FastFeed/Exception/LogicException.php b/src/FastFeed/Exception/LogicException.php index <HASH>..<HASH> 100644 --- a/src/FastFeed/Exception/LogicException.php +++ b/src/FastFeed/Exception/LogicException.php @@ -15,4 +15,4 @@ namespace FastFeed\Exception; class LogicException extends \LogicException { -} \ No newline at end of file +} diff --git a/src/FastFeed/Exception/RuntimeException.php b/src/FastFeed/Exception/RuntimeException.php index <HASH>..<HASH> 100644 --- a/src/FastFeed/Exception/RuntimeException.php +++ b/src/FastFeed/Exception/RuntimeException.php @@ -14,5 +14,4 @@ namespace FastFeed\Exception; */ class RuntimeException extends \RuntimeException { - -} \ No newline at end of file +} \ No newline at end of file
test with clossing braces