diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ with open('README.rst') as readme: setup( name = 'datapackage', - version = '0.4.0', + version = '0.4.1', url = 'https://github.com/tryggvib/datapackage', license = 'GPLv3', description = description,
Version <I> Bug fix in data retrieval based on different structure of the resources property.
diff --git a/lib/ronin/config.rb b/lib/ronin/config.rb index <HASH>..<HASH> 100644 --- a/lib/ronin/config.rb +++ b/lib/ronin/config.rb @@ -35,10 +35,10 @@ module Ronin CONFIG_PATH = File.expand_path(File.join(PATH,'config.rb')) # Configuration files directory - CONFIG_DIR = File.expand_path(File.join(PATH,'config')) + CONFIG_DIR = FileUtils.mkdir(File.expand_path(File.join(PATH,'config'))) # Temporary file directory - TMP_DIR = FileUtils.mkdir_p(File.join(PATH,'tmp')) + TMP_DIR = FileUtils.mkdir(File.join(PATH,'tmp')) # # Require the Ronin configuration file with the given _name_ in the
Automatically make the ~/.ronin/config/ directory.
diff --git a/spec/integration/presence_channel_spec.rb b/spec/integration/presence_channel_spec.rb index <HASH>..<HASH> 100644 --- a/spec/integration/presence_channel_spec.rb +++ b/spec/integration/presence_channel_spec.rb @@ -22,7 +22,7 @@ describe 'Integration' do count: 2, last_event: 'pusher:error' - messages.last['data']['message'].=~(/^Invalid signature: Expected HMAC SHA256 hex digest of/).should be_true + messages.last['data']['message'].should =~ /^Invalid signature: Expected HMAC SHA256 hex digest of/ end end end
get nicer failure message than expected false to be true
diff --git a/core/src/main/java/org/bitcoinj/core/CheckpointManager.java b/core/src/main/java/org/bitcoinj/core/CheckpointManager.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/org/bitcoinj/core/CheckpointManager.java +++ b/core/src/main/java/org/bitcoinj/core/CheckpointManager.java @@ -142,7 +142,8 @@ public class CheckpointManager { checkpoints.put(block.getHeader().getTimeSeconds(), block); } Sha256Hash dataHash = Sha256Hash.wrap(digest.digest()); - log.info("Read {} checkpoints, hash is {}", checkpoints.size(), dataHash); + log.info("Read {} checkpoints up to time {}, hash is {}", checkpoints.size(), + Utils.dateTimeFormat(checkpoints.lastEntry().getKey() * 1000), dataHash); return dataHash; } catch (ProtocolException e) { throw new IOException(e); @@ -179,7 +180,8 @@ public class CheckpointManager { checkpoints.put(block.getHeader().getTimeSeconds(), block); } HashCode hash = hasher.hash(); - log.info("Read {} checkpoints, hash is {}", checkpoints.size(), hash); + log.info("Read {} checkpoints up to time {}, hash is {}", checkpoints.size(), + Utils.dateTimeFormat(checkpoints.lastEntry().getKey() * 1000), hash); return Sha256Hash.wrap(hash.asBytes()); } finally { if (reader != null) reader.close();
CheckpointManager: Log time of latest checkpoint read.
diff --git a/features/support/env.rb b/features/support/env.rb index <HASH>..<HASH> 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -1,22 +1 @@ require 'aruba/cucumber' - -# -# Add bin/ to our PATH -BIN_DIR = File.expand_path(File.dirname(__FILE__) + '/../../bin') -ENV['PATH'] = "#{BIN_DIR}#{File::PATH_SEPARATOR}#{ENV['PATH']}" - -# -# ??? -THIS_DIR = File.dirname(__FILE__) -LIB_DIR = File.join(File.expand_path(THIS_DIR), '..', '..', 'lib') - -Before do - # Using "announce" causes massive warnings on 1.9.2 - @puts = true - @original_rubylib = ENV['RUBYLIB'] - ENV['RUBYLIB'] = LIB_DIR + File::PATH_SEPARATOR + ENV['RUBYLIB'].to_s -end - -After do - ENV['RUBYLIB'] = @original_rubylib -end
[tools, cucumber] Eliminate <I>% of env.rb? I don't recall why I added this.. but things appear to run ok when I remove it.. so..
diff --git a/rpcserver.go b/rpcserver.go index <HASH>..<HASH> 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -1465,8 +1465,11 @@ func (r *rpcServer) ListChannels(ctx context.Context, channelID := lnwire.NewChanIDFromOutPoint(&chanPoint) var linkActive bool - if _, err := r.server.htlcSwitch.GetLink(channelID); err == nil { - linkActive = true + if link, err := r.server.htlcSwitch.GetLink(channelID); err == nil { + // A channel is only considered active if it is known + // by the switch *and* able to forward + // incoming/outgoing payments. + linkActive = link.EligibleToForward() } // As this is required for display purposes, we'll calculate
rpc: a link is now only active if it is eligible to forward HTLCs In this commit, we further constrain the candidacy for an “active” channel. In addition to being present within the link, it *must* also have the RemoteNextRevocation set. Otherwise, this indicates that we haven’t yet processed a FundingLocked message for this channel.
diff --git a/app/models/part.rb b/app/models/part.rb index <HASH>..<HASH> 100644 --- a/app/models/part.rb +++ b/app/models/part.rb @@ -8,6 +8,8 @@ class Part embedded_in :programme_edition embedded_in :business_support_edition + scope :in_order, order_by(:order, :asc) + field :order, type: Integer field :title, type: String field :body, type: String diff --git a/test/models/edition_test.rb b/test/models/edition_test.rb index <HASH>..<HASH> 100644 --- a/test/models/edition_test.rb +++ b/test/models/edition_test.rb @@ -587,6 +587,17 @@ class EditionTest < ActiveSupport::TestCase end end + test "parts can be sorted by the order field using a scope" do + edition = GuideEdition.new(title: "One", slug: "one", panopticon_id: @artefact.id) + edition.parts.build title: "Biscuits", body:"Never gonna give you up", slug: "biscuits", order: 2 + edition.parts.build title: "Cookies", body:"NYAN NYAN NYAN NYAN", slug: "cookies", order: 1 + edition.save! + edition.reload + + assert_equal "Cookies", edition.parts.in_order.first.title + assert_equal "Biscuits", edition.parts.in_order.last.title + end + test "user should not be able to review an edition they requested review for" do user = User.create(name: "Mary")
Allow parts to be sorted by the order value Use a scope to sort parts by the value of the order attribute.
diff --git a/looptools/__init__.py b/looptools/__init__.py index <HASH>..<HASH> 100644 --- a/looptools/__init__.py +++ b/looptools/__init__.py @@ -1,6 +1,6 @@ from looptools.log import LogOutput -from looptools.timer import Timer, functimer +from looptools.timer import Timer, functimer, ActiveTimer from looptools.counter import Counter -__all__ = ["Timer", "Counter", "LogOutput", "functimer"] +__all__ = ["Timer", "Counter", "LogOutput", "functimer", "ActiveTimer"] __name__ = "Loop Tools" diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name='looptools', - version='0.1.6', + version='0.1.7', packages=find_packages(), install_requires=[], url='https://github.com/mrstephenneal/looptools',
Added timer functions for timer decorations and active timers.
diff --git a/cmsplugin_cascade/link/forms.py b/cmsplugin_cascade/link/forms.py index <HASH>..<HASH> 100644 --- a/cmsplugin_cascade/link/forms.py +++ b/cmsplugin_cascade/link/forms.py @@ -6,6 +6,7 @@ from django.db.models.fields.related import ManyToOneRel from django.forms import fields, Media, ModelChoiceField from django.forms.widgets import RadioSelect from django.utils.html import format_html +from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from django_select2.forms import HeavySelect2Widget from cms.models import Page @@ -15,8 +16,9 @@ from filer.fields.file import AdminFileWidget, FilerFileField from cms.utils import get_current_site -def format_page_link(*args, **kwargs): - return format_html("{} ({})", *args, **kwargs) +def format_page_link(title, path): + html = format_html("{} ({})", mark_safe(title), path) + return html class HeavySelectWidget(HeavySelect2Widget):
In LinkPlugin, mark search result as safe html
diff --git a/web/concrete/src/Editor/LinkAbstractor.php b/web/concrete/src/Editor/LinkAbstractor.php index <HASH>..<HASH> 100644 --- a/web/concrete/src/Editor/LinkAbstractor.php +++ b/web/concrete/src/Editor/LinkAbstractor.php @@ -120,6 +120,18 @@ class LinkAbstractor extends Object $fID = $picture->fid; $fo = \File::getByID($fID); if (is_object($fo)) { + // move width px to width attribute and height px to height attribute + $widthPattern = "/width:\\s([0-9]+)px;?/i"; + if (preg_match($widthPattern, $picture->style, $matches)) { + $picture->style = preg_replace($widthPattern, '', $picture->style); + $picture->width = $matches[1]; + } + $heightPattern = "/height:\\s([0-9]+)px;?/i"; + if (preg_match($heightPattern, $picture->style, $matches)) { + $picture->style = preg_replace($heightPattern, '', $picture->style); + $picture->height = $matches[1]; + } + $picture->style = preg_replace('/\s+/', '', $picture->style); if ($picture->style) { $image = new \Concrete\Core\Html\Image($fo, false); $image->getTag()->width(false)->height(false);
Allows images that might have something like <img style="width: <I>px; height: <I>px;"...> to leverage the responsive picture elements Former-commit-id: <I>c<I>d<I>d<I>ffd8cbd2d<I>c<I> Former-commit-id: <I>c5f<I>c<I>b<I>b<I>f<I>a5a7
diff --git a/elki-clustering/src/main/java/elki/index/tree/betula/CFNode.java b/elki-clustering/src/main/java/elki/index/tree/betula/CFNode.java index <HASH>..<HASH> 100644 --- a/elki-clustering/src/main/java/elki/index/tree/betula/CFNode.java +++ b/elki-clustering/src/main/java/elki/index/tree/betula/CFNode.java @@ -91,8 +91,13 @@ public class CFNode<L extends ClusterFeature> implements AsClusterFeature { * @return CF */ public AsClusterFeature getChild(int i) { + if(i < children.length) { return (AsClusterFeature) children[i]; } + else { + return null; + } + } /** * Add a subtree
fix array out of bounds exeption
diff --git a/src/Rememberable.php b/src/Rememberable.php index <HASH>..<HASH> 100644 --- a/src/Rememberable.php +++ b/src/Rememberable.php @@ -30,7 +30,7 @@ trait Rememberable */ public function __call($method, $parameters) { - if (static::rememberable() && in_array($method, ['increment', 'decrement'])) { + if (static::rememberable() && static::interceptable() && in_array($method, ['increment', 'decrement'])) { $result = call_user_func_array([$this, $method], $parameters); $this->fireModelEvent('saved'); @@ -81,4 +81,18 @@ trait Rememberable { return isset(static::$rememberable) && static::$rememberable === true; } + + /** + * Check if we're allowed to intercept __call. + * + * @return bool + */ + public static function interceptable() + { + if (! isset(static::$interceptable)) { + return true; + } + + return (bool) static::$interceptable; + } }
Add a check to see if we're allowed to intercept the increment/decrement operations.
diff --git a/src/models/AngelModel.php b/src/models/AngelModel.php index <HASH>..<HASH> 100644 --- a/src/models/AngelModel.php +++ b/src/models/AngelModel.php @@ -76,6 +76,12 @@ abstract class AngelModel extends \Eloquent { $model->assign(); }); + static::creating(function($model) { + if ($model->reorderable) { + $model->order = $model->count(); + } + }); + // Fill in the `order` gap after deleting a model. static::deleted(function($model) { if (!$model->reorderable) return;
Assign order to reorderable models on creation
diff --git a/telemetry/telemetry/test.py b/telemetry/telemetry/test.py index <HASH>..<HASH> 100644 --- a/telemetry/telemetry/test.py +++ b/telemetry/telemetry/test.py @@ -39,6 +39,7 @@ class Test(object): setattr(options, key, value) options.repeat_options = self._CreateRepeatOptions(options) + self.CustomizeBrowserOptions(options) test = self.test() ps = self.CreatePageSet(options) @@ -90,3 +91,7 @@ class Test(object): def AddTestCommandLineOptions(parser): """Override to accept custom command line options.""" pass + + def CustomizeBrowserOptions(self, options): + """Add browser options that are required by this benchmark.""" + pass
Added Web Animations and regular animation blink_perf benchmarks Add benchmark targets for the current animation implementation and the in progress Web Animations implementation using the Animations subset of the blink_perf tests. BUG=<I> Review URL: <URL>
diff --git a/src/Google2FA.php b/src/Google2FA.php index <HASH>..<HASH> 100644 --- a/src/Google2FA.php +++ b/src/Google2FA.php @@ -103,10 +103,7 @@ class Google2FA extends Google2FAPackage return new Bacon(); } - if ( - class_exists('chillerlan\QRCode') || - class_exists('BaconQrCode\Renderer\ImageRenderer') - ) { + if (class_exists('chillerlan\QRCode\QRCode')) { return new Chillerlan(); }
Refer to the right class for chillerlan's package
diff --git a/ping.go b/ping.go index <HASH>..<HASH> 100644 --- a/ping.go +++ b/ping.go @@ -83,17 +83,18 @@ func NewPinger(addr string) (*Pinger, error) { ipv4 = false } + r := rand.New(rand.NewSource(time.Now().UnixNano())) return &Pinger{ ipaddr: ipaddr, addr: addr, Interval: time.Second, Timeout: time.Second * 100000, Count: -1, - id: rand.Intn(math.MaxInt16), + id: r.Intn(math.MaxInt16), network: "udp", ipv4: ipv4, Size: timeSliceLength, - Tracker: rand.Int63n(math.MaxInt64), + Tracker: r.Int63n(math.MaxInt64), done: make(chan bool), }, nil } @@ -454,11 +455,11 @@ func (p *Pinger) processPacket(recv *packet) error { return nil } } - + outPkt := &Packet{ Nbytes: recv.nbytes, IPAddr: p.ipaddr, - Addr: p.addr, + Addr: p.addr, } switch pkt := m.Body.(type) {
Set a random source seed to avoid ID conflicts closes #<I> closes #<I>
diff --git a/tests/automated/buttonText.js b/tests/automated/buttonText.js index <HASH>..<HASH> 100644 --- a/tests/automated/buttonText.js +++ b/tests/automated/buttonText.js @@ -1,4 +1,3 @@ - describe('button text', function() { var settings = {}; @@ -15,6 +14,7 @@ describe('button text', function() { }); describe('with buttonIcons', function() { + describe('when lang is default', function() { it('should have no text', function() { expect($('.fc-button-next')).toHaveText(''); @@ -57,7 +57,9 @@ describe('button text', function() { }); }); }); + describe('without buttonIcons', function() { + beforeEach(function() { settings.buttonIcons = { prev: null, @@ -68,6 +70,7 @@ describe('button text', function() { }); describe('when lang is default', function() { + beforeEach(function() { $('#cal').fullCalendar(settings); }); @@ -91,6 +94,7 @@ describe('button text', function() { }); describe('when buttonText is specified', function() { + beforeEach(function() { settings.buttonText = { prev: '<-', @@ -143,4 +147,5 @@ describe('button text', function() { }); }); }); + });
Wasting a minute or two trying to whitespace my test consistent to the other tests
diff --git a/test/mysql/employees.js b/test/mysql/employees.js index <HASH>..<HASH> 100644 --- a/test/mysql/employees.js +++ b/test/mysql/employees.js @@ -13,7 +13,13 @@ describe('employees model', function () { var employees = db.extend('employees'); before(function (done) { - db.connect(done); + db.connect(function (error) { + var sql = 'CREATE TABLE IF NOT EXISTS `employees` (`id` int(10) unsigned NOT NULL AUTO_INCREMENT, `firstName` varchar(45) NOT NULL, `lastName` varchar(45) NOT NULL, `age` tinyint(3) unsigned DEFAULT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;'; + + if (error) return done(error); + + db.query(sql, done); + }); }); after(function (done) {
Updating the employees unit test with a 'CREATE TABLE' statement.
diff --git a/js/data/Model.js b/js/data/Model.js index <HASH>..<HASH> 100644 --- a/js/data/Model.js +++ b/js/data/Model.js @@ -194,6 +194,12 @@ define(["js/data/Entity", "js/core/List", "flow", "underscore"], function (Entit * @param {Function} callback - function(err, model, options) */ fetch: function (options, callback) { + + if (arguments.length === 1 && options instanceof Function) { + callback = options; + options = null; + } + options = options || {}; var self = this;
added fallback for Model.fetch if no options are passed to function call
diff --git a/pytablewriter/style/_theme.py b/pytablewriter/style/_theme.py index <HASH>..<HASH> 100644 --- a/pytablewriter/style/_theme.py +++ b/pytablewriter/style/_theme.py @@ -29,13 +29,9 @@ class ColSeparatorStyleFilterFunc(Protocol): ... -Theme = NamedTuple( - "Theme", - [ - ("style_filter", Optional[StyleFilterFunc]), - ("col_separator_style_filter", Optional[ColSeparatorStyleFilterFunc]), - ], -) +class Theme(NamedTuple): + style_filter: Optional[StyleFilterFunc] + col_separator_style_filter: Optional[ColSeparatorStyleFilterFunc] def list_themes() -> Sequence[str]:
Refactor a NamedTuple definition
diff --git a/src/view/ThemeManager.js b/src/view/ThemeManager.js index <HASH>..<HASH> 100644 --- a/src/view/ThemeManager.js +++ b/src/view/ThemeManager.js @@ -53,7 +53,7 @@ define(function (require, exports, module) { if(cm) { ThemeView.setDocumentMode(cm); - if(force === false) { + if(!force) { ThemeView.updateThemes(cm); refreshEditor(cm); } @@ -250,7 +250,7 @@ define(function (require, exports, module) { $(EditorManager).on("activeEditorChange", function() { - refresh(true); + refresh(); });
Fixed issue with unnecessary reload of themes when opening a new document
diff --git a/Bundle/BusinessPageBundle/Builder/BusinessPageBuilder.php b/Bundle/BusinessPageBundle/Builder/BusinessPageBuilder.php index <HASH>..<HASH> 100644 --- a/Bundle/BusinessPageBundle/Builder/BusinessPageBuilder.php +++ b/Bundle/BusinessPageBundle/Builder/BusinessPageBuilder.php @@ -66,7 +66,7 @@ class BusinessPageBuilder $accessor = PropertyAccess::createPropertyAccessor(); foreach ($patternProperties as $property) { - if (!in_array($property->getName(), array('id', 'widgetMap', 'slots', 'seo', 'i18n')) && !$property->isStatic()) { + if (!in_array($property->getName(), array('id', 'widgetMap', 'slots', 'seo', 'i18n', 'widgets')) && !$property->isStatic()) { $value = $accessor->getValue($bepPattern, $property->getName()); $setMethod = 'set'.ucfirst($property->getName()); if (method_exists($page, $setMethod)) {
do not give widgets to the generated BP, if so the BT looses it's widgets
diff --git a/EventListener/ShopSubscriber.php b/EventListener/ShopSubscriber.php index <HASH>..<HASH> 100755 --- a/EventListener/ShopSubscriber.php +++ b/EventListener/ShopSubscriber.php @@ -22,9 +22,6 @@ use WellCommerce\Bundle\CoreBundle\EventListener\AbstractEventSubscriber; */ class ShopSubscriber extends AbstractEventSubscriber { - /** - * {@inheritdoc} - */ public static function getSubscribedEvents() { return [
Updated readme, small changes in kernel and RouteProvider (cherry picked from commit <I>e<I>ed<I>a<I>cbc4e<I>d<I>fbeb<I>e6b)
diff --git a/core/codegen-runtime/src/main/java/org/overture/codegen/runtime/Utils.java b/core/codegen-runtime/src/main/java/org/overture/codegen/runtime/Utils.java index <HASH>..<HASH> 100644 --- a/core/codegen-runtime/src/main/java/org/overture/codegen/runtime/Utils.java +++ b/core/codegen-runtime/src/main/java/org/overture/codegen/runtime/Utils.java @@ -59,4 +59,10 @@ public class Utils return "mk_" + record.getClass().getSimpleName() + "(" + str + ")"; } + + @SuppressWarnings("unchecked") + public static <T extends ValueType> T clone(T t) + { + return (T) (t != null ? t.clone() : t); + } }
Now cloning of code generated value types is done using a utility function to guards against values being "null" which is possible for optionally typed values
diff --git a/src/com/caverock/androidsvg/SVG.java b/src/com/caverock/androidsvg/SVG.java index <HASH>..<HASH> 100644 --- a/src/com/caverock/androidsvg/SVG.java +++ b/src/com/caverock/androidsvg/SVG.java @@ -316,11 +316,6 @@ public class SVG Canvas canvas = picture.beginRecording(widthInPixels, heightInPixels); Box viewPort = new Box(0f, 0f, (float) widthInPixels, (float) heightInPixels); - if (alignment == null) - alignment = AspectRatioAlignment.xMidYMid; - if (scale == null) - scale = AspectRatioScale.MEET; - SVGAndroidRenderer renderer = new SVGAndroidRenderer(canvas, viewPort, defaultDPI); renderer.renderDocument(this, null, alignment, scale, false); @@ -459,11 +454,6 @@ public class SVG svgViewPort = new Box(0f, 0f, (float) canvas.getWidth(), (float) canvas.getHeight()); } - if (alignment == null) - alignment = AspectRatioAlignment.xMidYMid; - if (scale == null) - scale = AspectRatioScale.MEET; - SVGAndroidRenderer renderer = new SVGAndroidRenderer(canvas, svgViewPort, defaultDPI); renderer.renderDocument(this, null, alignment, scale, true);
Removed code that was overriding null alignment/scale parameters in render methods. There needs to be a way to request "don't scale to fill viewport"!
diff --git a/test/fixtures/active_record.rb b/test/fixtures/active_record.rb index <HASH>..<HASH> 100644 --- a/test/fixtures/active_record.rb +++ b/test/fixtures/active_record.rb @@ -288,7 +288,12 @@ class Post < ActiveRecord::Base def destroy_callback if title == "can't destroy me" errors.add(:title, "can't destroy me") - return false + + if Rails::VERSION::MAJOR >= 5 + throw(:abort) + else + return false + end end end end
Handle stopping in callbacks in new rails 5 way
diff --git a/src/valiant.jquery.js b/src/valiant.jquery.js index <HASH>..<HASH> 100644 --- a/src/valiant.jquery.js +++ b/src/valiant.jquery.js @@ -127,7 +127,8 @@ three.js r65 or higher this._scene = new THREE.Scene(); // create ThreeJS camera - this._camera = new THREE.PerspectiveCamera( this.options.fov, $(this.element).width() / $(this.element).height(), 0.1, 1000); + this._camera = new THREE.PerspectiveCamera(this._fov, $(this.element).width() / $(this.element).height(), 0.1, 1000); + this._camera.setLens(this._fov); // create ThreeJS renderer and append it to our object this._renderer = Detector.webgl? new THREE.WebGLRenderer(): new THREE.CanvasRenderer();
Fix for fov correctly being set in defaults or passed opts object fov wasn't correctly being set for some reason on the THREE.PerspectiveCamera until setLens() was called in the mouse wheel event handler. This fix calls setLens directly after PerspectiveCamera creation.
diff --git a/cumulusci/tests/pytest_plugins/pytest_sf_vcr.py b/cumulusci/tests/pytest_plugins/pytest_sf_vcr.py index <HASH>..<HASH> 100644 --- a/cumulusci/tests/pytest_plugins/pytest_sf_vcr.py +++ b/cumulusci/tests/pytest_plugins/pytest_sf_vcr.py @@ -93,7 +93,7 @@ def configure_recording_mode( elif user_requested_network_access and vcr_cassette_path.exists(): # user wants to keep existing cassette, so disable VCR usage entirely, like: # https://github.com/ktosiek/pytest-vcr/blob/08482cf0724697c14b63ad17752a0f13f7670add/pytest_vcr.py#L59 - recording_mode = RecordingMode.disabled + recording_mode = RecordingMode.DISABLE elif user_requested_network_access: recording_mode = RecordingMode.RECORD else:
Fix load tests. Use different sample task. Update cassettes. keep content-type.
diff --git a/demo/extract-img2.py b/demo/extract-img2.py index <HASH>..<HASH> 100644 --- a/demo/extract-img2.py +++ b/demo/extract-img2.py @@ -91,7 +91,7 @@ smasks = [] # stores xrefs of /SMask objects #------------------------------------------------------------------------------ for i in range(1, lenXREF): # scan through all objects try: - text = doc._getObjectString(i) # PDF object definition string + text = doc._getXrefString(i) # PDF object definition string except: print("xref %i " % i + doc._getGCTXerrmsg()) continue # skip the error
Update extract-img2.py
diff --git a/src/Transaction/TransactionBuilder.php b/src/Transaction/TransactionBuilder.php index <HASH>..<HASH> 100755 --- a/src/Transaction/TransactionBuilder.php +++ b/src/Transaction/TransactionBuilder.php @@ -223,8 +223,8 @@ class TransactionBuilder implements XdrEncodableInterface public function getFee() { - // todo: calculate real fee - return 100; + // todo: load base fee from network + return 100 * $this->operations->count(); } /**
TransactionBuilder - fee is now calculated correctly for transactions with mutiple options
diff --git a/src/org/opencms/importexport/A_CmsImport.java b/src/org/opencms/importexport/A_CmsImport.java index <HASH>..<HASH> 100644 --- a/src/org/opencms/importexport/A_CmsImport.java +++ b/src/org/opencms/importexport/A_CmsImport.java @@ -1,7 +1,7 @@ /* * File : $Source: /alkacon/cvs/opencms/src/org/opencms/importexport/A_CmsImport.java,v $ - * Date : $Date: 2005/03/19 13:58:19 $ - * Version: $Revision: 1.64 $ + * Date : $Date: 2005/04/05 13:27:18 $ + * Version: $Revision: 1.65 $ * * This library is part of OpenCms - * the Open Source Content Mananagement System @@ -83,7 +83,7 @@ public abstract class A_CmsImport implements I_CmsImport { public static final String C_RESOURCE_TYPE_LEGACY_PAGE_NAME = "page"; /** The id of the legacy resource type "link". */ - protected static final int C_RESOURCE_TYPE_LINK_ID = 2; + protected static final int C_RESOURCE_TYPE_LINK_ID = 1024; /** The name of the legacy resource type "link". */ protected static final String C_RESOURCE_TYPE_LINK_NAME = "link";
Bugfix in import version 2: Binary files were converted to external pointers
diff --git a/usb1.py b/usb1.py index <HASH>..<HASH> 100644 --- a/usb1.py +++ b/usb1.py @@ -23,7 +23,6 @@ import libusb1 from ctypes import byref, create_string_buffer, c_int, sizeof, POINTER, \ create_unicode_buffer, c_wchar, cast, c_uint16, c_ubyte, string_at, \ c_void_p, cdll -from cStringIO import StringIO import sys import threading from ctypes.util import find_library @@ -1723,7 +1722,8 @@ class USBContext(object): See libusb_handle_events_locked doc. """ # XXX: does tv parameter need to be exposed ? - result = libusb1.libusb_handle_events_locked(self.__context_p, _zero_tv_p) + result = libusb1.libusb_handle_events_locked(self.__context_p, + _zero_tv_p) if result: raise libusb1.USBError(result)
Fix some pylint-detected problems.
diff --git a/rekt/utils.py b/rekt/utils.py index <HASH>..<HASH> 100644 --- a/rekt/utils.py +++ b/rekt/utils.py @@ -44,12 +44,12 @@ def snake_case_to_camel_case(name): return name.replace('_', ' ').title().replace(' ', '') -def load_builtin_config(name, module_name=__name__): +def load_builtin_config(name, module_name=__name__, specs_path=specs.__path__): """ Uses package info magic to find the resource file located in the specs submodule. """ - config_path = Path(next(iter(specs.__path__))) + config_path = Path(next(iter(specs_path))) config_path = config_path / PurePath(resource_filename(module_name, name + '.yaml')) return load_config(config_path)
fixing bug in the load builtin config function which would not allow reuse in other packages
diff --git a/src/FieldHandlers/FieldHandlerFactory.php b/src/FieldHandlers/FieldHandlerFactory.php index <HASH>..<HASH> 100644 --- a/src/FieldHandlers/FieldHandlerFactory.php +++ b/src/FieldHandlers/FieldHandlerFactory.php @@ -60,11 +60,11 @@ class FieldHandlerFactory * * @param mixed $table Name or instance of the Table * @param string $field Field name - * @param string $data Field data + * @param mixed $data Field data * @param mixed[] $options Field options * @return string Field input */ - public function renderInput($table, string $field, string $data = '', array $options = []) : string + public function renderInput($table, string $field, $data = '', array $options = []) : string { $handler = self::getByTableField($table, $field, $options, $this->cakeView); @@ -106,11 +106,11 @@ class FieldHandlerFactory * * @param mixed $table Name or instance of the Table * @param string $field Field name - * @param string $data Field data + * @param mixed $data Field data * @param mixed[] $options Field options * @return string */ - public function renderValue($table, string $field, string $data, array $options = []) : string + public function renderValue($table, string $field, $data, array $options = []) : string { $handler = self::getByTableField($table, $field, $options, $this->cakeView);
Relaxed data value type-hinting for field handler factory API methods (task #<I>)
diff --git a/Kwf/Util/ClearCache.php b/Kwf/Util/ClearCache.php index <HASH>..<HASH> 100644 --- a/Kwf/Util/ClearCache.php +++ b/Kwf/Util/ClearCache.php @@ -296,7 +296,8 @@ class Kwf_Util_ClearCache protected function _clearCache(array $types, $output, $options) { - if (in_array('elastiCache', $types)) { + $skipOtherServers = isset($options['skipOtherServers']) ? $options['skipOtherServers'] : false; + if (in_array('elastiCache', $types) && !$skipOtherServers) { //namespace used in Kwf_Cache_Simple $cache = Kwf_Cache_Simple::getZendCache(); $mc = $cache->getBackend()->getMemcache();
if skip otherServers don't increment elastiCache, as that goes across servers
diff --git a/bin/roundtrip-test.js b/bin/roundtrip-test.js index <HASH>..<HASH> 100755 --- a/bin/roundtrip-test.js +++ b/bin/roundtrip-test.js @@ -530,8 +530,8 @@ var checkIfSignificant = function(offsets, data) { thisResult.wtDiff = formatDiff(oldWt, newWt, offset, 25); // Don't clog the rt-test server db with humongous diffs - if (diff.length > 2000) { - diff = diff.substring(0, 2000) + "-- TRUNCATED TO 2000 chars --"; + if (diff.length > 1000) { + diff = diff.substring(0, 1000) + "-- TRUNCATED TO 1000 chars --"; } thisResult.htmlDiff = diff; }
roundtrip-test.js: Truncate diffs to <I> chars instead of <I> * This reduces db bloat from storing test results. * Only a tiny fraction of test results (<I> in <I>K) are looked at. Change-Id: Ia<I>d<I>e<I>b<I>d0d0d<I>ae<I>b<I>a<I>c
diff --git a/bin/runner.js b/bin/runner.js index <HASH>..<HASH> 100755 --- a/bin/runner.js +++ b/bin/runner.js @@ -88,6 +88,15 @@ if (config.browsers) { worker.config = browser; worker.string = browserString; workers[key] = worker; + + var statusPoller = setInterval(function () { + client.getWorker(worker.id, function (err, _worker) { + if (_worker.status === 'running') { + clearInterval(statusPoller); + console.log('[%s] Launched', worker.string); + } + }); + }, 2000); }); }); });
Add polling for run status for a worker
diff --git a/src/test/java/org/webjars/RequireJSTest.java b/src/test/java/org/webjars/RequireJSTest.java index <HASH>..<HASH> 100644 --- a/src/test/java/org/webjars/RequireJSTest.java +++ b/src/test/java/org/webjars/RequireJSTest.java @@ -62,7 +62,7 @@ public class RequireJSTest { // todo: the angular version changes due to a range transitive dependency assertEquals(WEBJAR_URL_PREFIX + "angular-bootstrap/0.13.0/ui-bootstrap-tpls", jsonNoCdn.get("angular-bootstrap").get("paths").get("angular-bootstrap").get(0).asText()); - assertEquals(WEBJAR_URL_PREFIX + "angular/1.4.3/angular", jsonNoCdn.get("angular").get("paths").get("angular").get(0).asText()); + assertEquals(WEBJAR_URL_PREFIX + "angular/1.4.4/angular", jsonNoCdn.get("angular").get("paths").get("angular").get(0).asText()); Map<String, ObjectNode> jsonWithCdn = RequireJS.getSetupJson(WEBJAR_CDN_PREFIX, WEBJAR_URL_PREFIX);
RequireJSTest: Bump angular version Not sure what exactly the returned version depends on; in the long run maybe this should not care so much about the minor version, but in the meantime this gets the test to pass again.
diff --git a/includes/DHL_BusinessShipment.php b/includes/DHL_BusinessShipment.php index <HASH>..<HASH> 100644 --- a/includes/DHL_BusinessShipment.php +++ b/includes/DHL_BusinessShipment.php @@ -796,8 +796,13 @@ class DHL_BusinessShipment extends DHL_Version { $data->ShipmentOrder->Shipment->ReturnReceiver = $this->getReturnReceiver()->getClass_v2(); // Export-Document - if($this->getExportDocument() !== null) - $data->ShipmentOrder->Shipment->ExportDocument = $this->getExportDocument()->getExportDocumentClass_v2(); + if($this->getExportDocument() !== null) { + try { + $data->ShipmentOrder->Shipment->ExportDocument = $this->getExportDocument()->getExportDocumentClass_v2(); + } catch(Exception $e) { + $this->addError($e->getMessage()); + } + } // Other Settings if($this->getPrintOnlyIfReceiverIsValid() !== null) {
Added try-catch for Export-Document-Class creation
diff --git a/test.py b/test.py index <HASH>..<HASH> 100755 --- a/test.py +++ b/test.py @@ -65,7 +65,7 @@ class MemberTest(APITest): states = [ ('RI', 2), ('AL', 7), - ('AZ', 9), + ('AZ', 8), ] for state, count in states:
Updated test function with latest member data so tests return accurate results.
diff --git a/src/call_get.js b/src/call_get.js index <HASH>..<HASH> 100644 --- a/src/call_get.js +++ b/src/call_get.js @@ -43,8 +43,8 @@ function getCompiled(name, compiler, cache) { cache[" size"]++; if (cache[" size"] > 512) { var keys = Object.keys(cache); - for (var i = 0; i < 256; ++i) delete cache[keys[i]]; - cache[" size"] = keys.length - 256; + for (var i = 0; i < 4; ++i) delete cache[keys[i]]; + cache[" size"] = keys.length - 4; } } return ret; diff --git a/src/promise.js b/src/promise.js index <HASH>..<HASH> 100644 --- a/src/promise.js +++ b/src/promise.js @@ -879,7 +879,7 @@ Promise.prototype._settlePromiseAt = function Promise$_settlePromiseAt(index) { //this is only necessary against index inflation with long lived promises //that accumulate the index size over time, //not because the data wouldn't be GCd otherwise - if (index >= 256) { + if (index >= 4) { this._queueGC(); } };
fix; lower attachment count This fixes the issue discovered in #<I> by lowering the number of interactions a promise has to have before it's cleaned up.
diff --git a/tar_test.go b/tar_test.go index <HASH>..<HASH> 100644 --- a/tar_test.go +++ b/tar_test.go @@ -6,7 +6,7 @@ import ( "path" "testing" - "github.com/mholt/archiver" + "github.com/mholt/archiver/v3" ) func requireRegularFile(t *testing.T, path string) os.FileInfo {
Fix import path in test (#<I>)
diff --git a/src/requirementslib/models/requirements.py b/src/requirementslib/models/requirements.py index <HASH>..<HASH> 100644 --- a/src/requirementslib/models/requirements.py +++ b/src/requirementslib/models/requirements.py @@ -2624,9 +2624,13 @@ class Requirement(object): line_parts.append(self._specifiers) if self.markers: line_parts.append("; {0}".format(self.markers)) - if self.hashes_as_pip: + if self.hashes_as_pip and not (self.editable or self.vcs or self.is_vcs): line_parts.append(self.hashes_as_pip) line = "".join(line_parts) + if self.editable: + if self.markers: + line = '"{0}"'.format(line) + line = "-e {0}".format(line) return Line(line) @property
Fix line generation from pipfiles
diff --git a/lib/AssetGraph.js b/lib/AssetGraph.js index <HASH>..<HASH> 100644 --- a/lib/AssetGraph.js +++ b/lib/AssetGraph.js @@ -332,11 +332,7 @@ AssetGraph.prototype = { }); }, error.passToFunction(cb, function (resolvedAssetConfigs) { - var flattened = []; - resolvedAssetConfigs.forEach(function (resolvedAssetConfig) { - Array.prototype.push.apply(flattened, _.isArray(resolvedAssetConfig) ? resolvedAssetConfig : [resolvedAssetConfig]); - }); - cb(null, flattened); + cb(null, _.flatten(resolvedAssetConfigs)); }) ); }
AssetGraph.resolveAssetConfig: Used _.flatten to simplify a piece of code.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -17,4 +17,15 @@ setup( packages=find_packages(), install_requires=["django >= 1.6", "djangorestframework >= 2.4.3"], zip_safe=False, + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Environment :: Web Environment', + 'Framework :: Django', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: BSD License', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Topic :: Internet :: WWW/HTTP', + ] )
Added classifiers to setup.py
diff --git a/src/diagrams/class/classRenderer.js b/src/diagrams/class/classRenderer.js index <HASH>..<HASH> 100644 --- a/src/diagrams/class/classRenderer.js +++ b/src/diagrams/class/classRenderer.js @@ -505,9 +505,14 @@ export const draw = function(text, id) { logger.info( 'tjoho' + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation) ); - g.setEdge(getGraphId(relation.id1), getGraphId(relation.id2), { - relation: relation - }); + g.setEdge( + getGraphId(relation.id1), + getGraphId(relation.id2), + { + relation: relation + }, + relation.title || 'DEFAULT' + ); }); dagre.layout(g); g.nodes().forEach(function(v) {
fix(#<I>): render multiple relations
diff --git a/panc/src/main/scripts/panlint.py b/panc/src/main/scripts/panlint.py index <HASH>..<HASH> 100755 --- a/panc/src/main/scripts/panlint.py +++ b/panc/src/main/scripts/panlint.py @@ -238,8 +238,7 @@ def main(): for i in range(start_line, end_line + 1): ignore_lines.append(i) - f = open(filename) - for line_number, line in enumerate(f, start=1): + for line_number, line in enumerate(raw_text.splitlines(), start=1): line = line.rstrip('\n') if line and line_number not in ignore_lines and not RE_COMMENT_LINE.match(line):
Reuse existing file contents Rather than reopening the file.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ with open('schedule/requirements.txt') as f: required = f.read().splitlines() setup( - name='django-schedule', + name='django-scheduler', version='0.7', description='A calendaring app for Django.', author='Anthony Robert Hauber',
update setup.py with new name
diff --git a/src/Facade/Auth.php b/src/Facade/Auth.php index <HASH>..<HASH> 100644 --- a/src/Facade/Auth.php +++ b/src/Facade/Auth.php @@ -35,14 +35,16 @@ class Auth extends Facade } /** + * @param bool $refresh + * * @return \Cubex\Auth\IAuthedUser * * @throws \Exception * @throws \RuntimeException */ - public static function getAuthedUser() + public static function getAuthedUser($refresh = false) { - return self::getFacadeRoot()->getAuthedUser(); + return self::getFacadeRoot()->getAuthedUser($refresh); } /** diff --git a/src/ServiceManager/Services/AuthService.php b/src/ServiceManager/Services/AuthService.php index <HASH>..<HASH> 100644 --- a/src/ServiceManager/Services/AuthService.php +++ b/src/ServiceManager/Services/AuthService.php @@ -140,10 +140,17 @@ class AuthService extends AbstractServiceProvider } /** + * @param bool $refresh do not use cached user + * * @return IAuthedUser */ - public function getAuthedUser() + public function getAuthedUser($refresh = false) { + if($refresh === true) + { + $this->_authedUser = null; + } + if($this->_authedUser !== null) { return $this->_authedUser;
support refreshing authedUser details (useful when updating user information)
diff --git a/pkg/ipcache/cidr.go b/pkg/ipcache/cidr.go index <HASH>..<HASH> 100644 --- a/pkg/ipcache/cidr.go +++ b/pkg/ipcache/cidr.go @@ -64,6 +64,7 @@ func (ipc *IPCache) AllocateCIDRs( id, isNew, err := ipc.allocate(p, lbls, oldNID) if err != nil { ipc.IdentityAllocator.ReleaseSlice(context.Background(), nil, usedIdentities) + ipc.Unlock() return nil, err }
ipcache: Fix lock leak Commit <I>e<I>ea2a5a9 ("ipcache: Fix race in identity/ipcache release") unintentionally took the lock on the IPCache and failed to release it if the loop returned in the middle. This case is a bit unusual given that allocation fails in this case. Fix it. Found by inspection. Fixes: <I>e<I>ea2a5a9 ("ipcache: Fix race in identity/ipcache release")
diff --git a/lib/parse/amd.js b/lib/parse/amd.js index <HASH>..<HASH> 100644 --- a/lib/parse/amd.js +++ b/lib/parse/amd.js @@ -107,13 +107,10 @@ AMD.prototype.addOptimizedModules = function (filename) { amdetective(this.getFileSource(filename)).forEach(function (obj) { if (!self.isExcluded(obj.name)) { - var deps = []; - for(var i = 0; i < obj.deps.length;i++) { - if(!self.isExcluded(obj.deps[i])){ - deps.push(obj.deps[i]); - } - } - self.tree[obj.name] = deps; + + self.tree[obj.name] = obj.deps.filter(function(id) { + return id !== 'require' && id !== 'exports' && id !== 'module' && !id.match(/\.?\w\!/) && !self.isExcluded(id); + }) } }); };
filter out require/plugins and excluded
diff --git a/voltron/gdbproxy.py b/voltron/gdbproxy.py index <HASH>..<HASH> 100644 --- a/voltron/gdbproxy.py +++ b/voltron/gdbproxy.py @@ -2,7 +2,10 @@ import asyncore import logging import socket import struct -import cPickle as pickle +try: + import cPickle as pickle +except ImportError: + import pickle from .comms import _sock, READ_MAX from .common import * diff --git a/voltron/view.py b/voltron/view.py index <HASH>..<HASH> 100644 --- a/voltron/view.py +++ b/voltron/view.py @@ -3,7 +3,10 @@ from __future__ import print_function import os import sys import logging -import cPickle as pickle +try: + import cPickle as pickle +except ImportError: + import pickle import curses import pprint import re
Cope with the absense of cPickle
diff --git a/lib/cms/engine.rb b/lib/cms/engine.rb index <HASH>..<HASH> 100644 --- a/lib/cms/engine.rb +++ b/lib/cms/engine.rb @@ -1,5 +1,9 @@ module Cms class Engine < ::Rails::Engine isolate_namespace Cms + + ActionDispatch::Reloader.to_prepare do + require_dependency Cms::Engine.root.join('app/controllers/cms/resources_controller.rb') + end end end
Add resources controller to ActionDispatch::Reloader
diff --git a/tile_generator/pcf.py b/tile_generator/pcf.py index <HASH>..<HASH> 100755 --- a/tile_generator/pcf.py +++ b/tile_generator/pcf.py @@ -55,6 +55,7 @@ def reboot_cmd(yes_i_am_sure=False): time.sleep(1) print() opsmgr.ssh(['sudo reboot now'], silent=True) + time.sleep(10) # Allow system time to go down before we ping the API opsmgr.unlock() @cli.command('unlock')
Wait for system to go down during reboot
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ except ImportError: from distutils.core import setup setup(name='pynrrd', - version='0.2.2', + version='0.2.3', description='Pure python module for reading and writing nrrd files.', long_description='Pure python module for reading and writing nrrd files. See the github page for more information.', author='Maarten Everts',
Version bump to <I>.
diff --git a/src/components/calendar/Calendar.js b/src/components/calendar/Calendar.js index <HASH>..<HASH> 100644 --- a/src/components/calendar/Calendar.js +++ b/src/components/calendar/Calendar.js @@ -3065,7 +3065,7 @@ export class Calendar extends Component { if (!this.props.inline) { return ( <InputText ref={this.inputRef} id={this.props.inputId} name={this.props.name} type="text" className={this.props.inputClassName} style={this.props.inputStyle} - readOnly={this.props.readOnlyInput} disabled={this.props.disabled} required={this.props.required} autoComplete="off" placeholder={this.props.placeholder} + readOnly={this.props.readOnlyInput} disabled={this.props.disabled} required={this.props.required} autoComplete="off" placeholder={this.props.placeholder} tabIndex = {this.props.tabIndex} onInput={this.onUserInput} onFocus={this.onInputFocus} onBlur={this.onInputBlur} onKeyDown={this.onInputKeyDown} aria-labelledby={this.props.ariaLabelledBy} inputMode={this.props.inputMode} /> ); }
Fixed #<I> - TabIndex not set on Calendar (#<I>)
diff --git a/src/sap.ui.table/test/sap/ui/table/demokit/sample/OData2/Controller.controller.js b/src/sap.ui.table/test/sap/ui/table/demokit/sample/OData2/Controller.controller.js index <HASH>..<HASH> 100644 --- a/src/sap.ui.table/test/sap/ui/table/demokit/sample/OData2/Controller.controller.js +++ b/src/sap.ui.table/test/sap/ui/table/demokit/sample/OData2/Controller.controller.js @@ -88,7 +88,7 @@ sap.ui.define([ width: sColumnWidth, label: new sap.m.Label({text: "{/#Product/" + sName + "/@sap:label}"}), hAlign: sType && sType.indexOf("Decimal") >= 0 ? "End" : "Begin", - template: specialTemplate() || new Text({text: {path: sName}}) + template: specialTemplate() || new Text({text: {path: sName}, wrapping: false}) }); }
[INTERNAL] sap.ui.table.Table - Demokit sample fix The sap.ui.table.Table does not support wrapping therefore it is not used in the Demokit samples anymore. Change-Id: I3f9d<I>e1ac6c7fec<I>cb<I>c9d<I>d<I>d<I>
diff --git a/gatsby-node.js b/gatsby-node.js index <HASH>..<HASH> 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -93,7 +93,7 @@ exports.onPostBuild = async function ( } const currentIndexState = indexState[indexName]; - setStatus(activity, `query ${i}: executing query`); + setStatus(activity, `query #${i + 1}: executing query`); const result = await graphql(query); if (result.errors) { report.panic(`failed to index to Algolia`, result.errors);
chore: update message to clearly indicate the index of query (#<I>) * chore: update message to clearly indicate the index of query * Update gatsby-node.js
diff --git a/blobstore_client/Gemfile b/blobstore_client/Gemfile index <HASH>..<HASH> 100644 --- a/blobstore_client/Gemfile +++ b/blobstore_client/Gemfile @@ -1,4 +1,4 @@ -source "http://rubygems.org" +source :rubygems gem "httpclient" diff --git a/blobstore_client/lib/blobstore_client.rb b/blobstore_client/lib/blobstore_client.rb index <HASH>..<HASH> 100644 --- a/blobstore_client/lib/blobstore_client.rb +++ b/blobstore_client/lib/blobstore_client.rb @@ -7,6 +7,8 @@ end require "base64" +require "httpclient" + require "blobstore_client/client" require "blobstore_client/simple_blobstore_client" diff --git a/blobstore_client/spec/spec_helper.rb b/blobstore_client/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/blobstore_client/spec/spec_helper.rb +++ b/blobstore_client/spec/spec_helper.rb @@ -1,5 +1,8 @@ $:.unshift(File.expand_path("../../lib", __FILE__)) +require "bundler" +require "bundler/setup" + require "blobstore_client" Bundler.require(:test)
bundler <I> for blobstore client
diff --git a/modules/activiti-engine/src/main/java/org/activiti/engine/impl/HistoricTaskInstanceQueryImpl.java b/modules/activiti-engine/src/main/java/org/activiti/engine/impl/HistoricTaskInstanceQueryImpl.java index <HASH>..<HASH> 100644 --- a/modules/activiti-engine/src/main/java/org/activiti/engine/impl/HistoricTaskInstanceQueryImpl.java +++ b/modules/activiti-engine/src/main/java/org/activiti/engine/impl/HistoricTaskInstanceQueryImpl.java @@ -52,8 +52,8 @@ public class HistoricTaskInstanceQueryImpl extends AbstractVariableQueryImpl<His protected String taskName; protected String taskNameLike; protected String taskNameLikeIgnoreCase; - private List<String> taskNameList; - private List<String> taskNameListIgnoreCase; + protected List<String> taskNameList; + protected List<String> taskNameListIgnoreCase; protected String taskParentTaskId; protected String taskDescription; protected String taskDescriptionLike;
ACT-<I> member field access correction
diff --git a/great_expectations/data_context/types/__init__.py b/great_expectations/data_context/types/__init__.py index <HASH>..<HASH> 100644 --- a/great_expectations/data_context/types/__init__.py +++ b/great_expectations/data_context/types/__init__.py @@ -20,9 +20,9 @@ from .resource_identifiers import ( ValidationResultIdentifier, ) -# TODO: Deprecate this in favor of DataAssetIdentifier -NormalizedDataAssetName = namedtuple("NormalizedDataAssetName", [ - "datasource", - "generator", - "generator_asset" -]) \ No newline at end of file +# # TODO: Deprecate this in favor of DataAssetIdentifier +# NormalizedDataAssetName = namedtuple("NormalizedDataAssetName", [ +# "datasource", +# "generator", +# "generator_asset" +# ]) \ No newline at end of file
Dup definition most likely due to git merge
diff --git a/html/pfappserver/root/static.alt/src/views/Configuration/_config/role.js b/html/pfappserver/root/static.alt/src/views/Configuration/_config/role.js index <HASH>..<HASH> 100644 --- a/html/pfappserver/root/static.alt/src/views/Configuration/_config/role.js +++ b/html/pfappserver/root/static.alt/src/views/Configuration/_config/role.js @@ -215,13 +215,16 @@ export const view = (_, meta = {}) => { ] }, { - label: i18n.t('VLAN'), - text: i18n.t('The VLAN to use for this role'), + label: i18n.t('Inherit VLAN'), + text: i18n.t('Inherit VLAN from parent if none is found'), cols: [ { - namespace: 'vlan', - component: pfFormInput, - attrs: attributesFromMeta(meta, 'vlan') + namespace: 'inherit_vlan', + component: pfFormRangeToggle, + attrs: { + ...attributesFromMeta(meta, 'inherit_vlan'), + values: { checked: 'enabled', unchecked: 'disabled' } + } } ] }
Rename vlan to inherit_vlan and change type to a toggle
diff --git a/lib/zendesk2/client/mock.rb b/lib/zendesk2/client/mock.rb index <HASH>..<HASH> 100644 --- a/lib/zendesk2/client/mock.rb +++ b/lib/zendesk2/client/mock.rb @@ -5,7 +5,7 @@ class Zendesk2::Client < Cistern::Service attr_accessor :last_request def self.data - @data ||= { + @data ||= Hash.new { |h,k| h[k] = { :categories => {}, :forums => {}, :groups => {}, @@ -26,6 +26,7 @@ class Zendesk2::Client < Cistern::Service :users => {}, :views => {}, } + } end def self.serial_id @@ -34,6 +35,18 @@ class Zendesk2::Client < Cistern::Service @current_id end + def data + self.class.data[@url] + end + + def reset + data.clear + end + + def self.reset + data.clear + end + def serial_id self.class.serial_id end
mock data segmented on url
diff --git a/gcloud/bigquery/client.py b/gcloud/bigquery/client.py index <HASH>..<HASH> 100644 --- a/gcloud/bigquery/client.py +++ b/gcloud/bigquery/client.py @@ -64,9 +64,9 @@ class Client(JSONClient): :rtype: tuple, (list, str) :returns: list of :class:`gcloud.bigquery.dataset.Dataset`, plus a - "next page token" string: if not None, indicates that - more datasets can be retrieved with another call (pass that - value as ``page_token``). + "next page token" string: if the toke is not None, + indicates that more datasets can be retrieved with another + call (pass that value as ``page_token``). """ params = {}
Reword :returns: for clarity. Addresses: <URL>
diff --git a/vyked/utils/stats.py b/vyked/utils/stats.py index <HASH>..<HASH> 100644 --- a/vyked/utils/stats.py +++ b/vyked/utils/stats.py @@ -95,7 +95,7 @@ class Aggregator: @classmethod def periodic_aggregated_stats_logger(cls): - hostname = socket.gethostname() + hostname = socket.gethostbyname(socket.gethostname()) service_name = '_'.join(setproctitle.getproctitle().split('_')[:-1]) logd = cls._stats.to_dict()
make host-ip appear consistently in log logging `socket.hostname() was making the json inconsistent and raising alarms unreliable. this should fix the situation.
diff --git a/app/decorators/socializer/person_decorator.rb b/app/decorators/socializer/person_decorator.rb index <HASH>..<HASH> 100644 --- a/app/decorators/socializer/person_decorator.rb +++ b/app/decorators/socializer/person_decorator.rb @@ -26,7 +26,7 @@ module Socializer avatar_provider_array = %w( FACEBOOK LINKEDIN TWITTER ) if avatar_provider_array.include?(avatar_provider) - social_avatar_url(avatar_provider) + social_avatar_url else gravatar_url end @@ -84,8 +84,8 @@ module Socializer model.circles + model.memberships end - def social_avatar_url(provider) - auth = authentications.find_by(provider: provider.downcase) + def social_avatar_url + auth = authentications.find_by(provider: avatar_provider.downcase) auth.image_url if auth.present? end
no need to pass avatar_provider as an argument
diff --git a/src/Objects/Table.php b/src/Objects/Table.php index <HASH>..<HASH> 100644 --- a/src/Objects/Table.php +++ b/src/Objects/Table.php @@ -181,4 +181,21 @@ class Table } + /** + * check if array have a key + * + * @param array $array + * @param mixed $key + * @return bool + */ + public static function exists(array $array , $key) + { + return array_key_exists($key , $array); + } + + + + + + }
add function to check if object has a key
diff --git a/configyaml/config/dict.py b/configyaml/config/dict.py index <HASH>..<HASH> 100644 --- a/configyaml/config/dict.py +++ b/configyaml/config/dict.py @@ -43,7 +43,7 @@ class DictNode(AbstractNode): for k, v in self._dict_fields.items(): if 'default' in v: default = v['default'] - instance = v['class'](value=default) + instance = v['class'](value=default, context=self._context, parent=self) self.__dict__[k] = instance self._children[k] = instance diff --git a/tests/test_dict.py b/tests/test_dict.py index <HASH>..<HASH> 100644 --- a/tests/test_dict.py +++ b/tests/test_dict.py @@ -104,11 +104,13 @@ def test_default(): config = DummyConfigDefault(value=value) assert config.is_valid() assert config.foo._value == 'test' + assert config.foo._parent == config value = {'foo': 'bar'} config = DummyConfigDefault(value=value) assert config.is_valid() assert config.foo._value == 'bar' + assert config.foo._parent == config def test_get_item():
pass context and parent in DictNode default instance
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ class FetchExternal(setuptools.command.install.install): setup(cmdclass={'install': FetchExternal}, name='python_moztelemetry', - version='0.3.7.3', + version='0.3.7.5', author='Roberto Agostino Vitillo', author_email='rvitillo@mozilla.com', description='Spark bindings for Mozilla Telemetry',
Bump the package version (by 2).
diff --git a/PHPDaemon/WebSocket/Traits/DNode.php b/PHPDaemon/WebSocket/Traits/DNode.php index <HASH>..<HASH> 100755 --- a/PHPDaemon/WebSocket/Traits/DNode.php +++ b/PHPDaemon/WebSocket/Traits/DNode.php @@ -122,6 +122,9 @@ trait DNode { } public function sendPacket($p) { + if (!$this->client) { + return; + } if (is_string($p['method']) && ctype_digit($p['method'])) { $p['method'] = (int) $p['method']; } @@ -129,15 +132,23 @@ trait DNode { } /** - * Called when session finished. + * Called when session is finished * @return void */ public function onFinish() { + $this->cleanup(); + parent::onFinish(); + } + + /** + * Swipes internal structures + * @return void + */ + public function cleanup() { $this->remoteMethods = []; $this->localMethods = []; $this->persistentCallbacks = []; $this->callbacks = []; - parent::onFinish(); } protected static function setPath(&$m, $path, $val) {
DNode: added method cleanup()
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/CheckpointedInputGate.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/CheckpointedInputGate.java index <HASH>..<HASH> 100644 --- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/CheckpointedInputGate.java +++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/CheckpointedInputGate.java @@ -125,7 +125,6 @@ public class CheckpointedInputGate implements PullingAsyncDataInput<BufferOrEven next = inputGate.pollNext(); } else { - // TODO: FLINK-12536 for non credit-based flow control, getNext method is blocking next = bufferStorage.pollNext(); if (!next.isPresent()) { return pollNext();
[hotfix][doc] Remove invalid comment from CheckpointedInputGate This closes #<I> .
diff --git a/lib/plugins/coffee.js b/lib/plugins/coffee.js index <HASH>..<HASH> 100644 --- a/lib/plugins/coffee.js +++ b/lib/plugins/coffee.js @@ -11,7 +11,7 @@ module.exports = function coffeePlugin(carapace) { // as necessary so that the .coffee is handled correctly by the `coffee` binary. // var script = carapace.script; - if (script.match(/\.coffee$/)) { + if (value == 'true' || script.match(/\.coffee$/)) { carapace.script = coffeeBin; carapace.argv.unshift(script); }
[fix] coffee plugin should be able to be forced
diff --git a/lib/datalib.php b/lib/datalib.php index <HASH>..<HASH> 100644 --- a/lib/datalib.php +++ b/lib/datalib.php @@ -2019,7 +2019,7 @@ function get_group_teachers($courseid, $groupid) { if (($teacher->authority > 0) and ismember($groupid, $teacher->id)) { // Specific group teachers continue; } - unset($teacher[$key]); + unset($teachers[$key]); } } return $teachers;
fixed bug <I>, thanks Ilshat Fattakhov; merged from MOODLE_<I>_STABLE
diff --git a/lib/logger/config-serializer.js b/lib/logger/config-serializer.js index <HASH>..<HASH> 100644 --- a/lib/logger/config-serializer.js +++ b/lib/logger/config-serializer.js @@ -4,6 +4,7 @@ module.exports = configSerializer; function configSerializer(config) { const redactedFields = [ + 'authorization', 'token', 'githubAppKey', 'npmToken',
fix: add authorization to redacted logger fields
diff --git a/molgenis-omx-dataexplorer/src/main/resources/js/dataexplorer-data.js b/molgenis-omx-dataexplorer/src/main/resources/js/dataexplorer-data.js index <HASH>..<HASH> 100644 --- a/molgenis-omx-dataexplorer/src/main/resources/js/dataexplorer-data.js +++ b/molgenis-omx-dataexplorer/src/main/resources/js/dataexplorer-data.js @@ -135,6 +135,7 @@ settings.registry = 'https://www.dasregistry.org/das/sources'; genomeBrowser = new Browser(settings); genomeBrowser.realInit(); + genomeBrowser.highlightRegion(genomeBrowser.chr, (genomeBrowser.viewStart + 9990), (genomeBrowser.viewEnd - 9990)); var featureInfoMap = {}; genomeBrowser.addFeatureInfoPlugin(function(f, info) { //check if there is cached information for this clicked item
Region that you query in genome browser is now always highlighted on initialization
diff --git a/lib/view_assets/css_assets.rb b/lib/view_assets/css_assets.rb index <HASH>..<HASH> 100644 --- a/lib/view_assets/css_assets.rb +++ b/lib/view_assets/css_assets.rb @@ -1,15 +1,21 @@ module ViewAssets + # TODO add rspec examples class StyleSheetAssets < AssetsFinder def assets_path - "#{root_path}/stylesheets" + # 'assets/javascripts' + 'stylesheets' end def asset_extension 'css' end + def asset_type + 'stylesheet' + end + def tag(css_href) "<link href='#{css_href}' media='screen' rel='stylesheet' />" end end -end +end \ No newline at end of file
correct the configuration of css assets finder
diff --git a/gnupg/gnupg.py b/gnupg/gnupg.py index <HASH>..<HASH> 100644 --- a/gnupg/gnupg.py +++ b/gnupg/gnupg.py @@ -171,11 +171,6 @@ def _make_binary_stream(s, encoding): rv = StringIO(s) return rv -def _today(): - """Get the current date as a string in the form %Y-%m-%d.""" - now_string = datetime.now().__str__() - return now_string.split(' ', 1)[0] - def _threaded_copy_data(instream, outstream): wr = threading.Thread(target=_copy_data, args=(instream, outstream)) wr.setDaemon(True)
Remove function _today() from gnupg.py.
diff --git a/src/LouisLam/Util.php b/src/LouisLam/Util.php index <HASH>..<HASH> 100644 --- a/src/LouisLam/Util.php +++ b/src/LouisLam/Util.php @@ -22,12 +22,17 @@ class Util if ($containIndex) { return $_SERVER["SCRIPT_NAME"] . "/" . $relativePath; } else { - return str_replace("index.php", "", $_SERVER["SCRIPT_NAME"]) . $relativePath; + $segments = explode("/", $_SERVER["SCRIPT_NAME"]); + + $phpFile = $segments[count($segments) - 1]; + return str_replace($phpFile, "", $_SERVER["SCRIPT_NAME"]) . $relativePath; } } public static function res($relativePath) { - return str_replace("index.php", "", $_SERVER["SCRIPT_NAME"]) . $relativePath; + $segments = explode("/", $_SERVER["SCRIPT_NAME"]); + $phpFile = $segments[count($segments) - 1]; + return str_replace($phpFile, "", $_SERVER["SCRIPT_NAME"]) . $relativePath; } public static function loadJSON($path)
handle url if is not index.php
diff --git a/views/js/qtiItem/core/Loader.js b/views/js/qtiItem/core/Loader.js index <HASH>..<HASH> 100755 --- a/views/js/qtiItem/core/Loader.js +++ b/views/js/qtiItem/core/Loader.js @@ -422,26 +422,8 @@ define([ portableElement.typeIdentifier = data.typeIdentifier; portableElement.markup = data.markup; portableElement.entryPoint = data.entryPoint; + portableElement.properties = data.properties; portableElement.libraries = data.libraries; - portableElement.setNamespace('', data.xmlns); - - loadPortableCustomElementProperties(portableElement, data.properties); - } - - /** - * If a property is given as a serialized JSON object, parse it directly to a JS object - */ - function loadPortableCustomElementProperties(portableElement, rawProperties) { - var properties = {}; - - _.forOwn(rawProperties, function(value, key) { - try { - properties[key] = JSON.parse(value); - } catch (e) { - properties[key] = value; - } - }); - portableElement.properties = properties; } return Loader;
removed automatic parsing of JSON content in interaction properties
diff --git a/lib/lean_tag/taggable.rb b/lib/lean_tag/taggable.rb index <HASH>..<HASH> 100644 --- a/lib/lean_tag/taggable.rb +++ b/lib/lean_tag/taggable.rb @@ -20,7 +20,7 @@ module LeanTag define_method "add_#{tag_relation.to_s.singularize}!", ->(tag) { _add_tag!(tag, tag_relation) } define_method "#{tag_relation.to_s.singularize}_list", ->() { _get_tag_list(tag_relation) } define_method "remove_#{tag_relation.to_s.singularize}", ->(tag) { _remove_tag(tag, tag_relation) } - define_method "remove_#{tag_relation.to_s.singularize}!", ->(tag) { _remove_tag(tag, tag_relation) } + define_method "remove_#{tag_relation.to_s.singularize}!", ->(tag) { _remove_tag!(tag, tag_relation) } define_method "#{tag_relation.to_s.singularize}_list=", ->(list) { _set_tag_list(list, tag_relation) } end end
remove_tag! was never being called
diff --git a/prove.go b/prove.go index <HASH>..<HASH> 100644 --- a/prove.go +++ b/prove.go @@ -60,7 +60,7 @@ func (v *ProofEngine) PromptRemoteName() (err error) { for len(v.Username) == 0 && err == nil { var un string un, err = v.ProveUI.PromptUsername(v.st.GetPrompt(), prevErr) - if err != nil { + if err == nil { prevErr = v.st.CheckUsername(un) if prevErr == nil { v.Username = un
bugfix for keybase/go-client#<I>
diff --git a/lmdb/val.go b/lmdb/val.go index <HASH>..<HASH> 100644 --- a/lmdb/val.go +++ b/lmdb/val.go @@ -40,10 +40,10 @@ func WrapMulti(page []byte, stride int) *Multi { // Vals returns a slice containing the values in m. The returned slice has // length m.Len() and each item has length m.Stride(). func (m *Multi) Vals() [][]byte { - i, ps := 0, make([][]byte, m.Len()) - for off := 0; off < len(m.page); off += m.stride { - ps[i] = m.page[off : off+m.stride] - i++ + n := m.Len() + ps := make([][]byte, n) + for i := 0; i < n; i++ { + ps[i] = m.Val(i) } return ps }
clean up Multi.Vals by using Multi.Val internally
diff --git a/lib/mactag/ctags.rb b/lib/mactag/ctags.rb index <HASH>..<HASH> 100644 --- a/lib/mactag/ctags.rb +++ b/lib/mactag/ctags.rb @@ -14,8 +14,19 @@ module Mactag binary.gsub!('{OUTPUT}', @output) binary.gsub!('{INPUT}', @input) - - system "cd #{Rails.root} && #{binary}" + + exec(binary) + end + + + private + + def exec(binary) + system command(binary) + end + + def command(binary) + "cd #{Rails.root} && #{binary}" end end end
Separate this functionality for easier testing.
diff --git a/lib/quality/flay.rb b/lib/quality/flay.rb index <HASH>..<HASH> 100644 --- a/lib/quality/flay.rb +++ b/lib/quality/flay.rb @@ -1,8 +1,9 @@ module Quality module Flay - def quality_flay - private + private + + def quality_flay ratchet_quality_cmd('flay', args: "-m 75 -t 99999 #{ruby_files}", emacs_format: true) do |line|
Fix accidental line location swap of 'private'
diff --git a/gulpfile.js b/gulpfile.js index <HASH>..<HASH> 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,6 +1,6 @@ const gulp = require('gulp'); const sass = require('gulp-sass'); -var browserSync = require('browser-sync').create(); +const browserSync = require('browser-sync').create(); // Static server gulp.task('browser-sync', ['sass', 'js'], function () {
Uses const to be more consistent
diff --git a/multiqc/modules/mirtrace/mirtrace.py b/multiqc/modules/mirtrace/mirtrace.py index <HASH>..<HASH> 100755 --- a/multiqc/modules/mirtrace/mirtrace.py +++ b/multiqc/modules/mirtrace/mirtrace.py @@ -339,7 +339,7 @@ class MultiqcModule(BaseMultiqcModule): config = { 'id': 'mirtrace_complexity_plot', - 'title': 'miRTrace miRNA Complexity Plot', + 'title': 'miRTrace: miRNA Complexity Plot', 'ylab': 'Distinct miRNA Count', 'xlab': 'Number of Sequencing Reads', 'ymin': 0,
Add colon in plot title for complexity plot
diff --git a/elytron/src/test/java/org/wildfly/extension/elytron/MappersTestCase.java b/elytron/src/test/java/org/wildfly/extension/elytron/MappersTestCase.java index <HASH>..<HASH> 100644 --- a/elytron/src/test/java/org/wildfly/extension/elytron/MappersTestCase.java +++ b/elytron/src/test/java/org/wildfly/extension/elytron/MappersTestCase.java @@ -56,7 +56,6 @@ public class MappersTestCase extends AbstractSubsystemBaseTest { Assert.assertEquals("beta", transformer.apply(new NamePrincipal("beta@wildfly.org")).getName()); // remove server part Assert.assertEquals("gamma@example.com", transformer.apply(new NamePrincipal("gamma@example.com")).getName()); // keep Assert.assertEquals(null, transformer.apply(new NamePrincipal("invalid"))); // not an e-mail address - Assert.assertEquals(null, transformer.apply(new NamePrincipal(null))); Assert.assertEquals(null, transformer.apply(null)); } }
[WFCORE-<I>] Remove invalid test with Principal with 'null' name.
diff --git a/abstract.js b/abstract.js index <HASH>..<HASH> 100644 --- a/abstract.js +++ b/abstract.js @@ -235,7 +235,7 @@ ee(Object.defineProperties(PersistenceDriver.prototype, assign({ onAdd = function (obj) { var observable, value, stamp, objId, sKeys, sValue, data, indexEvent; obj = resolveObject(obj, names); - if (!obj) return null; + if (!obj) return deferred(null); objId = obj.__id__; if (obj.isKeyStatic(key)) { value = obj[key]; @@ -257,9 +257,9 @@ ee(Object.defineProperties(PersistenceDriver.prototype, assign({ if (data) { if (data.stamp === stamp) { if (sKeys) { - if (isCopy.call(resolveEventKeys(data.value), sKeys)) return; + if (isCopy.call(resolveEventKeys(data.value), sKeys)) return deferred(null); } else { - if (data.value === sValue) return; + if (data.value === sValue) return deferred(null); } ++stamp; // most likely model update } else if (data.stamp > stamp) {
Ensure common return type in internal function
diff --git a/lib/pi_charts.rb b/lib/pi_charts.rb index <HASH>..<HASH> 100644 --- a/lib/pi_charts.rb +++ b/lib/pi_charts.rb @@ -1,3 +1,5 @@ +# I guess I could do a loop, jah feel? +# Or any other way I guess. require "pi_charts/version" require "pi_charts/base" require "pi_charts/utils" @@ -7,6 +9,7 @@ require "pi_charts/pie_chart" require "pi_charts/bar_chart" require "pi_charts/doughnut_chart" +# Lil' extra spice. require "securerandom" require "json"
Comments, more comments. Need’em.
diff --git a/lib/active_record_shards/model.rb b/lib/active_record_shards/model.rb index <HASH>..<HASH> 100644 --- a/lib/active_record_shards/model.rb +++ b/lib/active_record_shards/model.rb @@ -9,7 +9,7 @@ module ActiveRecordShards def is_sharded? if self == ActiveRecord::Base - true + supports_sharding? elsif self == base_class @sharded != false else
AR::Base is only sharded if sharding is supported
diff --git a/spyderlib/plugins/editor.py b/spyderlib/plugins/editor.py index <HASH>..<HASH> 100644 --- a/spyderlib/plugins/editor.py +++ b/spyderlib/plugins/editor.py @@ -472,7 +472,7 @@ class EditorTabWidget(Tabs): finfo = self.data[index] editor = finfo.editor editor.setFocus() - plugin_title += " - " + osp.basename(finfo.filename) + plugin_title += " - " + osp.abspath(finfo.filename) self.__refresh_classbrowser(index, update=False) self.emit(SIGNAL('refresh_analysis_results()')) self.__refresh_statusbar(index)
Editor / fixed Issue <I>: show full path of current script in Editor's dockwidget title
diff --git a/flask_user/tests/test_db_adapters.py b/flask_user/tests/test_db_adapters.py index <HASH>..<HASH> 100644 --- a/flask_user/tests/test_db_adapters.py +++ b/flask_user/tests/test_db_adapters.py @@ -21,6 +21,7 @@ def test_mongoengine_db_adapter(app): # Test add_object user1 = db_adapter.add_object(User, username=username) + user2 = db_adapter.add_object(User, username='SecondUser') db_adapter.commit() # Test get_object @@ -57,11 +58,18 @@ def test_mongoengine_db_adapter(app): assert user_roles == ['Secret', 'Agent'] # Test delete_object + user1_id = user1.id db_adapter.delete_object(user1) db_adapter.commit() - user = db_adapter.find_first_object(User, username=username) + user = db_adapter.get_object(User, user1_id) assert user==None + user = db_adapter.get_object(User, user2.id) + assert user==user2 + # Test drop_all_tables + db_adapter.drop_all_tables() + user = db_adapter.get_object(User, user2.id) + assert user==None
Added tests for MongoEngineDbAdapter. Increased test coverage.
diff --git a/project/library/CM/Request/Abstract.php b/project/library/CM/Request/Abstract.php index <HASH>..<HASH> 100644 --- a/project/library/CM/Request/Abstract.php +++ b/project/library/CM/Request/Abstract.php @@ -400,14 +400,17 @@ abstract class CM_Request_Abstract { * @param array|null $headers * @param CM_Model_User|null $viewer * @param string|null $body + * @throws CM_Exception_Invalid * @return CM_Request_Get|CM_Request_Post */ public static function factory($method, $uri, array $headers = null, CM_Model_User $viewer = null, $body = null) { - if ($method === 'POST') { + $method = strtolower($method); + if ($method === 'post') { return new CM_Request_Post($uri, $headers, $viewer, $body); } - if ($method === 'GET') { + if ($method === 'get') { return new CM_Request_Get($uri, $headers, $viewer); } + throw new CM_Exception_Invalid('Invalid request method `' . $method . '`'); } } \ No newline at end of file
t<I>: Method case insensitive; exception thrown
diff --git a/logback-site/src/site/pages/templates/footer.js b/logback-site/src/site/pages/templates/footer.js index <HASH>..<HASH> 100644 --- a/logback-site/src/site/pages/templates/footer.js +++ b/logback-site/src/site/pages/templates/footer.js @@ -21,7 +21,7 @@ AAT = '@' DOOTT = '.' document.write('<tr>') document.write('<td align="left" colspan="2">') -document.write('We are actively looking for volunteers to proofread the documentation. Please send your corrections or suggestions for improvement to "corrections' + AAT +'qos'+DOOTT+'ch".'); +document.write('We are actively looking for volunteers to proofread the documentation. Please send your corrections or suggestions for improvement to "corrections' + AAT +'qos'+DOOTT+'ch". See also the <a href="http://articles.qos.ch/contributing.html">instructions for contributors</a>.'); document.write('</td>') document.write('</table>')
- added a link to the article on making contributions.
diff --git a/transmute_core/tests/frameworks/test_aiohttp/__init__.py b/transmute_core/tests/frameworks/test_aiohttp/__init__.py index <HASH>..<HASH> 100644 --- a/transmute_core/tests/frameworks/test_aiohttp/__init__.py +++ b/transmute_core/tests/frameworks/test_aiohttp/__init__.py @@ -1,4 +1,2 @@ import pytest -import sys - -pytestmark = pytest.mark.skipif(sys.version_info < (3,), reason="Python version must be greater than 3.") \ No newline at end of file +import sys \ No newline at end of file diff --git a/transmute_core/tests/frameworks/test_aiohttp/conftest.py b/transmute_core/tests/frameworks/test_aiohttp/conftest.py index <HASH>..<HASH> 100644 --- a/transmute_core/tests/frameworks/test_aiohttp/conftest.py +++ b/transmute_core/tests/frameworks/test_aiohttp/conftest.py @@ -1,9 +1,15 @@ import pytest -from .example import create_app +import sys + +def pytest_ignore_collect(*args, **kwargs): + if sys.version_info < (3,5): + return True + return False @pytest.fixture def app(loop): + from .example import create_app return create_app()
minor: fixed python<I> unit tests aiohttp's test files we're still loading during pytest execution. skipif doesn't prevent loading of aiohttp conftest.py files, resulting in SyntaxErrors being raised during collection. Using pytest_ignore_collect and moving import of aiohttp files to inline imports solves the issue.
diff --git a/src/index.test.js b/src/index.test.js index <HASH>..<HASH> 100644 --- a/src/index.test.js +++ b/src/index.test.js @@ -1,9 +1,10 @@ import _ from 'lodash'; -import eventInfoPlugin from './index'; import * as miniPlugins from './plugins'; import * as eventSamples from './eventSamples'; +const eventInfoPlugin = require('./index'); + class MockInvocation { constructor(event) { this.logData = {};
style(index.test.js): Fix lint issue with /index (#8)
diff --git a/pmxbot/core.py b/pmxbot/core.py index <HASH>..<HASH> 100644 --- a/pmxbot/core.py +++ b/pmxbot/core.py @@ -251,7 +251,10 @@ class LoggingCommandBot(irc.bot.SingleServerIRCBot): ) executor(howlong, self.background_runner, arguments) for action in _at_registry: - self._schedule_at(connection, *action) + try: + self._schedule_at(connection, *action) + except Exception: + log.exception("Error scheduling", action) self._set_keepalive(connection)
Log an exception when failing to schedule an action.
diff --git a/tests/test_pdf.py b/tests/test_pdf.py index <HASH>..<HASH> 100644 --- a/tests/test_pdf.py +++ b/tests/test_pdf.py @@ -2,10 +2,11 @@ Testing focused on pikepdf.Pdf """ +import locale import os import shutil import sys -from io import StringIO, BytesIO +from io import BytesIO, StringIO from pathlib import Path from unittest.mock import Mock, patch @@ -15,7 +16,6 @@ import pikepdf from pikepdf import PasswordError, Pdf, PdfError, Stream from pikepdf._cpphelpers import fspath # For py35 - # pylint: disable=redefined-outer-name @@ -180,6 +180,7 @@ def test_progress(trivial, outdir): mock.assert_called() +@pytest.mark.skipif(locale.getpreferredencoding() != 'UTF-8', reason="Unicode check") def test_unicode_filename(resources, outdir): target1 = outdir / '测试.pdf' target2 = outdir / '通过考试.pdf'
tests: fix possible issue when running tests in non-Unicode environment
diff --git a/src/Laracasts/TestDummy/EloquentDatabaseProvider.php b/src/Laracasts/TestDummy/EloquentDatabaseProvider.php index <HASH>..<HASH> 100644 --- a/src/Laracasts/TestDummy/EloquentDatabaseProvider.php +++ b/src/Laracasts/TestDummy/EloquentDatabaseProvider.php @@ -19,7 +19,7 @@ class EloquentDatabaseProvider implements BuildableRepositoryInterface { throw new TestDummyException("The {$type} model was not found."); } - return (new $type)->forceFill($attributes); + return $this->fill($type, $attributes); } /** @@ -44,4 +44,22 @@ class EloquentDatabaseProvider implements BuildableRepositoryInterface { return $entity->getAttributes(); } + /** + * Force fill an object with attributes. + * + * @param string $type + * @param array $attributes + * @return Eloquent + */ + private function fill($type, $attributes) + { + Eloquent::unguard(); + + $object = (new $type)->fill($attributes); + + Eloguent::reguard(); + + return $object; + } + }
Fall back to Laravel 4 friendly force filling
diff --git a/Runnable/EventsGenerator/CallableEventsGenerator.php b/Runnable/EventsGenerator/CallableEventsGenerator.php index <HASH>..<HASH> 100644 --- a/Runnable/EventsGenerator/CallableEventsGenerator.php +++ b/Runnable/EventsGenerator/CallableEventsGenerator.php @@ -6,7 +6,7 @@ class CallableEventsGenerator implements EventsGenerator { public function produce() { - call_user_func_array($this->callable, []); + return call_user_func_array($this->callable, []); } /**
fix(CallableEventsGenerator): return the result of the produce call