diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/upload/admin/controller/openbay/amazon.php b/upload/admin/controller/openbay/amazon.php index <HASH>..<HASH> 100644 --- a/upload/admin/controller/openbay/amazon.php +++ b/upload/admin/controller/openbay/amazon.php @@ -164,7 +164,7 @@ class ControllerOpenbayAmazon extends Controller { $response = simplexml_load_string($this->openbay->amazon->callWithResponse('plans/getPlans')); - $data['plans'][] = array(); + $data['plans'] = array(); if ($response) { foreach ($response->Plan as $plan) { diff --git a/upload/admin/controller/openbay/amazonus.php b/upload/admin/controller/openbay/amazonus.php index <HASH>..<HASH> 100644 --- a/upload/admin/controller/openbay/amazonus.php +++ b/upload/admin/controller/openbay/amazonus.php @@ -161,7 +161,7 @@ class ControllerOpenbayAmazonus extends Controller { $response = simplexml_load_string($this->openbay->amazonus->callWithResponse('plans/getPlans')); - $data['plans'][] = array(); + $data['plans'] = array(); if ($response) { foreach ($response->Plan as $plan) {
Removed empty array element from plan array.
diff --git a/internal/config/cgmgr/systemd.go b/internal/config/cgmgr/systemd.go index <HASH>..<HASH> 100644 --- a/internal/config/cgmgr/systemd.go +++ b/internal/config/cgmgr/systemd.go @@ -156,12 +156,9 @@ func (m *SystemdManager) SandboxCgroupPath(sbParent, sbID string) (cgParent, cgP if !strings.HasSuffix(filepath.Base(sbParent), ".slice") { return "", "", fmt.Errorf("cri-o configured with systemd cgroup manager, but did not receive slice as parent: %s", sbParent) } - cgParent, slicePath, err := sandboxCgroupAbsolutePath(sbParent) - if err != nil { - return "", "", err - } - if err := verifyCgroupHasEnoughMemory(slicePath, m.memoryPath, m.memoryMaxFile); err != nil { + cgParent = convertCgroupFsNameToSystemd(sbParent) + if err := verifyCgroupHasEnoughMemory(sbParent, m.memoryPath, m.memoryMaxFile); err != nil { return "", "", err }
cgmgr/systemd: don't recalculate cgroup path from the looks of it, we were expanding the slice unnecessarily, as we're already passed a path
diff --git a/quickplots/charts.py b/quickplots/charts.py index <HASH>..<HASH> 100644 --- a/quickplots/charts.py +++ b/quickplots/charts.py @@ -494,7 +494,9 @@ class AxisChart(Chart): line_width=0, name="block-s" ) - canvas._graphics.append(canvas._graphics.pop(0)) # Dirty hack + title = canvas.graphics()[0] + while canvas.graphics().index(title) != len(canvas.graphics()) - 1: + canvas.move_graphic_forward(title) canvas.graphics()[-1].y(self.vertical_padding() * canvas.height() * 0.5) canvas.graphics()[-1].vertical_align("center")
Make use of new omnicanvas graphic reordering to bring title forwards
diff --git a/formats.js b/formats.js index <HASH>..<HASH> 100644 --- a/formats.js +++ b/formats.js @@ -28,7 +28,7 @@ exports['hostname'] = function (input) { } exports['alpha'] = /^[a-zA-Z]+$/ exports['alphanumeric'] = /^[a-zA-Z0-9]+$/ -exports['style'] = /\s*(.+?):\s*([^;]+);?/g +exports['style'] = /.:\s*[^;]/g exports['phone'] = function (input) { if (!(rePhoneFirstPass.test(input))) return false if (rePhoneDoubleSpace.test(input)) return false
Fix a ReDoS in 'style' format As there are no `^` or `$` anchors in the regex, this should be equivalent. Patch deliberately does not change the behavior.
diff --git a/Core.php b/Core.php index <HASH>..<HASH> 100644 --- a/Core.php +++ b/Core.php @@ -812,12 +812,15 @@ class Core implements iCore if($requirement != 'samsonos/php_core') { // Try developer relative path - $path = '../../vendor'.$requirement; + $path = '../../vendor/'; if (!file_exists($path)) { // Build path to module - $path = __SAMSON_VENDOR_PATH.$requirement; + $path = __SAMSON_VENDOR_PATH; } + // Build path to module + $path .= $requirement; + // If path with underscores does not exists if (!file_exists($path)) { // Try path without underscore
Added patch for local developer module development by trying to find relative ../../vendor path
diff --git a/src/wyil/transforms/TypePropagation.java b/src/wyil/transforms/TypePropagation.java index <HASH>..<HASH> 100755 --- a/src/wyil/transforms/TypePropagation.java +++ b/src/wyil/transforms/TypePropagation.java @@ -1027,7 +1027,7 @@ public class TypePropagation extends ForwardFlowAnalysis<TypePropagation.Env> { do { // iterate until a fixed point reached oldEnv = newEnv != null ? newEnv : environment; - newEnv = propagate(body, oldEnv); + newEnv = propagate(index+1,body, oldEnv); } while (!newEnv.equals(oldEnv)); environment = join(environment, newEnv);
Another bug fix for forward flow analysis and type propagation.
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -36,7 +36,7 @@ MongoDOWN.prototype._open = function (options, callback) { if (!options.createIfMissing) dbExists(self.location, function (err, exists) { if (err) return callback(err); - if (!exists) return callback(new Error('Database ' + self.location + ' doesn\'t exist')); + if (!exists) return callback(new Error('Database ' + self.location + ' does not exist')); connect(); }); else if (options.errorIfExists)
Use common error messages This error message is expected by abstract-down
diff --git a/src/ossos-pipeline/ossos/astrom.py b/src/ossos-pipeline/ossos/astrom.py index <HASH>..<HASH> 100644 --- a/src/ossos-pipeline/ossos/astrom.py +++ b/src/ossos-pipeline/ossos/astrom.py @@ -902,6 +902,9 @@ class Observation(object): # TODO Remove get_image_uri from here, use the storage methods. def get_image_uri(self): + if self.ftype == 'p' and self.fk is None or self.fk=='': + return storage.dbimages_uri(self.expnum) + return storage.dbimages_uri(self.expnum, ccd=self.ccdnum, version=self.ftype, @@ -909,7 +912,8 @@ class Observation(object): ext='.fits') def get_object_planted_uri(self): - return os.path.dirname(self.get_image_uri())+"/Object.planted" + dir = os.path.dirname(storage.dbimages_uri(self.expnum, ccd=self.ccdnum)) + return dir+"/Object.planted" def get_apcor_uri(self): return storage.dbimages_uri(self.expnum,
Hardcoded that p images are not in a CCD directory: TODO Fix this better
diff --git a/test/assert.js b/test/assert.js index <HASH>..<HASH> 100644 --- a/test/assert.js +++ b/test/assert.js @@ -256,10 +256,10 @@ suite('assert', function () { test('doesNotThrow', function() { assert.doesNotThrow(function() { }); + assert.doesNotThrow(function() { }, 'foo'); err(function () { assert.doesNotThrow(function() { throw new Error('foo'); }); - assert.doesNotThrow(function() { throw new Error('bar'); }, 'foo'); }, 'expected [Function] to not throw an error'); });
Update `assert.doesNotThrow` test in order to check the use case when type is a string.
diff --git a/slither/solc_parsing/expressions/expression_parsing.py b/slither/solc_parsing/expressions/expression_parsing.py index <HASH>..<HASH> 100644 --- a/slither/solc_parsing/expressions/expression_parsing.py +++ b/slither/solc_parsing/expressions/expression_parsing.py @@ -241,7 +241,10 @@ def convert_subdenomination(value, sub): if sub is None: return value # to allow 0.1 ether conversion - value = float(value) + if value[0:2] == "0x": + value = float(int(value, 16)) + else: + value = float(value) if sub == 'wei': return int(value) if sub == 'szabo':
Added hexadecimal support for subdenominations
diff --git a/RAPIDpy/helper_functions.py b/RAPIDpy/helper_functions.py index <HASH>..<HASH> 100644 --- a/RAPIDpy/helper_functions.py +++ b/RAPIDpy/helper_functions.py @@ -58,7 +58,7 @@ def get_rivid_list_from_file(in_rapid_connect): """ rapid_connect_rivid_list = [] with open(in_rapid_connect, "rb") as csvfile: - reader = csv.reader(csvfile) + reader = csv.reader(csvfile, delimiter=",") for row in reader: rapid_connect_rivid_list.append(row[0]) return np_array(rapid_connect_rivid_list, dtype=int)
Added delimiter for rivid function
diff --git a/library/src/main/java/com/github/ksoichiro/android/observablescrollview/ObservableRecyclerView.java b/library/src/main/java/com/github/ksoichiro/android/observablescrollview/ObservableRecyclerView.java index <HASH>..<HASH> 100644 --- a/library/src/main/java/com/github/ksoichiro/android/observablescrollview/ObservableRecyclerView.java +++ b/library/src/main/java/com/github/ksoichiro/android/observablescrollview/ObservableRecyclerView.java @@ -103,8 +103,10 @@ public class ObservableRecyclerView extends RecyclerView implements Scrollable { for (int i = firstVisiblePosition, j = 0; i <= lastVisiblePosition; i++, j++) { int childHeight = 0; View child = getChildAt(j); - if (mChildrenHeights.indexOfKey(i) < 0 || (child != null && child.getHeight() != mChildrenHeights.get(i))) { - childHeight = child.getHeight(); + if (child != null) { + if (mChildrenHeights.indexOfKey(i) < 0 || (child.getHeight() != mChildrenHeights.get(i))) { + childHeight = child.getHeight(); + } } mChildrenHeights.put(i, childHeight); }
Fixed NPE when mChildrenHeights.indexOfKey(i) < 0 in ObservableRecyclerView.
diff --git a/liberty-starter-application/src/main/java/com/ibm/liberty/starter/client/BxCodegenClient.java b/liberty-starter-application/src/main/java/com/ibm/liberty/starter/client/BxCodegenClient.java index <HASH>..<HASH> 100644 --- a/liberty-starter-application/src/main/java/com/ibm/liberty/starter/client/BxCodegenClient.java +++ b/liberty-starter-application/src/main/java/com/ibm/liberty/starter/client/BxCodegenClient.java @@ -44,7 +44,7 @@ public class BxCodegenClient { public final String URL = System.getenv("bxCodegenEndpoint"); public final String STARTERKIT_URL = System.getenv("appAccelStarterkit"); - private final int retriesAllowed = 9; + private final int retriesAllowed = 18; public Map<String, byte[]> getFileMap(ProjectConstructionInputData inputData) throws ProjectGenerationException { checkConfig();
Increase number of retries to bx codegen.
diff --git a/blueprints/ember-cli-lazy-load/files/config/bundles.js b/blueprints/ember-cli-lazy-load/files/config/bundles.js index <HASH>..<HASH> 100644 --- a/blueprints/ember-cli-lazy-load/files/config/bundles.js +++ b/blueprints/ember-cli-lazy-load/files/config/bundles.js @@ -10,13 +10,15 @@ module.exports = function(environment) { //index: { - // files: [ // You can specify pattern you want, this options is directly used in a broccoli-funnel + // //Minisearch file patterns for the content of the bundle + // files: [ // "**/templates/index.js", // "**/controllers/index.js", // "**/components/my-item/**.js" // ], // - // routes: ["index", "..."] //If the user will translate to one of this route names the bundle gets loaded, this is optional + // //The name of the routes if you are using the lazy-route mixin, no minisearch expressions are allowed here. + // routes: ["index", "..."] //}, //about: { // files: [ @@ -24,7 +26,8 @@ module.exports = function(environment) { // "**/controllers/about.js", // "**/components/my-cat/**.js" // ], - // dependencies: ["index"], //If the content of your bundle depend on something from an other bundle you can specify this here + // //The dependencies for this bundle. They will loaded in the same batch as the actual bundle + // dependencies: ["index"], // routes: ["about", "more routes for this bundle "] //} }
- replace doc with doc from readme
diff --git a/openquake/calculators/event_based_risk.py b/openquake/calculators/event_based_risk.py index <HASH>..<HASH> 100644 --- a/openquake/calculators/event_based_risk.py +++ b/openquake/calculators/event_based_risk.py @@ -231,7 +231,8 @@ class EventBasedStats(object): [(ltype, (F32, cbuilder.curve_resolution)) for ltype, cbuilder in zip( ltypes, self.riskmodel.curve_builders)]) - rcurves = numpy.zeros((N, R, I), multi_lr_dt) + # TODO: change 2 -> I, then change the exporter + rcurves = numpy.zeros((N, R, 2), multi_lr_dt) if self.oqparam.loss_ratios: self.save_rcurves(rcurves, I) @@ -880,3 +881,6 @@ class EbriskCalculator(base.RiskCalculator): logging.info('Saved %d event losses', num_events) self.datastore.set_nbytes('agg_loss_table') self.datastore.set_nbytes('events') + + ebstats = EventBasedStats(self.datastore, self.monitor) + ebstats.build()
Computing the stats also for the ebrisk calculator Former-commit-id: <I>d<I>b<I>a<I>a<I>ba<I>ad<I>a9d<I>
diff --git a/spec/unit/type_factory/factory/test_tuple_type.rb b/spec/unit/type_factory/factory/test_tuple_type.rb index <HASH>..<HASH> 100644 --- a/spec/unit/type_factory/factory/test_tuple_type.rb +++ b/spec/unit/type_factory/factory/test_tuple_type.rb @@ -22,5 +22,22 @@ module Qrb end end + context 'when use with {r: 0..255} and a name' do + subject{ factory.type({r: 0..255}, "MyTuple") } + + it{ should be_a(TupleType) } + + it 'should have the correct constraint on r' do + subject.up(r: 36) + ->{ + subject.up(r: 543) + }.should raise_error(UpError) + end + + it 'should have the correct name' do + subject.name.should eq("MyTuple") + end + end + end end
Make sure Range can be used for tuple attribute types.
diff --git a/src/directives/array.js b/src/directives/array.js index <HASH>..<HASH> 100644 --- a/src/directives/array.js +++ b/src/directives/array.js @@ -130,7 +130,11 @@ angular.module('schemaForm').directive('sfArray', ['sfSelect', 'schemaForm', 'sf if (scope.validateArray) { scope.validateArray(); } - ngModel.$setDirty(); + + // Angular 1.2 lacks setDirty + if (ngModel.$setDirty) { + ngModel.$setDirty(); + } return list; };
Surround with a check since its not available in <I>
diff --git a/www/browser/push.js b/www/browser/push.js index <HASH>..<HASH> 100644 --- a/www/browser/push.js +++ b/www/browser/push.js @@ -367,7 +367,10 @@ module.exports = { }, hasPermission: function(successCallback, errorCallback) { - successCallback(true); + const granted = Notification && Notification.permission === 'granted'; + successCallback({ + isEnabled: granted + }); }, unregister: function(successCallback, errorCallback, options) {
:sparkles: PushNotification.hasPermission() is now supported in the browser (#<I>)
diff --git a/theme/afterburner/config.php b/theme/afterburner/config.php index <HASH>..<HASH> 100644 --- a/theme/afterburner/config.php +++ b/theme/afterburner/config.php @@ -59,6 +59,7 @@ $THEME->layouts = array( 'file' => 'default.php', 'regions' => array('side-pre', 'side-post'), 'defaultregion' => 'side-post', + 'options' => array('langmenu'=>true), ), // Server administration scripts. 'admin' => array(
MDL-<I> theme_afterburner: added lang menu to frontpage layout in config.php
diff --git a/nomad/resources_endpoint.go b/nomad/resources_endpoint.go index <HASH>..<HASH> 100644 --- a/nomad/resources_endpoint.go +++ b/nomad/resources_endpoint.go @@ -114,19 +114,16 @@ func (r *Resources) List(args *structs.ResourceListRequest, } // Set the index for the context. If the context has been specified, it - // is the only non-empty match set, and the index is set for it. - // If the context was not specified, we set the index to be the max index - // from available matches. + // will be used as the index of the response. Otherwise, the + // maximum index from all resources will be used. reply.Index = 0 - for k, v := range reply.Matches { - if len(v) != 0 { // make sure matches exist for this context - index, err := state.Index(k) - if err != nil { - return err - } - if index > reply.Index { - reply.Index = index - } + for _, e := range contexts { + index, err := state.Index(e) + if err != nil { + return err + } + if index > reply.Index { + reply.Index = index } }
max index for any resource, if context is unspecified
diff --git a/mongo_connector/doc_managers/solr_doc_manager.py b/mongo_connector/doc_managers/solr_doc_manager.py index <HASH>..<HASH> 100755 --- a/mongo_connector/doc_managers/solr_doc_manager.py +++ b/mongo_connector/doc_managers/solr_doc_manager.py @@ -79,10 +79,10 @@ class DocManager(): for wc_pattern in self._parse_fields(result, 'dynamicFields'): if wc_pattern[0] == "*": self._dynamic_field_regexes.append( - re.compile("\w%s\Z" % wc_pattern)) + re.compile(".*%s\Z" % wc_pattern[1:])) elif wc_pattern[-1] == "*": self._dynamic_field_regexes.append( - re.compile("\A%s\w*" % wc_pattern[:-1])) + re.compile("\A%s.*" % wc_pattern[:-1])) def _clean_doc(self, doc): """Reformats the given document before insertion into Solr.
fix: dynamicFields should match nested field names
diff --git a/src/main/java/com/apruve/models/SubscriptionAdjustment.java b/src/main/java/com/apruve/models/SubscriptionAdjustment.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/apruve/models/SubscriptionAdjustment.java +++ b/src/main/java/com/apruve/models/SubscriptionAdjustment.java @@ -53,6 +53,8 @@ public class SubscriptionAdjustment { @XmlElement(name = "price_ea_cents") private Integer priceEachCents; private Integer quantity; + @XmlElement(name = "merchant_notes") + private String merchantNotes; private String description; @XmlElement(name = "variant_info") private String variantInfo; @@ -182,6 +184,14 @@ public class SubscriptionAdjustment { public void setQuantity(Integer quantity) { this.quantity = quantity; } + + public String getMerchantNotes() { + return merchantNotes; + } + + public void setMerchantNotes(String merchantNotes) { + this.merchantNotes = merchantNotes; + } public String getDescription() { return description;
Implemented merchant_notes in subscription_adjustment
diff --git a/azurerm/provider.go b/azurerm/provider.go index <HASH>..<HASH> 100644 --- a/azurerm/provider.go +++ b/azurerm/provider.go @@ -257,15 +257,19 @@ func (c *Config) LoadTokensFromAzureCLI() error { return fmt.Errorf("Azure CLI Authorization Profile was not found. Please ensure the Azure CLI is installed and then log-in with `az login`.") } - // pull out the TenantID and Subscription ID from the Azure Profile, if not set - if c.SubscriptionID == "" && c.TenantID == "" { - for _, subscription := range profile.Subscriptions { - if subscription.IsDefault { + // pull out the Subscription ID / Tenant ID / Environment from the Azure Profile, if not set + for _, subscription := range profile.Subscriptions { + if subscription.IsDefault { + if c.SubscriptionID == "" { c.SubscriptionID = subscription.ID + } + if c.TenantID == "" { c.TenantID = subscription.TenantID + } + if c.Environment == "" { c.Environment = normalizeEnvironmentName(subscription.EnvironmentName) - break } + break } }
Conditional loading of the Subscription ID / Tenant ID / Environment
diff --git a/lib/dry/initializer/plugins/type_constraint.rb b/lib/dry/initializer/plugins/type_constraint.rb index <HASH>..<HASH> 100644 --- a/lib/dry/initializer/plugins/type_constraint.rb +++ b/lib/dry/initializer/plugins/type_constraint.rb @@ -11,8 +11,10 @@ module Dry::Initializer::Plugins ivar = :"@#{rename}" lambda do |*| value = instance_variable_get(ivar) - return if value == Dry::Initializer::UNDEFINED - instance_variable_set ivar, type.call(value) + + if value != Dry::Initializer::UNDEFINED + instance_variable_set ivar, type.call(value) + end end end end
Do not return from lambda So that MRI won't fail
diff --git a/src/Command/ApiCompare.php b/src/Command/ApiCompare.php index <HASH>..<HASH> 100644 --- a/src/Command/ApiCompare.php +++ b/src/Command/ApiCompare.php @@ -146,9 +146,10 @@ final class ApiCompare extends Command */ private function determineFromRevisionFromRepository(CheckedOutRepository $repository) : Revision { - $tags = $this->grabListOfTagsFromRepository($repository); return $this->parseRevision->fromStringForRepository( - $this->pickFromVersion->forVersions($tags)->getVersionString(), + $this->pickFromVersion->forVersions( + $this->grabListOfTagsFromRepository($repository) + )->getVersionString(), $repository ); }
Don't need that variable lying around there like a waste of bytes
diff --git a/test/read.js b/test/read.js index <HASH>..<HASH> 100644 --- a/test/read.js +++ b/test/read.js @@ -66,7 +66,7 @@ tape('read pixels', function (t) { throws('throws if attempt use object to null fbo', [{data: {}}]) // now do it for an uint8 fbo - let fbo = regl.framebuffer({ + var fbo = regl.framebuffer({ width: W, height: H, colorFormat: 'rgba',
test/read.js: Fix to ES6.
diff --git a/soco/services.py b/soco/services.py index <HASH>..<HASH> 100644 --- a/soco/services.py +++ b/soco/services.py @@ -428,7 +428,7 @@ class Service: return (headers, body) def send_command( - self, action, args=None, cache=None, cache_timeout=None, timeout=5, **kwargs + self, action, args=None, cache=None, cache_timeout=None, timeout=20, **kwargs ): # pylint: disable=too-many-arguments """Send a command to a Sonos device. diff --git a/tests/test_services.py b/tests/test_services.py index <HASH>..<HASH> 100644 --- a/tests/test_services.py +++ b/tests/test_services.py @@ -243,7 +243,7 @@ def test_send_command(service): "http://192.168.1.101:1400/Service/Control", headers=mock.ANY, data=DUMMY_VALID_ACTION.encode("utf-8"), - timeout=5, + timeout=20, ) # Now the cache should be primed, so try it again fake_post.reset_mock()
Revert service call timeout reduction (#<I>)
diff --git a/core/src/main/java/com/orientechnologies/orient/core/metadata/security/OSecurityShared.java b/core/src/main/java/com/orientechnologies/orient/core/metadata/security/OSecurityShared.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/com/orientechnologies/orient/core/metadata/security/OSecurityShared.java +++ b/core/src/main/java/com/orientechnologies/orient/core/metadata/security/OSecurityShared.java @@ -37,7 +37,7 @@ import com.orientechnologies.orient.core.storage.OStorageEmbedded; * @author Luca Garulli (l.garulli--at--orientechnologies.com) * */ -public class OSecurityShared { +public class OSecurityShared implements OSecurity { private OSharedResourceExternal lock = new OSharedResourceExternal(); public OUser authenticate(final String iUserName, final String iUserPassword) {
OSecurityShared class now implements OSecurity interface
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ setup(name='rhaptos.cnxmlutils', zip_safe=False, install_requires=[ 'setuptools', - 'lxml', + #'lxml', #'argparse', # -*- Extra requirements: -*- ],
revert lxml depend: do it as a system package
diff --git a/sos/R/kernel.py b/sos/R/kernel.py index <HASH>..<HASH> 100644 --- a/sos/R/kernel.py +++ b/sos/R/kernel.py @@ -224,16 +224,12 @@ class sos_R: def lan_to_sos(self, items): # first let us get all variables with names starting with sos - response = self.sos_kernel.get_response('..py.repr(ls(all=TRUE))', ('display_data', 'execute_result')) + response = self.sos_kernel.get_response('..py.repr(ls())', ('display_data', 'execute_result')) expr = response['data']['text/plain'] all_vars = eval(eval(expr.split(' ', 1)[-1])) all_vars = [all_vars] if isinstance(all_vars, str) else all_vars - for item in items: - if item not in all_vars: - self.sos_kernel.warn('{} is not defined.'.format(item)) - - items = [x for x in items if x in all_vars] + [x for x in all_vars if x.startswith('sos')] + items += [x for x in all_vars if x.startswith('sos')] for item in items: if '.' in item:
Properly implement magic variables during kernel switch #<I> and document the updated interface
diff --git a/lib/knife-attribute/version.rb b/lib/knife-attribute/version.rb index <HASH>..<HASH> 100644 --- a/lib/knife-attribute/version.rb +++ b/lib/knife-attribute/version.rb @@ -1,3 +1,3 @@ module KnifeAttribute - VERSION = "0.1.2" + VERSION = '1.0.0' end
Bump to version <I> - initial design goals implemented!
diff --git a/question/type/gapselect/questiontypebase.php b/question/type/gapselect/questiontypebase.php index <HASH>..<HASH> 100755 --- a/question/type/gapselect/questiontypebase.php +++ b/question/type/gapselect/questiontypebase.php @@ -84,7 +84,7 @@ abstract class qtype_gapselect_base extends question_type { // Delete old answer records foreach ($oldanswers as $oa) { - delete_records('question_answers', 'id', $oa->id); + $DB->delete_records('question_answers', array('id' => $oa->id)); } $options = $DB->get_record('question_' . $this->name(),
MDL-<I> gapselect: NOBUG noticed use of deprecated database function.
diff --git a/shared/teams/team/container.js b/shared/teams/team/container.js index <HASH>..<HASH> 100644 --- a/shared/teams/team/container.js +++ b/shared/teams/team/container.js @@ -234,6 +234,7 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => { onInviteByEmail, onCreateSubteam, onLeaveTeam, + onManageChat, onOpenFolder, onEditDescription, onSetOpenTeamRole,
Pipe through onManageChat in team container (#<I>)
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -1,16 +1,16 @@ var sitemap = require("./lib/sitemap"); -// sitemap.getSites("http://www.cbs.com/sitemaps/show/show_siteMap_index.xml", function(err, sites){ -// if(!err)console.log(sites);else console.log(err); -// }); +sitemap.getSites("http://www.cbs.com/sitemaps/show/show_siteMap_index.xml", function(err, sites){ + if(!err)console.log(sites);else console.log(err); +}); // sitemap.getSites("http://www.cnn.com/sitemaps/sitemap-index.xml", function(err,sites){ // if(!err)console.log(sites);else console.log(err); // }); -sitemap.getSites("http://www.walmart.com/sitemap_ip.xml", function(err,sites){ - if(!err)console.log(sites);else console.log(err); -}); +// sitemap.getSites("http://www.walmart.com/sitemap_ip.xml", function(err,sites){ +// if(!err)console.log(sites);else console.log(err); +// }); // sitemap.getSites("http://www.rakuten.com/sitemapxml/sitemapindex.xml", function(err,sites){ // if(!err)console.log(sites);else console.log(err);
Changing the index.js file to run CBS instead of walmart
diff --git a/pydsl/Grammar/Symbol.py b/pydsl/Grammar/Symbol.py index <HASH>..<HASH> 100644 --- a/pydsl/Grammar/Symbol.py +++ b/pydsl/Grammar/Symbol.py @@ -114,15 +114,6 @@ class StringTerminalSymbol(TerminalSymbol): return "<StringTS: '" + self.definition + "'>" -class CharTerminalSymbol(StringTerminalSymbol): - def __init__(self, char): - if len(char) != 1: - raise TypeError - StringTerminalSymbol.__init__(self, char) - - def __str__(self): - return "<CharTS: '" + self.definition + "'>" - class WordTerminalSymbol(TerminalSymbol):#boundariesrules: priority, [max,min,fixedsize] #If token is another grammar Word, it stores its semantic info def __init__(self, name, definitionrequirementsdic, boundariesrules):
deleted CharTerminalSymbol (II)
diff --git a/lib/Cisco.php b/lib/Cisco.php index <HASH>..<HASH> 100755 --- a/lib/Cisco.php +++ b/lib/Cisco.php @@ -173,7 +173,7 @@ class Cisco $invlines = explode("\r\n", $show_inventory); foreach ($invlines as $line) { // LEGACY PERL CODE: $x =~ /^\s*PID:\s(\S+).*SN:\s+(\S+)\s*$/; - if (preg_match('/.*PID:\s(\S+)\s.*/', $line, $reg)) { + if (preg_match('/.*PID:\s(\S+?)(,|\s).*/', $line, $reg)) { $model = $reg[1]; return $model;
Update Cisco.php Modified inventory-to-model detection to remove commas at end
diff --git a/lib/stompede/stomp.rb b/lib/stompede/stomp.rb index <HASH>..<HASH> 100644 --- a/lib/stompede/stomp.rb +++ b/lib/stompede/stomp.rb @@ -13,6 +13,8 @@ module Stompede module Stomp Parser = if defined?(CParser) CParser + elsif defined?(JavaParser) + JavaParser else RubyParser end
Enable JavaParser by default on JRuby
diff --git a/andes/models/renewable/reeca1.py b/andes/models/renewable/reeca1.py index <HASH>..<HASH> 100644 --- a/andes/models/renewable/reeca1.py +++ b/andes/models/renewable/reeca1.py @@ -332,7 +332,7 @@ class REECA1Model(Model): self.Iqcmd = ExtAlgeb(model='RenGen', src='Iqcmd', indexer=self.reg, export=False, info='Retrieved Iqcmd of RenGen', - e_str='-Iqcmd0 - IqHL_y', + e_str='-Iqcmd0 + IqHL_y', ) self.p0 = ExtService(model='RenGen',
Fixed Iqcmd equations in REECA1.
diff --git a/examples/js/basic-chart.js b/examples/js/basic-chart.js index <HASH>..<HASH> 100644 --- a/examples/js/basic-chart.js +++ b/examples/js/basic-chart.js @@ -11,6 +11,9 @@ require ('ansicolor').nice; (async function main () { + // experimental, not yet implemented for all exchanges + // your contributions are welcome ;) + const index = 4 // [ timestamp, open, high, low, close, volume ] const ohlcv = await new ccxt.okcoinusd ().fetchOHLCV ('BTC/USD', 900) const lastPrice = ohlcv[ohlcv.length - 1][index] // closing price
added a comment to basic-chart.js [ci skip]
diff --git a/lib/nucleon/project/github.rb b/lib/nucleon/project/github.rb index <HASH>..<HASH> 100644 --- a/lib/nucleon/project/github.rb +++ b/lib/nucleon/project/github.rb @@ -12,10 +12,10 @@ class Github < Git def normalize if reference = delete(:reference, nil) - myself.name = reference + myself.plugin_name = reference else if url = get(:url, nil) - myself.name = url + myself.plugin_name = url set(:url, myself.class.expand_url(url, get(:ssh, false))) end end @@ -49,7 +49,7 @@ class Github < Git if private_key && ssh_key begin - deploy_keys = client.deploy_keys(self.name) + deploy_keys = client.deploy_keys(myself.plugin_name) github_id = nil keys_match = true @@ -63,11 +63,11 @@ class Github < Git if github_id unless keys_match - client.edit_deploy_key(self.name, github_id, { :key => ssh_key }) + client.edit_deploy_key(myself.plugin_name, github_id, { :key => ssh_key }) verify_key end else - client.add_deploy_key(self.name, key_id, ssh_key) + client.add_deploy_key(myself.plugin_name, key_id, ssh_key) verify_key end
Fixing name issues that prevent key loading/saving in the github project provider.
diff --git a/src/ServiceManager.php b/src/ServiceManager.php index <HASH>..<HASH> 100644 --- a/src/ServiceManager.php +++ b/src/ServiceManager.php @@ -146,9 +146,10 @@ class ServiceManager implements ServiceLocatorInterface } if ($this->allowOverride === false && $this->has($name)) { - throw new Exception\InvalidServiceNameException( - 'A service by this name or alias already exists and cannot be overridden, please use an alternate name.' - ); + throw new Exception\InvalidServiceNameException(sprintf( + 'A service by the name or alias "%s" already exists and cannot be overridden, please use an alternate name', + $name + )); } $this->factories[$name] = $factory;
Allow merging Service Manager configuration - Allows specifying a "service_manager" key in module / application configuration - Configuration provided by a module is merged with internal services configuration - During loadModules.post, all merged service configuration is then used to configure the ServiceManager - Thus, modules and/or application configuration can override services! EXCEPT for services in the default configuration...
diff --git a/tests/api/RestfulServiceTest.php b/tests/api/RestfulServiceTest.php index <HASH>..<HASH> 100644 --- a/tests/api/RestfulServiceTest.php +++ b/tests/api/RestfulServiceTest.php @@ -172,12 +172,14 @@ class RestfulServiceTest extends SapphireTest { public function testHttpHeaderParseing() { $headers = "content-type: text/html; charset=UTF-8\r\n". "Server: Funky/1.0\r\n". + "X-BB-ExampleMANycaPS: test\r\n". "Set-Cookie: foo=bar\r\n". "Set-Cookie: baz=quux\r\n". "Set-Cookie: bar=foo\r\n"; $expected = array( 'Content-Type' => 'text/html; charset=UTF-8', 'Server' => 'Funky/1.0', + 'X-BB-ExampleMANycaPS' => 'test', 'Set-Cookie' => array( 'foo=bar', 'baz=quux',
Adding test to prove issue with HTTP Header parsing in RestfulService I have a header like: X-BB-Auth: xxxx and it is being given back to me as X-Bb-Auth - i want to prove the issue and the fix
diff --git a/PHPDaemon/DNode/Generic.php b/PHPDaemon/DNode/Generic.php index <HASH>..<HASH> 100755 --- a/PHPDaemon/DNode/Generic.php +++ b/PHPDaemon/DNode/Generic.php @@ -24,6 +24,7 @@ abstract class Generic extends \PHPDaemon\WebSocket\Route { protected $localMethods = []; protected $ioMode = false; protected $timer; + protected $traceCalls = false; /** * Called when the connection is handshaked. @@ -265,9 +266,10 @@ abstract class Generic extends \PHPDaemon\WebSocket\Route { } } elseif (isset($this->persistentCallbacks[$m])) { - if ($name = array_search($this->persistentCallbacks[$m], $this->localMethods, true)) { - //D($args); - Daemon::log('===>'.$name.'('.$this->toJsonDebug($args).')'); + if ($this->traceCalls) { + if ($name = array_search($this->persistentCallbacks[$m], $this->localMethods, true)) { + Daemon::log('===>'.$name.'('.$this->toJsonDebug($args).')'); + } } call_user_func_array($this->persistentCallbacks[$m], $args); }
DNode: traceCalls property
diff --git a/install/local/portableSharedLibraries/OAT/scale.raphael.js b/install/local/portableSharedLibraries/OAT/scale.raphael.js index <HASH>..<HASH> 100644 --- a/install/local/portableSharedLibraries/OAT/scale.raphael.js +++ b/install/local/portableSharedLibraries/OAT/scale.raphael.js @@ -9,7 +9,7 @@ * @author Bertrand Chevrier <bertrand@taotesting.com> for OAT SA * - Code refactoring to fit AMD modules */ -define(['IMSGLOBAL/jquery_2_1_1', 'OAT/raphael'], function($, Raphael){ +define(['IMSGlobal/jquery_2_1_1', 'OAT/raphael'], function($, Raphael){ var scaleRaphael = function(container, width, height){ var wrapper = container.style ? container : document.getElementById(container);
(re)fixed typo in shared lib ns
diff --git a/aegean.py b/aegean.py index <HASH>..<HASH> 100755 --- a/aegean.py +++ b/aegean.py @@ -123,25 +123,6 @@ class IslandFittingData(object): self.doislandflux = doislandflux -class DummyMP(object): - """ - A dummy copy of the mpfit class that just holds the parinfo variables - This class doesn't do a great deal, but it makes it 'looks' like the mpfit class - and makes it easy to estimate source parameters when you don't want to do any fitting. - """ - - def __init__(self, parinfo, perror): - self.params = [] - for var in parinfo: - try: - val = var['value'][0] - except: - val = var['value'] - self.params.append(val) - self.perror = perror - self.errmsg = "There is no error, I just didn't bother fitting anything!" - - class DummyLM(object): """ A dummy copy of the mpfit class that just holds the parinfo variables
removed DummyMP as it is no longer used.
diff --git a/test/send.js b/test/send.js index <HASH>..<HASH> 100644 --- a/test/send.js +++ b/test/send.js @@ -529,7 +529,7 @@ allocCluster.test('send() with requestDefaults', 2, function t(cluster, assert) subOne.handler.register('foo', function foo(req, res) { res.headers.as = 'raw'; - res.sendOk('', req.headers.cn); + res.sendOk('', req.callerName); }); subTwo.request({
test/send: switch to req.callerName
diff --git a/src/Traits/LoadsTranslatedCachedRoutes.php b/src/Traits/LoadsTranslatedCachedRoutes.php index <HASH>..<HASH> 100644 --- a/src/Traits/LoadsTranslatedCachedRoutes.php +++ b/src/Traits/LoadsTranslatedCachedRoutes.php @@ -58,7 +58,8 @@ trait LoadsTranslatedCachedRoutes { $path = $this->getDefaultCachedRoutePath(); - if ( ! in_array(request()->segment(1), $localeKeys)) { + $localeSegment = request()->segment(1); + if ($localeSegment && ! in_array($localeSegment, $localeKeys)) { return $path; }
Fixed an issue where route:trans:list wouldn’t show the correct routes
diff --git a/woven/deployment.py b/woven/deployment.py index <HASH>..<HASH> 100644 --- a/woven/deployment.py +++ b/woven/deployment.py @@ -121,10 +121,8 @@ def deploy_files(local_dir, remote_dir, pattern = '',rsync_exclude=['*.pyc','.*' run(' '.join(['mkdir -pv',remote_staging_dir])).split('\n') created_list = [remote_staging_dir] - extra_opts = None - #upload into remote staging - rsync_project(local_dir=staging_dir,remote_dir=remote_staging_dir,extra_opts=extra_opts,exclude=rsync_exclude,delete=True) + rsync_project(local_dir=staging_dir,remote_dir=remote_staging_dir,exclude=rsync_exclude,delete=True) #create the final destination created_dir_list = mkdirs(remote_dir, use_sudo)
fixed issue with extra_opts for rsync custom port
diff --git a/src/pybel/parser/parse_metadata.py b/src/pybel/parser/parse_metadata.py index <HASH>..<HASH> 100644 --- a/src/pybel/parser/parse_metadata.py +++ b/src/pybel/parser/parse_metadata.py @@ -205,6 +205,9 @@ class MetadataParser(BaseParser): def handle_annotation_pattern(self, s, l, tokens): name = tokens['name'] + + return tokens + self.annotations_re[name] = tokens['value'] return tokens
Remove url rewriting and better logging
diff --git a/hrpg/core.py b/hrpg/core.py index <HASH>..<HASH> 100644 --- a/hrpg/core.py +++ b/hrpg/core.py @@ -77,7 +77,7 @@ def cli(): hrpg dailies done <task-id> hrpg dailies undo <task-id> hrpg todos done <task-id> - hrpg todos add <task> + hrpg todos add <task>... hrpg server options: @@ -181,7 +181,7 @@ def cli(): print('marked todo \'%s\' complete' % todos[tid]['text']) del(todos[tid]) elif args['add']: - ttext = args['<task>'] + ttext = ' '.join(args['<task>']) hbt.user.tasks(type='todo', text=ttext, _method='post') todos.insert(0, {'completed': False, 'text': ttext})
close #2 `todos add` arg no longer requires quotes
diff --git a/holoviews/core/pprint.py b/holoviews/core/pprint.py index <HASH>..<HASH> 100644 --- a/holoviews/core/pprint.py +++ b/holoviews/core/pprint.py @@ -124,9 +124,10 @@ class Info(object): if hasattr(node.last, 'children'): # Must be an Overlay overlay_info = cls.overlay_info(level, node.last, siblings, value_dims=True) element_info, additional_lines = overlay_info - # NdOverlays, AxisLayout, Ndlayouts + # NdOverlays, GridSpace, Ndlayouts elif node.last is not None and getattr(node.last, '_deep_indexable'): - pass # TODO + element_info = cls.dotted(node.last) # Incomplete + additional_lines = [] else: _, [info] = cls.element_info(level, node.last, siblings, value_dims=True) _, element_info = info
Temporary fix to pprinter for UniformNdMappings
diff --git a/src/AntiCSRF.php b/src/AntiCSRF.php index <HASH>..<HASH> 100644 --- a/src/AntiCSRF.php +++ b/src/AntiCSRF.php @@ -77,7 +77,7 @@ class AntiCSRF if( $echo ) { echo $ret; - return; + return null; } return $ret; }
consistent return value "null" is returned anyway if called with no value
diff --git a/pynlpir/nlpir.py b/pynlpir/nlpir.py index <HASH>..<HASH> 100644 --- a/pynlpir/nlpir.py +++ b/pynlpir/nlpir.py @@ -15,7 +15,8 @@ logger.debug("Loading NLPIR module on a %s %s system." % ('64-bit' if is_64bit if not is_linux and not is_windows: logger.error("Platform '%s' is not supported by NLPIR." % sys.platform) -#: The absolute path to this package. +#: The absolute path to this package (used by NLPIR to find the ``Data`` +#: directory). PACKAGE_DIR = os.path.abspath(os.path.dirname(__file__)) #: The absolute path to this path's lib directory.
Clarifies comments on module-level constants.
diff --git a/pkg/terminal/terminal.go b/pkg/terminal/terminal.go index <HASH>..<HASH> 100644 --- a/pkg/terminal/terminal.go +++ b/pkg/terminal/terminal.go @@ -247,10 +247,10 @@ func (t *Term) handleExit() (int, error) { func (t *Term) loadConfig() api.LoadConfig { r := api.LoadConfig{true, 1, 64, 64, -1} - if t.conf.MaxStringLen != nil { + if t.conf != nil && t.conf.MaxStringLen != nil { r.MaxStringLen = *t.conf.MaxStringLen } - if t.conf.MaxArrayValues != nil { + if t.conf != nil && t.conf.MaxArrayValues != nil { r.MaxArrayValues = *t.conf.MaxArrayValues }
check that t.conf is not nil in loadConfig
diff --git a/actionpack/lib/action_controller/metal/renderers.rb b/actionpack/lib/action_controller/metal/renderers.rb index <HASH>..<HASH> 100644 --- a/actionpack/lib/action_controller/metal/renderers.rb +++ b/actionpack/lib/action_controller/metal/renderers.rb @@ -8,8 +8,7 @@ module ActionController class MissingRenderer < LoadError def initialize(format) - @format = format - super("No renderer defined for format: #{@format}") + super "No renderer defined for format: #{format}" end end
Do not use instance variables if they are not reused elsewhere
diff --git a/empyrical/stats.py b/empyrical/stats.py index <HASH>..<HASH> 100644 --- a/empyrical/stats.py +++ b/empyrical/stats.py @@ -714,7 +714,8 @@ def beta(returns, factor_returns, risk_free=0.0): if np.absolute(joint.var().iloc[1]) < 1.0e-30: return np.nan - return np.cov(joint.values.T, ddof=0)[0, 1] / np.var(joint.iloc[:, 1]) + cov = np.cov(joint.values.T, ddof=0) + return cov[0, 1] / cov[1, 1] def stability_of_timeseries(returns):
MAINT Beta calculation does not require explicity variance calculation.
diff --git a/see/context/resources/network.py b/see/context/resources/network.py index <HASH>..<HASH> 100644 --- a/see/context/resources/network.py +++ b/see/context/resources/network.py @@ -76,15 +76,15 @@ def create(hypervisor, identifier, configuration): """ with open(configuration['configuration']) as xml_file: - xml_string = xml_file.read() + xml_config = xml_file.read() for _ in range(MAX_ATTEMPTS): if 'dynamic_address' in configuration: address = generate_address(hypervisor, configuration['dynamic_address']) - xml_string = network_xml(identifier, xml_string, address=address) + xml_string = network_xml(identifier, xml_config, address=address) else: - xml_string = network_xml(identifier, xml_string) + xml_string = network_xml(identifier, xml_config) try: return hypervisor.networkCreateXML(xml_string)
network: fix creation attempts error handling The XML configuration was overwritten thus causing the next attempt to fail because the IP being already set within it.
diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_generator.go b/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_generator.go index <HASH>..<HASH> 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_generator.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_generator.go @@ -115,6 +115,10 @@ func (og *operationGenerator) GenerateVolumesAreAttachedFunc( volumeSpecMap := make(map[*volume.Spec]v1.UniqueVolumeName) // Iterate each volume spec and put them into a map index by the pluginName for _, volumeAttached := range attachedVolumes { + if volumeAttached.VolumeSpec == nil { + glog.Errorf("VerifyVolumesAreAttached.GenerateVolumesAreAttachedFunc: nil spec for volume %s", volumeAttached.VolumeName) + continue + } volumePlugin, err := og.volumePluginMgr.FindPluginBySpec(volumeAttached.VolumeSpec) if err != nil || volumePlugin == nil {
UPSTREAM: <I>: Fix c-m crash while verifying attached volumes
diff --git a/echo_test.go b/echo_test.go index <HASH>..<HASH> 100644 --- a/echo_test.go +++ b/echo_test.go @@ -6,6 +6,7 @@ import ( "errors" "fmt" "io/ioutil" + "net" "net/http" "net/http/httptest" "reflect" @@ -730,8 +731,24 @@ var listenerNetworkTests = []struct { {"tcp6 ipv6 address", "tcp6", "[::1]:1323"}, } +func supportsIPv6() bool { + addrs, _ := net.InterfaceAddrs() + for _, addr := range addrs { + // Check if any interface has local IPv6 assigned + if strings.Contains(addr.String(), "::1") { + return true + } + } + return false +} + func TestEchoListenerNetwork(t *testing.T) { + hasIPv6 := supportsIPv6() for _, tt := range listenerNetworkTests { + if !hasIPv6 && strings.Contains(tt.address, "::") { + t.Skip("Skipping testing IPv6 for " + tt.address + ", not available") + continue + } t.Run(tt.test, func(t *testing.T) { e := New() e.ListenerNetwork = tt.network
Fix failing tests on systems not supporting IPv6
diff --git a/src/key.js b/src/key.js index <HASH>..<HASH> 100644 --- a/src/key.js +++ b/src/key.js @@ -793,6 +793,7 @@ steal('src/synthetic.js','src/browsers.js',function(Syn) { if ( defaultResult !== null ) { setTimeout(function() { + Syn.trigger('input', Syn.key.options(key, 'input'), element) Syn.trigger('keyup', Syn.key.options(key, 'keyup'), element) callback(runDefaults, element) }, 1) diff --git a/test/qunit/key_test.js b/test/qunit/key_test.js index <HASH>..<HASH> 100644 --- a/test/qunit/key_test.js +++ b/test/qunit/key_test.js @@ -79,10 +79,11 @@ test("Key Event Order", 1, function(){ st.binder("key","keydown", recorder ); st.binder("key","keypress", recorder ); + st.binder("key","input", recorder ); st.binder("key","keyup", recorder ); stop(); Syn.key("B","key", function(){ - deepEqual(order,["keydown","keypress","keyup"],"Key order is correct") + deepEqual(order,["keydown","keypress", "input", "keyup"],"Key order is correct") start(); });
added input event to type() and respective test
diff --git a/src/SocialShare/SocialShare.php b/src/SocialShare/SocialShare.php index <HASH>..<HASH> 100644 --- a/src/SocialShare/SocialShare.php +++ b/src/SocialShare/SocialShare.php @@ -110,6 +110,22 @@ class SocialShare } /** + * Gets the total number of share of the given URL for all providers + * + * @param string $url + * @throws \RuntimeException + * @return int + */ + public function getSharesTotal( $url ) + { + $shares = 0; + foreach($this->providers as $providerName => $provider) { + $shares += $this->getShares($providerName, $url); + } + return $shares; + } + + /** * Updates delayed URLs */ public function update()
Add method to get the total number of shares (#5)
diff --git a/devices/useelink.js b/devices/useelink.js index <HASH>..<HASH> 100644 --- a/devices/useelink.js +++ b/devices/useelink.js @@ -36,6 +36,9 @@ module.exports = [ await reporting.bind(device.getEndpoint(ID), coordinatorEndpoint, ['genOnOff']); } }, + endpoint: (device) => { + return {'l1': 1, 'l2': 2, 'l3': 3, 'l4': 4, 'l5': 5}; + }, }, { fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_tvuarksa'}],
Missing endpoint mapping (#<I>)
diff --git a/yandextank/plugins/Telegraf/tests/test_plugin.py b/yandextank/plugins/Telegraf/tests/test_plugin.py index <HASH>..<HASH> 100644 --- a/yandextank/plugins/Telegraf/tests/test_plugin.py +++ b/yandextank/plugins/Telegraf/tests/test_plugin.py @@ -28,4 +28,4 @@ class TestTelegrafPlugin(object): try: telegraf_plugin.configure() except ValueError: - pass \ No newline at end of file + pass
pytests for telegraf
diff --git a/nautilus/services/service.py b/nautilus/services/service.py index <HASH>..<HASH> 100644 --- a/nautilus/services/service.py +++ b/nautilus/services/service.py @@ -93,6 +93,7 @@ class Service: # base the service on a flask app self.app = self.tornado_app + # setup various functionalities self.init_action_handler(action_handler) # self.setup_auth() @@ -207,14 +208,17 @@ class Service: Example: - import nautilus + .. code-block:: python - service = nautilus.Service(...) + import nautilus + from nauilus.network.http import RequestHandler - @service.route('/') - class HelloWorld(nautilus.network.http.RequestHandler): - def get(self): - return self.finish('hello world') + service = nautilus.Service(...) + + @service.route('/') + class HelloWorld(RequestHandler): + def get(self): + return self.finish('hello world') """ def decorator(cls, **kwds): # add the endpoint at the given route
added missing codeblock directive in service.route documentation
diff --git a/openapi_core/schema/operations/generators.py b/openapi_core/schema/operations/generators.py index <HASH>..<HASH> 100644 --- a/openapi_core/schema/operations/generators.py +++ b/openapi_core/schema/operations/generators.py @@ -31,6 +31,7 @@ class OperationsGenerator(object): parameters_list = operation_deref.get('parameters', []) parameters = self.parameters_generator.generate_from_list( parameters_list) + operation_id = operation_deref.get('operationId') request_body = None if 'requestBody' in operation_deref: @@ -43,6 +44,7 @@ class OperationsGenerator(object): Operation( http_method, path_name, responses, list(parameters), request_body=request_body, deprecated=deprecated, + operation_id=operation_id, ), ) diff --git a/tests/integration/test_petstore.py b/tests/integration/test_petstore.py index <HASH>..<HASH> 100644 --- a/tests/integration/test_petstore.py +++ b/tests/integration/test_petstore.py @@ -74,6 +74,7 @@ class TestPetstore(object): assert type(operation) == Operation assert operation.path_name == path_name assert operation.http_method == http_method + assert operation.operation_id is not None operation_spec = spec_dict['paths'][path_name][http_method]
Populate operation_id attr
diff --git a/src/components/Image/Image.js b/src/components/Image/Image.js index <HASH>..<HASH> 100644 --- a/src/components/Image/Image.js +++ b/src/components/Image/Image.js @@ -120,7 +120,7 @@ class Image extends CloudinaryComponent { containerWidth = Util.width(element); } } - return containerWidth; + return Math.round(containerWidth); }; applyBreakpoints(width, steps, options) {
Round off containerWidth fixes issue #<I>
diff --git a/source/rafcon/gui/mygaphas/aspect.py b/source/rafcon/gui/mygaphas/aspect.py index <HASH>..<HASH> 100644 --- a/source/rafcon/gui/mygaphas/aspect.py +++ b/source/rafcon/gui/mygaphas/aspect.py @@ -188,7 +188,10 @@ class SegmentHandleSelection(ItemHandleSelection): after = handles[handle_index + 1] d, p = distance_line_point(before.pos, after.pos, handle.pos) - if d < 1. / item.hierarchy_level: + # Checks how far the waypoint is from an imaginary line connecting the previous and next way/end point + # If it is close, the two segments are merged to one + merge_distance = item.line_width * 4 + if d < merge_distance: assert len(self.view.canvas.solver._marked_cons) == 0 Segment(item, self.view).merge_segment(segment)
fix(SegmentHandleSelection): Properly merge segments The merging of segments (removal of waypoints) should now properly work on all zoom and hierarchy levels. The commit fixes the issues, where it was no longer possible to create new waypoints on a deeply nested state.
diff --git a/lib/nydp.rb b/lib/nydp.rb index <HASH>..<HASH> 100644 --- a/lib/nydp.rb +++ b/lib/nydp.rb @@ -2,6 +2,8 @@ require 'date' require 'set' module Nydp + class Namespace < Hash + end def self.apply_function ns, function_name, *args function = r2n(function_name.to_sym, ns).value args = r2n args, ns diff --git a/lib/nydp/plugin.rb b/lib/nydp/plugin.rb index <HASH>..<HASH> 100644 --- a/lib/nydp/plugin.rb +++ b/lib/nydp/plugin.rb @@ -21,7 +21,7 @@ module Nydp end def self.build_nydp extra_files=nil, &block - ns = { } + ns = Namespace.new setup(ns) PLUGINS.each { |plg| loadall ns, plg, plg.loadfiles, &block
vm: use Namespace class instead of plain hash, so plugins can decorate with useful features
diff --git a/salt/returners/slack_webhook_return.py b/salt/returners/slack_webhook_return.py index <HASH>..<HASH> 100644 --- a/salt/returners/slack_webhook_return.py +++ b/salt/returners/slack_webhook_return.py @@ -176,7 +176,6 @@ def _generate_payload(author_icon, title, report): text += "Total: {}\n".format(report[TOTAL_KEY]) if DURATION_KEY in report: - "color": "danger", text += "Duration: {:.2f} secs".format(float(report[DURATION_KEY])) attachments = [{ @@ -348,9 +347,7 @@ def _post_message(webhook, author_icon, title, report): payload = _generate_payload(author_icon, title, report) - data = _urlencode({ - "payload": json.dumps(payload, ensure_ascii=False) - }) + data = _urlencode({"payload": json.dumps(payload, ensure_ascii=False)}) webhook_url = _urljoin("https://hooks.slack.com/services/", webhook) query_result = salt.utils.http.query(webhook_url, "POST", data=data)
bugfix: Fix bug introduced resolving conflicts
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -12,6 +12,10 @@ var stampit = require('stampit'); var _ = require('lodash'); var EventEmitter = require('events').EventEmitter; +var AssignFirstArgument = stampit({ init(opts) { + Object.assign(this, opts); +}}); + var StateMachine = stampit({ props: { // can be an object or an array @@ -25,7 +29,7 @@ var StateMachine = stampit({ initial: 'none', current: 'none' }, - static: { + statics: { Promise: global.Promise || require('es6-promise').Promise, FsmError: FsmError, callbackPrefix: 'on', @@ -397,7 +401,7 @@ var StateMachine = stampit({ return target; } }, - init: function init (context) { + init: function init (opts, context) { this.factory = context.stamp; var events = this.events; @@ -419,4 +423,6 @@ var StateMachine = stampit({ } }); +StateMachine = AssignFirstArgument.compose(StateMachine); + module.exports = StateMachine;
fixed breaking changes: statics, init signature, assignment of first argument
diff --git a/bosh_cli/lib/cli/validation.rb b/bosh_cli/lib/cli/validation.rb index <HASH>..<HASH> 100644 --- a/bosh_cli/lib/cli/validation.rb +++ b/bosh_cli/lib/cli/validation.rb @@ -29,9 +29,11 @@ module Bosh::Cli private def step(name, error_message, kind = :non_fatal, &block) + say("%-60s " % [name], "") + passed = yield - say("%-60s %s" % [name, passed ? "OK".make_green : "FAILED".make_red]) + say("%s" % [passed ? "OK".make_green : "FAILED".make_red]) unless passed errors << error_message
Show step message before long-running block result [finishes #<I>] This means #step can be used to display what is currently happening whilst determining OK/FAILED.
diff --git a/tests/test_flask_kvsession.py b/tests/test_flask_kvsession.py index <HASH>..<HASH> 100644 --- a/tests/test_flask_kvsession.py +++ b/tests/test_flask_kvsession.py @@ -167,7 +167,7 @@ def test_session_expires_without_backend_support(app, client): s = json_dec(rv.data) assert s['k1'] == 'value1' - client.get('/make-session-permanent/') + rv = client.get('/make-session-permanent/') # assert that the session has a non-zero timestamp sid, created = split_cookie(app, rv)
Properly use return value in permanency/expiration test.
diff --git a/lib/exception_handling/version.rb b/lib/exception_handling/version.rb index <HASH>..<HASH> 100644 --- a/lib/exception_handling/version.rb +++ b/lib/exception_handling/version.rb @@ -1,3 +1,3 @@ module ExceptionHandling - VERSION = "1.3.0" + VERSION = "1.3.0".freeze end
TECH-<I> honeybadger upgrade: add freeze to version constant
diff --git a/tensorboard/defs/rollup_config.js b/tensorboard/defs/rollup_config.js index <HASH>..<HASH> 100644 --- a/tensorboard/defs/rollup_config.js +++ b/tensorboard/defs/rollup_config.js @@ -23,4 +23,7 @@ module.exports = { }), commonjs(), ], + output: { + strict: false, + }, };
sync: relax rollup config for imperfect deps (#<I>) Projector depends on Weblas, a 3rd party dependency that throws runtime errors when run in a browser's strict mode: <URL>: `blaze run tensorboard/plugins/projector/polymer3/vz_projector:standalone`
diff --git a/modeltranslation/settings.py b/modeltranslation/settings.py index <HASH>..<HASH> 100644 --- a/modeltranslation/settings.py +++ b/modeltranslation/settings.py @@ -5,8 +5,8 @@ from django.core.exceptions import ImproperlyConfigured TRANSLATION_FILES = tuple(getattr(settings, 'MODELTRANSLATION_TRANSLATION_FILES', ())) -AVAILABLE_LANGUAGES = getattr(settings, 'MODELTRANSLATION_LANGUAGES', - [l[0] for l in settings.LANGUAGES]) +AVAILABLE_LANGUAGES = list(getattr(settings, 'MODELTRANSLATION_LANGUAGES', + (l[0] for l in settings.LANGUAGES))) DEFAULT_LANGUAGE = getattr(settings, 'MODELTRANSLATION_DEFAULT_LANGUAGE', None) if DEFAULT_LANGUAGE and DEFAULT_LANGUAGE not in AVAILABLE_LANGUAGES: raise ImproperlyConfigured('MODELTRANSLATION_DEFAULT_LANGUAGE not in LANGUAGES setting.')
Ensure AVAILABLE_LANGUAGES is a list (close #<I>).
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,6 +1,7 @@ 'use strict'; var AWS; +/* istanbul ignore if */ if (process.LLTRACE_ON) { AWS = require('lltrace-aws-sdk').AWS; } else { @@ -28,6 +29,7 @@ var AwsHelper = { // initialisation method (Optional) function init (context, event) { + /* istanbul ignore if */ if (process.LLTRACE_ON) { AWS.init(context.functionName); }
Ignore ifs for coverage
diff --git a/eventkit/models.py b/eventkit/models.py index <HASH>..<HASH> 100644 --- a/eventkit/models.py +++ b/eventkit/models.py @@ -281,6 +281,16 @@ class AbstractEvent(PolymorphicMPTTModel, AbstractBaseModel): missing = rruleset.between(starts, end_repeat) return missing + @property + def period(self): + """ + Return "AM" or "PM", depending on when this event starts. + """ + try: + return 'PM' if timezone.localize(self.starts).hour >= 12 else 'AM' + except AttributeError: + pass + @transaction.atomic def save(self, propagate=False, *args, **kwargs): """
Add `period` property. Returns "AM" or "PM" for the localised starts time.
diff --git a/src/sap.m/src/sap/m/WheelSlider.js b/src/sap.m/src/sap/m/WheelSlider.js index <HASH>..<HASH> 100644 --- a/src/sap.m/src/sap/m/WheelSlider.js +++ b/src/sap.m/src/sap/m/WheelSlider.js @@ -911,8 +911,8 @@ sap.ui.define([ $aItems.eq(this._iSelectedItemIndex).addClass("sapMWSItemSelected"); //WAI-ARIA region oDescriptionElement = document.getElementById(this.getId() + "-valDescription"); - if (oDescriptionElement.innerHTML !== sAriaLabel) { - oDescriptionElement.innerHTML = sAriaLabel; + if (oDescriptionElement.innerText !== sAriaLabel) { + oDescriptionElement.innerText = sAriaLabel; } };
[INTERNAL] sap.m.WheelSlider: Corrected API usage Change-Id: Ibca4e4d<I>e0cf<I>d3ceeea<I>ae<I>a<I>a8
diff --git a/grab/spider/task.py b/grab/spider/task.py index <HASH>..<HASH> 100644 --- a/grab/spider/task.py +++ b/grab/spider/task.py @@ -53,5 +53,8 @@ class Task(object): for key, value in kwargs.items(): setattr(task, key, value) + + if 'grab' in kwargs: + task.url = kwargs['grab'].config['url'] return task
Fix bug in Task clone method
diff --git a/src/transformers/trainer.py b/src/transformers/trainer.py index <HASH>..<HASH> 100755 --- a/src/transformers/trainer.py +++ b/src/transformers/trainer.py @@ -1511,7 +1511,7 @@ class Trainer: return else: rng_file = os.path.join(checkpoint, "rng_state.pth") - if not os.path.isfile(os.path.join(checkpoint, rng_file)): + if not os.path.isfile(rng_file): logger.info( "Didn't find an RNG file, if you are resuming a training that was launched in a distributed " "fashion, reproducibility is not guaranteed."
Trainer._load_rng_state() path fix (#<I>) (#<I>)
diff --git a/src/Core.php b/src/Core.php index <HASH>..<HASH> 100755 --- a/src/Core.php +++ b/src/Core.php @@ -138,7 +138,7 @@ } catch (Exception $e) { - if (self::getService('core.logger') instanceof Logger) { + if (self::hasService('core.logger')) { self::getService('core.logger')->critical($e->getMessage()); @@ -224,6 +224,16 @@ } /** + * Returns TRUE when a service exists under given service name, FALSE otherwise. + * @param string $service_name + * @return bool + */ + public static function hasService(string $service_name): bool + { + return array_key_exists($service_name, self::$services); + } + + /** * Returns service by service name. * @param string $service_name * @return mixed
Add Core::hasService method Fix a bug when Core log service was called while not yet registered
diff --git a/src/jash.js b/src/jash.js index <HASH>..<HASH> 100644 --- a/src/jash.js +++ b/src/jash.js @@ -143,7 +143,8 @@ function addBinaries(binaries) { } //if the last arg is an object, it's the options object - if (typeof args[args.length-1] == 'object') { + var lastArg = args[args.length-1]; + if (typeof lastArg == 'object' && !lastArg.length) { options = args.pop(); } //if the first argument was an array, the args were passed as
fix a bug where passing args as an array with nothing else broke
diff --git a/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestTablePartitioningSelect.java b/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestTablePartitioningSelect.java index <HASH>..<HASH> 100644 --- a/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestTablePartitioningSelect.java +++ b/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestTablePartitioningSelect.java @@ -28,7 +28,6 @@ import java.sql.SQLException; import java.util.Optional; import static com.facebook.presto.tests.TestGroups.HIVE_CONNECTOR; -import static com.facebook.presto.tests.TestGroups.QUARANTINE; import static com.teradata.tempto.Requirements.allOf; import static com.teradata.tempto.assertions.QueryAssert.Row.row; import static com.teradata.tempto.assertions.QueryAssert.assertThat; @@ -87,7 +86,7 @@ public class TestTablePartitioningSelect ); } - @Test(groups = {HIVE_CONNECTOR, QUARANTINE}) + @Test(groups = {HIVE_CONNECTOR}) public void testSelectPartitionedHiveTableDifferentFormats() throws SQLException {
Unquarantine TestTablePartitioningSelect This test was failling because of the resources filtering issue
diff --git a/unpack-browser.js b/unpack-browser.js index <HASH>..<HASH> 100644 --- a/unpack-browser.js +++ b/unpack-browser.js @@ -6,12 +6,12 @@ var ndarray = require("ndarray") function unpackPNG(w, h, c, str) { var canvas = document.createElement("canvas") - canvas.width = w - canvas.height = h + canvas.width = h + canvas.height = w var img = new Image() img.src = "data:image/png;base64," + str var context = canvas.getContext("2d") context.drawImage(img, 0, 0) - var pixels = context.getImageData(0, 0, w, h) + var pixels = context.getImageData(0, 0, h, w) return ndarray(pixels.data, [h, w, c], [4*w, 4, 1], 0) } \ No newline at end of file
Fix image orientation in unpack-browser.js width/height were reversed :)
diff --git a/lib/worker.js b/lib/worker.js index <HASH>..<HASH> 100644 --- a/lib/worker.js +++ b/lib/worker.js @@ -213,13 +213,13 @@ module.exports = function(opts, done) { */ if (opts.topology === 'cluster') { server = startCluster(opts); - delay = 1000; + delay = 10000; } else if (opts.topology === 'replicaset') { server = startReplicaset(opts); delay = 5000; } else { server = startStandalone(opts); - delay = 10000; + delay = 0; } debug('starting `%s`...', opts.name);
:zap: more debug
diff --git a/config/construction/Init.php b/config/construction/Init.php index <HASH>..<HASH> 100644 --- a/config/construction/Init.php +++ b/config/construction/Init.php @@ -4,7 +4,7 @@ * @Author: Cleberson Bieleski * @Date: 2017-12-23 04:54:45 * @Last Modified by: Cleberson Bieleski - * @Last Modified time: 2018-01-18 07:07:59 + * @Last Modified time: 2018-01-18 07:53:07 */ namespace DwPhp; @@ -706,8 +706,10 @@ class Init{ $this->setPageCtrl($directory_ctrl); $this->setPageView($directory_view); } - if(!file_exists($directory_view) || !is_file($directory_view)){ + if(!file_exists($directory_ctrl) || !is_file($directory_ctrl)){ $this->setPageCtrl($this->getPathApplication('controllers/error/','404.php')); + } + if(!file_exists($directory_view) || !is_file($directory_view)){ $this->setPageView($this->getPathApplication('views/error/','404.php')); }
controller access without the need of the view
diff --git a/activesupport/test/array_inquirer_test.rb b/activesupport/test/array_inquirer_test.rb index <HASH>..<HASH> 100644 --- a/activesupport/test/array_inquirer_test.rb +++ b/activesupport/test/array_inquirer_test.rb @@ -51,6 +51,11 @@ class ArrayInquirerTest < ActiveSupport::TestCase assert_respond_to arr, :foo assert_not_respond_to arr, :nope ensure - Array.send :undef_method, :respond_to_missing? + Array.class_eval do + undef_method :respond_to_missing? + def respond_to_missing?(name, include_private = false) + super + end + end end end diff --git a/activesupport/test/string_inquirer_test.rb b/activesupport/test/string_inquirer_test.rb index <HASH>..<HASH> 100644 --- a/activesupport/test/string_inquirer_test.rb +++ b/activesupport/test/string_inquirer_test.rb @@ -34,6 +34,11 @@ class StringInquirerTest < ActiveSupport::TestCase assert_not_respond_to str, :nope ensure - String.send :undef_method, :respond_to_missing? + String.class_eval do + undef_method :respond_to_missing? + def respond_to_missing?(name, include_private = false) + (name == :bar) || super + end + end end end
It would be safer not to totally undef core classes' respond_to_missing? instead, rewrite them to no-op
diff --git a/lib/plugins/aws/deployFunction/index.js b/lib/plugins/aws/deployFunction/index.js index <HASH>..<HASH> 100644 --- a/lib/plugins/aws/deployFunction/index.js +++ b/lib/plugins/aws/deployFunction/index.js @@ -69,16 +69,14 @@ class AwsDeployFunction { ZipFile: data, }; - this.sdk.request( + return this.sdk.request( 'Lambda', 'updateFunctionCode', params, this.options.stage, this.options.region - ); - - this.serverless.cli.log(`Successfully deployed function "${this.options.function}"`); - - return BbPromise.resolve(); + ).then(() => { + this.serverless.cli.log(`Successfully deployed function "${this.options.function}"`); + }); } cleanup() {
Fix Promise chain in deployFunction plugin
diff --git a/firebase.go b/firebase.go index <HASH>..<HASH> 100644 --- a/firebase.go +++ b/firebase.go @@ -143,6 +143,10 @@ func (fb *Firebase) doRequest(method string, body []byte) ([]byte, error) { if e1.Timeout() { return nil, ErrTimeout{err} } + case net.Error: + if err.Timeout() { + return nil, ErrTimeout{err} + } } defer resp.Body.Close()
also handler net.Errors directly
diff --git a/steam/util/binary.py b/steam/util/binary.py index <HASH>..<HASH> 100644 --- a/steam/util/binary.py +++ b/steam/util/binary.py @@ -8,10 +8,21 @@ class StructReader(object): :type data: :class:`bytes` """ if not isinstance(data, bytes): - raise ValueError("Requires bytes") + raise ValueError("Only works with bytes") self.data = data self.offset = 0 + def __len__(self): + return len(self.data) + + def rlen(self): + """Number of remaining bytes that can be read + + :return: number of remaining bytes + :rtype: :class:`int` + """ + return max(0, len(self) - self.offset) + def read(self, n=1): """Return n bytes
StructReader: added __len__() and rlen()
diff --git a/tests/LaTeX.js b/tests/LaTeX.js index <HASH>..<HASH> 100644 --- a/tests/LaTeX.js +++ b/tests/LaTeX.js @@ -128,8 +128,12 @@ var cases = { decimal_TeX: '\\frac{x \\cdot \\left(x+1\\right)}{x^{2}+2 \\cdot x+1}' }, 'x^2+2*x+y^2+y+6': { - TeX: '\\frac{x \\cdot \\left(x+1\\right)}{x^{2}+2 \\cdot x+1}', - decimal_TeX: '\\frac{x \\cdot \\left(x+1\\right)}{x^{2}+2 \\cdot x+1}' + TeX: 'x^{2}+2 \\cdot x+y^{2}+y+6', + decimal_TeX: 'x^{2}+2 \\cdot x+y^{2}+y+6' + }, + '(-1*(x-1))': { + TeX: '-\\left(x-1\\right)', + decimal_TeX: '-\\left(x-1\\right)' }, };
Update tests to include issue #<I>
diff --git a/src/MediaBundle/Provider/YoutubeProvider.php b/src/MediaBundle/Provider/YoutubeProvider.php index <HASH>..<HASH> 100644 --- a/src/MediaBundle/Provider/YoutubeProvider.php +++ b/src/MediaBundle/Provider/YoutubeProvider.php @@ -215,4 +215,19 @@ class YoutubeProvider extends AbstractProvider return $thumb; } + + + /** + * Get the full url to the original video. + * + * @param MediaInterface $media + * + * @return string + */ + public function getUrl(MediaInterface $media) + { + $metadata = $media->getMetaData(); + + return sprintf('https://youtube.com/?watch=%s', $metadata['id']); + } }
Added youtubeprovider getUrl method
diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index <HASH>..<HASH> 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -695,6 +695,7 @@ func expandTilde(p string) string { return getHomeDir() } + p = filepath.FromSlash(p) if !strings.HasPrefix(p, fmt.Sprintf("~%c", os.PathSeparator)) { return p }
Expand tilde on Windows as well (fixes #<I>)
diff --git a/src/LdapTools/ParameterResolver.php b/src/LdapTools/ParameterResolver.php index <HASH>..<HASH> 100644 --- a/src/LdapTools/ParameterResolver.php +++ b/src/LdapTools/ParameterResolver.php @@ -241,7 +241,7 @@ class ParameterResolver } elseif (array_key_exists(strtolower($parameter), array_change_key_case($attributes))) { $value = array_change_key_case($attributes)[strtolower($parameter)]; } - $original = preg_replace("/%$parameter%/", $value, $original); + $original = preg_replace("/".self::PARAM_MARKER.$parameter.self::PARAM_MARKER."/", $value, $original); } return $original;
Use the constant designated for the parameter marker character.
diff --git a/app.js b/app.js index <HASH>..<HASH> 100644 --- a/app.js +++ b/app.js @@ -118,8 +118,8 @@ if(process.env.CONN_NAME && process.env.DB_USERNAME && process.env.DB_PASSWORD & connection_string: 'mongodb://' + process.env.DB_USERNAME + ':' + process.env.DB_PASSWORD + '@' + process.env.DB_HOST + ':' + process.env.DB_PORT }; } - -if(!fs.existsSync(config_connections)) fs.writeFileSync(config_connections, JSON.stringify(configConnection)); +if (!fs.existsSync(config_connections) || fs.readFileSync(config_connections, 'utf8') === '{}') + fs.writeFileSync(config_connections, JSON.stringify(configConnection)); // if config files exist but are blank we write blank files for nconf if(fs.existsSync(config_app, 'utf8')){
#<I> Override default config.json with connection from env
diff --git a/test/main.js b/test/main.js index <HASH>..<HASH> 100644 --- a/test/main.js +++ b/test/main.js @@ -50,6 +50,14 @@ describe('gulp-browserify', function() { }).end(fakeFile); }); + it('should return a browserify require file without entry point contents', function(done) { + var fakeFile = createFakeFile('normal.js', null); + gulpB().once('data', function(bundled) { + expect(bundled.contents.toString()).to.equal(fs.readFileSync('test/expected/normal.js', 'utf8')); + done(); + }).end(fakeFile); + }); + it('should bundles multiple entry points', function(done) { var fakeFile1 = createFakeFile('normal.js', fs.readFileSync('test/fixtures/normal.js')); var fakeFile2 = createFakeFile('normal2.js', fs.readFileSync('test/fixtures/normal2.js'));
Add a test for no entry point contents.
diff --git a/pyramid/__init__.py b/pyramid/__init__.py index <HASH>..<HASH> 100644 --- a/pyramid/__init__.py +++ b/pyramid/__init__.py @@ -4,7 +4,7 @@ # # The pyramid module -__version__ = "0.7.0-dev" +__version__ = "0.7.0-dev0" try: # this var is injected in the setup build to enable
[ci skip] Bump to dev version
diff --git a/pyp2rpm/name_convertor.py b/pyp2rpm/name_convertor.py index <HASH>..<HASH> 100644 --- a/pyp2rpm/name_convertor.py +++ b/pyp2rpm/name_convertor.py @@ -43,6 +43,10 @@ class NameConvertor(object): rpmized_name = name if self.distro == 'mageia': exclude_string = 'python-' + if name not in ['pyp2rpm', + 'py', + 'pyflation'] and name[0:2] == 'py': + name = name[2:] else: exclude_string = 'py'
remove initial "py" to fit mageia conventions
diff --git a/test.py b/test.py index <HASH>..<HASH> 100644 --- a/test.py +++ b/test.py @@ -1,8 +1,9 @@ from contextlib import contextmanager -import unittest import logging import os +import stat import sys +import unittest from os.path import expanduser, join, abspath from textwrap import dedent @@ -276,9 +277,18 @@ class FunctionalityTests(unittest.TestCase): self.assertNotIn(join('testdata', 'test.ini'), conf.loaded_files) def test_secured_file(self): + # make sure the file is secured. This information is lost through git so + # we need to set it here manually. Also, this is only available on *nix, + # so we need to skip if necessary + if sys.platform != 'linux': + self.skipTest('Only runnable on *nix') + + path = join('testdata', 'secure.ini') + os.chmod(path, stat.S_IRUSR | stat.S_IWUSR) + conf = SecuredConfig('hello', 'world', filename='secure.ini', search_path='testdata') - self.assertIn(join('testdata', 'secure.ini'), conf.loaded_files) + self.assertIn(path, conf.loaded_files) def test_secured_nonexisting_file(self): conf = SecuredConfig('hello', 'world', filename='nonexisting.ini',
Make sure the secured file is secured On a fresh git clone the permissions are lost.
diff --git a/tabu_sampler.py b/tabu_sampler.py index <HASH>..<HASH> 100644 --- a/tabu_sampler.py +++ b/tabu_sampler.py @@ -127,7 +127,7 @@ class TabuSampler(Sampler): def _bqm_sample_to_tabu_sample(self, sample, bqm): assert len(sample) == len(bqm) _, values = zip(*sorted(sample_as_dict(sample).items())) - return values + return list(map(int, values)) def _tabu_sample_to_bqm_sample(self, sample, bqm): varorder = sorted(list(bqm.adj.keys()))
Bugfix: properly handle BQMs with string variable names