diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/libact/query_strategies/__init__.py b/libact/query_strategies/__init__.py index <HASH>..<HASH> 100644 --- a/libact/query_strategies/__init__.py +++ b/libact/query_strategies/__init__.py @@ -5,10 +5,7 @@ import logging logger = logging.getLogger(__name__) from .active_learning_by_learning import ActiveLearningByLearning -try: - from .hintsvm import HintSVM -except ImportError: - logger.warn('HintSVM library not found, not importing.') +from .hintsvm import HintSVM from .uncertainty_sampling import UncertaintySampling from .query_by_committee import QueryByCommittee from .quire import QUIRE
remove try except when hintsvm is not installed
diff --git a/src/angular-block-ui/service.test.js b/src/angular-block-ui/service.test.js index <HASH>..<HASH> 100644 --- a/src/angular-block-ui/service.test.js +++ b/src/angular-block-ui/service.test.js @@ -606,6 +606,5 @@ describe('block-ui-service', function() { expect($document[0].activeElement).toBe($otherInput[0]); }); - }); // focus management });
Fix window switching in IE #<I>
diff --git a/lib/util/slice_test.go b/lib/util/slice_test.go index <HASH>..<HASH> 100644 --- a/lib/util/slice_test.go +++ b/lib/util/slice_test.go @@ -20,8 +20,8 @@ func TestExist(t *testing.T) { []bool{true, false, false}, } for i, exp := range test.exps { - if exist(test.array, test.elms[i]) != exp { - t.Errorf("Expected in %v exist result of element %s be %v, but got %v", test.array, test.elms[i], exp, exist(test.array, test.elms[i])) + if Exists(test.array, test.elms[i]) != exp { + t.Errorf("Expected in %v exist result of element %s be %v, but got %v", test.array, test.elms[i], exp, Exists(test.array, test.elms[i])) } } } @@ -44,7 +44,7 @@ func TestRemove(t *testing.T) { }, } for i, test := range tests { - if exp := remove(test.slice, test.remove); !reflect.DeepEqual(exp, test.exp) { + if exp := Remove(test.slice, test.remove); !reflect.DeepEqual(exp, test.exp) { t.Errorf("Test %d: Expected %v be equal to %v", i, exp, test.exp) } }
forgot to change method names in slice tests
diff --git a/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php @@ -107,8 +107,14 @@ class FileProfilerStorage implements ProfilerStorageInterface */ public function write(Profile $profile) { + $file = $this->getFilename($profile->getToken()); + + if (file_exists($file)) { + return false; + } + // Store profile - file_put_contents($this->getFilename($profile->getToken()), serialize($profile)); + file_put_contents($file, serialize($profile)); // Add to index $file = fopen($this->getIndexFilename(), 'a'); @@ -120,6 +126,8 @@ class FileProfilerStorage implements ProfilerStorageInterface $profile->getParent() ? $profile->getParent()->getToken() : null )); fclose($file); + + return true; } /**
[HttpKernel] Fix tests for the file storage of profiler
diff --git a/hug/interface.py b/hug/interface.py index <HASH>..<HASH> 100644 --- a/hug/interface.py +++ b/hug/interface.py @@ -331,7 +331,7 @@ class CLI(Interface): self.interface.cli = self used_options = {'h', 'help'} - nargs_set = self.interface.takes_kargs + nargs_set = self.interface.takes_kargs or self.interface.takes_kwargs self.parser = argparse.ArgumentParser(description=route.get('doc', self.interface.spec.__doc__)) if 'version' in route: self.parser.add_argument('-v', '--version', action='version',
Set narg to true for kwargs
diff --git a/PBB_Core.py b/PBB_Core.py index <HASH>..<HASH> 100755 --- a/PBB_Core.py +++ b/PBB_Core.py @@ -729,8 +729,10 @@ class WDItemEngine(object): json_data = json.loads(reply.text) pprint.pprint(json_data) + if 'error' in json_data.keys: + raise UserWarning("Wikidata api returns error: "+json_data['error']['info'] - except requests.HTTPError as e: + except (requests.HTTPError, UserWarning) as e: print(e) PBB_Debug.getSentryClient().captureException(PBB_Debug.getSentryClient())
catch API error and raise an exxception
diff --git a/test/test_sc2replay.py b/test/test_sc2replay.py index <HASH>..<HASH> 100644 --- a/test/test_sc2replay.py +++ b/test/test_sc2replay.py @@ -17,3 +17,7 @@ class TestSC2Replay(unittest.TestCase): self.assertEqual(self.replay.duration, '26m 17s') self.assertEqual(self.replay.version, '1.0.2.16223') self.assertEqual(len(self.replay.players), 8) + + def test_init_with_a_file_arg(self): + self.replay = SC2Replay(open(TEST_DIR + 'test.SC2Replay', 'rb')) + self.assertEqual(self.replay.map, 'Toxic Slums')
Add a small test for init with a file arg.
diff --git a/lib/rack/rewrite/rule.rb b/lib/rack/rewrite/rule.rb index <HASH>..<HASH> 100644 --- a/lib/rack/rewrite/rule.rb +++ b/lib/rack/rewrite/rule.rb @@ -165,6 +165,8 @@ module Rack string =~ matcher elsif matcher.is_a?(String) string == matcher + elsif matcher.is_a?(Symbol) + string.downcase == matcher.to_s.downcase else false end
Allow matchers to be (case insensitive) Symbols.
diff --git a/sacad.py b/sacad.py index <HASH>..<HASH> 100755 --- a/sacad.py +++ b/sacad.py @@ -860,6 +860,8 @@ class CoverParadiseCoverSource(CoverSource): size = tuple(map(int, re_match.group(1, 2))) # get thumbnail url link = td1.find("a") + if link is None: + link = td2.find("b").find("a") thumbnail_url = link.find("img").get("src") # deduce img url without downloading subpage cover_id = int(thumbnail_url.rsplit(".", 1)[0].rsplit("/", 1)[1])
Fix Cover Paradise source failing for some searches
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -21,9 +21,7 @@ with open(os.path.join(here, version_filename)) as version_file: # change setup.py for readthedocs on_rtd = os.environ.get('READTHEDOCS') == 'True' -install_requires=['pandas', 'numpy', 'sgp4', 'pyEphem', 'requests', - 'xarray', - # remaining packages are excluded if on ReadTheDocs +install_requires=['xarray', 'pandas', 'numpy', 'sgp4', 'pyEphem', 'requests', 'pysatCDF', 'apexpy', 'aacgmv2', 'pysatMagVect', 'madrigalWeb', 'h5py', 'PyForecastTools'] @@ -32,6 +30,7 @@ install_requires=['pandas', 'numpy', 'sgp4', 'pyEphem', 'requests', # # TODO Remove when pyglow works in python 3 # install_requires.append('pyglow') +# all packages after pysatCDF are excluded if on ReadTheDocs if on_rtd: # read the docs doesn't do Fortran # remove pysatCDF through h5py
Update setup.py Moved xarray import to the front. Read the Docs isn't getting the correct pandas version and can't handle self upgrading for some reason.
diff --git a/Lib/glyphsLib/classes.py b/Lib/glyphsLib/classes.py index <HASH>..<HASH> 100755 --- a/Lib/glyphsLib/classes.py +++ b/Lib/glyphsLib/classes.py @@ -1925,6 +1925,8 @@ class GSNode(GSBase): else: if self.type == CURVE: content = "c" + elif self.type == QCURVE: + content = "q" elif self.type == OFFCURVE: content = "o" elif self.type == LINE:
Fix saving quadratic curves in Glyphs 3
diff --git a/lib/csscomb.js b/lib/csscomb.js index <HASH>..<HASH> 100644 --- a/lib/csscomb.js +++ b/lib/csscomb.js @@ -71,6 +71,10 @@ Comb.prototype = { * @returns {Array} */ processTree: function(tree) { + + // We walk across complete tree for each handler, + // because we need strictly maintain order in which handlers work, + // despite fact that handlers work on different level of the tree. this._handlers.forEach(function(handler) { this.processNode(['tree', tree], 0, handler); }, this);
Add comment with explanation for independed pass
diff --git a/jquery.flot.pie.js b/jquery.flot.pie.js index <HASH>..<HASH> 100644 --- a/jquery.flot.pie.js +++ b/jquery.flot.pie.js @@ -232,19 +232,21 @@ More detail and specific examples can be found in the included HTML file. for (var i = 0; i < data.length; ++i) { - if (data[i].data[0][1] / total <= options.series.pie.combine.threshold) { - combined += data[i].data[0][1]; + var value = data[i].data[0][1]; + + if (value / total <= options.series.pie.combine.threshold) { + combined += value; numCombined++; if (!color) { color = data[i].color; } } else { newdata.push({ - data: [[1, data[i].data[0][1]]], + data: [[1, value]], color: data[i].color, label: data[i].label, - angle: data[i].data[0][1] * Math.PI * 2 / total, - percent: data[i].data[0][1] / (total / 100) + angle: value * Math.PI * 2 / total, + percent: value / (total / 100) }); } }
Cache the data value, since it is used repeatedly.
diff --git a/apps/advanced/frontend/config/main.php b/apps/advanced/frontend/config/main.php index <HASH>..<HASH> 100644 --- a/apps/advanced/frontend/config/main.php +++ b/apps/advanced/frontend/config/main.php @@ -11,12 +11,12 @@ $params = array_merge( return [ 'id' => 'app-frontend', 'basePath' => dirname(__DIR__), - 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor', + 'vendorPath' => $rootDir . '/vendor', 'controllerNamespace' => 'frontend\controllers', 'modules' => [ 'gii' => 'yii\gii\Module' ], - 'extensions' => require(__DIR__ . '/../../vendor/yiisoft/extensions.php'), + 'extensions' => require($rootDir . '/vendor/yiisoft/extensions.php'), 'components' => [ 'request' => [ 'enableCsrfValidation' => true,
Small edit for consistency with frontend config. Small edit for consistency with /apps/advanced/backend/config/main.php. Sorry, my OCD kicked in.
diff --git a/isotopic_logging/context.py b/isotopic_logging/context.py index <HASH>..<HASH> 100644 --- a/isotopic_logging/context.py +++ b/isotopic_logging/context.py @@ -45,6 +45,8 @@ _stack = InjectionStack(_local) class InjectionContext(object): + _old_enter_time = None + def __init__(self, injector, inherit=False): if _stack.is_empty: if callable(injector): @@ -63,14 +65,18 @@ class InjectionContext(object): _stack.push(item) def __enter__(self): - injector = _stack.top.injector - injector.enter_time = time.time() - return injector + inj = _stack.top.injector + self._old_enter_time, inj.enter_time = inj.enter_time, time.time() + return inj def __exit__(self, type, value, traceback): - if _stack.top.parent is self: - item = _stack.pop() - item.injector.enter_time = None + item = _stack.top + + inj = item.injector + inj.enter_time, self._old_enter_time = self._old_enter_time, None + + if item.parent is self: + _stack.pop() def direct_injector(prefix, inherit=False):
ensure `elapsed_time` is related only to current context manager (#3)
diff --git a/src/labels/label_point.js b/src/labels/label_point.js index <HASH>..<HASH> 100644 --- a/src/labels/label_point.js +++ b/src/labels/label_point.js @@ -34,6 +34,10 @@ export default class LabelPoint extends Label { this.aabb = this.obb.getExtent(); } + getNextFittingSegment() { + return this.moveIntoTile(); + } + // Try to move the label into the tile bounds // Returns true if label was moved into tile, false if it couldn't be moved moveIntoTile () { @@ -63,7 +67,7 @@ export default class LabelPoint extends Label { this.updateBBoxes(); } - return this.inTileBounds(); + return updated; } }
Temporary API symmetry between label_point and label_line for finding next
diff --git a/ocLazyLoad.js b/ocLazyLoad.js index <HASH>..<HASH> 100644 --- a/ocLazyLoad.js +++ b/ocLazyLoad.js @@ -29,7 +29,7 @@ //injector hasn't been assigned to the rootElement yet: providers.getInstanceInjector = function() { return (instanceInjector) ? instanceInjector : (instanceInjector = $rootElement.data('$injector')); - } + }; return { getModuleConfig: function(name) { if(!modules[name]) { @@ -127,7 +127,7 @@ loadedModule, requires, promisesList = [], - load_complete; + loadComplete; moduleName = self.getModuleName(module); loadedModule = angular.module(moduleName); @@ -177,12 +177,12 @@ }); // Create a wrapper promise to watch the promise list and resolve it once everything is done. - load_complete = $q.defer(); + loadComplete = $q.defer(); $q.all(promisesList).then(function () { - load_complete.resolve(); + loadComplete.resolve(); }); - return load_complete.promise; + return loadComplete.promise; } asyncLoader(config.files, function () {
Code style: variable name/semicolon Renamed load_complete to loadComplete Added missing semicolon
diff --git a/salt/states/ceph.py b/salt/states/ceph.py index <HASH>..<HASH> 100644 --- a/salt/states/ceph.py +++ b/salt/states/ceph.py @@ -66,8 +66,8 @@ def quorum(name, **kwargs): return _test(name, "cluster quorum") try: cluster_quorum = __salt__['ceph.cluster_quorum'](**paramters) - except (CommandExecutionError, CommandNotFoundError) as e: - return _error(name, e.message) + except (CommandExecutionError, CommandNotFoundError) as err: + return _error(name, err.strerror) if cluster_quorum: return _unchanged(name, "cluster is quorum") return _error(name, "cluster is not quorum")
salt.states.ceph: Rename exception. pylint3 does not like single character variables.
diff --git a/integrations/helm/chartsync/deps.go b/integrations/helm/chartsync/deps.go index <HASH>..<HASH> 100644 --- a/integrations/helm/chartsync/deps.go +++ b/integrations/helm/chartsync/deps.go @@ -11,6 +11,15 @@ import ( func updateDependencies(chartDir, helmhome string) error { var hasLockFile bool + // sanity check: does the chart directory exist + chartInfo, err := os.Stat(chartDir) + switch { + case err != nil: + return err + case !chartInfo.IsDir(): + return fmt.Errorf("chart path %s is not a directory", chartDir) + } + // check if the requirements file exists reqFilePath := filepath.Join(chartDir, "requirements.yaml") reqInfo, err := os.Stat(reqFilePath)
Check that chart exists when updating its deps We don't want to fail at updating chart dependencies when a chart doesn't have a requirements.yaml file (which is optional, for a chart). However, we _do_ want to fail if the chart doesn't exist in the filesystem at all.
diff --git a/src/Bundle/Parser/IniParser.php b/src/Bundle/Parser/IniParser.php index <HASH>..<HASH> 100644 --- a/src/Bundle/Parser/IniParser.php +++ b/src/Bundle/Parser/IniParser.php @@ -103,7 +103,7 @@ class IniParser implements ParserInterface { $ini = parse_ini_file($file, true); - if (false === $ini) { + if (!is_array($ini)) { throw new \RuntimeException("File $file cannot be decoded"); }
Handle the case that the parse_ini_file() function is disabled (see #8).
diff --git a/demo/basic/index.js b/demo/basic/index.js index <HASH>..<HASH> 100644 --- a/demo/basic/index.js +++ b/demo/basic/index.js @@ -2,5 +2,5 @@ var dataContext = { points: require('./randomPoints')(10) }; -var vivasvg = require('../'); +var vivasvg = require('../../'); vivasvg.bootstrap(document.getElementById('scene'), dataContext);
Updated path to vivasvg
diff --git a/khard/khard.py b/khard/khard.py index <HASH>..<HASH> 100644 --- a/khard/khard.py +++ b/khard/khard.py @@ -1029,9 +1029,8 @@ def list_subcommand(vcard_list, parsable): name = vcard.get_first_name_last_name() else: name = vcard.get_last_name_first_name() - contact_line_list.append( - '\t'.join([config.get_shortened_uid(vcard.get_uid()), name, - vcard.address_book.name])) + contact_line_list.append('\t'.join([vcard.get_uid(), name, + vcard.address_book.name])) print('\n'.join(contact_line_list)) else: list_contacts(vcard_list)
Display full UID in parsable output This is a preparation for the following move of all short uid handling code to the AddressBook class. It also makes more sense to have the full uid in the parsable output as it is not intended to be consumed by humans.
diff --git a/Tools/build-website.js b/Tools/build-website.js index <HASH>..<HASH> 100644 --- a/Tools/build-website.js +++ b/Tools/build-website.js @@ -308,7 +308,7 @@ https://github.com/laurent22/joplin/blob/master/{{{sourceMarkdownFile}}} const footerHtml = ` <div class="footer"> -Copyright (c) 2016-2019 Laurent Cozic +Copyright (c) 2016-2020 Laurent Cozic </div> </body> </html>
fix copyright year in web site generation
diff --git a/aws.js b/aws.js index <HASH>..<HASH> 100644 --- a/aws.js +++ b/aws.js @@ -234,7 +234,7 @@ aws.queryRoute53 = function(method, path, data, options, callback) if (!options) options = {}; var curTime = new Date().toUTCString(); - var uri = "https://route53.amazonaws.com/2013-04-01/" + path; + var uri = "https://route53.amazonaws.com/2013-04-01" + path; var headers = { "x-amz-date": curTime, "content-type": "text/xml; charset=UTF-8", "content-length": data.length }; headers["X-Amzn-Authorization"] = "AWS3-HTTPS AWSAccessKeyId=" + this.key + ",Algorithm=HmacSHA1,Signature=" + core.sign(this.secret, curTime);
Updated docs, minor bugfixes
diff --git a/whois.ip.php b/whois.ip.php index <HASH>..<HASH> 100644 --- a/whois.ip.php +++ b/whois.ip.php @@ -65,15 +65,11 @@ function parse ($data,$query) { $this->Query=array(); +$this->Query['server'] = 'whois.arin.net'; +$this->Query['string'] = $query; -unset($this->Query['handler']); - -if (!isset($result['rawdata'])) - { - $result['rawdata'] = array(); - } - -$result['regyinfo']=array(); +$result['rawdata'] = array(); +$result['regyinfo'] = array(); $result['regyinfo']['registrar']='American Registry for Internet Numbers (ARIN)'; reset($this->REGISTRARS);
fixed problem with lastest changes in whois.ip
diff --git a/vdom/core.py b/vdom/core.py index <HASH>..<HASH> 100644 --- a/vdom/core.py +++ b/vdom/core.py @@ -79,7 +79,7 @@ class VDOM(object): self.key = key # Validate that all children are VDOMs or strings - if not all([isinstance(c, VDOM) or isinstance(c, str) for c in children]): + if not all([isinstance(c, VDOM) or isinstance(c, str) for c in self.children]): raise ValueError('Children must be a list of VDOM objects or strings') # mark completion of object creation. Object is immutable from now.
Don't fail validation when no children are passed in
diff --git a/torchvision/models/mnasnet.py b/torchvision/models/mnasnet.py index <HASH>..<HASH> 100644 --- a/torchvision/models/mnasnet.py +++ b/torchvision/models/mnasnet.py @@ -1,4 +1,3 @@ -import math import warnings import torch
cleanup unused import (#<I>) cleanup
diff --git a/lib/vcards/vcard.rb b/lib/vcards/vcard.rb index <HASH>..<HASH> 100644 --- a/lib/vcards/vcard.rb +++ b/lib/vcards/vcard.rb @@ -66,18 +66,42 @@ module Vcards number.save end + def phone_number + phone_numbers.first + end + + def phone_number=(number) + phone_numbers.build(:number => number, :phone_number_type => 'phone') + end + has_many :mobile_numbers, :class_name => 'PhoneNumber', :conditions => ["phone_number_type = ?", 'mobile'], :after_add => :add_mobile_number def add_mobile_number(number) number.phone_number_type = 'mobile' number.save end + def mobile_number + mobile_numbers.first + end + + def mobile_number=(number) + mobile_numbers.build(:number => number, :phone_number_type => 'mobile') + end + has_many :fax_numbers, :class_name => 'PhoneNumber', :conditions => ["phone_number_type = ?", 'fax'], :after_add => :add_fax_number def add_fax_number(number) number.phone_number_type = 'fax' number.save end + def fax_number + fax_numbers.first + end + + def fax_number=(number) + fax_numbers.build(:number => number, :phone_number_type => 'fax') + end + # Salutation def salutation case honorific_prefix
Add convenience accessors for *_numbers.
diff --git a/install.rb b/install.rb index <HASH>..<HASH> 100755 --- a/install.rb +++ b/install.rb @@ -73,7 +73,7 @@ bins = glob(%w{bin/*}) rdoc = glob(%w{bin/* sbin/* lib/**/*.rb README README-library CHANGELOG TODO Install}).reject { |e| e=~ /\.(bat|cmd)$/ } ri = glob(%w{bin/*.rb sbin/* lib/**/*.rb}).reject { |e| e=~ /\.(bat|cmd)$/ } man = glob(%w{man/man[0-9]/*}) -libs = glob(%w{lib/**/*.rb lib/**/*.py lib/puppet/util/command_line/*}) +libs = glob(%w{lib/**/*.rb lib/**/*.erb lib/**/*.py lib/puppet/util/command_line/*}) tests = glob(%w{test/**/*.rb}) def do_configs(configs, target, strip = 'conf/')
maint: install erb templates under lib/ We now use a handful of erb templates to generate help, so it matters that we install them into the right destination. This extends install.rb to reflect that change.
diff --git a/test/test_helper.rb b/test/test_helper.rb index <HASH>..<HASH> 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -6,7 +6,9 @@ require "rails/test_help" require 'shoulda' require 'pry' require 'factory_girl' -FactoryGirl.find_definitions +if FactoryGirl.factories.first.nil? + FactoryGirl.find_definitions +end Rails.backtrace_cleaner.remove_silencers!
get factories loading properly for all types of test runs
diff --git a/src/Bllim/Datatables/Datatables.php b/src/Bllim/Datatables/Datatables.php index <HASH>..<HASH> 100644 --- a/src/Bllim/Datatables/Datatables.php +++ b/src/Bllim/Datatables/Datatables.php @@ -402,13 +402,10 @@ class Datatables $columns = $schema->listTableColumns($table); foreach ($columns as $column_infos) { if($column_infos->getName() === $target_column) { - // $name = $column_infos->getName(); - // $type = $column_infos->getType()->getName(); - $length = $column_infos->getLength(); - // $default = $column_infos->getDefault(); - // var_dump($length);//debug - if(!empty($length) && $length < $column_max_size) - $column_max_size = $length; + $length = $column_infos->getLength(); + if(!empty($length) && $length < $column_max_size) { + $column_max_size = $length; + } break; } }
Tidying up codes and removing useless comments
diff --git a/Bundle/BlogBundle/Filter/CategoryFilter.php b/Bundle/BlogBundle/Filter/CategoryFilter.php index <HASH>..<HASH> 100644 --- a/Bundle/BlogBundle/Filter/CategoryFilter.php +++ b/Bundle/BlogBundle/Filter/CategoryFilter.php @@ -112,7 +112,7 @@ class CategoryFilter extends BaseFilter $categories = $this->filterQueryHandler->handle($options['widget'], BlogCategory::class); //getAll categories - $categoryQb = $this->getEntityManager()->getRepository('BlogCategory.php')->getAll(); + $categoryQb = $this->getEntityManager()->getRepository('VictoireBlogBundle:BlogCategory')->getAll(); //getAll published articles $articleQb = $this->getEntityManager()->getRepository('VictoireBlogBundle:Article')->getAll(true);
revert and fix BlogCategory call
diff --git a/scapy.py b/scapy.py index <HASH>..<HASH> 100755 --- a/scapy.py +++ b/scapy.py @@ -10356,6 +10356,22 @@ def dhcp_request(iface=None,**kargs): return srp1(Ether(dst="ff:ff:ff:ff:ff:ff")/IP(src="0.0.0.0",dst="255.255.255.255")/UDP(sport=68,dport=67) /BOOTP(chaddr=hw)/DHCP(options=[("message-type","discover"),"end"]),iface=iface,**kargs) +def snmpwalk(dst, oid="1", community="public"): + try: + while 1: + r = sr1(IP(dst=dst)/UDP(sport=RandShort())/SNMP(community=community, PDU=SNMPnext(varbindlist=[SNMPvarbind(oid=oid)])),timeout=2, chainCC=1, verbose=0, retry=2) + if ICMP in r: + print repr(r) + break + if r is None: + print "No answers" + break + print "%-40s: %r" % (r[SNMPvarbind].oid.val,r[SNMPvarbind].value) + oid = r[SNMPvarbind].oid + + except KeyboardInterrupt: + pass + ##################### ## Reporting stuff ##
Added snmpwalk()
diff --git a/public/assets/login.js b/public/assets/login.js index <HASH>..<HASH> 100644 --- a/public/assets/login.js +++ b/public/assets/login.js @@ -9,7 +9,6 @@ function login() { var recaptcha = $("#g-recaptcha-response").val(); toast("Validando dados!", 15000); post('login', 'login', {email: email, pass: pass, recaptcha: recaptcha}, function (g) { - clearToast(); if (typeof g === "string") { navigator.vibrate(100); loginFree = !0; diff --git a/public/assets/logout.js b/public/assets/logout.js index <HASH>..<HASH> 100644 --- a/public/assets/logout.js +++ b/public/assets/logout.js @@ -1,4 +1,3 @@ -clearToast(); toast("Saindo...", 3000); setCookieAnonimo().then(() => { app.loadView(HOME + "login");
clearToast remove because toast is clear itself
diff --git a/questionary/prompts/common.py b/questionary/prompts/common.py index <HASH>..<HASH> 100644 --- a/questionary/prompts/common.py +++ b/questionary/prompts/common.py @@ -18,13 +18,22 @@ from questionary.constants import ( INDICATOR_UNSELECTED, ) +# This is a cut-down version of `prompt_toolkit.formatted_text.AnyFormattedText` +# which does not exist in v2 of prompt_toolkit +FormattedText = Union[ + Text, + List[Tuple[Text, Text]], + List[Tuple[Text, Text, Callable[[Any], None]]], + None, +] + class Choice(object): """One choice in a select, rawselect or checkbox.""" def __init__( self, - title: Text, + title: FormattedText, value: Optional[Any] = None, disabled: Optional[Text] = None, checked: bool = False,
Accept style tuples in `title` argument annotation of `Choice` (#<I>)
diff --git a/src/Psalm/ErrorBaseline.php b/src/Psalm/ErrorBaseline.php index <HASH>..<HASH> 100644 --- a/src/Psalm/ErrorBaseline.php +++ b/src/Psalm/ErrorBaseline.php @@ -285,7 +285,7 @@ class ErrorBaseline $baselineDoc->formatOutput = true; $xml = preg_replace_callback( - '/<files (psalm-version="[^"]+") (?:php-version="(.+)">\n)/', + '/<files (psalm-version="[^"]+") (?:php-version="(.+)"(\/?>)\n)/', /** * @param array<int, string> $matches */ @@ -301,7 +301,7 @@ class ErrorBaseline "\n" . ' "' . "\n" . - '>' . + $matches[3] . "\n"; }, $baselineDoc->saveXML()
apply pretty formatting when there are no issues (#<I>)
diff --git a/src/python/pants/base/worker_pool.py b/src/python/pants/base/worker_pool.py index <HASH>..<HASH> 100644 --- a/src/python/pants/base/worker_pool.py +++ b/src/python/pants/base/worker_pool.py @@ -8,6 +8,7 @@ from __future__ import (nested_scopes, generators, division, absolute_import, wi import threading import multiprocessing from multiprocessing.pool import ThreadPool +import os import signal import sys @@ -179,8 +180,8 @@ class SubprocPool(object): @staticmethod def worker_init(): - # Ignore sigint in workers since they are daemon procs and thus die with parent. - signal.signal(signal.SIGINT, signal.SIG_IGN) + # Exit quietly on sigint, otherwise we get {num_procs} keyboardinterrupt stacktraces spewn + signal.signal(signal.SIGINT, lambda *args: os._exit(0)) @classmethod def foreground(cls):
Exit workers on sigint rather than ignore Testing Done: <URL>
diff --git a/lib/transactions.js b/lib/transactions.js index <HASH>..<HASH> 100644 --- a/lib/transactions.js +++ b/lib/transactions.js @@ -60,12 +60,11 @@ function Transactions(client) { * @param {number} [timeLimit] - the maximum number of seconds that * the transaction should run before rolling back automatically * @param {boolean} [withState] - whether to return a Transaction - * object that can track the properties of the transaction - * @returns {string|transactions.Transaction} either a string - * transactionId (the default) or a Transaction object identifying - * the multi-statement transaction; in the next major release, - * the Transaction object will become the default and the string - * transactionId will be deprecated. + * object that can track the properties of the transaction + * @returns {transactions.Transaction|string} either a Transaction object + * (the default) or string transactionId identifying the multi-statement + * transaction; returning a string transactionId is deprecated and + * will be removed in the next major release. */ Transactions.prototype.open = function openTransaction() { var args = mlutil.asArray.apply(null, arguments); @@ -119,7 +118,7 @@ Transactions.prototype.open = function openTransaction() { ); operation.validStatusCodes = [303]; operation.outputTransform = openOutputTransform; - operation.withState = withState || false; + operation.withState = withState || true; return requester.startRequest(operation); };
fix(#<I>): make a transaction object the default return value For a transactions.read() Also update docs for returning a string transactionID. Returning a string transactionID is deprecated and will be removed in the next major release.
diff --git a/openquake/calculators/disaggregation.py b/openquake/calculators/disaggregation.py index <HASH>..<HASH> 100644 --- a/openquake/calculators/disaggregation.py +++ b/openquake/calculators/disaggregation.py @@ -494,7 +494,7 @@ class DisaggregationCalculator(base.HazardCalculator): out = output_dict(self.shapedic, outputs) count = numpy.zeros(len(self.sitecol), U16) _disagg_trt = numpy.zeros(self.N, [(trt, float) for trt in self.trts]) - for (s, m, k), mat6 in results.items(): + for (s, m, k), mat6 in sorted(results.items()): imt = self.imts[m] for p, poe in enumerate(self.poes_disagg): mat5 = mat6[..., p, :]
Sorted the disagg results before saving them [skip CI]
diff --git a/theme/boost/classes/boostnavbar.php b/theme/boost/classes/boostnavbar.php index <HASH>..<HASH> 100644 --- a/theme/boost/classes/boostnavbar.php +++ b/theme/boost/classes/boostnavbar.php @@ -55,6 +55,9 @@ class boostnavbar implements \renderable { protected function prepare_nodes_for_boost(): void { global $PAGE; + // Remove the navbar nodes that already exist in the primary navigation menu. + $this->remove_items_that_exist_in_navigation($PAGE->primarynav); + // Defines whether section items with an action should be removed by default. $removesections = true; @@ -94,9 +97,6 @@ class boostnavbar implements \renderable { } } - $this->remove('myhome'); // Dashboard. - $this->remove('home'); - // Remove 'My courses' if we are in the module context. if ($this->page->context->contextlevel == CONTEXT_MODULE) { $this->remove('mycourses');
MDL-<I> theme_boost: Remove breadcrumb nodes that exist in primary nav Generally, we want to avoid displaying any breadcrumb nodes which are already present in the primary navigation menu. Currently, this is done by manually specifying which breadcrumb node (by its identification key) should be removed. This change provides more reliable, automatic removal of these breadcrum nodes by utilizing the exising method remove_items_that_exist_in_navigation().
diff --git a/src/TestSuite/IntegrationTestTrait.php b/src/TestSuite/IntegrationTestTrait.php index <HASH>..<HASH> 100644 --- a/src/TestSuite/IntegrationTestTrait.php +++ b/src/TestSuite/IntegrationTestTrait.php @@ -621,7 +621,8 @@ trait IntegrationTestTrait $props = [ 'url' => $url, 'session' => $session, - 'query' => $queryData + 'query' => $queryData, + 'files' => [], ]; if (is_string($data)) { $props['input'] = $data; diff --git a/src/TestSuite/MiddlewareDispatcher.php b/src/TestSuite/MiddlewareDispatcher.php index <HASH>..<HASH> 100644 --- a/src/TestSuite/MiddlewareDispatcher.php +++ b/src/TestSuite/MiddlewareDispatcher.php @@ -153,7 +153,8 @@ class MiddlewareDispatcher $environment, $spec['query'], $spec['post'], - $spec['cookies'] + $spec['cookies'], + $spec['files'] ); $request = $request->withAttribute('session', $spec['session']);
Pass uploaded files configured with configRequest() to ServerRequest.
diff --git a/src/Illuminate/Remote/Connection.php b/src/Illuminate/Remote/Connection.php index <HASH>..<HASH> 100644 --- a/src/Illuminate/Remote/Connection.php +++ b/src/Illuminate/Remote/Connection.php @@ -36,13 +36,6 @@ class Connection implements ConnectionInterface { protected $username; /** - * The authentication credential set. - * - * @var array - */ - protected $auth; - - /** * All of the defined tasks. * * @var array
Removing variable that's never used.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,9 @@ setup( install_requires=[ 'ase', 'pypif', - 'requests' ], - packages=find_packages(exclude=('tests', 'docs')) + extras_require={ + 'report': ["requests"], + }, + packages=find_packages(exclude=('tests', 'docs')), )
Move requests to extras Since `quality_report` is `False` by default.
diff --git a/server/gulpfile.js b/server/gulpfile.js index <HASH>..<HASH> 100644 --- a/server/gulpfile.js +++ b/server/gulpfile.js @@ -89,7 +89,7 @@ gulp.task('output-build-info', function () { // Capture changes from the last commit try { - execSync('git diff --quiet HEAD'); + execSync('git diff --quiet HEAD -- server'); } catch (err) { dirtyInfo = "-dirty"; }
fix(server): build-info dirty flag is capturing changes from all projects
diff --git a/synctool/src/test/java/org/duracloud/sync/walker/DirWalkerTest.java b/synctool/src/test/java/org/duracloud/sync/walker/DirWalkerTest.java index <HASH>..<HASH> 100644 --- a/synctool/src/test/java/org/duracloud/sync/walker/DirWalkerTest.java +++ b/synctool/src/test/java/org/duracloud/sync/walker/DirWalkerTest.java @@ -29,9 +29,9 @@ public class DirWalkerTest extends SyncTestBase { @Test public void testDirWalker() { - File tempDir = new File("target"); + File checkDir = new File("src"); List<File> dirs = new ArrayList<File>(); - dirs.add(tempDir); + dirs.add(checkDir); DirWalker dirWalker = new DirWalker(dirs); assertFalse(dirWalker.walkComplete()); @@ -44,7 +44,7 @@ public class DirWalkerTest extends SyncTestBase { } Collection tempDirFiles = - FileUtils.listFiles(tempDir, + FileUtils.listFiles(checkDir, TrueFileFilter.INSTANCE, TrueFileFilter.INSTANCE);
Changing this test to use a directory which does not change size in the course of the test. git-svn-id: <URL>
diff --git a/Generator.php b/Generator.php index <HASH>..<HASH> 100644 --- a/Generator.php +++ b/Generator.php @@ -172,6 +172,16 @@ abstract class Generator { } /** + * Setup some hook. + * + * @return void + */ + public function setUp() + { + // + } + + /** * Run the generator. * * @return int @@ -179,6 +189,8 @@ abstract class Generator { */ public function run() { + $this->setUp(); + if ($this->filesystem->exists($path = $this->getPath()) && ! $this->force) { throw new FileAlreadyExistsException($path);
Add setUp method: used for setup some condition of command
diff --git a/sharding-proxy/src/test/java/io/shardingsphere/shardingproxy/transport/mysql/packet/command/query/text/query/ComQueryPacketTest.java b/sharding-proxy/src/test/java/io/shardingsphere/shardingproxy/transport/mysql/packet/command/query/text/query/ComQueryPacketTest.java index <HASH>..<HASH> 100644 --- a/sharding-proxy/src/test/java/io/shardingsphere/shardingproxy/transport/mysql/packet/command/query/text/query/ComQueryPacketTest.java +++ b/sharding-proxy/src/test/java/io/shardingsphere/shardingproxy/transport/mysql/packet/command/query/text/query/ComQueryPacketTest.java @@ -100,7 +100,7 @@ public final class ComQueryPacketTest { ShardingSchema shardingSchema = mock(ShardingSchema.class); Map<String, ShardingSchema> shardingSchemas = new HashMap<>(); shardingSchemas.put(ShardingConstant.LOGIC_SCHEMA_NAME, shardingSchema); - Field field = GlobalRegistry.class.getDeclaredField("shardingSchemas"); + Field field = GlobalRegistry.class.getDeclaredField("logicSchemas"); field.setAccessible(true); field.set(GlobalRegistry.getInstance(), shardingSchemas); }
modify ComQueryPacketTest.java
diff --git a/src/Provider/DatabaseMenuProvider.php b/src/Provider/DatabaseMenuProvider.php index <HASH>..<HASH> 100644 --- a/src/Provider/DatabaseMenuProvider.php +++ b/src/Provider/DatabaseMenuProvider.php @@ -29,7 +29,7 @@ class DatabaseMenuProvider implements MenuProviderInterface */ protected $matcher; - public function __construct(BuilderInterface $builder, RequestStack $requestStack, MatcherInterface $matcher = null) + public function __construct(BuilderInterface $builder, RequestStack $requestStack, MatcherInterface $matcher) { $this->builder = $builder; $this->requestStack = $requestStack; @@ -48,10 +48,8 @@ class DatabaseMenuProvider implements MenuProviderInterface { $menu = $this->builder->build($name, $this->requestStack->getCurrentRequest()); - if ($this->matcher !== null) { - foreach ($menu->getChildren() as $child) { - $child->setCurrent($this->matcher->isCurrent($child)); - } + foreach ($menu->getChildren() as $child) { + $child->setCurrent($this->matcher->isCurrent($child)); } return $menu;
Reverted the optional matcher argument to a required one No need to have an optional/nullable matcher as this is included with knp menu bundle anyway
diff --git a/lib/puppetdb_query/version.rb b/lib/puppetdb_query/version.rb index <HASH>..<HASH> 100644 --- a/lib/puppetdb_query/version.rb +++ b/lib/puppetdb_query/version.rb @@ -1,3 +1,3 @@ module PuppetDBQuery - VERSION = "0.0.33".freeze + VERSION = "0.0.34".freeze end
m<I>'s version bumper
diff --git a/src/components/dialog/QDialog.js b/src/components/dialog/QDialog.js index <HASH>..<HASH> 100644 --- a/src/components/dialog/QDialog.js +++ b/src/components/dialog/QDialog.js @@ -94,9 +94,8 @@ export default { this.$emit('input', val) }, show: () => { - this.$emit('show') - if (!this.$q.platform.is.desktop) { + this.$emit('show') return } @@ -109,6 +108,7 @@ export default { if (node.length) { node[0].focus() + this.$emit('show') return } } @@ -117,6 +117,7 @@ export default { if (node.length) { node[node.length - 1].focus() } + this.$emit('show') }, hide: () => { this.$emit('hide')
QDialog: emit show after focusing the element in dialog (#<I>) Allows simpler focusing of another elements in `@show` in userland. ref #<I>
diff --git a/phy/cluster/manual/view_model.py b/phy/cluster/manual/view_model.py index <HASH>..<HASH> 100644 --- a/phy/cluster/manual/view_model.py +++ b/phy/cluster/manual/view_model.py @@ -157,7 +157,7 @@ class FeatureViewModel(BaseViewModel): # (n_spikes, n_channels, n_features) # because that's what the FeatureView expects currently. n_fet = self.model.n_features_per_channel - n_channels = self.model.n_channels + n_channels = len(self.model.channel_order) shape = (-1, n_channels, n_fet) features = features[:, :n_fet * n_channels].reshape(shape) # Scale factor.
Fixed bug in feature view model due to cluster order.
diff --git a/billy/fulltext.py b/billy/fulltext.py index <HASH>..<HASH> 100644 --- a/billy/fulltext.py +++ b/billy/fulltext.py @@ -42,7 +42,10 @@ PUNCTUATION = re.compile('[%s]' % re.escape(string.punctuation)) def _clean_text(text): - text = text.encode('ascii', 'ignore') + if isinstance(text, unicode): + text = text.encode('ascii', 'ignore') + else: + text = text.decode('utf8', 'ignore').encode('ascii', 'ignore') text = text.replace(u'\xa0', u' ') # nbsp -> sp text = PUNCTUATION.sub(' ', text) # strip punctuation text = re.sub('\s+', ' ', text) # collapse spaces
try harder to clean up unicode
diff --git a/allegedb/allegedb/cache.py b/allegedb/allegedb/cache.py index <HASH>..<HASH> 100644 --- a/allegedb/allegedb/cache.py +++ b/allegedb/allegedb/cache.py @@ -611,17 +611,3 @@ class EdgesCache(Cache): = self.db._make_edge(self.db.graph[graph], nodeA, nodeB, idx) Cache.store(self, graph, nodeA, nodeB, idx, branch, rev, ex) self.predecessors[(graph, nodeB)][nodeA][idx][branch][rev] = ex - # am i doin it right?? - kc = self._update_keycache( - (graph, nodeA), branch, rev, (nodeB, idx), ex - ) - self._validate_keycache( - self.parents[(graph, nodeA)][(nodeB, idx)], - kc, - branch, rev, (graph, nodeA, nodeB, idx) - ) - self._validate_keycache( - self.keys[(graph, nodeA, nodeB, idx)], - kc, - branch, rev, (graph, nodeA, nodeB, idx) - )
Delete some tests that didn't make sense They seem entirely redundant with the ones already in Cache.store, actually. I think I had more caching in mind to do and tried to get all Test Driven Development about it, but then forgot all about it?
diff --git a/lib/active_attr/version.rb b/lib/active_attr/version.rb index <HASH>..<HASH> 100644 --- a/lib/active_attr/version.rb +++ b/lib/active_attr/version.rb @@ -1,5 +1,5 @@ module ActiveAttr # Complete version string # @since 0.1.0 - VERSION = "0.6.0" + VERSION = "0.7.0.alpha1" end
Bump development version to <I>.alpha1
diff --git a/tests/ServerTest.php b/tests/ServerTest.php index <HASH>..<HASH> 100644 --- a/tests/ServerTest.php +++ b/tests/ServerTest.php @@ -103,6 +103,15 @@ class ServerTest extends \PHPUnit_Framework_TestCase { $this->assertEquals($eventsTable, $subscribedEventsReflection->getValue($this->server)); } + public function testUnubscribingUnknownEventThrowsInvalidArgumentException() + { + $handler = $this->getMockBuilder('\noFlash\CherryHttp\EventsHandlerInterface')->getMock(); + $this->server->setEventsHandler($handler); + + $this->setExpectedException('\InvalidArgumentException'); + $this->server->unsubscribeEvent('unknownEvent'); + } + public function testHearbeatIntervalCanBeSet() { $serverReflection = new \ReflectionObject($this->server);
Added test for unknown event unsubscription in Server.
diff --git a/numexpr/expressions.py b/numexpr/expressions.py index <HASH>..<HASH> 100644 --- a/numexpr/expressions.py +++ b/numexpr/expressions.py @@ -15,8 +15,8 @@ import sys import threading import numpy -from distutils.version import LooseVersion -_np_version = LooseVersion(numpy.__version__) +from pkg_resources import parse_version +_np_version = parse_version(numpy.__version__) # Declare a double type that does not exist in Python space double = numpy.double @@ -282,7 +282,7 @@ def rtruediv_op(a, b): @ophelper def pow_op(a, b): - if (_np_version >= '1.12.0b1' and + if (_np_version >= parse_version('1.12.0b1') and b.astKind in ('int', 'long') and a.astKind in ('int', 'long') and numpy.any(b.value < 0)):
Better fix for gh-<I> distutils.LooseVersion does not handle correctly RC versions
diff --git a/lib/node-libnmap.js b/lib/node-libnmap.js index <HASH>..<HASH> 100644 --- a/lib/node-libnmap.js +++ b/lib/node-libnmap.js @@ -15,7 +15,7 @@ var version = 'v0.2.0' , ipv6 = require('ip-address').v6 , netmask = require('netmask').Netmask , proc = require('child_process').exec - , nmap = function(options, fn) { + , nmap = function(options, abc) { 'use strict'; @@ -180,7 +180,7 @@ var version = 'v0.2.0' */ flatten: function (report) { return this.recursive(report.nmaprun); - }, + } }; /** @@ -220,7 +220,7 @@ var version = 'v0.2.0' , reports = []; if (opts.range > 0) - return fn(new Error("Range of hosts could not be created")); + return new Error("Range of hosts could not be created"); Object.keys(opts.range).forEach(function(block) { @@ -565,9 +565,9 @@ var version = 'v0.2.0' }); tools.worker(opts, function scan(err, data) { - if (err) cb(err); + if (err) return cb(err); - cb(null, data); + return cb(null, data); }); }; };
Removed undefined fn()
diff --git a/container/docker/engine.py b/container/docker/engine.py index <HASH>..<HASH> 100644 --- a/container/docker/engine.py +++ b/container/docker/engine.py @@ -753,20 +753,22 @@ class Engine(BaseEngine): client.tag(image_id, repository, tag=image_buildstamp) logger.info('Pushing %s:%s...' % (repository, image_buildstamp)) - status = client.push(repository, + stream = client.push(repository, tag=image_buildstamp, stream=True) last_status = None - for line in status: - line = json.loads(line) - if type(line) is dict and 'error' in line: - logger.error(line['error']) - elif type(line) is dict and 'status' in line: - if line['status'] != last_status: - logger.info(line['status']) - last_status = line['status'] - else: - logger.debug(line) + for data in stream: + data = data.splitlines() + for line in data: + line = json.loads(line) + if type(line) is dict and 'error' in line: + logger.error(line['error']) + if type(line) is dict and 'status' in line: + if line['status'] != last_status: + logger.info(line['status']) + last_status = line['status'] + else: + logger.debug(line) def get_client(self): if not self._client:
Properly parse docker push output stream Properly parses the docker push output when multiple json lines from the data stream are returned
diff --git a/lib/rexport/export_methods.rb b/lib/rexport/export_methods.rb index <HASH>..<HASH> 100644 --- a/lib/rexport/export_methods.rb +++ b/lib/rexport/export_methods.rb @@ -247,6 +247,8 @@ module Rexport #:nodoc: end end + export_items.reset + position = 0 rexport_fields.each do |rexport_field| position += 1
fix sorting of renamed fields
diff --git a/lib/tokenizer.js b/lib/tokenizer.js index <HASH>..<HASH> 100644 --- a/lib/tokenizer.js +++ b/lib/tokenizer.js @@ -138,7 +138,7 @@ Tokenizer.prototype = { ABORT: function ABORT(){}, - SKIP: function SKIP(val){this.value = val;}, + SKIP: function SKIP(amount){this.amount = amount;}, /** * Match parsed tokens, starting at offset, skipping any token "types" specified in *skipTypes* * @@ -481,8 +481,13 @@ if (match instanceof Tokenizer.prototype.ABORT) return null; - if (match instanceof Tokenizer.prototype.SKIP) - match = match.value; + if (match instanceof Tokenizer.prototype.SKIP) { + console.log('DOING SKIP!!!'); + return { + offset: offset + (match.amount || 0), + value: match + } + } if (match && (match instanceof Array)) { match.index = offset; @@ -551,8 +556,8 @@ return new Tokenizer.prototype.ABORT(); }; - context.skip = function(match) { - return new Tokenizer.prototype.SKIP(match); + context.skip = function(amount) { + return new Tokenizer.prototype.SKIP(amount); }; this.tokens = tokens;
Fixed bug in tokenizer with skipping tokens
diff --git a/ui/js/directives/top_nav_bar.js b/ui/js/directives/top_nav_bar.js index <HASH>..<HASH> 100644 --- a/ui/js/directives/top_nav_bar.js +++ b/ui/js/directives/top_nav_bar.js @@ -40,12 +40,12 @@ treeherder.directive('thWatchedRepo', [ btnClass: "btn-view-nav-closed" }, "unsupported": { - icon: "", + icon: "fa-question", color: "treeUnavailable", btnClass: "btn-view-nav" }, "not retrieved yet": { - icon: "", + icon: "fa-spinner", color: "treeUnavailable", btnClass: "btn-view-nav" }
Bug <I> - Provide icons for repo btn states unsupported/not-retrieved
diff --git a/scripts/serverless.js b/scripts/serverless.js index <HASH>..<HASH> 100755 --- a/scripts/serverless.js +++ b/scripts/serverless.js @@ -448,7 +448,6 @@ processSpanPromise = (async () => { } } } - if (isHelpRequest || commands[0] === 'plugin') { processLog.debug('resolve variables in "plugins"'); // We do not need full config resolved, we just need to know what @@ -475,6 +474,12 @@ processSpanPromise = (async () => { if (!variablesMeta.size) return; // All properties successuflly resolved if (!ensureResolvedProperty('plugins')) return; + + // At this point we have all properties needed for `plugin install/uninstall` commands + if (commands[0] === 'plugin') { + return; + } + if (!ensureResolvedProperty('package\0path')) return; if (!ensureResolvedProperty('frameworkVersion')) return;
fix: Ensure to attempt minimal config resolution for plugin commands
diff --git a/messages.go b/messages.go index <HASH>..<HASH> 100644 --- a/messages.go +++ b/messages.go @@ -22,7 +22,7 @@ type Msg struct { User string `json:"user,omitempty"` Text string `json:"text,omitempty"` Timestamp string `json:"ts,omitempty"` - ThreadTimeStamp string `json:"thread_ts,omitempty"` + ThreadTimestamp string `json:"thread_ts,omitempty"` IsStarred bool `json:"is_starred,omitempty"` PinnedTo []string `json:"pinned_to, omitempty"` Attachments []Attachment `json:"attachments,omitempty"`
Rename ThreadTimeStamp to Threadtimestamp for consistency
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,27 @@ # -*- coding: utf-8 -*- +import os try: from setuptools import setup except ImportError: from distutils.core import setup +def walk_subpkg(name): + data_files = [] + package_dir = 'folium' + for parent, dirs, files in os.walk(os.path.join(package_dir, name)): + sub_dir = os.sep.join(parent.split(os.sep)[1:]) # remove package_dir from the path + for f in files: + data_files.append(os.path.join(sub_dir, f)) + return data_files + +pkg_data = { +'': ['*.js', + 'templates/*.html', + 'templates/*.js', + 'templates/*.txt'] + walk_subpkg('templates/tiles') +} + setup( name='folium', version='0.1.2', @@ -18,9 +35,5 @@ setup( 'Programming Language :: Python :: 2.7', 'License :: OSI Approved :: MIT License'], packages=['folium'], - package_data={'': ['*.js', - 'templates/*.html', - 'templates/*.js', - 'templates/*.txt', - 'plugins/*.js']} + package_data=pkg_data )
folium issue #<I> - fixed setup.py to package all the files in templates/tiles.
diff --git a/fireplace/enums.py b/fireplace/enums.py index <HASH>..<HASH> 100644 --- a/fireplace/enums.py +++ b/fireplace/enums.py @@ -56,14 +56,50 @@ class GameTag(IntEnum): WINDFURY = 189 TAUNT = 190 STEALTH = 191 + SPELLPOWER = 192 DIVINE_SHIELD = 194 CHARGE = 197 CARDRACE = 200 + FACTION = 201 CARDTYPE = 202 + FREEZE = 208 + RECALL = 215 + DEATH_RATTLE = 217 + BATTLECRY = 218 + SECRET = 219 + COMBO = 220 CANT_ATTACK = 227 FROZEN = 260 ARMOR = 292 NUM_ATTACKS_THIS_TURN = 297 + OneTurnEffect = 338 + ADJACENT_BUFF = 350 + AURA = 362 + POISONOUS = 363 + + # flavor + ELITE = 114 + CARD_SET = 183 + CLASS = 199 + RARITY = 203 + + # unused + AttackVisualType = 251 + DevState = 268 + Collectible = 321 + ENCHANTMENT_BIRTH_VISUAL = 330 + ENCHANTMENT_IDLE_VISUAL = 331 + + # strings + TRIGGER_VISUAL = 32 + CARDTEXT_INHAND = 184 + CARDNAME = 185 + CardTextInPlay = 252 + TARGETING_ARROW_TEXT = 325 + ARTISTNAME = 342 + FLAVORTEXT = 351 + HOW_TO_EARN = 364 + HOW_TO_EARN_GOLDEN = 365 class PlayReq(IntEnum):
Add most currently-used GameTags
diff --git a/mod/imscp/backup/moodle1/lib.php b/mod/imscp/backup/moodle1/lib.php index <HASH>..<HASH> 100644 --- a/mod/imscp/backup/moodle1/lib.php +++ b/mod/imscp/backup/moodle1/lib.php @@ -122,13 +122,18 @@ class moodle1_mod_imscp_handler extends moodle1_mod_handler { protected function parse_structure($data, $contextid) { global $CFG; - $temppath = $this->converter->get_tempdir_path(); - $manifestfilecontents = file_get_contents($temppath.'/moddata/resource/'.$data['id'].'/imsmanifest.xml'); + $manifestfile = $this->converter->get_tempdir_path().'/moddata/resource/'.$data['id'].'/imsmanifest.xml'; + if (!file_exists($manifestfile)) { + // todo add to conversion log + return null; + } + $manifestfilecontents = file_get_contents($manifestfile); if (empty($manifestfilecontents)) { + // todo add to conversion log return null; } require_once($CFG->dirroot.'/mod/imscp/locallib.php'); return imscp_parse_manifestfile($manifestfilecontents); } -} \ No newline at end of file +}
MDL-<I> IMS content package converter checks that the manifest file exists
diff --git a/src/isEmptyFunction.js b/src/isEmptyFunction.js index <HASH>..<HASH> 100644 --- a/src/isEmptyFunction.js +++ b/src/isEmptyFunction.js @@ -2,7 +2,7 @@ module.exports = function(aFunc, istanbul) { var vStr = aFunc.toString(); var result = /^function\s*\S*\s*\((.|[\n\r\u2028\u2029])*\)\s*{[\s;]*}$/g.test(vStr); if (!result) { - if (!istanbul) try {istanbul = require('istanbul');} catch(e){} + if (!istanbul) try {istanbul = eval("require('istanbul')");} catch(e){} if (istanbul) result = /^function\s*\S*\s*\((.|[\n\r\u2028\u2029])*\)\s*{__cov_[\d\w_]+\.f\[.*\]\+\+;}$/.test(vStr); }
* [bug] the Webpack / Browserify / etc do not "conditional" requires the require gets executed at build time. closes #2
diff --git a/mongoctl/mongoctl.py b/mongoctl/mongoctl.py index <HASH>..<HASH> 100644 --- a/mongoctl/mongoctl.py +++ b/mongoctl/mongoctl.py @@ -3805,8 +3805,7 @@ class Server(DocumentWrapper): status['connection'] = True can_admin = True - if (admin and - self.is_auth() and + if (self.is_auth() and self.needs_to_auth("admin") and not self.has_auth_to("admin")): status['error'] = "Cannot authenticate"
Making is_administrable( ) more accurate by reverting get_status( ) to always attempt to auth
diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js index <HASH>..<HASH> 100644 --- a/src/MarkerClusterGroup.js +++ b/src/MarkerClusterGroup.js @@ -416,6 +416,7 @@ export var MarkerClusterGroup = L.MarkerClusterGroup = L.FeatureGroup.extend({ //If we aren't on the map (yet), blow away the markers we know of if (!this._map) { this._needsClustering = []; + this._needsRemoving = []; delete this._gridClusters; delete this._gridUnclustered; }
Clear out _needsRemoving when clearLayers is called while we aren't on the map. Otherwise we'll try remove them when we are added, which breaks things. Refs #<I>
diff --git a/spec/api-browser-window-spec.js b/spec/api-browser-window-spec.js index <HASH>..<HASH> 100644 --- a/spec/api-browser-window-spec.js +++ b/spec/api-browser-window-spec.js @@ -153,6 +153,14 @@ describe('browser-window module', function () { }) w.loadURL('file://' + path.join(fixtures, 'api', 'did-fail-load-iframe.html')) }) + + it('does not crash in did-fail-provisional-load handler', function (done) { + w.webContents.once('did-fail-provisional-load', function () { + w.loadURL('http://somewhere-that-does-not.exist/') + done() + }) + w.loadURL('http://somewhere-that-does-not.exist/') + }) }) describe('BrowserWindow.show()', function () {
spec: loadUrl should not crash in did-fail-provisional-load handler
diff --git a/lib/cuke_modeler/models/cell.rb b/lib/cuke_modeler/models/cell.rb index <HASH>..<HASH> 100644 --- a/lib/cuke_modeler/models/cell.rb +++ b/lib/cuke_modeler/models/cell.rb @@ -1,6 +1,5 @@ module CukeModeler - # A class modeling a single cell of a row. class Cell < Model include Sourceable
Break some more stuff Adding a break for the documentation and linting jobs, in order to see how they react.
diff --git a/salt/engines/sqs_events.py b/salt/engines/sqs_events.py index <HASH>..<HASH> 100644 --- a/salt/engines/sqs_events.py +++ b/salt/engines/sqs_events.py @@ -167,4 +167,6 @@ def start(queue, profile=None, tag='salt/engine/sqs', owner_acct_id=None): while True: if not q: q = sqs.get_queue(queue, owner_acct_id=owner_acct_id) + q.set_message_class(boto.sqs.message.RawMessage) + _process_queue(q, queue, fire_master, tag=tag, owner_acct_id=owner_acct_id, message_format=message_format)
Surpress boto WARNING during decode, reference: <URL>
diff --git a/src/lang/nl/lfm.php b/src/lang/nl/lfm.php index <HASH>..<HASH> 100644 --- a/src/lang/nl/lfm.php +++ b/src/lang/nl/lfm.php @@ -50,6 +50,7 @@ return [ 'error-instance' => 'Het geuploade bestand moet een instantie zijn van UploadedFile', 'error-invalid' => 'Ongeldig upload verzoek', 'error-other' => 'Er is een fout opgetreden: ', + 'error-size' => 'U heeft de maximale bestandsgrootte overschreden:', 'error-too-large' => 'De verzoek entiteit is te groot!', 'btn-upload' => 'Bestand uploaden',
Merge pull request #<I> from tvbeek/patch-1 * Add a missing dutch translation line * Update lfm.php
diff --git a/mnemosyned/daemon.go b/mnemosyned/daemon.go index <HASH>..<HASH> 100644 --- a/mnemosyned/daemon.go +++ b/mnemosyned/daemon.go @@ -3,6 +3,7 @@ package mnemosyned import ( "database/sql" "errors" + "fmt" "io" "net" "net/http" @@ -147,7 +148,7 @@ func (d *Daemon) Run() (err error) { interceptor := promgrpc.NewInterceptor(promgrpc.InterceptorOpts{}) d.clientOptions = []grpc.DialOption{ - grpc.WithUserAgent(subsystem), + grpc.WithUserAgent(fmt.Sprintf("%s:%s", subsystem, d.opts.Version)), grpc.WithStatsHandler(interceptor), grpc.WithDialer(interceptor.Dialer(func(addr string, timeout time.Duration) (net.Conn, error) { return net.DialTimeout("tcp", addr, timeout)
grpc user agent has service version as well
diff --git a/ansible_runner/runner_config.py b/ansible_runner/runner_config.py index <HASH>..<HASH> 100644 --- a/ansible_runner/runner_config.py +++ b/ansible_runner/runner_config.py @@ -288,12 +288,12 @@ class RunnerConfig(object): output.debug("Not loading settings") self.settings = dict() - try: - if self.ssh_key_data is None: - self.ssh_key_data = self.loader.load_file('env/ssh_key', string_types) - except ConfigurationError: - output.debug("Not loading ssh key") - self.ssh_key_data = None + try: + if self.ssh_key_data is None: + self.ssh_key_data = self.loader.load_file('env/ssh_key', string_types) + except ConfigurationError: + output.debug("Not loading ssh key") + self.ssh_key_data = None self.idle_timeout = self.settings.get('idle_timeout', None) self.job_timeout = self.settings.get('job_timeout', None)
Revert accidental indentation change from ac<I>d0.
diff --git a/test/core_tasks.js b/test/core_tasks.js index <HASH>..<HASH> 100644 --- a/test/core_tasks.js +++ b/test/core_tasks.js @@ -6,6 +6,7 @@ describe('Core: Tasks', function(){ var taskOutput = []; before(function(done){ + this.timeout(10000) specHelper.stopServer(0, function(api){ specHelper.prepare(0, function(api){ rawAPI = api; @@ -326,6 +327,7 @@ describe('Core: Tasks', function(){ }); it('tasks can be passed params and taskWorkers can work on thier own', function(done){ + this.timeout(10000) taskOutput = []; rawAPI.redis.client.flushdb(function(){ var worker = new rawAPI.taskProcessor({id: 1}); @@ -336,7 +338,7 @@ describe('Core: Tasks', function(){ taskOutput[0].should.equal('TEST'); worker.stop(); done(); - }, 1000) + }, rawAPI.tasks.cycleTimeMS * 2 + 1) }); }); });
update task tests to slower sample time:
diff --git a/aws-sdk-core/lib/aws-sdk-core/xml/parser.rb b/aws-sdk-core/lib/aws-sdk-core/xml/parser.rb index <HASH>..<HASH> 100644 --- a/aws-sdk-core/lib/aws-sdk-core/xml/parser.rb +++ b/aws-sdk-core/lib/aws-sdk-core/xml/parser.rb @@ -20,6 +20,21 @@ module Aws @engine = options[:engine] || self.class.engine end + # Parses the XML document, returning a parsed structure. + # + # If you pass a block, this will yield for XML + # elements that are not modeled in the rules given + # to the constructor. + # + # parser.parse(xml) do |path, value| + # puts "uhandled: #{path.join('/')} - #{value}" + # end + # + # The purpose of the unhandled callback block is to + # allow callers to access values such as the EC2 + # request ID that are part of the XML body but not + # part of the operation result. + # # @param [String] xml An XML document string to parse. # @param [Structure] target (nil) # @return [Structure]
Added clarifying docs.
diff --git a/scripts/documentation/generate.js b/scripts/documentation/generate.js index <HASH>..<HASH> 100644 --- a/scripts/documentation/generate.js +++ b/scripts/documentation/generate.js @@ -139,14 +139,14 @@ async function execute() { await git.commit(message, [FINAL_SAVE_PATH]); console.info("\x1b[32m", `Changes committed to ${TARGET_BRANCH} branch`, "\x1b[0m"); - // Push changes + // Push changes and remove tmp folder await git.push(); console.info("\x1b[32m", `Changes pushed to remote`, "\x1b[0m"); + await rimraf(TMP_FOLDER); - // Come back to original branch and remove tmp folder + // Come back to original branch console.info("\x1b[32m", `Switching back to '${ORIGINAL_BRANCH}' branch`, "\x1b[0m"); await git.checkout(ORIGINAL_BRANCH); - await rimraf(TMP_FOLDER); }
Remove tmp folder at the end
diff --git a/src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java b/src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java +++ b/src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java @@ -457,6 +457,7 @@ public abstract class AbstractGitFlowMojo extends AbstractMojo { // quotes // https://github.com/aleksandr-m/gitflow-maven-plugin/issues/3 branches = removeQuotes(branches); + branches = StringUtils.strip(branches); return branches; }
Strip some whitespace characters in find branches - closes #<I>
diff --git a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/URL.java b/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/URL.java index <HASH>..<HASH> 100644 --- a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/URL.java +++ b/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/URL.java @@ -1189,8 +1189,8 @@ public final class URL implements java.io.Serializable { if (handler == null) { try { if (protocol.equals("file")) { - handler = (URLStreamHandler)Class. - forName("sun.net.www.protocol.file.Handler").newInstance(); + // https://github.com/google/j2objc/issues/912 + handler = new sun.net.www.protocol.file.Handler(); } else if (protocol.equals("jar")) { throw new UnsupportedOperationException("Jar streams are not supported."); } else if (protocol.equals("http")) {
Issue #<I>: fixed file URLStreamHandler linking.
diff --git a/tensorflow_probability/python/vi/optimization.py b/tensorflow_probability/python/vi/optimization.py index <HASH>..<HASH> 100644 --- a/tensorflow_probability/python/vi/optimization.py +++ b/tensorflow_probability/python/vi/optimization.py @@ -135,10 +135,10 @@ def fit_surrogate_posterior(target_log_prob_fn, Default value: 'fit_surrogate_posterior'. Returns: - results: `Tensor` or nested structure of `Tensor`s, according to the - return type of `result_fn`. Each `Tensor` has an added leading dimension - of size `num_steps`, packing the trajectory of the result over the course - of the optimization. + results: `Tensor` or nested structure of `Tensor`s, according to the return + type of `trace_fn`. Each `Tensor` has an added leading dimension of size + `num_steps`, packing the trajectory of the result over the course of the + optimization. #### Examples
Fix a typo in the description of fit_surrogate_posterior
diff --git a/lib/rdo/colored_logger.rb b/lib/rdo/colored_logger.rb index <HASH>..<HASH> 100644 --- a/lib/rdo/colored_logger.rb +++ b/lib/rdo/colored_logger.rb @@ -15,9 +15,9 @@ module RDO self.formatter = Proc.new do |severity, time, prog, msg| case severity - when "DEBUG" then "\033[35mSQL\033[0m \033[36m~\033[0m %s\n" % msg - when "FATAL" then "\033[31mERROR ~ %s\033[0m\n" % msg - else "%s ~ %s\n" % [severity, msg] + when "DEBUG" then "\033[35mSQL\033[0m \033[36m~\033[0m %s#{$/}" % msg + when "FATAL" then "\033[31mERROR ~ %s\033[0m#{$/}" % msg + else "%s ~ %s#{$/}" % [severity, msg] end end end
Use cross-platform line-endings in logger
diff --git a/doc/conf.py b/doc/conf.py index <HASH>..<HASH> 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -61,9 +61,9 @@ copyright = u'2015, Jeong-Yoon Lee' # built documents. # # The short X.Y version. -version = '0.4' +version = '0.5' # The full version, including alpha/beta/rc tags. -release = '0.4.4' +release = '0.5.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/kaggler/__init__.py b/kaggler/__init__.py index <HASH>..<HASH> 100644 --- a/kaggler/__init__.py +++ b/kaggler/__init__.py @@ -1,4 +1,4 @@ -__version__ = '0.4.4' +__version__ = '0.5.0' __all__ = ['const', 'data_io', 'feature_selection', diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ except ImportError: setup( name='Kaggler', - version='0.4.4', + version='0.5.0', author='Jeong-Yoon Lee', author_email='jeongyoon.lee1@gmail.com',
update version number to <I>
diff --git a/lenses/lens.py b/lenses/lens.py index <HASH>..<HASH> 100644 --- a/lenses/lens.py +++ b/lenses/lens.py @@ -24,7 +24,6 @@ lens_methods = [ ('norm_', baselens.NormalisingLens), ('setter_', baselens.SetterLens), ('traverse_', baselens.TraverseLens), - ('trivial_', baselens.TrivialLens), ('tuple_', baselens.TupleLens), ('values_', baselens.ValuesLens), ('zoomattr_', baselens.ZoomAttrLens), diff --git a/tests/test_lens.py b/tests/test_lens.py index <HASH>..<HASH> 100644 --- a/tests/test_lens.py +++ b/tests/test_lens.py @@ -216,7 +216,7 @@ def test_lens_divide(): # Testing that you can use sublenses through Lens properly def test_lens_trivial(): - assert lens(3).trivial_().get() == 3 + assert lens(3).get() == 3 def test_lens_getitem():
removed useless trivial lens access from api
diff --git a/lib/abn_search.rb b/lib/abn_search.rb index <HASH>..<HASH> 100644 --- a/lib/abn_search.rb +++ b/lib/abn_search.rb @@ -181,7 +181,7 @@ class ABNSearch else if !result[:legal_name].blank? && result[:legal_name].length > 2 result[:name] = result[:legal_name] - elsif !result[:legal_name].blank? + elsif !result[:legal_name2].blank? result[:name] = result[:legal_name2] end end @@ -192,4 +192,4 @@ class ABNSearch def valid? self.errors.size == 0 end -end \ No newline at end of file +end
fixed parse_search_results so that legal_name2 can be used as the name
diff --git a/mobly/utils.py b/mobly/utils.py index <HASH>..<HASH> 100644 --- a/mobly/utils.py +++ b/mobly/utils.py @@ -19,7 +19,6 @@ import logging import os import platform import portpicker -import psutil import random import re import signal @@ -331,6 +330,10 @@ def stop_standing_subprocess(proc, kill_signal=signal.SIGTERM): Raises: Error: if the subprocess could not be stopped. """ + # Only import psutil when actually needed. + # psutil may cause import error in certain env. This way the utils module + # doesn't crash upon import. + import psutil pid = proc.pid logging.debug('Stopping standing subprocess %d', pid) process = psutil.Process(pid)
Localize `psutil` usage. (#<I>)
diff --git a/src/elements/NavLink.js b/src/elements/NavLink.js index <HASH>..<HASH> 100644 --- a/src/elements/NavLink.js +++ b/src/elements/NavLink.js @@ -1,8 +1,9 @@ import styled from 'styled-components'; import theme from '../theme'; -const NavLink = styled.a` +const NavLink = styled.div` + a { text-decoration: none; display: block; padding: 20px 30px; @@ -18,6 +19,7 @@ const NavLink = styled.a` font-weight: 800; font-size: 16px; } + } svg { margin-right: 10px; @@ -26,10 +28,14 @@ const NavLink = styled.a` } @media (max-width: 768px) { + + a { padding: 20px 0; margin-left: auto; margin-right: auto; text-align: center; + } + svg { margin-right: 0;
Nav Links style contained <a> tags.
diff --git a/src/api/helpers/generateWrappers.js b/src/api/helpers/generateWrappers.js index <HASH>..<HASH> 100644 --- a/src/api/helpers/generateWrappers.js +++ b/src/api/helpers/generateWrappers.js @@ -32,7 +32,7 @@ function generateWrappers(cls, types, prefixMap, metadata) { } = func; // Don't parse deprecated APIs - if (deprecatedSince === '1') { + if (deprecatedSince <= 2) { return; }
Fix ignore deprecated methods (ignore since 2)
diff --git a/src/ol/renderer/dom/domtilelayerrenderer.js b/src/ol/renderer/dom/domtilelayerrenderer.js index <HASH>..<HASH> 100644 --- a/src/ol/renderer/dom/domtilelayerrenderer.js +++ b/src/ol/renderer/dom/domtilelayerrenderer.js @@ -79,15 +79,15 @@ ol.renderer.dom.TileLayer.prototype.renderFrame = return; } + var view2DState = frameState.view2DState; + var tileLayer = this.getTileLayer(); var tileSource = tileLayer.getTileSource(); var tileGrid = tileSource.getTileGrid(); - - var view2DState = frameState.view2DState; var z = tileGrid.getZForResolution(view2DState.resolution); - var tileRange = tileGrid.getTileRangeForExtentAndResolution( - frameState.extent, view2DState.resolution); var tileResolution = tileGrid.getResolution(z); + var tileRange = tileGrid.getTileRangeForExtentAndResolution( + frameState.extent, tileResolution); /** @type {Object.<number, Object.<string, ol.Tile>>} */ var tilesToDrawByZ = {};
Structure DOM renderer code to be more similar to WebGL renderer code
diff --git a/docs/conf.py b/docs/conf.py index <HASH>..<HASH> 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -134,8 +134,8 @@ html_theme_options = { 'github_banner': True, 'show_powered_by': False, 'extra_nav_links': { - 'invenio-openaire@GitHub': 'http://github.com/inveniosoftware/invenio-openaire', - 'invenio-openaire@PyPI': 'http://pypi.python.org/pypi/invenio-openaire/', + 'invenio-openaire@GitHub': 'https://github.com/inveniosoftware/invenio-openaire', + 'invenio-openaire@PyPI': 'https://pypi.python.org/pypi/invenio-openaire/', } } @@ -326,3 +326,6 @@ texinfo_documents = [ # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {'https://docs.python.org/': None} + +# Autodoc configuraton. +autoclass_content = 'both'
docs: autodoc configuration and HTTPS fix * Replaces HTTP links with HTTPS where possible.
diff --git a/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java b/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java index <HASH>..<HASH> 100644 --- a/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java +++ b/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java @@ -133,6 +133,8 @@ public class JBossWSInvoker extends JAXWSMethodInvoker implements Invoker targetBean = this.getServiceObject(exchange); } + //[JBWS-3843] workaround: set the CallbackHandler threadlocal again; as a matter of fact, if that's in the Exchange, + //DIGEST auth is being used and that will cause the EJB layer to re-do authentication because of the bug CallbackHandler cbHandler = exchange.getInMessage().get(CallbackHandler.class); Object obj = null; try
[JBWS-<I>] Adding comment explaining the workaround; proper fix will come in PicketBox
diff --git a/geom_test.go b/geom_test.go index <HASH>..<HASH> 100644 --- a/geom_test.go +++ b/geom_test.go @@ -201,6 +201,11 @@ func TestGeoMIsInvert(t *testing.T) { cpx.Scale(1.5, 2.5) cpx.Translate(-2, -3) + cpx2 := GeoM{} + cpx2.Scale(2, 3) + cpx2.Rotate(0.234) + cpx2.Translate(100, 100) + cases := []struct { GeoM GeoM Invertible bool @@ -225,6 +230,10 @@ func TestGeoMIsInvert(t *testing.T) { GeoM: cpx, Invertible: true, }, + { + GeoM: cpx2, + Invertible: true, + }, } pts := []struct { diff --git a/internal/affine/geom.go b/internal/affine/geom.go index <HASH>..<HASH> 100644 --- a/internal/affine/geom.go +++ b/internal/affine/geom.go @@ -188,7 +188,7 @@ func (g *GeoM) det() float64 { if g == nil { return 1 } - return (g.a_1+1)*(g.d_1+1) - g.b - g.c + return (g.a_1+1)*(g.d_1+1) - g.b*g.c } func (g *GeoM) IsInvertible() bool {
affine: Bug fix: (*GeoM).det() was wrong (#<I>)
diff --git a/FFmpegMovie.php b/FFmpegMovie.php index <HASH>..<HASH> 100644 --- a/FFmpegMovie.php +++ b/FFmpegMovie.php @@ -202,7 +202,7 @@ class FFmpegMovie implements Serializable { // Get information about file from ffmpeg $output = array(); - exec('ffmpeg -i '.$this->movieFile.' 2>&1', $output, $retVar); + exec('ffmpeg -i '.escapeshellarg($this->movieFile).' 2>&1', $output, $retVar); $this->ffmpegOut = join(PHP_EOL, $output); // No ffmpeg installed @@ -609,7 +609,7 @@ class FFmpegMovie implements Serializable { $frameFilePath = sys_get_temp_dir().uuid().'.jpg'; $frameTime = round((($framePos / $this->getFrameCount()) * $this->getDuration()), 4); - exec('ffmpeg -i '.$this->movieFile.' -vframes 1 -ss '.$frameTime.' '.$frameFilePath.' 2>&1', $out); + exec('ffmpeg -i '.escapeshellarg($this->movieFile).' -vframes 1 -ss '.$frameTime.' '.$frameFilePath.' 2>&1', $out); // Cannot write frame to the data storage if (!file_exists($frameFilePath)) {
Security hole patched with escapeshellarg()
diff --git a/lib/Podio.php b/lib/Podio.php index <HASH>..<HASH> 100644 --- a/lib/Podio.php +++ b/lib/Podio.php @@ -44,7 +44,7 @@ class Podio { if ($options && !empty($options['session_manager'])) { if (is_string($options['session_manager']) && class_exists($options['session_manager'])) { self::$session_manager = new $options['session_manager']; - } else if (is_object($options['session_manager']) && method_exists($options['session_manager'], 'get') && method_exists($options['session_manager'], 'get')) { + } else if (is_object($options['session_manager']) && method_exists($options['session_manager'], 'get') && method_exists($options['session_manager'], 'set')) { self::$session_manager = $options['session_manager']; } if (self::$session_manager) {
Both get and set functions should be checked in a session manager object, not twice get.
diff --git a/spec/current_month_spec.rb b/spec/current_month_spec.rb index <HASH>..<HASH> 100644 --- a/spec/current_month_spec.rb +++ b/spec/current_month_spec.rb @@ -8,11 +8,11 @@ describe Beggar::CurrentMonth do end it 'returns weekdays' do - pending + current_month.weekdays.should == 21 end it 'returns weekdays until today' do - pending + current_month.weekdays_until_today.should == 13 end it 'returns weekdays in hours' do @@ -24,31 +24,32 @@ describe Beggar::CurrentMonth do end it 'returns weekdays progression' do - pending + current_month.weekdays_progression.should == 62 end it 'returns weekdays until date' do - pending + date = Date.new(2012, 2, 23) + current_month.weekdays_until(date).should == 17 end it 'returns first day of month' do - pending + current_month.first_day.should == Date.new(2012, 2, 1) end it 'returns last day of month' do - pending + current_month.last_day.should == Date.new(2012, 2, 29) end it 'returns year' do - pending + current_month.year.should == 2012 end it 'returns month' do - pending + current_month.month.should == 2 end it 'returns today' do - pending + current_month.today.should == Date.new(2012, 2, 17) end end
Add missing specs for CurrentMonth class
diff --git a/classes/Util.php b/classes/Util.php index <HASH>..<HASH> 100644 --- a/classes/Util.php +++ b/classes/Util.php @@ -83,6 +83,7 @@ class QM_Util { self::$file_dirs['go-plugin'] = self::standard_dir( WPMU_PLUGIN_DIR . '/shared-plugins' ); self::$file_dirs['mu-plugin'] = self::standard_dir( WPMU_PLUGIN_DIR ); self::$file_dirs['vip-plugin'] = self::standard_dir( get_theme_root() . '/vip/plugins' ); + self::$file_dirs['theme'] = null; self::$file_dirs['stylesheet'] = self::standard_dir( get_stylesheet_directory() ); self::$file_dirs['template'] = self::standard_dir( get_template_directory() ); self::$file_dirs['other'] = self::standard_dir( WP_CONTENT_DIR ); @@ -152,9 +153,11 @@ class QM_Util { } else { $name = __( 'Theme', 'query-monitor' ); } + $type = 'theme'; break; case 'template': $name = __( 'Parent Theme', 'query-monitor' ); + $type = 'theme'; break; case 'other': // Anything else that's within the content directory should appear as
Specify a common component type for themes.
diff --git a/src/SidebarMenu.php b/src/SidebarMenu.php index <HASH>..<HASH> 100644 --- a/src/SidebarMenu.php +++ b/src/SidebarMenu.php @@ -41,12 +41,12 @@ class SidebarMenu extends \hipanel\base\Menu implements \yii\base\BootstrapInter 'tariffs' => [ 'label' => Yii::t('hipanel/finance', 'Tariffs'), 'url' => ['/finance/tariff/index'], - 'visible' => function () { return Yii::$app->user->can('support') ?: false; }, + 'visible' => function () { return Yii::$app->user->can('support'); }, ], 'holds' => [ 'label' => Yii::t('hipanel/finance', 'Held payments'), 'url' => ['/finance/held-payments/index'], - 'visible' => function () { return Yii::$app->user->can('resell') ?: false; }, + 'visible' => function () { return Yii::$app->user->can('resell'); }, ], ], ],
Removed Client and Seller filters from the AdvancedSearch view for non-support
diff --git a/src/shapes/labels.js b/src/shapes/labels.js index <HASH>..<HASH> 100644 --- a/src/shapes/labels.js +++ b/src/shapes/labels.js @@ -23,7 +23,7 @@ d3plus.shape.labels = function(vars,selection,enter,exit) { var align = t.anchor || vars.style.labels.align, tspan = this.tagName == "tspan", share = tspan ? this.parentNode.className.baseVal == "share" : this.className.baseVal == "share", - width = d3.select(this).node().getBBox().width, + width = d3.select(this).node().getComputedTextLength(), rtl = vars.style.labels.dir == "rtl" if (align == "middle" || share) {
fixed cross-browser problem with .getBBox() of tspan element
diff --git a/lib/swag_dev/project/tools/vagrant/shell.rb b/lib/swag_dev/project/tools/vagrant/shell.rb index <HASH>..<HASH> 100644 --- a/lib/swag_dev/project/tools/vagrant/shell.rb +++ b/lib/swag_dev/project/tools/vagrant/shell.rb @@ -16,6 +16,8 @@ class SwagDev::Project::Tools::Vagrant::Shell # @return [Hash] attr_reader :options + # Initialize a shell with given options + # # @param [Hash] def initialize(options = {}) @options = options @@ -71,9 +73,9 @@ class SwagDev::Project::Tools::Vagrant::Shell require 'rake' require 'rake/file_utils' - # rubocop:disable Style/CaseEquality - cmd.push(options) unless cmd.last === Hash - # rubocop:enable Style/CaseEquality + unless cmd.last.is_a?(Hash) and !cmd.last.empty? + cmd.push(options.clone) + end ::Rake::FileUtilsExt.sh(*cmd, &block) end
vagrant/shell (tools) minor bugfix
diff --git a/consumables/js/es2015/index.js b/consumables/js/es2015/index.js index <HASH>..<HASH> 100644 --- a/consumables/js/es2015/index.js +++ b/consumables/js/es2015/index.js @@ -135,8 +135,12 @@ export { * by searching for elements with `data-component-name` (e.g. `data-loading`) attribute * or upon DOM events (e.g. clicking) on such elements. * See each components' static `.init()` methods for details. + * + * HeaderNav is not instantiated - see PR https://github.ibm.com/Bluemix/bluemix-components/pull/1318 + * * @private */ + const init = () => { if (!settings.disableAutoInit) { FabButton.init(); @@ -145,7 +149,6 @@ const init = () => { Tab.init(); OverflowMenu.init(); Modal.init(); - HeaderNav.init(); Toolbars.init(); Loading.init(); Dropdown.init();
[6.x] Hotfix clash between Bluemix.Common and bluemix-components.js (#<I>) Remove auto init for HeaderNav