diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/src/surface.js b/src/surface.js index <HASH>..<HASH> 100644 --- a/src/surface.js +++ b/src/surface.js @@ -112,6 +112,10 @@ Surface.Prototype = function() { return [pos, charPos]; }; + this.getCoordinateForPosition = function(range) { + return _mapDOMCoordinates.call(this, range.startContainer, range.startOffset); + }; + // Read out current DOM selection and update selection in the model // --------------- @@ -208,11 +212,21 @@ Surface.Prototype = function() { var _mapModelCoordinates = function(pos) { var container = this.docCtrl.container; var component = container.getComponent(pos[0]); + return this.getPositionFromComponent(component, offset); + }; + + this.getPositionFromCoordinate = function(path, offset) { + var container = this.docCtrl.container; + var component = container.lookup(path); + return this.getPositionFromComponent(component, offset); + }; + + this.getPositionFromComponent = function(component, offset) { // TODO rethink when it is a good time to attach the view to the node surface if (!component.surface.hasView()) { this._attachViewToNodeSurface(component); } - var wCoor = component.surface.getDOMPosition(pos[1]); + var wCoor = component.surface.getDOMPosition(offset); return wCoor; };
Added some helpers to map between screen coordinates to model coordinates.
diff --git a/Controller/SOAPController.php b/Controller/SOAPController.php index <HASH>..<HASH> 100644 --- a/Controller/SOAPController.php +++ b/Controller/SOAPController.php @@ -9,13 +9,6 @@ use Symfony\Component\HttpFoundation\Request; use Splash\Server\SplashServer; use Splash\Client\Splash; - - -use Doctrine\Common\Annotations\AnnotationReader; -use Splash\Bundle\Conversion\SplashFieldConverter; -//use Acme\DataBundle\Entity\Person; - - class SOAPController extends Controller { @@ -41,7 +34,7 @@ class SOAPController extends Controller { //====================================================================// // Detect NuSOAP requests send by Splash Server - if ( strpos( $request->headers->get('User-Agent') , "NuSOAP" ) === FALSE ) + if ( strpos( $request->headers->get('User-Agent') , "SOAP" ) === FALSE ) { //====================================================================// // Return Empty Response
Allow both SOAP & NuSOAP requests
diff --git a/src/sap.m/src/sap/m/ObjectHeaderRenderer.js b/src/sap.m/src/sap/m/ObjectHeaderRenderer.js index <HASH>..<HASH> 100644 --- a/src/sap.m/src/sap/m/ObjectHeaderRenderer.js +++ b/src/sap.m/src/sap/m/ObjectHeaderRenderer.js @@ -1260,6 +1260,8 @@ sap.ui.define(['jquery.sap.global', 'sap/ui/core/IconPool'], oRM.write("<span"); // Start TitleArrow container oRM.writeAttribute("id", oOH.getId() + "-title-arrow"); + oRM.addStyle("display", "inline-block"); + oRM.writeStyles(); oRM.write(">"); this._renderResponsiveTitleAndArrow(oRM, oOH, nCutLen); oRM.write("</span>");
[FIX] sap.m.ObjectHeader: Title / arrow span focused correctly - the span should have a height/width to be focused correctly otherwise The element and all of its children are handled as "hidden" if the dimensions are <= 0. BCP: <I> Change-Id: I<I>ee<I>cb<I>c3d<I>dd<I>f<I>
diff --git a/internal/graphics/command.go b/internal/graphics/command.go index <HASH>..<HASH> 100644 --- a/internal/graphics/command.go +++ b/internal/graphics/command.go @@ -211,6 +211,9 @@ func (c *fillCommand) Exec(indexOffsetInBytes int) error { // Flush is needed after filling (#419) opengl.GetContext().Flush() + // Mysterious, but binding texture is needed after filling + // on some mechines like Photon 2 (#492). + opengl.GetContext().BindTexture(c.dst.texture.native) return nil }
graphics: Bug fix: TestImageTooManyFill didin't pass on some machines Fixes #<I>
diff --git a/byteplay3.py b/byteplay3.py index <HASH>..<HASH> 100644 --- a/byteplay3.py +++ b/byteplay3.py @@ -474,16 +474,14 @@ class Label(object): pass # This boolean function allows distinguishing real opcodes in a CodeList from -# the two non-opcode types. Note this assumes there only ever exists the one -# instance of SetLineno, although there may be multiple Label objects. -# -# TODO: would this not be safer using "not isinstance(obj,SetLinenoType)"? +# the two non-opcode types. Note there should only ever exist the one +# instance of SetLinenoType, the global SetLineno. But who knows? def isopcode(obj): """ Return whether obj is an opcode - not SetLineno or Label """ - return obj is not SetLineno and not isinstance(obj, Label) + return not isinstance(obj,SetLinenoType) and not isinstance(obj, Label) #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #
Defensive programming in the isopcode() test
diff --git a/Bundle/MediaBundle/Entity/Folder.php b/Bundle/MediaBundle/Entity/Folder.php index <HASH>..<HASH> 100755 --- a/Bundle/MediaBundle/Entity/Folder.php +++ b/Bundle/MediaBundle/Entity/Folder.php @@ -2,7 +2,6 @@ namespace Victoire\Bundle\MediaBundle\Entity; - use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; @@ -45,8 +44,8 @@ class Folder /** * @var Folder * - * @ORM\ManyToOne(targetEntity="Folder", inversedBy="children", fetch="EAGER") - * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", nullable=true) + * @ORM\ManyToOne(targetEntity="Folder", inversedBy="children", fetch="EAGER", cascade={"persist", "remove"}) + * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", nullable=true, onDelete="SET NULL") */ protected $parent;
[MediaBundle] Cascade persist/remove on folders
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -10,7 +10,7 @@ require "net/https" require "uri" ## Uncomment to load in a .yml with your pin key -# ENV.update YAML.load(File.read(File.expand_path("../test_data.yml", __FILE__))) +ENV.update YAML.load(File.read(File.expand_path("../test_data.yml", __FILE__))) # gem require 'pin_up'
removed a vcr .yml
diff --git a/pytablereader/interface.py b/pytablereader/interface.py index <HASH>..<HASH> 100644 --- a/pytablereader/interface.py +++ b/pytablereader/interface.py @@ -62,10 +62,14 @@ class TableLoader(TableLoaderInterface): def source_type(self): return self._validator.source_type + @property + def quoting_flags(self): + return self.__quoting_flags + def __init__(self, source): self.table_name = tnt.DEFAULT self.source = source - self.quoting_flags = None + self.__quoting_flags = None self._validator = None self._logger = None
Change an attribute to a read-only property
diff --git a/src/helpers.php b/src/helpers.php index <HASH>..<HASH> 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -429,8 +429,8 @@ CODE; } throw new \RuntimeException(\sprintf( - 'Cannot build argument constructor for %s, give a scalar type hint or a deriving like Enum, FromString, Uuid, FromScalar, FromArray', - $namespace !== '' ? $namespace . '\\' . $name : $name + 'First argument of %s will be used as an aggregateId. It should give a scalar type hint or a deriving like Enum, FromString, Uuid, FromScalar', + $definition->name() )); }
Changed text of error message to make it more clear that the argument is being used as an aggregateId.
diff --git a/lib/html5lib/TreeBuilder.php b/lib/html5lib/TreeBuilder.php index <HASH>..<HASH> 100644 --- a/lib/html5lib/TreeBuilder.php +++ b/lib/html5lib/TreeBuilder.php @@ -2322,7 +2322,7 @@ class HTML5_TreeBuilder { } elseif ($token['type'] === HTML5_Tokenizer::COMMENT) { /* Append a Comment node to the current node with the data attribute set to the data given in the comment token. */ - $this->insertToken($token['data']); + $this->insertComment($token['data']); } elseif ($token['type'] === HTML5_Tokenizer::DOCTYPE) { // parse error } elseif ($token['type'] === HTML5_Tokenizer::STARTTAG && $token['name'] === 'html') {
#<I> | Fixed a bug of using undefined method insertToken Untested fix. But definitely a bug and the most likely correct method insertComment is used on a similar code block.
diff --git a/lib/activerecord-multi-tenant/multi_tenant.rb b/lib/activerecord-multi-tenant/multi_tenant.rb index <HASH>..<HASH> 100644 --- a/lib/activerecord-multi-tenant/multi_tenant.rb +++ b/lib/activerecord-multi-tenant/multi_tenant.rb @@ -29,6 +29,7 @@ module MultiTenant @@multi_tenant_models[table_name.to_s] = model_klass end def self.multi_tenant_model_for_table(table_name) + @@multi_tenant_models ||= {} @@multi_tenant_models[table_name.to_s] end
Add init of @@multi_tenant_models This prevents raising an error if the first model referenced after application boot is not distributed.
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -2,12 +2,18 @@ import React, {PropTypes as T} from 'react'; import { soundManager } from 'soundmanager2'; const pendingCalls = []; +let initialized = false; function createSound(options, cb) { if (soundManager.ok()) { cb(soundManager.createSound(options)); return () => {}; } else { + if (!initialized) { + initialized = true; + soundManager.beginDelayedInit(); + } + const call = () => { cb(soundManager.createSound(options)); };
Initialize SoundManager when it’s lazy loaded
diff --git a/flink-table/flink-table-planner-blink/src/test/java/org/apache/flink/table/planner/factories/TestValuesRuntimeFunctions.java b/flink-table/flink-table-planner-blink/src/test/java/org/apache/flink/table/planner/factories/TestValuesRuntimeFunctions.java index <HASH>..<HASH> 100644 --- a/flink-table/flink-table-planner-blink/src/test/java/org/apache/flink/table/planner/factories/TestValuesRuntimeFunctions.java +++ b/flink-table/flink-table-planner-blink/src/test/java/org/apache/flink/table/planner/factories/TestValuesRuntimeFunctions.java @@ -95,7 +95,13 @@ final class TestValuesRuntimeFunctions { } static List<Watermark> getWatermarks(String tableName) { - return watermarkHistory.getOrDefault(tableName, new ArrayList<>()); + synchronized (TestValuesTableFactory.class) { + if (watermarkHistory.containsKey(tableName)) { + return new ArrayList<>(watermarkHistory.get(tableName)); + } else { + return Collections.emptyList(); + } + } } static List<String> getResults(String tableName) { @@ -122,6 +128,7 @@ final class TestValuesRuntimeFunctions { globalRawResult.clear(); globalUpsertResult.clear(); globalRetractResult.clear(); + watermarkHistory.clear(); } }
[FLINK-<I>][table-planner] Clear watermark output when test finished for FromElementSourceFunctionWithWatermark This closes #<I>
diff --git a/lib/fluent/supervisor.rb b/lib/fluent/supervisor.rb index <HASH>..<HASH> 100644 --- a/lib/fluent/supervisor.rb +++ b/lib/fluent/supervisor.rb @@ -321,6 +321,18 @@ module Fluent def supervisor_sigcont_handler if Fluent.windows? $log.info "dump file. [pid:#{Process.pid}]" + + # Sigdump outputs under `/tmp` dir without `SIGDUMP_PATH` specified + # but `/tmp` dir may not exist on Windows by default. + # Since this function is mainly for Windows, this case should be saved. + # (Don't want to couple tightly with the Sigdump library but want to save this case especially.) + unless ENV['SIGDUMP_PATH'] + dump_dir = '/tmp' + unless Dir.exist?(dump_dir) + FileUtils.mkdir_p(dump_dir, mode: Fluent::DEFAULT_DIR_PERMISSION) + end + end + require 'sigdump' Sigdump.dump else
Support the case where `/tmp` dir doesn't exist on Windows
diff --git a/src/DataSource/Database.php b/src/DataSource/Database.php index <HASH>..<HASH> 100644 --- a/src/DataSource/Database.php +++ b/src/DataSource/Database.php @@ -170,5 +170,29 @@ class Database extends \PDO // Since this function is only to return one row, only return the first row return $prepQuery->fetch(); } + + /** + * fetchClass() + * Returns an object of the specified type, created from the database + * + * @author Cory Gehr + * @access public + * @param string $query MySQL Query String + * @param mixed[] $data Parameters for the query + * @param string $class Class Name + * @return mixed Created object + */ + public function fetchClass($query, $data, $class) + { + // Prepare the query + $prepQuery = parent::prepare($query); + // Change the fetch mode to FETCH_CLASS + $prepQuery->setFetchMode(PDO::FETCH_CLASS, $class); + // Now execute + $prepQuery->execute($data); + + // Return the created class + return $prepQuery->fetch(); + } } ?>
Add fetchClass() Adds a function that will use a query to create an object based on the specified class
diff --git a/org.jenetics/src/main/java/org/jenetics/util/accumulators.java b/org.jenetics/src/main/java/org/jenetics/util/accumulators.java index <HASH>..<HASH> 100644 --- a/org.jenetics/src/main/java/org/jenetics/util/accumulators.java +++ b/org.jenetics/src/main/java/org/jenetics/util/accumulators.java @@ -39,12 +39,6 @@ import org.jscience.mathematics.structure.GroupAdditive; public final class accumulators extends StaticObject { private accumulators() {} - public static final Accumulator<Object> NULL = new Accumulator<Object>() { - @Override - public void accumulate(final Object value) { - } - }; - /** * Calculates the sum of the accumulated values. *
Remove unused 'NULL' instance.
diff --git a/pysat/_instrument.py b/pysat/_instrument.py index <HASH>..<HASH> 100644 --- a/pysat/_instrument.py +++ b/pysat/_instrument.py @@ -1122,9 +1122,9 @@ class Instrument(object): if self._iter_type == 'date': if self.date is not None: idx, = np.where(self._iter_list == self.date) - if len(idx) == 0: - raise StopIteration('Outside the set date boundaries.') - if idx[-1]+1 >= len(self._iter_list): + if (len(idx) == 0): + raise StopIteration('File list is empty. Nothing to be done.') + elif idx[-1]+1 >= len(self._iter_list): raise StopIteration('Outside the set date boundaries.') else: idx += 1 @@ -1161,7 +1161,7 @@ class Instrument(object): if self.date is not None: idx, = np.where(self._iter_list == self.date) if len(idx) == 0: - raise StopIteration('Outside the set date boundaries.') + raise StopIteration('File list is empty. Nothing to be done.') elif idx[0] == 0: raise StopIteration('Outside the set date boundaries.') else:
Updated error feedback when iterating by file and the available file list is empty.
diff --git a/salt/output/highstate.py b/salt/output/highstate.py index <HASH>..<HASH> 100644 --- a/salt/output/highstate.py +++ b/salt/output/highstate.py @@ -198,9 +198,7 @@ def _format_host(host, data): state_lines.insert( 3, u' {tcolor} Name: {comps[2]}{colors[ENDC]}') try: - comment = ret['comment'].strip().replace( - u'\n', - u'\n' + u' ' * 14) + stripped_comment = ret['comment'].strip() except AttributeError: # Assume comment is a list try: comment = ret['comment'].join(' ').replace( @@ -212,6 +210,16 @@ def _format_host(host, data): comment = comment.strip().replace( u'\n', u'\n' + u' ' * 14) + else: + try: + comment = stripped_comment.replace( + u'\n', + u'\n' + u' ' * 14) + except UnicodeDecodeError: + comment = stripped_comment.replace( + '\n', + '\n' + ' ' * 14) + comment = comment.decode('UTF-8') for detail in ['start_time', 'duration']: ret.setdefault(detail, u'') if ret['duration'] != '':
Handle unicode in highstate outputter Refs #<I>
diff --git a/lib/Schema.js b/lib/Schema.js index <HASH>..<HASH> 100644 --- a/lib/Schema.js +++ b/lib/Schema.js @@ -219,7 +219,7 @@ Schema.prototype.parseDynamo = async function (model, dynamoObj) { attrVal = await attr.parseDynamo(dynamoObj[name]); } if (attrVal !== undefined && attrVal !== null) { - model[name] = attrVal; + model[attr.name] = attrVal; } } else { debug('parseDynamo: received an attribute name (%s) that is not defined in the schema', name);
feat(schema): change the way attributes are set by parseDynamo function This does not change parseDynamo result <I>% of the time, because `name` and `attr.name` are usually identical, but makes it possible to manually add hidden attributes to a schema by calling Attribute.create() with `name` set to Symbol(), which can be useful to plugin authors.
diff --git a/js/jasmine.js b/js/jasmine.js index <HASH>..<HASH> 100644 --- a/js/jasmine.js +++ b/js/jasmine.js @@ -12,7 +12,7 @@ jasmineStarted: function(suiteInfo) { }, suiteStarted: function(result) { -# suite object initialization +// suite object initialization this.suite_info[this.suite_count] = result; this.suite_info[this.suite_count]["started"] = new Date().toUTCString(); this.suite_count++; @@ -124,4 +124,4 @@ function status(current_status, status){ function remove(suite, position){ suite.splice(position, 1); return suite; -} \ No newline at end of file +}
Replaced ruby comment with jasmine
diff --git a/main.go b/main.go index <HASH>..<HASH> 100644 --- a/main.go +++ b/main.go @@ -271,6 +271,10 @@ func run() error { // Merge sharded artifacts. for env, mergeProgram := range shardableArtifacts { + if len(filesToMerge[env]) == 0 { + fmt.Printf("stress: skipping merge for artifact %s\n", env) + continue + } output, err := os.Create(os.Getenv(env)) if err != nil { return err
stress: skip merging when there are no artifacts to merge If no tests successfully complete then there will be nothing to merge and just calling into the merge program may therefore fail. In this case it's appropriate to skip the merge.
diff --git a/lib/spreedly.rb b/lib/spreedly.rb index <HASH>..<HASH> 100644 --- a/lib/spreedly.rb +++ b/lib/spreedly.rb @@ -156,10 +156,10 @@ module Spreedly end # Activates a free trial on the subscriber. - # Requires subscription_id of the free trial plan - def activate_free_trial(subscription_id) + # Requires plan_id of the free trial plan + def activate_free_trial(plan_id) result = Spreedly.post("/subscribers/#{id}/subscribe_to_free_trial.xml", :body => - Spreedly.to_xml_params(:subscription_plan => {:id => subscription_id})) + Spreedly.to_xml_params(:subscription_plan => {:id => plan_id})) case result.code when /2../ when '404'
Change subscription_id to plan_id to match mock's usage. The plan_id makes is clearer than my subscription_id. Thanks Nathaniel.
diff --git a/src/postmate.js b/src/postmate.js index <HASH>..<HASH> 100644 --- a/src/postmate.js +++ b/src/postmate.js @@ -297,6 +297,10 @@ class Postmate { this.parent.addEventListener('message', reply, false) const doSend = () => { + if (attempt === maxHandshakeRequests) { + clearInterval(responseInterval) + return + } attempt++ if (process.env.NODE_ENV !== 'production') { log(`Parent: Sending handshake attempt ${attempt}`, { childOrigin }) @@ -306,10 +310,6 @@ class Postmate { type: messsageType, model: this.model, }, childOrigin) - - if (attempt === maxHandshakeRequests) { - clearInterval(responseInterval) - } } const loaded = () => {
fix the issue where the max attempt is ignored because of postMessage exception (#<I>)
diff --git a/src/Lucid/Model/index.js b/src/Lucid/Model/index.js index <HASH>..<HASH> 100644 --- a/src/Lucid/Model/index.js +++ b/src/Lucid/Model/index.js @@ -1049,14 +1049,17 @@ class Model extends BaseModel { } /** - * Returns an array of ids. - * - * Note: this method doesn't allow eagerloading relations + * Returns an object of key/value pairs. + * This method will not eagerload relationships. + * The lhs field is the object key, and rhs is the value. * - * @method ids + * @method pair * @async * - * @return {Array} + * @param {String} lhs + * @param {String} rhs + * + * @return {Object} */ static pair (lhs, rhs) { return this.query().pair(lhs, rhs)
doc(docblock): update docblock
diff --git a/contrib/mesos/pkg/scheduler/plugin.go b/contrib/mesos/pkg/scheduler/plugin.go index <HASH>..<HASH> 100644 --- a/contrib/mesos/pkg/scheduler/plugin.go +++ b/contrib/mesos/pkg/scheduler/plugin.go @@ -306,7 +306,8 @@ func (k *kubeScheduler) Schedule(pod *api.Pod, unused algorithm.NodeLister) (str } } -// Call ScheduleFunc and subtract some resources, returning the name of the machine the task is scheduled on +// doSchedule schedules the given task and returns the machine the task is scheduled on +// or an error if the scheduling failed. func (k *kubeScheduler) doSchedule(task *podtask.T) (string, error) { var offer offers.Perishable var err error
scheduler: correct doc in doSchedule
diff --git a/openpnm/utils/_workspace.py b/openpnm/utils/_workspace.py index <HASH>..<HASH> 100644 --- a/openpnm/utils/_workspace.py +++ b/openpnm/utils/_workspace.py @@ -43,12 +43,10 @@ class WorkspaceSettings(SettingsAttr): @property def loglevel(self): - logger = logging.getLogger() return logger.level @loglevel.setter def loglevel(self, value): - logger = logging.getLogger() logger.setLevel(value)
prevent getting logger from root level This call was getting the logger from the root level and overwriting the app settings for logging level. I was having trouble in mak issue #<I>
diff --git a/test/transports.htmlfile.test.js b/test/transports.htmlfile.test.js index <HASH>..<HASH> 100644 --- a/test/transports.htmlfile.test.js +++ b/test/transports.htmlfile.test.js @@ -146,7 +146,7 @@ module.exports = { var port = ++ports , cl = client(port) , io = create(cl) - , beat = false; + , heartbeats = 0; io.configure(function () { io.set('heartbeat interval', .05); @@ -156,7 +156,7 @@ module.exports = { io.sockets.on('connection', function (socket) { socket.on('disconnect', function (reason) { - beat.should.be.true; + heartbeats.should.eql(2); reason.should.eql('heartbeat timeout'); cl.end(); @@ -166,8 +166,6 @@ module.exports = { }); cl.handshake(function (sid) { - var heartbeats = 0; - cl.data('/socket.io/{protocol}/htmlfile/' + sid, function (msgs) { heartbeats++; @@ -176,10 +174,6 @@ module.exports = { type: 'heartbeat' })); } - - if (heartbeats == 2) { - beat = true; - } }); }); }
Simplified heartbeat htmlfile test, made consistent with websocket one.
diff --git a/osuapi/enums.py b/osuapi/enums.py index <HASH>..<HASH> 100644 --- a/osuapi/enums.py +++ b/osuapi/enums.py @@ -149,6 +149,10 @@ class BeatmapGenre(Enum): novelty = 7 hip_hop = 9 electronic = 10 + metal = 11 + classical = 12 + folk = 13 + jazz = 14 class BeatmapLanguage(Enum):
Add various new song genre enums
diff --git a/container.go b/container.go index <HASH>..<HASH> 100644 --- a/container.go +++ b/container.go @@ -161,6 +161,10 @@ func OpenContainer(id string) (Container, error) { container.handle = handle + if err := container.registerCallback(); err != nil { + return nil, makeContainerError(container, operation, "", err) + } + logrus.Debugf(title+" succeeded id=%s handle=%d", id, handle) runtime.SetFinalizer(container, closeContainer) return container, nil
Add a callback registration when opening a container
diff --git a/tensorlayer/layers.py b/tensorlayer/layers.py index <HASH>..<HASH> 100755 --- a/tensorlayer/layers.py +++ b/tensorlayer/layers.py @@ -1733,7 +1733,7 @@ class BatchNormLayer(Layer): trainable=False) moving_variance = _get_variable('moving_variance', params_shape, - initializer=tf.ones_initializer, + initializer=tf.ones_initializer(), trainable=False) # These ops will only be preformed when training.
Update layers.py The init_ops.one_initializer() function is rewritten on tensorflow <I>. Maybe 'tf.one_initializer' should be replaced by 'tf.one_initializer()' in tensorlayer for tensorflow <I>. But i did not check it for tensorflow <I> backend.
diff --git a/lib/split/experiment.rb b/lib/split/experiment.rb index <HASH>..<HASH> 100644 --- a/lib/split/experiment.rb +++ b/lib/split/experiment.rb @@ -1,7 +1,6 @@ module Split class Experiment attr_accessor :name - attr_accessor :winner def initialize(name, *alternative_names) @name = name.to_s
attr_accessor not required for winner as we define our own methods
diff --git a/code/steppedcheckout/CheckoutStep_Membership.php b/code/steppedcheckout/CheckoutStep_Membership.php index <HASH>..<HASH> 100644 --- a/code/steppedcheckout/CheckoutStep_Membership.php +++ b/code/steppedcheckout/CheckoutStep_Membership.php @@ -10,6 +10,7 @@ class CheckoutStep_Membership extends CheckoutStep{ 'MembershipForm', 'LoginForm', 'createaccount', + 'docreateaccount', 'CreateAccountForm' );
Added 'docreateaccount' to list of CheckoutStep_Membership allowed actions
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/WebTestCase.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/WebTestCase.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/WebTestCase.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/WebTestCase.php @@ -60,7 +60,7 @@ class WebTestCase extends BaseWebTestCase return new $class( $options['test_case'], isset($options['root_config']) ? $options['root_config'] : 'config.yml', - isset($options['environment']) ? $options['environment'] : 'securitybundletest', + isset($options['environment']) ? $options['environment'] : 'securitybundletest' . strtolower($options['test_case']), isset($options['debug']) ? $options['debug'] : true ); }
[SecurityBundle] Fix execution of functional tests with different names Using "securitybundletest" as the default environment for the functional test's kernel causes a PHP fatal error redeclaring the class "appSecuritybundletestDebugProjectContainer" when multiple tests (with unique names) are executed. In lieu of forcing tests to specify their own environment explicitly, we can simply append the test name into the environment. Note: this bug may be related to PHPUnit executing multiple tests within the same process.
diff --git a/lib/bundler/monkey_patch.rb b/lib/bundler/monkey_patch.rb index <HASH>..<HASH> 100644 --- a/lib/bundler/monkey_patch.rb +++ b/lib/bundler/monkey_patch.rb @@ -11,11 +11,11 @@ module Bundler end module Bundler # Handles all the fetching with the rubygems server - class Fetcher + class Fetcher + alias :initialize_old :initialize + def initialize(remote_uri) - @remote_uri = RubygemsMirror.to_uri(remote_uri) - @has_api = true # will be set to false if the rubygems index is ever fetched - @@connection ||= Net::HTTP::Persistent.new nil, :ENV + initialize_old RubygemsMirror.to_uri(remote_uri) end end end
make monkey patch more robust against upstream changes
diff --git a/lib/discourse_api/api/categories.rb b/lib/discourse_api/api/categories.rb index <HASH>..<HASH> 100644 --- a/lib/discourse_api/api/categories.rb +++ b/lib/discourse_api/api/categories.rb @@ -28,6 +28,11 @@ module DiscourseApi response['body']['category'] if response['body'] end + def delete_category(id) + response = delete("/categories/#{id}") + response[:body]['success'] + end + def categories(params = {}) response = get('/categories.json', params) response[:body]['category_list']['categories']
add api to delete category (#<I>)
diff --git a/server/src/main/java/org/openqa/selenium/server/testgenerator/XlateHtmlSeleneseToJava.java b/server/src/main/java/org/openqa/selenium/server/testgenerator/XlateHtmlSeleneseToJava.java index <HASH>..<HASH> 100644 --- a/server/src/main/java/org/openqa/selenium/server/testgenerator/XlateHtmlSeleneseToJava.java +++ b/server/src/main/java/org/openqa/selenium/server/testgenerator/XlateHtmlSeleneseToJava.java @@ -448,9 +448,7 @@ public class XlateHtmlSeleneseToJava { return beginning.replaceFirst("\n", "") + ": op not meaningful from rc client"; } if (op.endsWith("AndWait")) { - if (!op.startsWith("click")) { - ending += EOL + "selenium.waitForPageToLoad(\"" + timeOut + "\");"; - } + ending += EOL + "selenium.waitForPageToLoad(\"" + timeOut + "\");"; op = op.replaceFirst("AndWait", ""); tokens[0] = tokens[0].replaceFirst("AndWait", ""); }
wait for page to load after when translating "clickAndWait" r<I>
diff --git a/nx-dev/nx-dev/tailwind.config.js b/nx-dev/nx-dev/tailwind.config.js index <HASH>..<HASH> 100644 --- a/nx-dev/nx-dev/tailwind.config.js +++ b/nx-dev/nx-dev/tailwind.config.js @@ -52,6 +52,12 @@ module.exports = { 'code::after': { content: '', }, + 'blockquote p:first-of-type::before': { + content: '', + }, + 'blockquote p:last-of-type::after': { + content: '', + }, }, }, },
docs(core): remove extra quotes for blockquote (#<I>)
diff --git a/bcbio/variation/gatkjoint.py b/bcbio/variation/gatkjoint.py index <HASH>..<HASH> 100644 --- a/bcbio/variation/gatkjoint.py +++ b/bcbio/variation/gatkjoint.py @@ -84,6 +84,9 @@ def _run_genotype_gvcfs_genomicsdb(genomics_db, region, out_file, data): "-R", dd.get_ref_file(data), "--output", tx_out_file, "-L", bamprep.region_to_gatk(region)] + # Avoid slow genotyping runtimes with improved quality score calculation in GATK4 + # https://gatkforums.broadinstitute.org/gatk/discussion/11471/performance-troubleshooting-tips-for-genotypegvcfs/p1 + params += ["--use-new-qual-calculator"] cores = dd.get_cores(data) memscale = {"magnitude": 0.9 * cores, "direction": "increase"} if cores > 1 else None broad_runner.run_gatk(params, memscale=memscale)
GATK4: improve GenotypeGVCFs speed with new-qual Swaps to use improved speed in GATK4's new quality calculator. Fixes #<I>
diff --git a/sovrin_client/test/cli/test_tutorial_manual.py b/sovrin_client/test/cli/test_tutorial_manual.py index <HASH>..<HASH> 100644 --- a/sovrin_client/test/cli/test_tutorial_manual.py +++ b/sovrin_client/test/cli/test_tutorial_manual.py @@ -51,7 +51,6 @@ def testGettingStartedTutorialAgainstSandbox(newGuyCLI, be, do): @pytest.mark.skipif('sys.platform == "win32"', reason='SOV-384') -@pytest.mark.skipif('sys.platform == "linux"', reason='SOV-501') def testManual(do, be, poolNodesStarted, poolTxnStewardData, philCLI, connectedToTest, nymAddedOut, attrAddedOut, schemaAdded, issuerKeyAdded, aliceCLI, newKeyringOut, aliceMap,
[#SOV-<I>] remove skip statement which was bring back accidentally in previous merge
diff --git a/src/android/io/branch/BranchSDK.java b/src/android/io/branch/BranchSDK.java index <HASH>..<HASH> 100644 --- a/src/android/io/branch/BranchSDK.java +++ b/src/android/io/branch/BranchSDK.java @@ -1029,7 +1029,7 @@ public class BranchSDK extends CordovaPlugin { JSONObject response = new JSONObject(); - if (error == null) { + if (error == null || url != null) { try { response.put("url", url);
fix: corrected android long url with no tracking
diff --git a/packages/posts/sources/cachePosts.js b/packages/posts/sources/cachePosts.js index <HASH>..<HASH> 100644 --- a/packages/posts/sources/cachePosts.js +++ b/packages/posts/sources/cachePosts.js @@ -2,13 +2,14 @@ import logger from "../lib/logger"; import initializedSources from "./"; const cachePosts = searchParams => { - return Promise.all(initializedSources.map(postSource => { - return postSource.getAllServicePosts(searchParams) - .catch(error => { - logger.error(error); - return []; - }); - })); + return initializedSources + .then(initializedSources => Promise.all(initializedSources.map(postSource => { + return postSource.getAllServicePosts(searchParams) + .catch(error => { + logger.error(error); + return []; + }); + }))); }; export default cachePosts;
fix(posts): `initializedSources` is actually a Promised array.
diff --git a/eZ/Publish/Core/Repository/Tests/Service/InMemory/RepositoryTest.php b/eZ/Publish/Core/Repository/Tests/Service/InMemory/RepositoryTest.php index <HASH>..<HASH> 100644 --- a/eZ/Publish/Core/Repository/Tests/Service/InMemory/RepositoryTest.php +++ b/eZ/Publish/Core/Repository/Tests/Service/InMemory/RepositoryTest.php @@ -13,7 +13,7 @@ use eZ\Publish\Core\Repository\Tests\Service\RepositoryTest as BaseRepositoryTes /** * Test case for Repository Service using InMemory storage class */ -class RoleTest extends BaseRepositoryTest +class RepositoryTest extends BaseRepositoryTest { protected function getRepository() {
Fix wrong class name from cc<I>a5
diff --git a/ui/AbstractEditor.js b/ui/AbstractEditor.js index <HASH>..<HASH> 100644 --- a/ui/AbstractEditor.js +++ b/ui/AbstractEditor.js @@ -45,7 +45,7 @@ class AbstractEditor extends Component { this.editingBehavior = this.editorSession.editingBehavior this.markersManager = this.editorSession.markersManager - this.ResourceManageranager = new ResourceManager(this.editorSession, this.getChildContext()) + this.resourceManager = new ResourceManager(this.editorSession, this.getChildContext()) } /** @@ -89,6 +89,7 @@ class AbstractEditor extends Component { globalEventHandler: this.globalEventHandler, iconProvider: this.iconProvider, labelProvider: this.labelProvider, + resourceManager: this.resourceManager, // ATTENTION: this is a map of tool target names to maps of tool names to tools // i.e. a declarative way to map tools to tool groups toolGroups: this.toolGroups,
Expose resourceManger properly.
diff --git a/src/frontend/org/voltdb/sysprocs/UpdateApplicationBase.java b/src/frontend/org/voltdb/sysprocs/UpdateApplicationBase.java index <HASH>..<HASH> 100644 --- a/src/frontend/org/voltdb/sysprocs/UpdateApplicationBase.java +++ b/src/frontend/org/voltdb/sysprocs/UpdateApplicationBase.java @@ -272,7 +272,6 @@ public abstract class UpdateApplicationBase extends VoltNTSystemProcedure { retval.worksWithElastic = diff.worksWithElastic(); } catch (PrepareDiffFailureException e) { - compilerLog.warn(e.getMessage(), e); throw e; } catch (Exception e) {
ENG-<I>: Remove unhelpful log warning with stack trace. (#<I>)
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -16,7 +16,7 @@ function WindowPage() { this.format = function(obj) { var query = QueryString.stringify(obj.query); if (query) obj.search = query; - else obj.search = null; + else delete obj.search; if (obj.path) { var help = this.parse(obj.path); obj.pathname = help.pathname;
Everything passed to search is casted to string
diff --git a/src/Illuminate/Support/Collection.php b/src/Illuminate/Support/Collection.php index <HASH>..<HASH> 100755 --- a/src/Illuminate/Support/Collection.php +++ b/src/Illuminate/Support/Collection.php @@ -537,7 +537,7 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate foreach ($this->items as $key => $item) { - if ($value($item, $key)) return $key; + if (call_user_func($value, $item, $key)) return $key; } return false;
Get rid of PHPStorm warning
diff --git a/domain/pool/poolstore.go b/domain/pool/poolstore.go index <HASH>..<HASH> 100644 --- a/domain/pool/poolstore.go +++ b/domain/pool/poolstore.go @@ -48,14 +48,12 @@ type storeImpl struct { //GetResourcePools Get a list of all the resource pools func (ps *storeImpl) GetResourcePools(ctx datastore.Context) ([]ResourcePool, error) { defer ctx.Metrics().Stop(ctx.Metrics().Start("PoolStore.GetResourcePools")) - plog.Debug("Pool Store.GetResourcePools") return query(ctx, "_exists_:ID") } // GetResourcePoolsByRealm gets a list of resource pools for a given realm func (s *storeImpl) GetResourcePoolsByRealm(ctx datastore.Context, realm string) ([]ResourcePool, error) { defer ctx.Metrics().Stop(ctx.Metrics().Start("PoolStore.GetResourcePoolsByRealm")) - plog.WithField("realml", realm).Debug("Pool Store.GetResourcePoolsByRealm") id := strings.TrimSpace(realm) if id == "" { return nil, errors.New("empty realm not allowed")
Remove execution flow logging from pool store because we don't have it in the other stores
diff --git a/simplelru/lru_interface.go b/simplelru/lru_interface.go index <HASH>..<HASH> 100644 --- a/simplelru/lru_interface.go +++ b/simplelru/lru_interface.go @@ -10,7 +10,7 @@ type LRUCache interface { // updates the "recently used"-ness of the key. #value, isFound Get(key interface{}) (value interface{}, ok bool) - // Check if a key exsists in cache without updating the recent-ness. + // Checks if a key exists in cache without updating the recent-ness. Contains(key interface{}) (ok bool) // Returns key's value without updating the "recently used"-ness of the key. @@ -31,6 +31,6 @@ type LRUCache interface { // Returns the number of items in the cache. Len() int - // Clear all cache entries + // Clears all cache entries. Purge() }
Fix typo: 'exsists' (#<I>)
diff --git a/mixbox/entities.py b/mixbox/entities.py index <HASH>..<HASH> 100644 --- a/mixbox/entities.py +++ b/mixbox/entities.py @@ -294,6 +294,42 @@ class Entity(object): return cls.from_dict(d) + def _get_namespaces(self, recurse=True): + """Only used in a couple places in nose tests now.""" + nsset = set() + + # Get all _namespaces for parent classes + namespaces = [x._namespace for x in self.__class__.__mro__ + if hasattr(x, '_namespace')] + + nsset.update(namespaces) + + #In case of recursive relationships, don't process this item twice + self.touched = True + if recurse: + for x in self._get_children(): + if not hasattr(x, 'touched'): + nsset.update(x._get_namespaces()) + del self.touched + + return nsset + + def _get_children(self): + #TODO: eventually everything should be in _fields, not the top level + # of vars() + + members = {} + members.update(vars(self)) + members.update(self._fields) + + for v in six.itervalues(members): + if isinstance(v, Entity): + yield v + elif isinstance(v, list): + for item in v: + if isinstance(item, Entity): + yield item + @classmethod def istypeof(cls, obj): """Check if `cls` is the type of `obj`
Re-added the Entity._get_namespaces() and Entity._get_children() methods, since it turned out there are some python-cybox tests which use them. They don't seem to be used anywhere else; makes me think maybe the tests should be rewritten...
diff --git a/fieldpath.go b/fieldpath.go index <HASH>..<HASH> 100644 --- a/fieldpath.go +++ b/fieldpath.go @@ -157,6 +157,27 @@ func newFieldpathHuffman() HuffmanTree { return buildTree(huffmanlist) } +// Returns the static huffman tree based on our observed tree states +func newFieldpathHuffmanStatic() HuffmanTree { + var h HuffmanTree + h = &HuffmanNode{0, nil, nil} + + addNode(h, 0, 1, 0) // PlusOne + addNode(h, 1, 2, 1) // EncodingFinish + addNode(h, 7, 4, 2) // PlusTwo + addNode(h, 11, 5, 3) // PlusN + addNode(h, 19, 6, 4) // PlusThree + addNode(h, 51, 6, 5) // PopAllButOnePlusOne + addNode(h, 91, 8, 6) // PushOneLeftDeltaOneRightZero + addNode(h, 283, 10, 7) // NonTopoComplexPack4Bits + addNode(h, 1819, 11, 8) // NonTopoComplex + addNode(h, 2843, 12, 9) // PushOneLeftDeltaZeroRightZero + addNode(h, 17179, 15, 10) // PopOnePlusOne + addNode(h, 103195, 27, 11) // PushTwoLeftDeltaZero + + return h +} + func PlusOne(r *reader, fp *fieldpath) { _debugf("Name: %s", fp.parent.Name)
Added newFieldpathHuffmanStatic function
diff --git a/src/ossos-pipeline/ossos/ssos.py b/src/ossos-pipeline/ossos/ssos.py index <HASH>..<HASH> 100644 --- a/src/ossos-pipeline/ossos/ssos.py +++ b/src/ossos-pipeline/ossos/ssos.py @@ -62,9 +62,16 @@ class TracksParser(object): input_mpc_lines = filestr.split('\n') mpc_observations = [] + next_comment = None for line in input_mpc_lines: mpc_observation = mpc.Observation.from_string(line) - if mpc_observation is not None: + if isinstance(mpc_observation, mpc.MPCComment): + next_comment = mpc_observation + continue + if isinstance(mpc_observation, mpc.Observation): + if next_comment is not None: + mpc_observation.comment = next_comment + next_comment = None mpc_observations.append(mpc_observation) mpc_observations.sort(key=lambda obs: obs.date.jd) @@ -221,7 +228,8 @@ class SSOSParser(object): ccd=None, version='p', ext='.fits', - subdir=None) + subdir="") + logger.debug('Trying to access {}'.format(image_uri)) if not storage.exists(image_uri, force=False):
allow MPC lines to have the comment preceeding the astrometric line. This ability should be more generic for creating an observation but I'm not sure how.
diff --git a/Migrations/DatabaseMigrationRepository.php b/Migrations/DatabaseMigrationRepository.php index <HASH>..<HASH> 100755 --- a/Migrations/DatabaseMigrationRepository.php +++ b/Migrations/DatabaseMigrationRepository.php @@ -121,7 +121,7 @@ class DatabaseMigrationRepository implements MigrationRepositoryInterface { // The migrations table is responsible for keeping track of which of the // migrations have actually run for the application. We'll create the // table to hold the migration file's path as well as the batch ID. - $table->string('migration'); + $table->string('migration')->unique(); $table->integer('batch'); });
Add a unique index to migration column
diff --git a/tests/test_pytest_cover.py b/tests/test_pytest_cover.py index <HASH>..<HASH> 100644 --- a/tests/test_pytest_cover.py +++ b/tests/test_pytest_cover.py @@ -1,11 +1,10 @@ import os import sys +import subprocess import virtualenv - import py import pytest -import subprocess import pytest_cover.plugin pytest_plugins = 'pytester', 'cov' @@ -188,6 +187,34 @@ def test_central_coveragerc(testdir): assert result.ret == 0 +def test_show_missing_coveragerc(testdir): + script = testdir.makepyfile(SCRIPT) + testdir.tmpdir.join('.coveragerc').write(""" +[run] +source = . + +[report] +show_missing = true +""") + + result = testdir.runpytest('-v', + '--cov', + '--cov-report=term', + script) + + result.stdout.fnmatch_lines([ + '*- coverage: platform *, python * -*', + 'Name * Stmts * Miss * Cover * Missing', + 'test_show_missing_coveragerc* %s * 11' % SCRIPT_RESULT, + '*10 passed*', + ]) + + # single-module coverage report + assert result.stdout.lines[-3].startswith('test_show_missing_coveragerc') + + assert result.ret == 0 + + def test_no_cov_on_fail(testdir): script = testdir.makepyfile(SCRIPT_FAIL)
Test that --cov-report=term will report missing lines if .coveragerc has show_missing=true. Ref #1.
diff --git a/testing/mgo.go b/testing/mgo.go index <HASH>..<HASH> 100644 --- a/testing/mgo.go +++ b/testing/mgo.go @@ -9,6 +9,7 @@ import ( "net" "os" "os/exec" + "path/filepath" "strconv" stdtesting "testing" "time" @@ -40,10 +41,18 @@ func startMgoServer() error { if err != nil { return err } + pemPath := filepath.Join(dbdir, "server.pem") + err = ioutil.WriteFile(pemPath, []byte(CACertPEM + CAKeyPEM), 0600) + if err != nil { + return fmt.Errorf("cannot write cert/key PEM: %v", err) + } mgoport := strconv.Itoa(FindTCPPort()) mgoargs := []string{ "--auth", "--dbpath", dbdir, + "--sslOnNormalPorts", + "--sslPEMKeyFile", pemPath, + "--sslPEMKeyPassword", "ignored", "--bind_ip", "localhost", "--port", mgoport, "--nssize", "1",
testing: start mgo with ssl
diff --git a/src/NodejsPhpFallback/NodejsPhpFallback.php b/src/NodejsPhpFallback/NodejsPhpFallback.php index <HASH>..<HASH> 100644 --- a/src/NodejsPhpFallback/NodejsPhpFallback.php +++ b/src/NodejsPhpFallback/NodejsPhpFallback.php @@ -6,6 +6,8 @@ use Composer\Composer; use Composer\IO\IOInterface; use Composer\Json\JsonFile; use Composer\Script\Event; +use Exception; +use Throwable; class NodejsPhpFallback { @@ -245,7 +247,14 @@ class NodejsPhpFallback $remindedChoice = static::getConfirmRemindedChoiceFile(); if (!file_exists($remindedChoice) || !is_readable($remindedChoice)) { - $manual = strtolower($io->ask($message)); + try { + $manual = strtolower($io->ask($message)); + } catch (Exception $e) { + return 'y'; + } catch (Throwable $e) { + return 'y'; + } + @file_put_contents($remindedChoice, $manual); return $manual;
Fallback to "yes" if IO ask fail
diff --git a/llrb.go b/llrb.go index <HASH>..<HASH> 100644 --- a/llrb.go +++ b/llrb.go @@ -158,6 +158,11 @@ func (self *Node) moveRedRight() *Node { return self } +// Len returns the number of elements stored in the Tree. +func (self *Tree) Len() int { + return self.Count +} + // Get returns the first match of q in the Tree. If insertion without // replacement is used, this is probably not what you want. func (self *Tree) Get(q Comparable) Comparable { @@ -171,11 +176,6 @@ func (self *Tree) Get(q Comparable) Comparable { return n.Elem } -// Len returns the number of elements stored in the Tree. -func (self *Tree) Len() int { - return self.Count -} - func (self *Node) search(q Comparable) (n *Node) { n = self for n != nil {
Code reorganisation: Fix interrupted function pair Get and search should be adjacent.
diff --git a/bundles/org.eclipse.orion.client.javascript/web/javascript/contentAssist/ternAssist.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/contentAssist/ternAssist.js index <HASH>..<HASH> 100644 --- a/bundles/org.eclipse.orion.client.javascript/web/javascript/contentAssist/ternAssist.js +++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/contentAssist/ternAssist.js @@ -695,6 +695,8 @@ define([ var _h = Hover.formatMarkdownHover(completion.doc); if(_h) { obj.content += _h.content; + } else { + obj.content += proposal.name; } } if(completion.url) {
Bug <I> - [assist] Proposals with ignored doc show empty hover
diff --git a/lib/i18n-inflector/interpolate.rb b/lib/i18n-inflector/interpolate.rb index <HASH>..<HASH> 100644 --- a/lib/i18n-inflector/interpolate.rb +++ b/lib/i18n-inflector/interpolate.rb @@ -284,13 +284,12 @@ module I18n # process each token from set results = tokens.split(OPERATOR_COMPLEX).map do |token| raise IndexError.new if token.empty? - r = interpolate_core( - PATTERN_MARKER + kinds.next + '{' + token + ':' + value + '}', - locale, options) if value == LOUD_MARKER - break if r.empty? - elsif r != value - break # stop with this set, because something is not matching + r = interpolate_core("#{PATTERN_MARKER}#{kinds.next}{#{token}:#{value}|@}", locale, options) + break if r == PATTERN_MARKER + else + r = interpolate_core("#{PATTERN_MARKER}#{kinds.next}{#{token}:#{value}}", locale, options) + break if r != value # stop with this set, because something is not matching end r end
Interpolation routine for complex kinds simplified
diff --git a/lib/dm-validations.rb b/lib/dm-validations.rb index <HASH>..<HASH> 100644 --- a/lib/dm-validations.rb +++ b/lib/dm-validations.rb @@ -47,6 +47,10 @@ module DataMapper resource end end + + # models that are non DM resources must get .validators + # and other methods, too + model.extend Validate::ClassMethods end # Ensures the object is valid for the context provided, and otherwise
[dm-validations] When DataMapper::Validate is included, extend model with class methods, since it may be a non DM model. * Makes it possible to use DM validations gem with non DataMapper models
diff --git a/Form/FileType.php b/Form/FileType.php index <HASH>..<HASH> 100644 --- a/Form/FileType.php +++ b/Form/FileType.php @@ -41,6 +41,7 @@ class FileType extends AbstractType implements DataMapperInterface, EventSubscri 'multiple' => false, 'options' => [], 'required_message' => 'Choose a file.', + 'allow_file_upload' => true, ]) ->setAllowedTypes('class', 'string') ->setAllowedTypes('multiple', 'bool')
Fixing FileType according tonew option allow_file_upload
diff --git a/src/Controller/Frontend/Basket/Standard.php b/src/Controller/Frontend/Basket/Standard.php index <HASH>..<HASH> 100644 --- a/src/Controller/Frontend/Basket/Standard.php +++ b/src/Controller/Frontend/Basket/Standard.php @@ -423,7 +423,7 @@ class Standard } // remove service rebate of original price - $price = $provider->calcPrice( $this->get() )->setRebate( '0.00' ); + $price = $provider->calcPrice( $this->get(), $config )->setRebate( '0.00' ); $orderBaseServiceManager = \Aimeos\MShop::create( $context, 'order/base/service' );
Pass config options to calcPrice() of service providers
diff --git a/js/gatecoin.js b/js/gatecoin.js index <HASH>..<HASH> 100644 --- a/js/gatecoin.js +++ b/js/gatecoin.js @@ -176,6 +176,12 @@ module.exports = class gatecoin extends Exchange { ], }, }, + 'fees': { + 'trading': { + 'maker': 0.0025, + 'taker': 0.0035, + }, + }, }); }
gatecoin: taker/maker fees added
diff --git a/src/UDB2/EventRepository.php b/src/UDB2/EventRepository.php index <HASH>..<HASH> 100644 --- a/src/UDB2/EventRepository.php +++ b/src/UDB2/EventRepository.php @@ -81,13 +81,11 @@ class EventRepository implements RepositoryInterface // At this point we need to have // - the user associated with the event, from the metadata // - the token and secret of the user stored in the database - $token = ''; - $secret = ''; + $metadata = $domainMessage->getMetadata()->serialize(); + $tokenCredentials = $metadata['uitid_token_credentials']; + //throw new \Exception($userId); $entryAPI = $this->entryAPIFactory->withTokenCredentials( - new TokenCredentials( - $token, - $secret - ) + $tokenCredentials ); $entryAPI->addTagToEvent( $event,
iii-<I>: Use token credentials from context (temporarily)
diff --git a/lib/branches/get-tags.js b/lib/branches/get-tags.js index <HASH>..<HASH> 100644 --- a/lib/branches/get-tags.js +++ b/lib/branches/get-tags.js @@ -14,15 +14,10 @@ module.exports = async ({cwd, env, options: {tagFormat}}, branches) => { return pReduce( branches, async (branches, branch) => { - const branchTags = await Promise.all( - (await getTags(branch.name, {cwd, env})) - .map(tag => { - const [, version, channel] = tag.match(tagRegexp) || []; - return {gitTag: tag, version, channel}; - }) - .filter(({version}) => version && semver.valid(semver.clean(version))) - .map(async ({gitTag, ...rest}) => ({gitTag, ...rest})) - ); + const branchTags = (await getTags(branch.name, {cwd, env})).reduce((tags, tag) => { + const [, version, channel] = tag.match(tagRegexp) || []; + return version && semver.valid(semver.clean(version)) ? [...tags, {gitTag: tag, version, channel}] : tags; + }, []); debug('found tags for branch %s: %o', branch.name, branchTags); return [...branches, {...branch, tags: branchTags}];
fix: simplify `get-tags` algorithm
diff --git a/tests/core/network/test_grids.py b/tests/core/network/test_grids.py index <HASH>..<HASH> 100644 --- a/tests/core/network/test_grids.py +++ b/tests/core/network/test_grids.py @@ -191,6 +191,10 @@ class TestMVGridDing0(object): Checks that the ring obtained from the rings_nodes function setting the include_root_node parameter to "True" contains the list of nodes that are expected. + Currently the test doesn't check the consistency of the + order of the items in the resulting list. It only checks + if all the nodes expected are present and the + length of the list is the same """ ring, grid = ring_mvgridding0 station = grid.station() @@ -201,7 +205,8 @@ class TestMVGridDing0(object): generators[1], station] rings_nodes = list(grid.rings_nodes(include_root_node=True))[0] - assert rings_nodes == rings_nodes_expected + assert len(rings_nodes) == len(rings_nodes_expected) + assert set(rings_nodes) == set(rings_nodes_expected) def test_rings_nodes_root_only_exclude_root(self, ring_mvgridding0): """
Made one more test a little less stringent based on design recommendations
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -42,9 +42,6 @@ RSpec.configure do |config| # config.mock_with :rr config.mock_with :rspec - # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures - config.fixture_path = "#{::Rails.root}/spec/fixtures" - # If you're not using ActiveRecord, or you'd prefer not to run each of your # examples within a transaction, remove the following line or assign false # instead of true.
Fix reading files from specs for v1.x
diff --git a/azurerm/resource_arm_application_gateway.go b/azurerm/resource_arm_application_gateway.go index <HASH>..<HASH> 100644 --- a/azurerm/resource_arm_application_gateway.go +++ b/azurerm/resource_arm_application_gateway.go @@ -1357,10 +1357,12 @@ func flattenApplicationGatewayWafConfig(waf *network.ApplicationGatewayWebApplic } func flattenApplicationGatewaySslPolicy(policy *network.ApplicationGatewaySslPolicy) []interface{} { - result := make([]interface{}, 0, len(*policy.DisabledSslProtocols)) + result := make([]interface{}, 0) - for _, proto := range *policy.DisabledSslProtocols { - result = append(result, string(proto)) + if protocols := policy.DisabledSslProtocols; protocols != nil { + for _, proto := range *protocols { + result = append(result, string(proto)) + } } return result
Fixing a crash where DisabledSSLProtocols could be nil
diff --git a/lib/DirectEditing.js b/lib/DirectEditing.js index <HASH>..<HASH> 100644 --- a/lib/DirectEditing.js +++ b/lib/DirectEditing.js @@ -16,7 +16,7 @@ function DirectEditing(eventBus, canvas) { this._providers = []; this._textbox = new TextBox({ container: canvas.getPaper().node.parentNode, - keyHandler: this._handleKey.bind(this) + keyHandler: _.bind(this._handleKey, this) }); }
fix(plug-in): use _.bind instead of Function#bind Function#bind is not supported in older webkit browsers.
diff --git a/src/ZipCodeValidator/Constraints/ZipCodeValidator.php b/src/ZipCodeValidator/Constraints/ZipCodeValidator.php index <HASH>..<HASH> 100644 --- a/src/ZipCodeValidator/Constraints/ZipCodeValidator.php +++ b/src/ZipCodeValidator/Constraints/ZipCodeValidator.php @@ -101,7 +101,7 @@ class ZipCodeValidator extends ConstraintValidator 'HT' => '\\d{4}', 'HU' => '\\d{4}', 'ID' => '\\d{5}', - 'IE' => '[\\dA-Z]{3} ?[\\dA-Z]{4}', + 'IE' => '[\\dA-Z]{3}( ?[\\dA-Z]{4})?', 'IL' => '\\d{5}(?:\\d{2})?', 'IM' => 'IM\\d[\\dA-Z]? ?\\d[ABD-HJLN-UW-Z]{2}', 'IN' => '\\d{6}',
Change to allow the second part of an Irish postcode to be optional (#<I>)
diff --git a/src/Controller.php b/src/Controller.php index <HASH>..<HASH> 100644 --- a/src/Controller.php +++ b/src/Controller.php @@ -13,6 +13,7 @@ namespace app\admin; use infuse\Inflector; use infuse\Utility as U; +use infuse\View; class Controller { @@ -48,7 +49,7 @@ class Controller 'title' => Inflector::titleize( $module ), 'adminViewsDir' => $this->adminViewsDir ]; - $this->app[ 'view_engine' ]->assignData( $adminViewParams ); + $this->app[ 'view_engine' ]->setGlobalParameters($adminViewParams); // set module param if module is not using scaffolding $controller = '\\app\\' . $module . '\\Controller'; @@ -156,7 +157,7 @@ class Controller $params[ 'modelJSON' ] = json_encode( $modelInfo ); $params[ 'ngApp' ] = 'models'; - $res->render( $this->adminViewsDir . 'model', $params ); + return new View($this->adminViewsDir . 'model', $params); } /////////////////////////
support Response/View changes to infuse/libs
diff --git a/tests/api/test_sentinelhub_batch.py b/tests/api/test_sentinelhub_batch.py index <HASH>..<HASH> 100644 --- a/tests/api/test_sentinelhub_batch.py +++ b/tests/api/test_sentinelhub_batch.py @@ -68,6 +68,8 @@ def test_create_and_run_batch_request(batch_client, requests_mock): } } }, + "tileCount": 42, + "status": "CREATED", } } ],
fixed failing batch test by adding new fields in mocked response
diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index <HASH>..<HASH> 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -111,7 +111,7 @@ module Rake if args.empty? task_name = key arg_names = [] - deps = value + deps = value || [] else task_name = args.shift arg_names = key diff --git a/test/test_rake_definitions.rb b/test/test_rake_definitions.rb index <HASH>..<HASH> 100644 --- a/test/test_rake_definitions.rb +++ b/test/test_rake_definitions.rb @@ -59,6 +59,11 @@ class TestRakeDefinitions < Rake::TestCase assert_raises(RuntimeError) { Task[:x].invoke } end + def test_falsey_dependencies + task :x => nil + assert_equal [], Task[:x].prerequisites + end + def test_implicit_file_dependencies runs = [] create_existing_file
Ignore falsey dependencies When creating Rake tasks programatically, it could so happen that the prerequisites reach the point of creation as an argument. This change teaches the Rake DSL to ignore falsey (`nil' or `false') values when they are specified as the dependencies; this way, programmatic creation does not have to deal with a special case.
diff --git a/lib/boot/load/tymly-loader/load-dir.js b/lib/boot/load/tymly-loader/load-dir.js index <HASH>..<HASH> 100644 --- a/lib/boot/load/tymly-loader/load-dir.js +++ b/lib/boot/load/tymly-loader/load-dir.js @@ -28,7 +28,6 @@ module.exports = function loadDir (rootDir, allComponents, options) { }) const rootComponents = {} - let componentDir componentDirs.forEach( function (componentTypeDir) { @@ -37,7 +36,7 @@ module.exports = function loadDir (rootDir, allComponents, options) { rootComponents[componentTypeName] = {} } if (componentTypeDir[0] !== '.' && COMPONENT_DIR_BLACKLIST.indexOf(componentTypeName) === -1) { - componentDir = path.join(rootDir, componentTypeDir) + const componentDir = path.join(rootDir, componentTypeDir) const dirContent = fs.readdirSync(componentDir) dirContent.forEach( function (filename) {
refactor: Move componentDir declaration into the loop
diff --git a/app/models/no_cms/blocks/concerns/model_with_slots.rb b/app/models/no_cms/blocks/concerns/model_with_slots.rb index <HASH>..<HASH> 100644 --- a/app/models/no_cms/blocks/concerns/model_with_slots.rb +++ b/app/models/no_cms/blocks/concerns/model_with_slots.rb @@ -24,8 +24,8 @@ module NoCms::Blocks::Concerns # In the dup implementation we configure the `dup_block_when_duping_slot` # virtual attribute of the slot with the same value than the attribute # from this model. This way we propagate the configuration. - def dup_with_slots options = {} - duplicated = dup_without_slots + def dup + duplicated = super # We just need to dub root slots, if there are nested slots # will be dupped in each slot block_slots.roots.each do |slot| @@ -36,8 +36,6 @@ module NoCms::Blocks::Concerns end duplicated end - alias_method_chain :dup, :slots - end end
Removing deprecated alias_method_chain Issue #<I>
diff --git a/boatd_client/__init__.py b/boatd_client/__init__.py index <HASH>..<HASH> 100644 --- a/boatd_client/__init__.py +++ b/boatd_client/__init__.py @@ -1 +1 @@ -from boatd_client import Boat +from .boatd_client import Boat
Fix build for python 3.x
diff --git a/.eslintrc.js b/.eslintrc.js index <HASH>..<HASH> 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -28,6 +28,7 @@ module.exports = { 'react/style-prop-object': 'off', 'react/display-name': 'off', 'react/require-default-props': 'off', - 'react/forbid-component-props': 'off' + 'react/forbid-component-props': 'off', + 'react/no-unused-prop-types': 'off' } }; \ No newline at end of file
Disable react/no-unused-prop-types
diff --git a/km3pipe/io/hdf5.py b/km3pipe/io/hdf5.py index <HASH>..<HASH> 100644 --- a/km3pipe/io/hdf5.py +++ b/km3pipe/io/hdf5.py @@ -107,8 +107,16 @@ class HDF5Sink(Module): return blob def finish(self): - for tab in self._tables.values(): - tab.cols.event_id.create_index() + for tab in self._tables.itervalues(): + if 'frame_id' in tab.colnames: + print("Creating index for '{0}' using 'frame_id'..." + .format(tab.name)) + tab.cols.frame_id.create_index() + elif 'event_id' in tab.colnames: + print("Creating index for '{0}' using 'event_id'..." + .format(tab.name)) + tab.cols.event_id.create_index() + tab.flush() self.h5file.root._v_attrs.km3pipe = str(kp.__version__) self.h5file.root._v_attrs.pytables = str(tb.__version__)
Fixing indexing bug. I am not crazy
diff --git a/lib/tokyo_metro/static/operator/info.rb b/lib/tokyo_metro/static/operator/info.rb index <HASH>..<HASH> 100644 --- a/lib/tokyo_metro/static/operator/info.rb +++ b/lib/tokyo_metro/static/operator/info.rb @@ -18,6 +18,10 @@ class TokyoMetro::Static::Operator::Info < TokyoMetro::Static::Fundamental::Info include ::OdptCommon::Modules::MethodMissing::Decision::Common::Operator + def self.instance_variable_names + [ :same_as , :name , :index , :additional_infos , :twitter_account_info ] + end + # @!group Constructor # Constructor
<I>_<I> Update - TokyoMetro::Static::Operator::Info
diff --git a/openpnm/geometry/StickAndBall2D.py b/openpnm/geometry/StickAndBall2D.py index <HASH>..<HASH> 100644 --- a/openpnm/geometry/StickAndBall2D.py +++ b/openpnm/geometry/StickAndBall2D.py @@ -45,10 +45,10 @@ class StickAndBall2D(GenericGeometry): >>> pn = op.network.CubicDual(shape=[5, 5, 5]) >>> Ps = pn.pores('primary') >>> Ts = pn.throats('primary') - >>> geo1 = op.geometry.StickAndBall_2D(network=pn, pores=Ps, throats=Ts) + >>> geo1 = op.geometry.StickAndBall2D(network=pn, pores=Ps, throats=Ts) >>> Ps = pn.pores('secondary') >>> Ts = pn.throats(['secondary', 'interconnect']) - >>> geo2 = op.geometry.StickAndBall_2D(network=pn, pores=Ps, throats=Ts) + >>> geo2 = op.geometry.StickAndBall2D(network=pn, pores=Ps, throats=Ts) Now override the 'pore.diameter' values on the ``geo2`` object:
Class names shouldn't have underscores
diff --git a/pyvista/plotting/colors.py b/pyvista/plotting/colors.py index <HASH>..<HASH> 100644 --- a/pyvista/plotting/colors.py +++ b/pyvista/plotting/colors.py @@ -152,6 +152,16 @@ white whitesmoke yellow yellowgreen +tab:blue +tab:orange +tab:green +tab:red +tab:purple +tab:brown +tab:pink +tab:gray +tab:olive +tab:cyan """ @@ -305,7 +315,17 @@ hexcolors = { 'white': '#FFFFFF', 'whitesmoke': '#F5F5F5', 'yellow': '#FFFF00', - 'yellowgreen': '#9ACD32'} + 'yellowgreen': '#9ACD32', + 'tab:blue': '#1f77b4', + 'tab:orange': '#ff7f0e', + 'tab:green': '#2ca02c', + 'tab:red': '#d62728', + 'tab:purple': '#9467bd', + 'tab:brown': '#8c564b', + 'tab:pink': '#e377c2', + 'tab:gray': '#7f7f7f', + 'tab:olive': '#bcbd22', + 'tab:cyan': '#17becf'} color_char_to_word = { 'b': 'blue',
add new colors (#<I>)
diff --git a/mistletoe/block_token.py b/mistletoe/block_token.py index <HASH>..<HASH> 100644 --- a/mistletoe/block_token.py +++ b/mistletoe/block_token.py @@ -404,7 +404,6 @@ class ListItem(BlockToken): lines.anchor() prepend = -1 leader = None - newline = 0 line_buffer = [] next_line = lines.peek() # first line in list item @@ -420,13 +419,25 @@ class ListItem(BlockToken): next_line = lines.peek() if empty_first_line and next_line is not None and next_line.strip() == '': return line_buffer, prepend, leader - while (next_line is not None - and not cls.parse_marker(next_line, prepend, leader)): + newline = 0 + while True: + # no more lines + if next_line is None: + # strip off newlines + if newline: + del line_buffer[-newline:] + break + # not in continuation if not cls.in_continuation(next_line, prepend): + # next_line is a new list item + if cls.parse_marker(next_line, prepend, leader): + break + # not another item, has newlines -> not continuation if newline: del line_buffer[-newline:] break - elif cls.other_token(next_line): + # directly followed by another token + if cls.other_token(next_line): break line = next(lines) stripped = line.lstrip(' ')
refactor ListItem.read condition checks
diff --git a/azurerm/provider.go b/azurerm/provider.go index <HASH>..<HASH> 100644 --- a/azurerm/provider.go +++ b/azurerm/provider.go @@ -340,11 +340,11 @@ func Provider() terraform.ResourceProvider { "azurerm_mysql_virtual_network_rule": resourceArmMySqlVirtualNetworkRule(), "azurerm_network_connection_monitor": resourceArmNetworkConnectionMonitor(), "azurerm_network_ddos_protection_plan": resourceArmNetworkDDoSProtectionPlan(), + "azurerm_network_interface": resourceArmNetworkInterface(), "azurerm_network_interface_application_gateway_backend_address_pool_association": resourceArmNetworkInterfaceApplicationGatewayBackendAddressPoolAssociation(), "azurerm_network_interface_application_security_group_association": resourceArmNetworkInterfaceApplicationSecurityGroupAssociation(), "azurerm_network_interface_backend_address_pool_association": resourceArmNetworkInterfaceBackendAddressPoolAssociation(), "azurerm_network_interface_nat_rule_association": resourceArmNetworkInterfaceNatRuleAssociation(), - "azurerm_network_interface": resourceArmNetworkInterface(), "azurerm_network_packet_capture": resourceArmNetworkPacketCapture(), "azurerm_network_profile": resourceArmNetworkProfile(), "azurerm_network_security_group": resourceArmNetworkSecurityGroup(),
Fix: gofmt issue for provider.go
diff --git a/lib/mongoid/validations/uniqueness.rb b/lib/mongoid/validations/uniqueness.rb index <HASH>..<HASH> 100644 --- a/lib/mongoid/validations/uniqueness.rb +++ b/lib/mongoid/validations/uniqueness.rb @@ -156,8 +156,8 @@ module Mongoid #:nodoc: # # @since def scope_value_changed?(document) - Array.wrap(options[:scope]).reduce(false) do |result, item| - (result || document.send("attribute_changed?", item.to_s)) + Array.wrap(options[:scope]).any? do |item| + document.send("attribute_changed?", item.to_s) end end end
Changed *reduce* to *any?*, since any? is more optimized in case of multiple scopes. It's also more readable.
diff --git a/Controller/BlogController.php b/Controller/BlogController.php index <HASH>..<HASH> 100644 --- a/Controller/BlogController.php +++ b/Controller/BlogController.php @@ -53,7 +53,7 @@ class BlogController extends Controller $date = null; if (null !== $filter) { - $tag = $this->get('icap.blog.tag_repository')->findOneByName($filter); + $tag = $this->get('icap.blog.tag_repository')->findOneBySlug($filter); if (null === $tag) { $author = $this->getDoctrine()->getRepository('ClarolineCoreBundle:User')->findOneByUsername($filter);
[BlogBundle] Retrieving tag from slug for searching
diff --git a/admin_media.php b/admin_media.php index <HASH>..<HASH> 100644 --- a/admin_media.php +++ b/admin_media.php @@ -1276,12 +1276,11 @@ echo WT_JS_START; ?> echo '<br />'; } } - echo "</td></tr>"; break; } } - if ($passCount==1 && $printDone) echo "<tr><td class=\"\" colspan=\"3\">&nbsp;</td></tr>"; + if ($passCount==1 && !$isExternal && $printDone) echo "<tr><td class=\"\" colspan=\"3\">&nbsp;</td></tr>"; } ?> </tbody>
fix: error when the jquery table don't appear
diff --git a/acceptance/tests/modules/install/with_modulepath.rb b/acceptance/tests/modules/install/with_modulepath.rb index <HASH>..<HASH> 100644 --- a/acceptance/tests/modules/install/with_modulepath.rb +++ b/acceptance/tests/modules/install/with_modulepath.rb @@ -9,7 +9,7 @@ step "Install a module with relative modulepath" on master, "cd /etc/puppet/modules2 && puppet module install pmtacceptance-nginx --modulepath=." do assert_output <<-OUTPUT Preparing to install into /etc/puppet/modules2 ... - Downloading from http://forge.puppetlabs.com ... + Downloading from https://forge.puppetlabs.com ... Installing -- do not interrupt ... /etc/puppet/modules2 └── pmtacceptance-nginx (\e[0;36mv0.0.1\e[0m) @@ -22,7 +22,7 @@ step "Install a module with absolute modulepath" on master, puppet('module install pmtacceptance-nginx --modulepath=/etc/puppet/modules2') do assert_output <<-OUTPUT Preparing to install into /etc/puppet/modules2 ... - Downloading from http://forge.puppetlabs.com ... + Downloading from https://forge.puppetlabs.com ... Installing -- do not interrupt ... /etc/puppet/modules2 └── pmtacceptance-nginx (\e[0;36mv0.0.1\e[0m)
(#<I>) Fix test to expect https not http After a <I>.x -> <I>rc rollup the with_modulepath system test was failing due to the conversion to HTTPS. This patch converts the test.
diff --git a/core/common/src/test/java/alluxio/AlluxioURITest.java b/core/common/src/test/java/alluxio/AlluxioURITest.java index <HASH>..<HASH> 100644 --- a/core/common/src/test/java/alluxio/AlluxioURITest.java +++ b/core/common/src/test/java/alluxio/AlluxioURITest.java @@ -11,20 +11,18 @@ package alluxio; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.junit.Assume.assumeTrue; + import alluxio.util.OSUtils; -import org.junit.Assert; -import org.junit.Assume; import org.junit.Test; import java.util.HashMap; import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.assertFalse; -import static org.junit.Assume.assumeTrue; - /** * Unit tests for {@link AlluxioURI}. */
[SMALLFIX] Fix build
diff --git a/molgenis-data-vcf/src/main/java/org/molgenis/data/vcf/VcfRepository.java b/molgenis-data-vcf/src/main/java/org/molgenis/data/vcf/VcfRepository.java index <HASH>..<HASH> 100644 --- a/molgenis-data-vcf/src/main/java/org/molgenis/data/vcf/VcfRepository.java +++ b/molgenis-data-vcf/src/main/java/org/molgenis/data/vcf/VcfRepository.java @@ -338,9 +338,9 @@ public class VcfRepository extends AbstractRepository if (isListValue) { // TODO support list of primitives datatype - return MolgenisFieldTypes.FieldTypeEnum.STRING; + return MolgenisFieldTypes.FieldTypeEnum.TEXT; } - return MolgenisFieldTypes.FieldTypeEnum.STRING; + return MolgenisFieldTypes.FieldTypeEnum.TEXT; default: throw new MolgenisDataException("unknown vcf info type [" + vcfMetaInfo.getType() + "]"); }
change "string" VCF INFO fields to TEXT because we don't know how many characters it can contain
diff --git a/cfgrib/messages.py b/cfgrib/messages.py index <HASH>..<HASH> 100644 --- a/cfgrib/messages.py +++ b/cfgrib/messages.py @@ -260,7 +260,7 @@ class FileStream(collections.Iterable): break except Exception: if self.errors == 'ignore': - logging.exception("skipping corrupted Message") + LOG.exception("skipping corrupted Message") else: raise
Bugfix: minor, use the configured logger.
diff --git a/lib/active_remote/persistence.rb b/lib/active_remote/persistence.rb index <HASH>..<HASH> 100644 --- a/lib/active_remote/persistence.rb +++ b/lib/active_remote/persistence.rb @@ -238,7 +238,6 @@ module ActiveRemote run_callbacks :create do # Use the getter here so we get the type casting. new_attributes = attributes - new_attributes.delete(primary_key.to_s) response = rpc.execute(:create, new_attributes) diff --git a/spec/lib/active_remote/persistence_spec.rb b/spec/lib/active_remote/persistence_spec.rb index <HASH>..<HASH> 100644 --- a/spec/lib/active_remote/persistence_spec.rb +++ b/spec/lib/active_remote/persistence_spec.rb @@ -208,7 +208,7 @@ describe ::ActiveRemote::Persistence do subject { Tag.new } it "creates the record" do - expected_attributes = subject.attributes.reject { |key, value| key == "guid" } + expected_attributes = subject.attributes expect(rpc).to receive(:execute).with(:create, expected_attributes) subject.save end
Allow primary_key to be set on create ActiveRecord allows the primary key to be set on create. This makes ActiveRemote#create behave the same way by allowing the primary_key attribute to be sent in a create operation.
diff --git a/SingularityService/src/main/java/com/hubspot/singularity/resources/TaskResource.java b/SingularityService/src/main/java/com/hubspot/singularity/resources/TaskResource.java index <HASH>..<HASH> 100644 --- a/SingularityService/src/main/java/com/hubspot/singularity/resources/TaskResource.java +++ b/SingularityService/src/main/java/com/hubspot/singularity/resources/TaskResource.java @@ -684,7 +684,6 @@ public class TaskResource extends AbstractLeaderAwareResource { @Override public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { - LOG.trace("Proxying download of {} from Mesos: Body chunk has length={}", requestBuilder.build().getUrl(), bodyPart.length()); bodyPart.writeTo(wrappedOutputStream); wrappedOutputStream.flush(); return STATE.CONTINUE;
This is way too verbose even for TRACE.
diff --git a/design/satellite_passes.py b/design/satellite_passes.py index <HASH>..<HASH> 100644 --- a/design/satellite_passes.py +++ b/design/satellite_passes.py @@ -1,3 +1,12 @@ +""" +On my laptop, this script shows that simply computing the positions and +the sunlit-ness of the ISS for each of the 381 seconds of this pass +takes roughly the same amount of time as mounting a full search for the +moment it passes into shadow. But the benefit is far greater, because +with almost no additional expense all altitudes and azimuths can also +be computed. + +""" import numpy as np from skyfield import almanac, api from skyfield.nutationlib import iau2000b @@ -62,11 +71,4 @@ DT = time() - T0 print(DT, 'to re-use the positions to compute altitude and azimuth') -print(''' -On my laptop, this script shows that simply computing the positions and -the sunlit-ness of the ISS for each of the 381 seconds of this pass -takes roughly the same amount of time as mounting a full search for the -moment it passes into shadow. But the benefit is far greater, because -with almost no additional expense all altitudes and azimuths can also -be computed. -''') +print(__doc__.rstrip())
Move explanation to top where folks might see it
diff --git a/tests/test_disque.py b/tests/test_disque.py index <HASH>..<HASH> 100644 --- a/tests/test_disque.py +++ b/tests/test_disque.py @@ -166,9 +166,8 @@ class TestDisque(unittest.TestCase): assert stat.get('jobs-in', None) is not None assert stat.get('jobs-out', None) is not None - # TODO (canardleteer): bring this back - """ def test_shownack(self): + """Test that NACK and SHOW work appropriately.""" queuename = "test_show-%s" % self.testID test_job = six.b("Show me.") @@ -179,12 +178,10 @@ class TestDisque(unittest.TestCase): for queue_name, job_id, job in jobs: self.client.nack_job(job_id) - shown = self.client.show(job_id) + shown = self.client.show(job_id, True) - print(shown) + assert shown.get('body') == test_job + assert shown.get('nacks') == 1 - assert shown[six.b('body')] == test_job - assert shown[six.b('nacks')] == 1 - """ if __name__ == '__main__': unittest.main()
Added a unit test for the new SHOW / dict style.
diff --git a/tests/testcases/unpublication_tests.py b/tests/testcases/unpublication_tests.py index <HASH>..<HASH> 100644 --- a/tests/testcases/unpublication_tests.py +++ b/tests/testcases/unpublication_tests.py @@ -76,7 +76,8 @@ class UnpublicationTestCase(unittest.TestCase): prefix=self.prefix, coupler=self.coupler, data_node=self.data_node, - message_timestamp='some_moment' + message_timestamp='some_moment', + consumer_solr_url='fake_solr_foo' ) return assistant @@ -183,7 +184,8 @@ class UnpublicationTestCase(unittest.TestCase): "message_timestamp": "anydate", "drs_id": self.drs_id, "data_node": self.data_node, - "ROUTING_KEY": "unpublish_all_versions" + "ROUTING_KEY": "unpublish_all_versions", + "consumer_solr_url":"fake_solr_foo" } received_rabbit_task = self.__get_received_message_from_rabbit_mock(self.coupler, 0) messagesOk = tests.utils.compare_json_return_errormessage(expected_rabbit_task, received_rabbit_task)
Unit tests: Fixed unpublication tests (added new mandatory arg 'consumer_solr_url').
diff --git a/tasks/config.js b/tasks/config.js index <HASH>..<HASH> 100644 --- a/tasks/config.js +++ b/tasks/config.js @@ -17,6 +17,15 @@ const shared = { module: { loaders: [{ test: /\.js$/, + exclude: /node_modules/, + loader: 'babel', + query: { + presets: ['es2015'], + plugins: ['transform-runtime'] + } + }, { + test: /\.js$/, + include: /node_modules\/(hoek|qs|wreck|boom)/, loader: 'babel', query: { presets: ['es2015'],
fix(build): Do not run all deps through babel
diff --git a/osrparse/utils.py b/osrparse/utils.py index <HASH>..<HASH> 100644 --- a/osrparse/utils.py +++ b/osrparse/utils.py @@ -64,7 +64,7 @@ class KeyMania(IntFlag): K7 = 1 << 6 K8 = 1 << 7 -class ReplayEvent: +class ReplayEvent(abc.ABC): def __init__(self, time_delta: int): self.time_delta = time_delta @@ -92,6 +92,9 @@ class ReplayEventOsu(ReplayEvent): return (f"{self.time_delta} ({self.x}, {self.y}) " f"{self.keys}") + def _members(self): + return (self.time_delta, self.x, self.y, self.keys) + class ReplayEventTaiko(ReplayEvent): def __init__(self, time_delta: int, x: int, keys: int): super().__init__(time_delta)
fix _members not being defined for ReplayEventOsu
diff --git a/lib/ruby_expect/expect.rb b/lib/ruby_expect/expect.rb index <HASH>..<HASH> 100644 --- a/lib/ruby_expect/expect.rb +++ b/lib/ruby_expect/expect.rb @@ -257,6 +257,7 @@ module RubyExpect # end # def expect *patterns, &block + @logger.debug("Expecting #{patterns.inspect}") if @logger.debug? patterns = pattern_escape(*patterns) @end_time = 0 if (@timeout != 0) @@ -271,6 +272,7 @@ module RubyExpect @last_match = nil patterns.each_index do |i| if (match = patterns[i].match(@buffer)) + @logger.debug("Matched #{match}") if @logger.debug? @last_match = match @before = @buffer.slice!(0...match.begin(0)) @match = @buffer.slice!(0...match.to_s.length) @@ -285,6 +287,7 @@ module RubyExpect return matched_index end end + @logger.debug("Timeout") return nil end @@ -356,7 +359,7 @@ module RubyExpect else input = @read_fh.readpartial(4096) @buffer << input - @logger.debug(input) if (@logger.debug?) + @logger.info(input) if (@logger.info?) end end rescue EOFError => e
Added some debugging and changed IO debugging to informational
diff --git a/repo_hooks.go b/repo_hooks.go index <HASH>..<HASH> 100644 --- a/repo_hooks.go +++ b/repo_hooks.go @@ -95,6 +95,8 @@ type PayloadRepo struct { ID int64 `json:"id"` Name string `json:"name"` URL string `json:"url"` + SSHURL string `json:"ssh_url"` + CloneURL string `json:"clone_url"` Description string `json:"description"` Website string `json:"website"` Watchers int `json:"watchers"`
add more field to repo payload
diff --git a/goagen/gen_app/writers.go b/goagen/gen_app/writers.go index <HASH>..<HASH> 100644 --- a/goagen/gen_app/writers.go +++ b/goagen/gen_app/writers.go @@ -779,8 +779,8 @@ func Configure{{ goify .SchemeName true }}Security(service *goa.Service, f goa.{ return scopes } middleware := f(def, fetchScopes) -{{ else }}{{/* -*/}} middleware := f(def) +{{ else }} + middleware := f(def) {{ end }}{{/* */}} service.Context = context.WithValue(service.Context, securitySchemeKey({{ printf "%q" .SchemeName }}), middleware) }{{ end }}
Fix overzealous newline removal. (#<I>)
diff --git a/samples/update-intent.js b/samples/update-intent.js index <HASH>..<HASH> 100644 --- a/samples/update-intent.js +++ b/samples/update-intent.js @@ -17,6 +17,7 @@ process.env.DEBUG = 'dialogflow:debug'; // enables lib debugging statements async function main(projectId, intentId, displayName) { + // [START dialogflow_update_intent_sample] const {IntentsClient} = require('@google-cloud/dialogflow'); const intentClient = new IntentsClient(); @@ -39,6 +40,7 @@ async function main(projectId, intentId, displayName) { //Send the request for update the intent. const result = await intentClient.updateIntent(updateIntentRequest); console.log(result); + // [END dialogflow_update_intent_sample] } process.on('unhandledRejection', err => {
docs: added region tags (#<I>)