diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/pkg/services/sqlstore/sqlstore.go b/pkg/services/sqlstore/sqlstore.go index <HASH>..<HASH> 100644 --- a/pkg/services/sqlstore/sqlstore.go +++ b/pkg/services/sqlstore/sqlstore.go @@ -149,8 +149,13 @@ func getEngine() (*xorm.Engine, error) { if len(fields) > 1 && len(strings.TrimSpace(fields[1])) > 0 { port = fields[1] } - cnnstr = fmt.Sprintf("user=%s password=%s host=%s port=%s dbname=%s sslmode=%s", - DbCfg.User, DbCfg.Pwd, host, port, DbCfg.Name, DbCfg.SslMode) + if DbCfg.Pwd == "" { + DbCfg.Pwd = "''" + } + if DbCfg.User == "" { + DbCfg.User = "''" + } + cnnstr = fmt.Sprintf("user=%s password=%s host=%s port=%s dbname=%s sslmode=%s", DbCfg.User, DbCfg.Pwd, host, port, DbCfg.Name, DbCfg.SslMode) case "sqlite3": if !filepath.IsAbs(DbCfg.Path) { DbCfg.Path = filepath.Join(setting.DataPath, DbCfg.Path)
fix(postgres): If password or user is empty use empty quotes for connection string, #<I>
diff --git a/src/main/java/net/kuujo/vertigo/util/Context.java b/src/main/java/net/kuujo/vertigo/util/Context.java index <HASH>..<HASH> 100644 --- a/src/main/java/net/kuujo/vertigo/util/Context.java +++ b/src/main/java/net/kuujo/vertigo/util/Context.java @@ -58,7 +58,7 @@ public final class Context { return InstanceContext.fromJson(contextInfo); } } - throw new IllegalArgumentException("No context found."); + return null; } }
Return null if context is not found in verticle configuration.
diff --git a/lib/ydim/invoice.rb b/lib/ydim/invoice.rb index <HASH>..<HASH> 100644 --- a/lib/ydim/invoice.rb +++ b/lib/ydim/invoice.rb @@ -89,6 +89,11 @@ module YDIM config = PdfInvoice.config.dup config.formats['quantity'] = "%1.#{@precision}f" config.formats['total'] = "#{@currency} %1.2f" + if(item = @items[0]) + if((item.vat_rate - YDIM::Server.config.vat_rate).abs > 0.1) + config.texts['tax'] = "MwSt 7.6%" + end + end invoice = PdfInvoice::Invoice.new(config) invoice.date = @date invoice.invoice_number = @unique_id
The Tax text of an exported PDF file becomes MwSt <I>% when vat_rate == <I>
diff --git a/command/build/command.go b/command/build/command.go index <HASH>..<HASH> 100644 --- a/command/build/command.go +++ b/command/build/command.go @@ -115,11 +115,17 @@ func (c Command) Run(env packer.Environment, args []string) int { } // Handle signals + var interruptWg sync.WaitGroup + interrupted := false sigCh := make(chan os.Signal, 1) signal.Notify(sigCh, os.Interrupt) go func() { <-sigCh + interruptWg.Add(1) + defer interruptWg.Done() + interrupted = true + log.Println("Interrupted! Cancelling builds...") var wg sync.WaitGroup @@ -137,7 +143,15 @@ func (c Command) Run(env packer.Environment, args []string) int { wg.Wait() }() + // Wait for both the builds to complete and the interrupt handler, + // if it is interrupted. wg.Wait() + interruptWg.Wait() + + if interrupted { + env.Ui().Say("Cleanly cancelled builds after being interrupted.") + return 1 + } // Output all the artifacts env.Ui().Say("\n==> The build completed! The artifacts created were:")
command/build: Cleanly exit after being interrupted
diff --git a/lib/punchblock/connection/xmpp.rb b/lib/punchblock/connection/xmpp.rb index <HASH>..<HASH> 100644 --- a/lib/punchblock/connection/xmpp.rb +++ b/lib/punchblock/connection/xmpp.rb @@ -82,6 +82,7 @@ module Punchblock # Preserve Punchblock native exceptions raise e if e.class.to_s =~ /^Punchblock/ # Wrap everything else + # FIXME: We are losing valuable backtrace here... raise ProtocolError.new(e.class.to_s, e.message) end end
Add a FIXME about lost backtrace
diff --git a/util/db/cluster.go b/util/db/cluster.go index <HASH>..<HASH> 100644 --- a/util/db/cluster.go +++ b/util/db/cluster.go @@ -58,6 +58,7 @@ func (s *db) CreateCluster(ctx context.Context, c *appv1.Cluster) (*appv1.Cluste }, } clusterSecret.Data = clusterToData(c) + clusterSecret.Annotations = AnnotationsFromConnectionState(&c.ConnectionState) clusterSecret, err = s.kubeclientset.CoreV1().Secrets(s.ns).Create(clusterSecret) if err != nil { if apierr.IsAlreadyExists(err) { diff --git a/util/db/repository.go b/util/db/repository.go index <HASH>..<HASH> 100644 --- a/util/db/repository.go +++ b/util/db/repository.go @@ -57,6 +57,7 @@ func (s *db) CreateRepository(ctx context.Context, r *appsv1.Repository) (*appsv }, } repoSecret.Data = repoToData(r) + repoSecret.Annotations = AnnotationsFromConnectionState(&r.ConnectionState) repoSecret, err := s.kubeclientset.CoreV1().Secrets(s.ns).Create(repoSecret) if err != nil { if apierr.IsAlreadyExists(err) {
Issue #<I> - Fix saving default connection status for repos and clusters (#<I>)
diff --git a/sanic/request.py b/sanic/request.py index <HASH>..<HASH> 100644 --- a/sanic/request.py +++ b/sanic/request.py @@ -69,10 +69,10 @@ class Request(dict): self.stream = None @property - def json(self, loads=json_loads): + def json(self): if self.parsed_json is None: try: - self.parsed_json = loads(self.body) + self.parsed_json = json_loads(self.body) except Exception: if not self.body: return None @@ -80,6 +80,16 @@ class Request(dict): return self.parsed_json + def load_json(self, loads=json_loads): + try: + self.parsed_json = loads(self.body) + except Exception: + if not self.body: + return None + raise InvalidUsage("Failed when parsing body as json") + + return self.parsed_json + @property def token(self): """Attempt to return the auth header token.
make method instead of property for alternative json decoding of request
diff --git a/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/config/ConfigServerMvcConfiguration.java b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/config/ConfigServerMvcConfiguration.java index <HASH>..<HASH> 100644 --- a/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/config/ConfigServerMvcConfiguration.java +++ b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/config/ConfigServerMvcConfiguration.java @@ -71,6 +71,11 @@ public class ConfigServerMvcConfiguration implements WebMvcConfigurer { @Bean public EnvironmentController environmentController(EnvironmentRepository envRepository, ConfigServerProperties server) { + return delegateController(envRepository, server); + } + + protected EnvironmentController delegateController(EnvironmentRepository envRepository, + ConfigServerProperties server) { EnvironmentController controller = new EnvironmentController(encrypted(envRepository, server), this.objectMapper); controller.setStripDocumentFromYaml(server.isStripDocumentFromYaml()); @@ -107,7 +112,7 @@ public class ConfigServerMvcConfiguration implements WebMvcConfigurer { @RefreshScope public EnvironmentController environmentController(EnvironmentRepository envRepository, ConfigServerProperties server) { - return super.environmentController(envRepository, server); + return super.delegateController(envRepository, server); } }
Avoid triggering self-invocation warning inadvertently
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ def readme(): return f.read() setup(name = 'timeago', - version = '1.0.11', + version = '1.0.12', description = 'A very simple python library, used to format datetime with `*** time ago` statement. eg: "3 hours ago".', long_description = readme(), author = 'hustcc',
Release <I>. Related to #<I> and #<I>
diff --git a/src/Client.php b/src/Client.php index <HASH>..<HASH> 100644 --- a/src/Client.php +++ b/src/Client.php @@ -83,7 +83,7 @@ class Client implements ClientInterface * @param string $resource The API resource to search for. * @param array $filters Array of search criteria to use in request. * - * @return DataWrapperInterface|null + * @return null|DataWrapper * * @throws \InvalidArgumentException Thrown if $resource is empty or not a string. */ @@ -109,7 +109,7 @@ class Client implements ClientInterface * @param string $resource The API resource to search for. * @param integer $id The id of the API resource. * - * @return DataWrapperInterface|null + * @return null|DataWrapper */ final public function get(string $resource, int $id) {
Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on <URL>
diff --git a/lib/bullet.rb b/lib/bullet.rb index <HASH>..<HASH> 100644 --- a/lib/bullet.rb +++ b/lib/bullet.rb @@ -190,17 +190,22 @@ module Bullet end def profile + return_value = nil if Bullet.enable? begin Bullet.start_request - yield + return_value = yield Bullet.perform_out_of_channel_notifications if Bullet.notification? ensure Bullet.end_request end + else + return_value = yield end + + return_value end private
Bullets' profile returns the return value of profiled code and runs the code even is bullet is disabled
diff --git a/models/CommentModel.php b/models/CommentModel.php index <HASH>..<HASH> 100644 --- a/models/CommentModel.php +++ b/models/CommentModel.php @@ -341,7 +341,8 @@ class CommentModel extends ActiveRecord ->alias('c') ->select(['c.createdBy', 'a.username']) ->joinWith('author a') - ->groupBy('c.createdBy') + ->groupBy(['c.createdBy', 'a.username']) + ->orderBy('a.username') ->asArray() ->all();
fix PostgreSQL group by clause #<I>
diff --git a/lib/daybreak/queue.rb b/lib/daybreak/queue.rb index <HASH>..<HASH> 100644 --- a/lib/daybreak/queue.rb +++ b/lib/daybreak/queue.rb @@ -6,6 +6,13 @@ module Daybreak class Queue def initialize @queue, @full, @empty = [], [], [] + # Wake up threads 10 times per second to avoid deadlocks + # since there is a race condition below + @heartbeat = Thread.new do + @full.each(&:run) + @empty.each(&:run) + sleep 0.1 + end end def <<(x) @@ -25,6 +32,7 @@ module Daybreak def next while @queue.empty? begin + # If a push happens here, the thread won't be woken up @full << Thread.current Thread.stop ensure @@ -37,6 +45,7 @@ module Daybreak def flush until @queue.empty? begin + # If a pop happens here, the thread won't be woken up @empty << Thread.current Thread.stop ensure
add heartbeat thread to mri queue
diff --git a/extended-statistics/src/test/java/org/infinispan/stats/BaseClusterTopKeyTest.java b/extended-statistics/src/test/java/org/infinispan/stats/BaseClusterTopKeyTest.java index <HASH>..<HASH> 100644 --- a/extended-statistics/src/test/java/org/infinispan/stats/BaseClusterTopKeyTest.java +++ b/extended-statistics/src/test/java/org/infinispan/stats/BaseClusterTopKeyTest.java @@ -57,6 +57,10 @@ public abstract class BaseClusterTopKeyTest extends MultipleCacheManagersTest { cache(0).put(key1, "value1"); cache(0).put(key2, "value2"); + + assertNoLocks(key1); + assertNoLocks(key2); + cache(1).put(key1, "value3"); cache(1).put(key2, "value4"); @@ -283,6 +287,12 @@ public abstract class BaseClusterTopKeyTest extends MultipleCacheManagersTest { assertTopKeyLockFailed(cache, key, failed); } + private void assertNoLocks(String key) { + for (Cache<?, ?> cache : caches()) { + assertEventuallyNotLocked(cache, key); + } + } + private PrepareCommandBlocker addPrepareBlockerIfAbsent(Cache<?, ?> cache) { List<CommandInterceptor> chain = cache.getAdvancedCache().getInterceptorChain();
ISPN-<I> DistTopKeyTest.testPut random failures * make sure that no locks are acquired before performing the next put
diff --git a/core/src/main/java/com/meltmedia/cadmium/core/history/HistoryManager.java b/core/src/main/java/com/meltmedia/cadmium/core/history/HistoryManager.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/com/meltmedia/cadmium/core/history/HistoryManager.java +++ b/core/src/main/java/com/meltmedia/cadmium/core/history/HistoryManager.java @@ -37,8 +37,16 @@ public class HistoryManager { pool = Executors.newSingleThreadExecutor(); } - + + public void logEvent(boolean maint, String openId, String comment) { + logEvent("", "", openId, "", comment, maint, false); + } + public void logEvent(String branch, String sha, String openId, String directory, String comment, boolean revertible) { + logEvent(branch, sha, openId, directory, comment, false, revertible); + } + + public void logEvent(String branch, String sha, String openId, String directory, String comment, boolean maint, boolean revertible) { HistoryEntry lastEntry = history.size() > 0 ? history.get(0) : null; HistoryEntry newEntry = new HistoryEntry(); newEntry.setTimestamp(new Date());
Added maintenance special logEvent Method
diff --git a/tests/test_advanced.py b/tests/test_advanced.py index <HASH>..<HASH> 100644 --- a/tests/test_advanced.py +++ b/tests/test_advanced.py @@ -10,4 +10,4 @@ def test_code_with_tricky_content(): assert md('<code>></code>') == "`>`" assert md('<code>/home/</code><b>username</b>') == "`/home/`**username**" assert md('First line <code>blah blah<br />blah blah</code> second line') \ - == "First line `blah blah \nblah blah` second line" + == "First line `blah blah \nblah blah` second line"
Formatting tweak Change indent of continuation line; squashes a flake8 warning.
diff --git a/api/api.go b/api/api.go index <HASH>..<HASH> 100644 --- a/api/api.go +++ b/api/api.go @@ -67,8 +67,12 @@ const ( // the VolumeSpec.force_unsupported_fs_type. When set to true it asks // the driver to use an unsupported value of VolumeSpec.format if possible SpecForceUnsupportedFsType = "force_unsupported_fs_type" - SpecNodiscard = "nodiscard" - StoragePolicy = "storagepolicy" + // SpecMatchSrcVolProvision defaults to false. Applicable to cloudbackup restores only. + // If set to "true", cloudbackup restore volume gets provisioned on same pools as + // backup, allowing for inplace restore after. + SpecMatchSrcVolProvision = "match_src_vol_provision" + SpecNodiscard = "nodiscard" + StoragePolicy = "storagepolicy" ) // OptionKey specifies a set of recognized query params.
New label to support source volume based provision (#<I>)
diff --git a/docs/source/conf.py b/docs/source/conf.py index <HASH>..<HASH> 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -44,7 +44,6 @@ extensions = [ "sphinx.ext.ifconfig", "sphinx.ext.viewcode", "sphinx.ext.napoleon", - 'IPython.sphinxext.ipython_console_highlighting', # see https://github.com/spatialaudio/nbsphinx/issues/24 "nbsphinx" # ipynb autodocs ]
Removed ipython extension from docs
diff --git a/webapps/ui/cockpit/plugins/base/app/views/dashboard/processes.js b/webapps/ui/cockpit/plugins/base/app/views/dashboard/processes.js index <HASH>..<HASH> 100644 --- a/webapps/ui/cockpit/plugins/base/app/views/dashboard/processes.js +++ b/webapps/ui/cockpit/plugins/base/app/views/dashboard/processes.js @@ -61,7 +61,7 @@ function ( 'incident', 'incidents' ], - link: '' + link: '#/processes?targetPlugin=search-process-instances&searchQuery=%5B%7B%22type%22:%22PIwithIncidents%22,%22operator%22:%22eq%22,%22value%22:%22%22,%22name%22:%22%22%7D%5D' } };
improve(cockpit-dashboard): add link to processes with incidents Related to CAM-<I>
diff --git a/phantom-driver.js b/phantom-driver.js index <HASH>..<HASH> 100644 --- a/phantom-driver.js +++ b/phantom-driver.js @@ -179,8 +179,9 @@ RunAllAutoTests(function(num_failing, num_passing) { if (num_failing !== 0) { console.log('FAIL'); phantom.exit(); + } else { + console.log('PASS'); } - console.log('PASS'); phantom.exit(); // This is not yet reliable enough to be useful:
Only print PASS when failed test count == 0. Or is that === 0?
diff --git a/test/models_sanity_test.rb b/test/models_sanity_test.rb index <HASH>..<HASH> 100644 --- a/test/models_sanity_test.rb +++ b/test/models_sanity_test.rb @@ -10,10 +10,12 @@ class ModelsSanityTest < Test::Unit::TestCase model_files = Dir[File.join(models_directory, '**', '*')] model_files.each do |model_file| filename = File.basename(model_file, File.extname(model_file)) - model_class = ActiveSupport::Inflector.constantize("Podio::" + filename.classify) + model_class = ActiveSupport::Inflector.constantize("Podio::" + filename.classify) rescue nil - test "should instansiate #{model_class.name}" do - assert_nothing_raised { model_class.new } + if model_class + test "should instansiate #{model_class.name}" do + assert_nothing_raised { model_class.new } + end end end end \ No newline at end of file
Dont test models ActiveSupport fails to classify correctly
diff --git a/FlowCal/io.py b/FlowCal/io.py index <HASH>..<HASH> 100644 --- a/FlowCal/io.py +++ b/FlowCal/io.py @@ -1527,8 +1527,16 @@ class FCSData(np.ndarray): detector_voltage = tuple(detector_voltage) # Amplifier gain: Stored in the keyword parameter $PnG for channel n. - amplifier_gain = [fcs_file.text.get('$P{}G'.format(i)) - for i in range(1, num_channels + 1)] + # The FlowJo Collector's Edition software saves the amplifier gain in + # keyword parameters CytekP01G, CytekP02G, CytekP03G, ... for channels + # 1, 2, 3, ... + if 'CREATOR' in fcs_file.text and \ + 'FlowJoCollectorsEdition' in fcs_file.text.get('CREATOR'): + amplifier_gain = [fcs_file.text.get('CytekP{:02d}G'.format(i)) + for i in range(1, num_channels + 1)] + else: + amplifier_gain = [fcs_file.text.get('$P{}G'.format(i)) + for i in range(1, num_channels + 1)] amplifier_gain = [float(agi) if agi is not None else None for agi in amplifier_gain] amplifier_gain = tuple(amplifier_gain)
Added exception for reading linear amplifier gain from FlowJo FCS files. See #<I>.
diff --git a/spec/support/silence_output.rb b/spec/support/silence_output.rb index <HASH>..<HASH> 100644 --- a/spec/support/silence_output.rb +++ b/spec/support/silence_output.rb @@ -9,6 +9,10 @@ RSpec.shared_context 'silence output', :silence_output do true end + def respond_to_missing?(*) + true + end + def method_missing(*) end end
Fix Style/MissingRespondToMissing offense
diff --git a/spec/support/actor_examples.rb b/spec/support/actor_examples.rb index <HASH>..<HASH> 100644 --- a/spec/support/actor_examples.rb +++ b/spec/support/actor_examples.rb @@ -550,10 +550,8 @@ shared_context "a Celluloid Actor" do |included_module| it "knows which tasks are waiting on calls to other actors" do actor = @klass.new - # an alias for Celluloid::Actor#waiting_tasks tasks = actor.tasks tasks.size.should == 1 - tasks.first.status.should == :running future = actor.future(:blocking_call) sleep 0.1 # hax! waiting for ^^^ call to actually start
Fix broken spec This spec specified incorrect behavior before. The offending examples have been removed.
diff --git a/src/sap.m/src/sap/m/VariantManagement.js b/src/sap.m/src/sap/m/VariantManagement.js index <HASH>..<HASH> 100644 --- a/src/sap.m/src/sap/m/VariantManagement.js +++ b/src/sap.m/src/sap/m/VariantManagement.js @@ -1044,6 +1044,11 @@ sap.ui.define([ } }; + VariantManagement.prototype.setModified = function(bValue) { + this.setProperty("modified", bValue); + return this; + }; + VariantManagement.prototype._openVariantList = function() { var oItem; @@ -1072,6 +1077,11 @@ sap.ui.define([ } } + var oSelectedItem = this.oVariantList.getSelectedItem(); + if (oSelectedItem) { + this.oVariantPopOver.setInitialFocus(oSelectedItem.getId()); + } + var oControlRef = this._oCtrlRef ? this._oCtrlRef : this.oVariantLayout; this._oCtrlRef = null; this.oVariantPopOver.openBy(oControlRef);
[INTERNAL] m.VariantManagement: scroll to the selected item in 'My Views' Change-Id: Ic3fa<I>ec<I>b<I>f<I>e<I>c<I>a6a8b
diff --git a/tests/integration/BeanstalkTest.php b/tests/integration/BeanstalkTest.php index <HASH>..<HASH> 100644 --- a/tests/integration/BeanstalkTest.php +++ b/tests/integration/BeanstalkTest.php @@ -1,7 +1,10 @@ <?php - +/** + * Class BeanstalkTest + * @coversNothing + */ class BeanstalkTest extends PHPUnit_Framework_TestCase { /** @var \Beanie\Beanie */ @@ -142,5 +145,6 @@ class BeanstalkTest extends PHPUnit_Framework_TestCase $jobStats = $job->stats(); $this->assertEquals($jobStats['state'], 'ready'); + $job->delete(); } }
Mark beanstalkd integration test with @coversNothing, make reproducible
diff --git a/trunk/JLanguageTool/src/java/org/languagetool/language/Russian.java b/trunk/JLanguageTool/src/java/org/languagetool/language/Russian.java index <HASH>..<HASH> 100644 --- a/trunk/JLanguageTool/src/java/org/languagetool/language/Russian.java +++ b/trunk/JLanguageTool/src/java/org/languagetool/language/Russian.java @@ -117,7 +117,7 @@ public class Russian extends Language { DoublePunctuationRule.class, UppercaseSentenceStartRule.class, HunspellRule.class, -// WordRepeatRule.class, + WordRepeatRule.class, WhitespaceRule.class, // specific to Russian : RussianUnpairedBracketsRule.class,
[ru] enable general word repeat rule again
diff --git a/spec/type/polymorphic_type_spec.rb b/spec/type/polymorphic_type_spec.rb index <HASH>..<HASH> 100644 --- a/spec/type/polymorphic_type_spec.rb +++ b/spec/type/polymorphic_type_spec.rb @@ -126,8 +126,11 @@ RSpec.describe AttrJson::Type::PolymorphicModel do describe "assigning via json_attributes" do it "allows assigning via raw hash object" do instance.json_attributes = { - "many_poly"=>[{"str"=>"str", "int"=>12}, {"str"=>"str", "bool"=>true}], - "one_poly"=>{"str"=>"str", "int"=>12}, + "one_poly": {"int": 12, "str": "str", "type": "Model1"}, + "many_poly": [ + {"int": 12, "str": "str", "type": "Model1"}, + {"str": "str", "bool": true, "type": "Model2"} + ] } instance.save # TODO: assert assignment worked correctly
make sure to pass in the "type" field on the hash
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ def readme(): return f.read() setup(name='zk_shell', - version='0.1', + version='0.2', description='A Python - Kazoo based - shell for ZooKeeper', long_description=readme(), classifiers=[
Version bump since prev package didn't include data files
diff --git a/src/main/java/net/e175/klaus/solarpositioning/PSA.java b/src/main/java/net/e175/klaus/solarpositioning/PSA.java index <HASH>..<HASH> 100644 --- a/src/main/java/net/e175/klaus/solarpositioning/PSA.java +++ b/src/main/java/net/e175/klaus/solarpositioning/PSA.java @@ -17,6 +17,8 @@ import java.util.TimeZone; * minutes of arc for the period 1999–2015." * * @author Klaus A. Brunner + * + * @deprecated PSA shouldn't be used after the year 2015. * */ public final class PSA {
add "soft" deprecation, as PSA's time is running out
diff --git a/src/ol/events/Target.js b/src/ol/events/Target.js index <HASH>..<HASH> 100644 --- a/src/ol/events/Target.js +++ b/src/ol/events/Target.js @@ -40,7 +40,7 @@ class Target extends Disposable { * @private * @type {*} */ - this.target_ = opt_target; + this.eventTarget_ = opt_target; /** * @private @@ -96,7 +96,7 @@ class Target extends Disposable { const evt = typeof event === 'string' ? new Event(event) : event; const type = evt.type; if (!evt.target) { - evt.target = this.target_ || this; + evt.target = this.eventTarget_ || this; } const listeners = this.listeners_[type]; let propagate;
Fix property name collision target_ with Control * As described in #<I>, Control uses the property target_ for a custom parent HTMLElement, leading to Events on the Control being dispatched with that as the target and not the Control itself. * Solved by renaming the target_ property on Target to eventTarget_
diff --git a/kafka/consumer/new.py b/kafka/consumer/new.py index <HASH>..<HASH> 100644 --- a/kafka/consumer/new.py +++ b/kafka/consumer/new.py @@ -172,7 +172,7 @@ class KafkaConsumer(object): self._msg_iter = self.fetch_messages() # Check for auto-commit - if self.should_auto_commit(): + if self._should_auto_commit(): self.commit() try: @@ -220,7 +220,7 @@ class KafkaConsumer(object): self._offsets.task_done[topic_partition] = offset - def should_auto_commit(self): + def _should_auto_commit(self): if not self._config['auto_commit_enable']: return False
_should_auto_commit is private
diff --git a/src/LockServiceProvider.php b/src/LockServiceProvider.php index <HASH>..<HASH> 100644 --- a/src/LockServiceProvider.php +++ b/src/LockServiceProvider.php @@ -13,8 +13,6 @@ class LockServiceProvider extends ServiceProvider */ public function boot() { - $this->package('beatswitch/lock-laravel', 'lock-laravel', __DIR__); - // Here we should execute the permissions callback from the config file so all // the roles and aliases get registered and if we're using the array driver, // all of our permissions get set beforehand. @@ -33,6 +31,8 @@ class LockServiceProvider extends ServiceProvider */ public function register() { + $this->package('beatswitch/lock-laravel', 'lock-laravel', __DIR__); + $this->bootstrapManager(); $this->bootstrapAuthedUserLock(); }
Register package config before bootstrap Fixes a bug where the default driver couldn't be set
diff --git a/tlsconfig/config.go b/tlsconfig/config.go index <HASH>..<HASH> 100644 --- a/tlsconfig/config.go +++ b/tlsconfig/config.go @@ -46,8 +46,6 @@ var acceptedCBCCiphers = []uint16{ tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, - tls.TLS_RSA_WITH_AES_256_CBC_SHA, - tls.TLS_RSA_WITH_AES_128_CBC_SHA, } // DefaultServerAcceptedCiphers should be uses by code which already has a crypto/tls
Remove TLS_RSA ciphers from the default accepted ciphers - weak & triggers scanning warnings
diff --git a/lib/things/task.rb b/lib/things/task.rb index <HASH>..<HASH> 100644 --- a/lib/things/task.rb +++ b/lib/things/task.rb @@ -101,6 +101,10 @@ module Things node.inner_text.to_f.to_cocoa_date end + def due? + due_date && Time.now > due_date + end + def bullet completed? ? "✓" : canceled? ? "×" : "-" end diff --git a/test/test_task.rb b/test/test_task.rb index <HASH>..<HASH> 100644 --- a/test/test_task.rb +++ b/test/test_task.rb @@ -132,6 +132,19 @@ class TaskTest < Test::Unit::TestCase assert_equal "2009-08-01", task.due_date.strftime("%Y-%m-%d") end + test "should know that the task is due" do + assert task_by_id("z186").due? + end + + test "should know that the task is not due" do + Time.stubs(:now).returns(Time.parse('2009-07-31')) + assert !task_by_id("z186").due? + end + + test "should not be due for a task without due date" do + assert !find_task(:basic).due? + end + test "each state should have a bullet" do assert_equal "✓", task_by_id("z173").bullet # complete assert_equal "×", task_by_id("z189").bullet # canceled
added Task#due? to check if a task is due yet
diff --git a/app/controllers/component-tree.js b/app/controllers/component-tree.js index <HASH>..<HASH> 100644 --- a/app/controllers/component-tree.js +++ b/app/controllers/component-tree.js @@ -170,10 +170,19 @@ export default Controller.extend({ scrollTreeToItem(objectId) { let selectedItemIndex = this.get('displayedList').findIndex(item => item.view.objectId === objectId); - if (selectedItemIndex) { - const averageItemHeight = 22; + if (!selectedItemIndex) { + return; + } + + const averageItemHeight = 25; + const targetScrollTop = averageItemHeight * selectedItemIndex; + const componentTreeEl = document.querySelector('.js-component-tree'); + const height = componentTreeEl.offsetHeight; + + // Only scroll to item if not already in view + if (targetScrollTop < componentTreeEl.scrollTop || targetScrollTop > componentTreeEl.scrollTop + height) { schedule('afterRender', () => { - document.querySelector('.js-component-tree').scrollTop = averageItemHeight * selectedItemIndex; + componentTreeEl.scrollTop = targetScrollTop - (height / 2); }); } },
Only scroll to an element when it's out of view (#<I>) Avoid scrolling to visible elements and match the behavior of the Elements panel.
diff --git a/src/headers.js b/src/headers.js index <HASH>..<HASH> 100644 --- a/src/headers.js +++ b/src/headers.js @@ -34,7 +34,7 @@ export default class Headers { * @return Void */ constructor(headers) { - this[MAP] = {}; + this[MAP] = Object.create(null); this[FOLLOW_SPEC] = Headers.FOLLOW_SPEC; // Headers @@ -100,11 +100,11 @@ export default class Headers { * @return Void */ forEach(callback, thisArg) { - Object.getOwnPropertyNames(this[MAP]).forEach(name => { + for (let name in this[MAP]) { this[MAP][name].forEach(value => { callback.call(thisArg, value, name, this); }); - }); + } } /** @@ -141,7 +141,7 @@ export default class Headers { * @return Boolean */ has(name) { - return this[MAP].hasOwnProperty(sanitizeName(name)); + return !!this[MAP][sanitizeName(name)]; } /**
Use Object.create(null) for Headers' internal map Suggested by @jimmywarting.
diff --git a/pychromecast.py b/pychromecast.py index <HASH>..<HASH> 100644 --- a/pychromecast.py +++ b/pychromecast.py @@ -21,7 +21,7 @@ APP_ID_NETFLIX = "Netflix" APP_ID_TICTACTOE = "TicTacToe" APP_ID_GOOGLE_MUSIC = "GoogleMusic" APP_ID_PLAY_MOVIES = "PlayMovies" - +APP_ID_HULU_PLUS = "Hulu_Plus" def start_app(host, app_id, data=None):
Added app_id for Hulu Plus
diff --git a/daemon/src/main/java/io/minecloud/daemon/StatisticsWatcher.java b/daemon/src/main/java/io/minecloud/daemon/StatisticsWatcher.java index <HASH>..<HASH> 100644 --- a/daemon/src/main/java/io/minecloud/daemon/StatisticsWatcher.java +++ b/daemon/src/main/java/io/minecloud/daemon/StatisticsWatcher.java @@ -52,7 +52,7 @@ public class StatisticsWatcher extends Thread { if (!file.isDirectory()) continue; - File currentFreq = new File(file, "cpufreq/cpuinfo_cur_freq"); + File currentFreq = new File(file, "cpufreq/scaling_cur_freq"); if (!currentFreq.exists()) continue;
Use of scaling_cur_freq instead of cpuinfo_cur_freq It's just so much better in many ways.
diff --git a/core/server/master/src/main/java/alluxio/master/lineage/recompute/RecomputePlanner.java b/core/server/master/src/main/java/alluxio/master/lineage/recompute/RecomputePlanner.java index <HASH>..<HASH> 100644 --- a/core/server/master/src/main/java/alluxio/master/lineage/recompute/RecomputePlanner.java +++ b/core/server/master/src/main/java/alluxio/master/lineage/recompute/RecomputePlanner.java @@ -46,8 +46,8 @@ public class RecomputePlanner { * @param fileSystemMaster the file system master */ public RecomputePlanner(LineageStore lineageStore, FileSystemMaster fileSystemMaster) { - mLineageStore = Preconditions.checkNotNull(lineageStore); - mFileSystemMaster = Preconditions.checkNotNull(fileSystemMaster); + mLineageStore = Preconditions.checkNotNull(lineageStore, "lineageStore"); + mFileSystemMaster = Preconditions.checkNotNull(fileSystemMaster, "fileSystemMaster"); } /**
Supply variable name for Precondition.checkNotNull of RecomputePlanner.java
diff --git a/packages/ruby/test/test.js b/packages/ruby/test/test.js index <HASH>..<HASH> 100644 --- a/packages/ruby/test/test.js +++ b/packages/ruby/test/test.js @@ -16,8 +16,16 @@ const testsThatFailToBuild = new Map([ ], ]); +const testsThatShouldBeSkipped = ['06-rails']; + // eslint-disable-next-line no-restricted-syntax for (const fixture of fs.readdirSync(fixturesPath)) { + const shouldSkip = testsThatShouldBeSkipped.includes(fixture); + if (shouldSkip) { + console.log(`Skipping: ${fixture}`); + continue; + } + const errMsg = testsThatFailToBuild.get(fixture); if (errMsg) { // eslint-disable-next-line no-loop-func
[tests] skip ruby test for now (#<I>)
diff --git a/lib/escobar/heroku/pipeline.rb b/lib/escobar/heroku/pipeline.rb index <HASH>..<HASH> 100644 --- a/lib/escobar/heroku/pipeline.rb +++ b/lib/escobar/heroku/pipeline.rb @@ -69,11 +69,11 @@ module Escobar end def required_commit_contexts(forced = false) - @required_commit_contexts ||= fetch_required_commit_contexts(forced) + return [] if forced + @required_commit_contexts ||= fetch_required_commit_contexts end - def fetch_required_commit_contexts(forced = false) - return [] if forced + def fetch_required_commit_contexts github_client.required_contexts.map do |context| if context == "continuous-integration/travis-ci" context = "continuous-integration/travis-ci/push"
Return early outside of cache if forced
diff --git a/command/build/command.go b/command/build/command.go index <HASH>..<HASH> 100644 --- a/command/build/command.go +++ b/command/build/command.go @@ -112,6 +112,10 @@ func (c Command) Run(env packer.Environment, args []string) int { builds = append(builds, build) } + if cfgDebug { + env.Ui().Say("Debug mode enabled. Builds will not be parallelized.") + } + // Compile all the UIs for the builds colors := [5]packer.UiColor{ packer.UiColorGreen,
command/build: Say we're in debug mode if we're in it
diff --git a/test/form/samples/namespace-optimization-computed-string/main.js b/test/form/samples/namespace-optimization-computed-string/main.js index <HASH>..<HASH> 100644 --- a/test/form/samples/namespace-optimization-computed-string/main.js +++ b/test/form/samples/namespace-optimization-computed-string/main.js @@ -1,3 +1,4 @@ import * as foo from './foo.js'; foo['bar']['quux']['a'](); +foo['bar']['quux']['b'](); diff --git a/test/form/samples/namespace-optimization-computed-string/quux.js b/test/form/samples/namespace-optimization-computed-string/quux.js index <HASH>..<HASH> 100644 --- a/test/form/samples/namespace-optimization-computed-string/quux.js +++ b/test/form/samples/namespace-optimization-computed-string/quux.js @@ -1,3 +1,5 @@ export function a () { console.log('effect'); } + +export function b () {}
Improve test to show that tree-shaking now works with computed namespace props.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,6 @@ setup(name='mmpy', package_dir={'mmpy':'src'}, provides=['mmpy'], license='ISCL', - requires=['simplejson'], install_requires=['simplejson'], classifiers=['Development Status :: 3 - Alpha', 'License :: OSI Approved :: ISC License (ISCL)',
remove the requires= keyword per @mattjeffery's suggestion
diff --git a/test/datepicker_test.js b/test/datepicker_test.js index <HASH>..<HASH> 100644 --- a/test/datepicker_test.js +++ b/test/datepicker_test.js @@ -98,4 +98,17 @@ describe("DatePicker", () => { TestUtils.Simulate.click(clearButton); expect(cleared).to.be.true; }); + + it("should mount and unmount properly", done => { + var TestComponent = React.createClass({ + getInitialState() { + return { mounted: true }; + }, + render() { + return this.state.mounted ? <DatePicker /> : null; + } + }); + var element = TestUtils.renderIntoDocument(<TestComponent />); + element.setState({ mounted: false }, done); + }); });
Add failing unit test for unmount error
diff --git a/examples/cmd.php b/examples/cmd.php index <HASH>..<HASH> 100644 --- a/examples/cmd.php +++ b/examples/cmd.php @@ -34,6 +34,7 @@ args optional arguments ], 'cmd:date' => 'Displays the current date', 'cmd:cal' => 'Displays the calendar of current month', + 'cmd:dump' => 'Dumps the help array', ]; parent::__construct(); @@ -62,6 +63,11 @@ args optional arguments $cmd->execute('cal'); $this->writeln($cmd->output()); } + + function cmd_dump() + { + $this->_dump($this->help); + } } $c = new TestCommand;
added dump example into example/cmd.php
diff --git a/examples/plot_loo_pit_ecdf.py b/examples/plot_loo_pit_ecdf.py index <HASH>..<HASH> 100644 --- a/examples/plot_loo_pit_ecdf.py +++ b/examples/plot_loo_pit_ecdf.py @@ -1,6 +1,6 @@ """ LOO-PIT ECDF Plot -========= +================= _thumb: .5, .7 """ diff --git a/examples/plot_loo_pit_overlay.py b/examples/plot_loo_pit_overlay.py index <HASH>..<HASH> 100644 --- a/examples/plot_loo_pit_overlay.py +++ b/examples/plot_loo_pit_overlay.py @@ -1,6 +1,6 @@ """ LOO-PIT Overlay Plot -========= +==================== _thumb: .5, .7 """
fix underline (#<I>)
diff --git a/lib/turbot/command.rb b/lib/turbot/command.rb index <HASH>..<HASH> 100644 --- a/lib/turbot/command.rb +++ b/lib/turbot/command.rb @@ -119,20 +119,6 @@ module Turbot require 'rest_client' raise(error) end - rescue RestClient::Unauthorized - display 'Authentication failure' - if ENV['TURBOT_API_KEY'] - exit(1) - else - run 'login' - retry - end - rescue RestClient::ResourceNotFound => e - error extract_error(e.http_body) { e.http_body =~ /^([\w\s]+ not found).?$/ ? $1 : 'Resource not found' } - rescue RestClient::PaymentRequired, RestClient::RequestFailed => e # 402, 502 - error extract_error(e.http_body) - rescue RestClient::RequestTimeout - error 'API request timed out. Please try again, or contact bots@opencorporates.com if this issue persists.' rescue SocketError => e error 'Unable to connect to Turbot API, please check internet connectivity and try again.' rescue OptionParser::ParseError
Remove unreachable code (all API calls are handled in bots.rb)
diff --git a/news-bundle/src/Resources/contao/modules/ModuleNews.php b/news-bundle/src/Resources/contao/modules/ModuleNews.php index <HASH>..<HASH> 100644 --- a/news-bundle/src/Resources/contao/modules/ModuleNews.php +++ b/news-bundle/src/Resources/contao/modules/ModuleNews.php @@ -126,10 +126,12 @@ abstract class ModuleNews extends \Module // Compile the news text else { - $objTemplate->text = function () use ($objArticle) + $id = $objArticle->id; + + $objTemplate->text = function () use ($id) { $strText = ''; - $objElement = \ContentModel::findPublishedByPidAndTable($objArticle->id, 'tl_news'); + $objElement = \ContentModel::findPublishedByPidAndTable($id, 'tl_news'); if ($objElement !== null) {
[News] Do not pass the database object to the closure generating the content.
diff --git a/tests/JMS/Tests/SerializerServiceProvider/SerializerServiceProviderTest.php b/tests/JMS/Tests/SerializerServiceProvider/SerializerServiceProviderTest.php index <HASH>..<HASH> 100644 --- a/tests/JMS/Tests/SerializerServiceProvider/SerializerServiceProviderTest.php +++ b/tests/JMS/Tests/SerializerServiceProvider/SerializerServiceProviderTest.php @@ -89,12 +89,12 @@ XML; foreach($files as $file) { if ($file->isDir()){ - rmdir($file->getRealPath()); + @rmdir($file->getRealPath()); } else { - unlink($file->getRealPath()); + @unlink($file->getRealPath()); } } - rmdir($directory); + @rmdir($directory); } }
Supress errors when deleting cache files.
diff --git a/lib/aruba/api/core.rb b/lib/aruba/api/core.rb index <HASH>..<HASH> 100644 --- a/lib/aruba/api/core.rb +++ b/lib/aruba/api/core.rb @@ -140,7 +140,10 @@ module Aruba Aruba::Platform.chdir(path) { Aruba::Platform.expand_path(file_name, dir_string) } end else - Aruba::Platform.chdir(File.join(aruba.root_directory, aruba.current_directory)) { Aruba::Platform.expand_path(file_name, dir_string) } + directory = File.join(aruba.root_directory, aruba.current_directory) + + Aruba::Platform.mkdir directory unless File.exist? directory + Aruba::Platform.chdir(directory) { Aruba::Platform.expand_path(file_name, dir_string) } end end # rubocop:enable Metrics/MethodLength
Create current directory if does not exist
diff --git a/context.js b/context.js index <HASH>..<HASH> 100644 --- a/context.js +++ b/context.js @@ -19,13 +19,14 @@ function Namespace (name) { this.active = Object.create(null); } +function getNamespace(name) { return namespaces[name]; } + // "class" method Namespace.get = getNamespace; -function getNamespace(name) { return namespaces[name]; } - Namespace.prototype.set = function (key, value) { - return this.active[key] = value; + this.active[key] = value; + return value; }; Namespace.prototype.get = function (key) {
Make jshint happy.
diff --git a/src/utils/utils.js b/src/utils/utils.js index <HASH>..<HASH> 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -63,7 +63,7 @@ Utils.pathForURL = function (url) { }; Utils.isRelativeURL = function (url) { - return !(url.search(/^(http|https|data|blob):\/\//) > -1 || url.substr(0, 2) === '//'); + return !(url.search(/^(http|https|data|blob):/) > -1 || url.substr(0, 2) === '//'); }; Utils.extensionForURL = function (url) {
fix bug where blob URLs were treated as relative URLs
diff --git a/src/formats/geojson/GeoJSONParser.js b/src/formats/geojson/GeoJSONParser.js index <HASH>..<HASH> 100644 --- a/src/formats/geojson/GeoJSONParser.js +++ b/src/formats/geojson/GeoJSONParser.js @@ -1100,13 +1100,16 @@ define(['../../error/ArgumentError', GeoJSONParser.prototype.setProj4jsAliases = function () { Proj4.defs([ [ + "urn:ogc:def:crs:EPSG::4326", + Proj4.defs('EPSG:4326') + ], + [ 'urn:ogc:def:crs:OGC:1.3:CRS84', Proj4.defs('EPSG:4326') ], [ 'urn:ogc:def:crs:EPSG::3857', Proj4.defs('EPSG:3857') - ] ]); };
Add urn:ogc:def:crs:EPSG::<I> as alias for EPSG:<I> in GeoJSONParser (#<I>)
diff --git a/src/models/Client.php b/src/models/Client.php index <HASH>..<HASH> 100644 --- a/src/models/Client.php +++ b/src/models/Client.php @@ -11,6 +11,7 @@ namespace hipanel\modules\client\models; use hipanel\helpers\StringHelper; +use hipanel\models\Ref; use hipanel\modules\client\forms\EmployeeForm; use hipanel\modules\client\models\query\ClientQuery; use hipanel\modules\domain\models\Domain; @@ -29,7 +30,7 @@ class Client extends \hipanel\base\Model { use \hipanel\base\ModelTrait; - const TYPE_SELLER = 'seller'; + const TYPE_SELLER = 'reseller'; const TYPE_ADMIN = 'admin'; const TYPE_MANAGER = 'manager'; const TYPE_CLIENT = 'client';
Fixed seller type of client to Reseller in Clinent model
diff --git a/github-release-from-changelog.js b/github-release-from-changelog.js index <HASH>..<HASH> 100755 --- a/github-release-from-changelog.js +++ b/github-release-from-changelog.js @@ -115,7 +115,7 @@ var changelogLines = changelog.replace(/\r\n/g, "\n").split("\n"); // # 1.0 // ## v1.0 // ## [v1.0 -var versionStartStringRe = "##? \\[?v?"; +var versionStartStringRe = "^##? \\[?v?"; var versionStartRe = new RegExp(versionStartStringRe); var versionRe = new RegExp(versionStartStringRe + version.replace(/\./, ".")); var footerLinkRe = new RegExp("$\\[");
Fix a specific bug if a line contain a version similar to supported markdown title
diff --git a/extensions/tags/js/src/admin/components/EditTagModal.js b/extensions/tags/js/src/admin/components/EditTagModal.js index <HASH>..<HASH> 100644 --- a/extensions/tags/js/src/admin/components/EditTagModal.js +++ b/extensions/tags/js/src/admin/components/EditTagModal.js @@ -74,9 +74,9 @@ export default class EditTagModal extends Modal { </div>, 20); items.add('icon', <div className="Form-group"> - <label>{app.translator.trans('core.admin.edit_group.icon_label')}</label> + <label>{app.translator.trans('flarum-tags.admin.edit_tag.icon_label')}</label> <div className="helpText"> - {app.translator.trans('core.admin.edit_group.icon_text', {a: <a href="https://fontawesome.com/icons?m=free" tabindex="-1"/>})} + {app.translator.trans('flarum-tags.admin.edit_tag.icon_text', {a: <a href="https://fontawesome.com/icons?m=free" tabindex="-1"/>})} </div> <input className="FormControl" placeholder="fas fa-bolt" value={this.icon()} oninput={m.withAttr('value', this.icon)}/> </div>, 10);
Updated edit tag modal to use appropriate lang-english keys
diff --git a/src/de/lmu/ifi/dbs/elki/database/ids/integer/DoubleIntegerDBIDPair.java b/src/de/lmu/ifi/dbs/elki/database/ids/integer/DoubleIntegerDBIDPair.java index <HASH>..<HASH> 100644 --- a/src/de/lmu/ifi/dbs/elki/database/ids/integer/DoubleIntegerDBIDPair.java +++ b/src/de/lmu/ifi/dbs/elki/database/ids/integer/DoubleIntegerDBIDPair.java @@ -23,7 +23,6 @@ package de.lmu.ifi.dbs.elki.database.ids.integer; along with this program. If not, see <http://www.gnu.org/licenses/>. */ -import de.lmu.ifi.dbs.elki.database.ids.DBID; import de.lmu.ifi.dbs.elki.database.ids.DoubleDBIDPair; /** @@ -68,16 +67,4 @@ class DoubleIntegerDBIDPair implements DoubleDBIDPair, IntegerDBIDRef { public double doubleValue() { return value; } - - @Override - @Deprecated - public Double getFirst() { - return new Double(value); - } - - @Override - @Deprecated - public DBID getSecond() { - return new IntegerDBID(id); - } }
Delete PairInterface interface leftovers.
diff --git a/mithril.js b/mithril.js index <HASH>..<HASH> 100644 --- a/mithril.js +++ b/mithril.js @@ -1007,6 +1007,10 @@ } function copyStyleAttrs(node, dataAttr, cachedAttr) { + if (cachedAttr === dataAttr) { + node.style = "" + cachedAttr = {} + } for (var rule in dataAttr) { if (hasOwn.call(dataAttr, rule)) { if (cachedAttr == null || cachedAttr[rule] !== dataAttr[rule]) { @@ -1091,7 +1095,7 @@ tag, namespace ) { - if (!(attrName in cachedAttrs) || (cachedAttr !== dataAttr) || ($document.activeElement === node)) { + if (!(attrName in cachedAttrs) || (cachedAttr !== dataAttr) || typeof dataAttr === "object" || ($document.activeElement === node)) { cachedAttrs[attrName] = dataAttr try { return setSingleAttr(
update style if it's mutated object
diff --git a/tests/Small/ConfigTest.php b/tests/Small/ConfigTest.php index <HASH>..<HASH> 100644 --- a/tests/Small/ConfigTest.php +++ b/tests/Small/ConfigTest.php @@ -48,6 +48,24 @@ class ConfigTest extends TestCase /** * @test * @small + * @covers ::validateConfig + */ + public function itCanHandleIntoToBoolConversion(): void + { + $server[ConfigInterface::PARAM_DB_USER] = self::SERVER[ConfigInterface::PARAM_DB_USER]; + $server[ConfigInterface::PARAM_DB_PASS] = self::SERVER[ConfigInterface::PARAM_DB_PASS]; + $server[ConfigInterface::PARAM_DB_HOST] = self::SERVER[ConfigInterface::PARAM_DB_HOST]; + $server[ConfigInterface::PARAM_DB_NAME] = self::SERVER[ConfigInterface::PARAM_DB_NAME]; + $server[ConfigInterface::PARAM_DEVMODE] = 0; + $server[ConfigInterface::PARAM_DB_DEBUG] = 1; + $config = new Config($server); + self::assertFalse($config->get(ConfigInterface::PARAM_DEVMODE)); + self::assertTrue($config->get(ConfigInterface::PARAM_DB_DEBUG)); + } + + /** + * @test + * @small * @covers ::get */ public function getParam(): void
some tests for the int/bool conversion
diff --git a/lib/mobility/version.rb b/lib/mobility/version.rb index <HASH>..<HASH> 100644 --- a/lib/mobility/version.rb +++ b/lib/mobility/version.rb @@ -7,9 +7,9 @@ module Mobility module VERSION MAJOR = 1 - MINOR = 2 - TINY = 2 - PRE = nil + MINOR = 3 + TINY = 0 + PRE = alpha STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".") end
Bump to <I>.alpha
diff --git a/splinter/element_list.py b/splinter/element_list.py index <HASH>..<HASH> 100644 --- a/splinter/element_list.py +++ b/splinter/element_list.py @@ -2,7 +2,7 @@ class ElementDoesNotExist(Exception): pass class ElementList(list): - + def __init__(self, list): self.extend(list) @@ -11,17 +11,11 @@ class ElementList(list): return super(ElementList, self).__getitem__(index) except IndexError: raise ElementDoesNotExist('element does not exist') - + @property def first(self): - try: - return self[0] - except IndexError: - raise ElementDoesNotExist('element does not exist') - + return self[0] + @property def last(self): - try: - return self[-1] - except IndexError: - raise ElementDoesNotExist('element does not exist') + return self[-1]
refactoring exceptions element list
diff --git a/liquibase-core/src/main/java/liquibase/datatype/core/UnknownType.java b/liquibase-core/src/main/java/liquibase/datatype/core/UnknownType.java index <HASH>..<HASH> 100644 --- a/liquibase-core/src/main/java/liquibase/datatype/core/UnknownType.java +++ b/liquibase-core/src/main/java/liquibase/datatype/core/UnknownType.java @@ -26,7 +26,12 @@ public class UnknownType extends LiquibaseDataType { public DatabaseDataType toDatabaseDataType(Database database) { int dataTypeMaxParameters = database.getDataTypeMaxParameters(getName()); Object[] parameters = getParameters(); - if (database instanceof MySQLDatabase && getName().equals("TINYBLOB") || getName().equals("MEDIUMBLOB")) { + if (database instanceof MySQLDatabase && ( + getName().equals("TINYBLOB") + || getName().equals("MEDIUMBLOB") + || getName().equals("TINYTEXT") + || getName().equals("MEDIUMTEXT") + )) { parameters = new Object[0]; }
CORE-<I> Unnecessary size specifications on MEDIUMTEXT, TINYTEXT, MEDIUMBLOB, TINYBLOB from generateChangeLog
diff --git a/neo/Settings.py b/neo/Settings.py index <HASH>..<HASH> 100644 --- a/neo/Settings.py +++ b/neo/Settings.py @@ -183,7 +183,7 @@ class SettingsHolder: self.NODE_PORT = int(config['NodePort']) self.WS_PORT = config['WsPort'] self.URI_PREFIX = config['UriPrefix'] - self.ACCEPT_INCOMING_PEERS = config['AcceptIncomingPeers'] + self.ACCEPT_INCOMING_PEERS = config.get('AcceptIncomingPeers', False) self.BOOTSTRAP_FILE = config['BootstrapFile'] self.NOTIF_BOOTSTRAP_FILE = config['NotificationBootstrapFile']
Default self.ACCEPT_INCOMING_PEERS to False
diff --git a/public/js/vendor/jquery.bottomless.js b/public/js/vendor/jquery.bottomless.js index <HASH>..<HASH> 100644 --- a/public/js/vendor/jquery.bottomless.js +++ b/public/js/vendor/jquery.bottomless.js @@ -121,8 +121,8 @@ (options.success || function(data) { var $items = $.parseHTML(data); $el.append($items); - $el.data('page', page); })(data); + $el.data('page', page); stop(); $el.trigger('aposScrollLoaded'); },
Fix a very old bottomless bug: if you supply your own success function, the `page` jquery data attribute never gets set
diff --git a/bingsearch.py b/bingsearch.py index <HASH>..<HASH> 100644 --- a/bingsearch.py +++ b/bingsearch.py @@ -32,7 +32,12 @@ class BingSearch(object): url = self.QUERY_URL.format(urllib2.quote("'{}'".format(query)), limit, offset, format) r = requests.get(url, auth=("", self.api_key)) json_results = r.json() - return [Result(single_result_json) for single_result_json in json_results['d']['results']], json_results['d']['__next'] + try: + next_link = json_results['d']['__next'] + except KeyError as kE: + print "KeyError: %s" % kE + next_link = '' + return [Result(single_result_json) for single_result_json in json_results['d']['results']], next_link class Result(object): '''
__next link is sometimes not returned
diff --git a/grakn-kb/src/main/java/ai/grakn/kb/internal/concept/ThingImpl.java b/grakn-kb/src/main/java/ai/grakn/kb/internal/concept/ThingImpl.java index <HASH>..<HASH> 100644 --- a/grakn-kb/src/main/java/ai/grakn/kb/internal/concept/ThingImpl.java +++ b/grakn-kb/src/main/java/ai/grakn/kb/internal/concept/ThingImpl.java @@ -273,7 +273,7 @@ public abstract class ThingImpl<T extends Thing, V extends Type> extends Concept throw GraknTxOperationException.hasNotAllowed(this, attribute); } - EdgeElement attributeEdge = putEdge(AttributeImpl.from(attribute), Schema.EdgeLabel.ATTRIBUTE); + EdgeElement attributeEdge = addEdge(AttributeImpl.from(attribute), Schema.EdgeLabel.ATTRIBUTE); return vertex().tx().factory().buildRelation(attributeEdge, hasAttribute, hasAttributeOwner, hasAttributeValue); }
Adding resources now behave as adding relationships. I.e. duplicates are allowed (#<I>)
diff --git a/tests/CalendarTest.php b/tests/CalendarTest.php index <HASH>..<HASH> 100644 --- a/tests/CalendarTest.php +++ b/tests/CalendarTest.php @@ -30,6 +30,27 @@ class CalendarTest extends \PHPUnit_Framework_TestCase { } + public function testCalendarLastDayOfMonth() { + $u1 = new Unit(1,10,array()); + $u2 = new Unit(2,20,array()); + + $units = array($u1,$u2); + + $sd1 = new \DateTime('2016-03-31 12:12'); + $sd2 = new \DateTime('2016-03-31 13:12'); + + $e1 = new Event($sd1, $sd2, $u1, 11); + $e2 = new Event($sd1, $sd2, $u2, 22); + + $store = new SqlLiteDBStore($this->pdo, 'availability_event', SqlDBStore::BAT_STATE); + + $calendar = new Calendar($units, $store); + + $calendar->addEvents(array($e1, $e2), Event::BAT_HOURLY); + + $this->assertEquals($calendar->getStates($sd1, $sd2), array(1 => array(11 => 11), 2 => array(22 => 22))); + } + public function testCalendarAddSingleEvent2UnitsSameHours() { $u1 = new Unit(1,10,array());
Add Calendar test for last day of month
diff --git a/src/you_get/extractors/youku.py b/src/you_get/extractors/youku.py index <HASH>..<HASH> 100644 --- a/src/you_get/extractors/youku.py +++ b/src/you_get/extractors/youku.py @@ -78,7 +78,7 @@ class Youku(VideoExtractor): self.api_error_code = None self.api_error_msg = None - self.ccode = '0511' + self.ccode = '0515' # Found in http://g.alicdn.com/player/ykplayer/0.5.64/youku-player.min.js # grep -oE '"[0-9a-zA-Z+/=]{256}"' youku-player.min.js self.ckey = 'DIl58SLFxFNndSV1GFNnMQVYkx1PP5tKe1siZu/86PR1u/Wh1Ptd+WOZsHHWxysSfAOhNJpdVWsdVJNsfJ8Sxd8WKVvNfAS8aS8fAOzYARzPyPc3JvtnPHjTdKfESTdnuTW6ZPvk2pNDh4uFzotgdMEFkzQ5wZVXl2Pf1/Y6hLK0OnCNxBj3+nb0v72gZ6b0td+WOZsHHWxysSo/0y9D2K42SaB8Y/+aD2K42SaB8Y/+ahU+WOZsHcrxysooUeND'
[youku] fire in the hole!
diff --git a/Kwf/Util/Fulltext/Backend/Solr.php b/Kwf/Util/Fulltext/Backend/Solr.php index <HASH>..<HASH> 100644 --- a/Kwf/Util/Fulltext/Backend/Solr.php +++ b/Kwf/Util/Fulltext/Backend/Solr.php @@ -24,7 +24,9 @@ class Kwf_Util_Fulltext_Backend_Solr extends Kwf_Util_Fulltext_Backend_Abstract if (!isset($i[$subrootId])) { $solr = Kwf_Config::getValueArray('fulltext.solr'); $path = $solr['path']; - $path = str_replace('%subroot%', $subrootId, $path); + $subrootPart = $subrootId; + if (!$subrootPart) $subrootPart = 'root'; + $path = str_replace('%subroot%', $subrootPart, $path); $path = str_replace('%appid%', Kwf_Config::getValue('application.id'), $path); $i[$subrootId] = new Kwf_Util_Fulltext_Solr_Service($solr['host'], $solr['port'], $path); }
Change solr default path if no subdomains defined If no subdomains are defined now root is used as value for %subdomain%. So it's not needed to set solr path explicitely in every web.
diff --git a/stan.go b/stan.go index <HASH>..<HASH> 100644 --- a/stan.go +++ b/stan.go @@ -132,6 +132,8 @@ var DefaultOptions = Options{ type Option func(*Options) error // NatsURL is an Option to set the URL the client should connect to. +// The url can contain username/password semantics. e.g. nats://derek:pass@localhost:4222 +// Comma separated arrays are also supported, e.g. urlA, urlB. func NatsURL(u string) Option { return func(o *Options) error { o.NatsURL = u
[UPDATED] Doc of NatsURL [ci skip] Specify that one can pass a comma separated list of urls. Resolves #<I>
diff --git a/src/app-router.js b/src/app-router.js index <HASH>..<HASH> 100644 --- a/src/app-router.js +++ b/src/app-router.js @@ -58,8 +58,12 @@ export class AppRouter extends Router { if (!instructionCount) { this.events.publish('router:navigation:processing', { instruction }); + } else if (instructionCount === this.maxInstructionCount - 1) { + logger.error(`${instructionCount + 1} navigation instructions have been attempted without success. Restoring last known good location.`); + restorePreviousLocation(this); + return this.dequeueInstruction(instructionCount + 1); } else if (instructionCount > this.maxInstructionCount) { - throw new Error(`Maximum navigation attempts exceeded. ${this.maxInstructionCount} navigation instructions have been attempted without success. Giving up.`); + throw new Error(`Maximum navigation attempts exceeded. Giving up.`); } let context = this.createNavigationContext(instruction);
feat(router): restore previous location after exceeding max nav attempts
diff --git a/store/ttl_key_heap.go b/store/ttl_key_heap.go index <HASH>..<HASH> 100644 --- a/store/ttl_key_heap.go +++ b/store/ttl_key_heap.go @@ -59,6 +59,10 @@ func (h *ttlKeyHeap) Pop() interface{} { old := h.array n := len(old) x := old[n-1] + // Set slice element to nil, so GC can recycle the node. + // This is due to golang GC doesn't support partial recycling: + // https://github.com/golang/go/issues/9618 + old[n-1] = nil h.array = old[0 : n-1] delete(h.keyMap, x) return x
store: optimize ttlKeyHeap GC It helps to recycle nodes in heap array, whose value can be unlimited long.
diff --git a/src/Administration/Resources/app/administration/src/module/sw-settings-customer-group/page/sw-settings-customer-group-detail/index.js b/src/Administration/Resources/app/administration/src/module/sw-settings-customer-group/page/sw-settings-customer-group-detail/index.js index <HASH>..<HASH> 100644 --- a/src/Administration/Resources/app/administration/src/module/sw-settings-customer-group/page/sw-settings-customer-group-detail/index.js +++ b/src/Administration/Resources/app/administration/src/module/sw-settings-customer-group/page/sw-settings-customer-group-detail/index.js @@ -239,12 +239,12 @@ Component.register('sw-settings-customer-group-detail', { this.customerGroup = await this.createdComponent(); } catch (err) { + this.isLoading = false; + this.createNotificationError({ message: this.$tc('sw-settings-customer-group.detail.notificationErrorMessage'), }); } - - this.isLoading = false; }, }, });
NEXT-<I> - fix cannot read property of undefined error
diff --git a/storio/src/main/java/com/pushtorefresh/storio/db/StorIODb.java b/storio/src/main/java/com/pushtorefresh/storio/db/StorIODb.java index <HASH>..<HASH> 100644 --- a/storio/src/main/java/com/pushtorefresh/storio/db/StorIODb.java +++ b/storio/src/main/java/com/pushtorefresh/storio/db/StorIODb.java @@ -32,7 +32,7 @@ public abstract class StorIODb { /** * Log wrapper. */ - private final Loggi loggi = new Loggi(); + @NonNull private final Loggi loggi = new Loggi(); /** * Prepares "execute sql" operation for {@link StorIODb}
Add @NonNull annotation for Loggi
diff --git a/system/src/Grav/Console/Cli/SandboxCommand.php b/system/src/Grav/Console/Cli/SandboxCommand.php index <HASH>..<HASH> 100644 --- a/system/src/Grav/Console/Cli/SandboxCommand.php +++ b/system/src/Grav/Console/Cli/SandboxCommand.php @@ -47,7 +47,6 @@ class SandboxCommand extends ConsoleCommand * @var array */ protected $mappings = [ - '/.editorconfig' => '/.editorconfig', '/.gitignore' => '/.gitignore', '/CHANGELOG.md' => '/CHANGELOG.md', '/LICENSE.txt' => '/LICENSE.txt', @@ -59,7 +58,6 @@ class SandboxCommand extends ConsoleCommand '/system' => '/system', '/vendor' => '/vendor', '/webserver-configs' => '/webserver-configs', - '/codeception.yml' => '/codeception.yml', ]; /**
Fix #<I> Remove mappings missing if not cloned from github
diff --git a/doc.go b/doc.go index <HASH>..<HASH> 100644 --- a/doc.go +++ b/doc.go @@ -31,6 +31,7 @@ use when creating the Iterator. ro.SetFillCache(false) it := db.NewIterator(ro) defer it.Close() + it.Seek(mykey) for it = it; it.Valid(); it.Next() { munge(it.Key(), it.Value()) }
forgotten Seek in iterator pattern
diff --git a/src/MySql/Wrapper/Wrapper.php b/src/MySql/Wrapper/Wrapper.php index <HASH>..<HASH> 100644 --- a/src/MySql/Wrapper/Wrapper.php +++ b/src/MySql/Wrapper/Wrapper.php @@ -712,7 +712,12 @@ abstract class Wrapper */ private function getWrapperRoutineName($theStoredRoutineName) { - return lcfirst(preg_replace('/(_)([a-z])/e', "strtoupper('\\2')", stristr($theStoredRoutineName, '_'))); + return lcfirst(preg_replace_callback('/(_)([a-z])/', + function ($matches) + { + return strtoupper($matches[2]); + }, + stristr($theStoredRoutineName, '_'))); } //--------------------------------------------------------------------------------------------------------------------
DL-<I>: PHP 7 issue: /e modifier is no longer supported.
diff --git a/tests/explainers/test_tree.py b/tests/explainers/test_tree.py index <HASH>..<HASH> 100644 --- a/tests/explainers/test_tree.py +++ b/tests/explainers/test_tree.py @@ -265,7 +265,7 @@ def test_pyspark_regression_decision_tree(): # validate values sum to the margin prediction of the model plus expected_value test = model.transform(iris).toPandas() predictions = model.transform(iris).select("prediction").toPandas() - diffs = expected_values + shap_values.sum() - predictions + diffs = expected_values + shap_values.sum(1) - predictions["prediction"] assert np.max(np.abs(diffs)) < 1e-6, "SHAP values don't sum to model output for class0!" assert (np.abs(expected_values - predictions.mean()) < 1e-6).all(), "Bad expected_value!" spark.stop()
add support for spark decision tree regressor
diff --git a/src/message_receiver.js b/src/message_receiver.js index <HASH>..<HASH> 100644 --- a/src/message_receiver.js +++ b/src/message_receiver.js @@ -132,13 +132,12 @@ class MessageReceiver extends eventing.EventTarget { request.respond(400, 'Invalid Resource'); throw new Error('Invalid WebSocket resource received'); } + let envelope; try { const data = crypto.decryptWebsocketMessage(Buffer.from(request.body), this.signalingKey); - const envelopeProto = protobufs.Envelope.decode(data); - const envelope = protobufs.Envelope.toObject(envelopeProto); + envelope = protobufs.Envelope.toObject(protobufs.Envelope.decode(data)); envelope.timestamp = envelope.timestamp.toNumber(); - await this.handleEnvelope(envelope); } catch(e) { console.error("Error handling incoming message:", e); request.respond(500, 'Bad encrypted websocket message'); @@ -147,7 +146,11 @@ class MessageReceiver extends eventing.EventTarget { await this.dispatchEvent(ev); throw e; } - request.respond(200, 'OK'); + try { + await this.handleEnvelope(envelope); + } finally { + request.respond(200, 'OK'); + } } async handleEnvelope(envelope, reentrant) {
Restore old technique for handling new messages from websocket. Must return <I>, even if it's an error to avoid getting repeat deliveries.
diff --git a/edisgo/grid/connect.py b/edisgo/grid/connect.py index <HASH>..<HASH> 100644 --- a/edisgo/grid/connect.py +++ b/edisgo/grid/connect.py @@ -247,7 +247,7 @@ def _connect_mv_node(network, node, target_obj): node_source=adj_node1, node_target=branch_tee) line = Line(id=random.randint(10 ** 8, 10 ** 9), - length=line_length, + length=line_length / 1e3, quantity=1, kind=line_kind, type=line_type) @@ -260,7 +260,7 @@ def _connect_mv_node(network, node, target_obj): node_source=adj_node2, node_target=branch_tee) line = Line(id=random.randint(10 ** 8, 10 ** 9), - length=line_length, + length=line_length / 1e3, quantity=1, kind=line_kind, type=line_type) @@ -275,7 +275,7 @@ def _connect_mv_node(network, node, target_obj): node_source=node, node_target=branch_tee) line = Line(id=random.randint(10 ** 8, 10 ** 9), - length=line_length, + length=line_length / 1e3, quantity=1, kind=std_line_kind, type=std_line_type)
fix line length bug in MV connect (m->km)
diff --git a/lib/terminal_chess/version.rb b/lib/terminal_chess/version.rb index <HASH>..<HASH> 100644 --- a/lib/terminal_chess/version.rb +++ b/lib/terminal_chess/version.rb @@ -1,3 +1,3 @@ module TerminalChess - VERSION = "0.1.4" + VERSION = "0.2.0" end
Bump to version <I>
diff --git a/core-bundle/src/Resources/contao/library/Contao/Widget.php b/core-bundle/src/Resources/contao/library/Contao/Widget.php index <HASH>..<HASH> 100644 --- a/core-bundle/src/Resources/contao/library/Contao/Widget.php +++ b/core-bundle/src/Resources/contao/library/Contao/Widget.php @@ -967,7 +967,7 @@ abstract class Widget extends \BaseTemplate } break; - // Do not allow any characters that are usually encoded by class Input [=<>()#/]) + // Do not allow any characters that are usually encoded by class Input [#<>()\=]) case 'extnd': if (!\Validator::isExtendedAlphanumeric(html_entity_decode($varInput))) {
[Core] fix typo in Widget comment
diff --git a/server/container_create_linux.go b/server/container_create_linux.go index <HASH>..<HASH> 100644 --- a/server/container_create_linux.go +++ b/server/container_create_linux.go @@ -470,13 +470,13 @@ func (s *Server) createSandboxContainer(ctx context.Context, ctr ctrIface.Contai Destination: "/sys", Type: "sysfs", Source: "sysfs", - Options: []string{"nosuid", "noexec", "nodev", "rw"}, + Options: []string{"nosuid", "noexec", "nodev", "rw", "rslave"}, }) ctr.SpecAddMount(rspec.Mount{ Destination: "/sys/fs/cgroup", Type: "cgroup", Source: "cgroup", - Options: []string{"nosuid", "noexec", "nodev", "rw", "relatime"}, + Options: []string{"nosuid", "noexec", "nodev", "rw", "relatime", "rslave"}, }) }
server: mount cgroup with rslave even when running as privileged container, prevent cgroup mounts to be propagated to the host as it could cause errors when running with rshared and systemd inside of the container. Closes: <URL>
diff --git a/test/minitest_runner.rb b/test/minitest_runner.rb index <HASH>..<HASH> 100644 --- a/test/minitest_runner.rb +++ b/test/minitest_runner.rb @@ -26,22 +26,11 @@ module Byebug ["--name=/#{filtered_methods.join('|')}/"] end - run_with_timeout(flags) + Minitest.run(flags + $ARGV) end private - def max_running_time - 300 - end - - def run_with_timeout(flags) - Timeout.timeout(max_running_time) { Minitest.run(flags + $ARGV) } - rescue Timeout::Error - warn "Test suite timed out after #{max_running_time} seconds" - false - end - def runnables Minitest::Runnable.runnables end
Remove timeouts from test runner (#<I>) Use Ctrl-C locally, and rely on CI's handling in CI.
diff --git a/molgenis-omx-protocolviewer/src/main/java/org/molgenis/omx/study/StudyDefinitionService.java b/molgenis-omx-protocolviewer/src/main/java/org/molgenis/omx/study/StudyDefinitionService.java index <HASH>..<HASH> 100644 --- a/molgenis-omx-protocolviewer/src/main/java/org/molgenis/omx/study/StudyDefinitionService.java +++ b/molgenis-omx-protocolviewer/src/main/java/org/molgenis/omx/study/StudyDefinitionService.java @@ -2,6 +2,8 @@ package org.molgenis.omx.study; import java.util.List; +import org.springframework.scheduling.annotation.Async; + /** * Find, retrieve and persist study definitions * @@ -29,5 +31,6 @@ public interface StudyDefinitionService * * @param studyDefinition */ + @Async public void persistStudyDefinition(StudyDefinition studyDefinition); }
perform study definition persist async
diff --git a/telethon/client/chats.py b/telethon/client/chats.py index <HASH>..<HASH> 100644 --- a/telethon/client/chats.py +++ b/telethon/client/chats.py @@ -1085,18 +1085,17 @@ class ChatMethods: if isinstance(user, types.InputPeerSelf): await self(functions.channels.LeaveChannelRequest(entity)) else: - await self([ - functions.channels.EditBannedRequest( - channel=entity, - user_id=user, - banned_rights=types.ChatBannedRights(until_date=None, view_messages=True) - ), - functions.channels.EditBannedRequest( - channel=entity, - user_id=user, - banned_rights=types.ChatBannedRights(until_date=None) - ), - ], ordered=True) + await self(functions.channels.EditBannedRequest( + channel=entity, + user_id=user, + banned_rights=types.ChatBannedRights(until_date=None, view_messages=True) + )) + await asyncio.sleep(0.5) + await self(functions.channels.EditBannedRequest( + channel=entity, + user_id=user, + banned_rights=types.ChatBannedRights(until_date=None) + )) else: raise ValueError('You must pass either a channel or a chat')
Fix kick_participant in channels (#<I>) Presumably some server-side change made insta-unbanning no longer work.
diff --git a/pkg/policy/rule.go b/pkg/policy/rule.go index <HASH>..<HASH> 100644 --- a/pkg/policy/rule.go +++ b/pkg/policy/rule.go @@ -43,12 +43,21 @@ func (r *rule) validate() error { func mergeL4Port(ctx *SearchContext, r api.PortRule, p api.PortProtocol, proto string, resMap L4PolicyMap) int { fmt := p.Port + "/" + proto - if _, ok := resMap[fmt]; !ok { + v, ok := resMap[fmt] + if !ok { resMap[fmt] = CreateL4Filter(r, p, proto) return 1 } - - return 0 + l4Filter := CreateL4Filter(r, p, proto) + if l4Filter.L7Parser != "" { + v.L7Parser = l4Filter.L7Parser + } + if l4Filter.L7RedirectPort != 0 { + v.L7RedirectPort = l4Filter.L7RedirectPort + } + v.L7Rules = append(v.L7Rules, l4Filter.L7Rules...) + resMap[fmt] = v + return 1 } func mergeL4(ctx *SearchContext, dir string, portRules []api.PortRule, resMap L4PolicyMap) int {
policy: adding a merger for l7 rules This commit fixes the order of policies when they are inserted. If a user adds policies with the same selector and a l7 rule, the l7 rule won't be merged causing the policy of the first rule inserted to be enforced. This commit attempts to merge the l7 http rules for all the policies with the same endpoint selector. Thus, all l7 rules will be enforced for the same endpoint selector.
diff --git a/generator/operation.go b/generator/operation.go index <HASH>..<HASH> 100644 --- a/generator/operation.go +++ b/generator/operation.go @@ -488,6 +488,7 @@ func (b *codeGenOpBuilder) MakeOperation() (GenOperation, error) { ExtraSchemes: extraSchemes, WithContext: b.WithContext, TimeoutName: timeoutName, + Extensions: operation.Extensions, }, nil } diff --git a/generator/structs.go b/generator/structs.go index <HASH>..<HASH> 100644 --- a/generator/structs.go +++ b/generator/structs.go @@ -355,6 +355,8 @@ type GenOperation struct { ConsumesMediaTypes []string WithContext bool TimeoutName string + + Extensions map[string]interface{} } // GenOperations represents a list of operations to generate
Add Swagger extensions to each Operation
diff --git a/devices/miboxer.js b/devices/miboxer.js index <HASH>..<HASH> 100644 --- a/devices/miboxer.js +++ b/devices/miboxer.js @@ -27,4 +27,11 @@ module.exports = [ vendor: 'Miboxer', extend: extend.light_onoff_brightness(), }, + { + fingerprint: [{modelID: 'TS0502B', manufacturerName: '_TZ3210_frm6149r'}], + model: 'FUT035Z', + description: 'Dual white LED controller', + vendor: 'Miboxer', + extend: extend.light_onoff_brightness_colortemp({disableColorTempStartup: true, colorTempRange: [153, 500]}), + }, ];
Add FUT<I>Z (#<I>) * Added support for FUT<I>Z CCT Dimmer * Added Color-Temp range * Update miboxer.js
diff --git a/src/services/FileService.php b/src/services/FileService.php index <HASH>..<HASH> 100644 --- a/src/services/FileService.php +++ b/src/services/FileService.php @@ -63,7 +63,7 @@ class FileService protected function getFileByPath($filePath) { $file = $this->storage->getFiles()->getFileByName($filePath); - return new File($file); + return $file === null ? null : new File($file); } /** diff --git a/src/storage/storage/ImagesStorage.php b/src/storage/storage/ImagesStorage.php index <HASH>..<HASH> 100644 --- a/src/storage/storage/ImagesStorage.php +++ b/src/storage/storage/ImagesStorage.php @@ -103,7 +103,7 @@ class ImagesStorage extends AbstractStorage /** * @param $filename * - * @return null + * @return \stdClass|null */ public function getImageByName($filename) {
Minor refactor to fix two bugs
diff --git a/src/main/java/com/datumbox/common/utilities/RandomGenerator.java b/src/main/java/com/datumbox/common/utilities/RandomGenerator.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/datumbox/common/utilities/RandomGenerator.java +++ b/src/main/java/com/datumbox/common/utilities/RandomGenerator.java @@ -36,7 +36,7 @@ public class RandomGenerator { * * @return */ - public static Long getGlobalSeed() { + public static synchronized Long getGlobalSeed() { return globalSeed; } @@ -49,7 +49,7 @@ public class RandomGenerator { * * @param globalSeed */ - public static void setGlobalSeed(Long globalSeed) { + public static synchronized void setGlobalSeed(Long globalSeed) { RandomGenerator.globalSeed = globalSeed; } @@ -61,7 +61,7 @@ public class RandomGenerator { * * @return */ - public synchronized static Random getThreadLocalRandom() { + public static synchronized Random getThreadLocalRandom() { if(threadLocalRandom == null) { threadLocalRandom = new ThreadLocal<Random>() { @Override
Making public methods of RandomGenerator synchronized
diff --git a/writer.js b/writer.js index <HASH>..<HASH> 100644 --- a/writer.js +++ b/writer.js @@ -13,6 +13,7 @@ var Definition = require("./definition.js"); var profiler = require('./profiler.js'); var count_writes = 0; +var count_units_in_prev_analyze = 0; function saveJoint(objJoint, objValidationState, preCommitCallback, onDone) { var objUnit = objJoint.unit; @@ -467,10 +468,16 @@ function saveJoint(objJoint, objValidationState, preCommitCallback, onDone) { function updateSqliteStats(){ if (count_writes % 100 !== 0) return; - console.log("will update sqlite stats"); - db.query("ANALYZE", function(){ - db.query("ANALYZE sqlite_master", function(){ - console.log("sqlite stats updated"); + db.query("SELECT COUNT(*) AS count_units FROM units", function(rows){ + var count_units = rows[0].count_units; + if (count_units < 2*count_units_in_prev_analyze) + return; + count_units_in_prev_analyze = count_units; + console.log("will update sqlite stats"); + db.query("ANALYZE", function(){ + db.query("ANALYZE sqlite_master", function(){ + console.log("sqlite stats updated"); + }); }); }); }
re-analyze only after each doubling
diff --git a/lib/commands/general.js b/lib/commands/general.js index <HASH>..<HASH> 100644 --- a/lib/commands/general.js +++ b/lib/commands/general.js @@ -1,4 +1,5 @@ import _ from 'lodash'; +import util from 'appium-support'; let commands = {}, helpers = {}, extensions = {}; @@ -22,7 +23,7 @@ commands.mobilePerformEditorAction = async function (opts = {}) { commands.mobileSwipe = async function (opts = {}) { const {direction, element} = assertRequiredOptions(opts, ['direction', 'element']); - return await this.espresso.jwproxy.command(`/appium/execute_mobile/${element}/swipe`, 'POST', {direction}); + return await this.espresso.jwproxy.command(`/appium/execute_mobile/${util.unwrapElement(element)}/swipe`, 'POST', {direction}); }; commands.mobileGetDeviceInfo = async function () {
Accept element and elementId for mobile:swipe (#<I>)
diff --git a/lib/KVCObject.js b/lib/KVCObject.js index <HASH>..<HASH> 100644 --- a/lib/KVCObject.js +++ b/lib/KVCObject.js @@ -11,7 +11,7 @@ var DEFAULT_PREFIX = ''; function KVCObject(options) { this._resetObject(); this._resetChanges(); - this._setOptions(options || {}); + this._setOptions(options); } inherits(KVCObject, EventEmitter); @@ -31,6 +31,7 @@ KVCObject.prototype._setOptions = function (options, defaultOptions) { this._options = {}; } + options = options || {}; defaultOptions = defaultOptions || DEFAULT_OPTIONS; for (var key in defaultOptions) {
Fixed issue with unitialized options
diff --git a/lib/transforms/buildProduction.js b/lib/transforms/buildProduction.js index <HASH>..<HASH> 100644 --- a/lib/transforms/buildProduction.js +++ b/lib/transforms/buildProduction.js @@ -131,7 +131,6 @@ module.exports = function (options) { // Remove orphan assets, except I18n which might originally have been referenced from the no longer existing bootstrapper: .inlineHtmlTemplates() .removeUnreferencedAssets({type: query.not('I18n'), isInitial: query.not(true)}) - .flattenStaticIncludes() .convertCssImportsToHtmlStyles() .removeDuplicateHtmlStyles({type: 'Html', isInitial: true}) .mergeIdenticalAssets({isLoaded: true, isInline: false, type: ['JavaScript', 'Css']})
buildProduction: Don't run flattenStaticIncludes anymore, it's no longer necessary.
diff --git a/jsoneditor/jsoneditor.js b/jsoneditor/jsoneditor.js index <HASH>..<HASH> 100644 --- a/jsoneditor/jsoneditor.js +++ b/jsoneditor/jsoneditor.js @@ -1107,6 +1107,19 @@ JSONEditor.Node.prototype.focus = function(field) { * Remove focus from the value or field of this node */ JSONEditor.Node.prototype.blur = function() { + if (this.dom.tr && this.dom.tr.parentNode) { + var domValue = this.dom.value; + if (domValue) { + domValue.blur(); + } + var domField = this.dom.field; + if (domField) { + domField.blur(); + } + } + + // retrieve the field and value from the DOM. A little redundant but + // it cannot do harm. this._getDomValue(true); this._getDomField(true); };
Fixed method Node.blur, which did not actually removed the focus from the node. Now it does.
diff --git a/src/Projecting/AggregateProjector.php b/src/Projecting/AggregateProjector.php index <HASH>..<HASH> 100644 --- a/src/Projecting/AggregateProjector.php +++ b/src/Projecting/AggregateProjector.php @@ -15,7 +15,7 @@ use Prooph\EventMachine\Persistence\DocumentStore; * Example usage: * <code> * $eventMachine->watch(Stream::ofWriteModel()) - * ->with(AggregateProjector::generateProjectionNameForAggregateType('My.AR'), AggregateProjector::class) + * ->with(AggregateProjector::generateProjectionName('My.AR'), AggregateProjector::class) * ->filterAggregateType('My.AR') * ->storeDocuments(JsonSchema::object(...)) * </code>
Fix example doc block of AggregateProjector
diff --git a/tests/TestCase.php b/tests/TestCase.php index <HASH>..<HASH> 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -95,7 +95,10 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase $status = (int)$function(); exit(0); default: - pcntl_wait($status); + usleep(1e3); + if (pcntl_wait($status) === -1) { + $this->fail('Failed to fork process.'); + } return $status; } }
Fix test conflicts with forks not ready yet