diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/tests/support/mock.py b/tests/support/mock.py index <HASH>..<HASH> 100644 --- a/tests/support/mock.py +++ b/tests/support/mock.py @@ -95,8 +95,10 @@ if NO_MOCK is False: class MockFH(object): - def __init__(self, filename, read_data): + def __init__(self, filename, read_data, *args, **kwargs): self.filename = filename + self.call_args = (filename,) + args + self.call_kwargs = kwargs self.empty_string = b'' if isinstance(read_data, six.binary_type) else '' self.read_data = self._iterate_read_data(read_data) self.read = Mock(side_effect=self._read) @@ -316,7 +318,7 @@ class MockOpen(object): # Contents were not an exception, so proceed with creating the # mocked filehandle. pass - ret = MockFH(name, file_contents) + ret = MockFH(name, file_contents, *args, **kwargs) self.filehandles.setdefault(name, []).append(ret) return ret except KeyError:
Track call args/kwargs in MockFH This allows for them to be verified in tests
diff --git a/src/TwentyOneRunFactory.php b/src/TwentyOneRunFactory.php index <HASH>..<HASH> 100644 --- a/src/TwentyOneRunFactory.php +++ b/src/TwentyOneRunFactory.php @@ -408,7 +408,7 @@ class TwentyOneRunFactory implements Factory ), SortOrderConfig::create( AttributeCode::fromString('created_at'), - SortOrderDirection::create(SortOrderDirection::ASC) + SortOrderDirection::create(SortOrderDirection::DESC) ), ]; }
Issue #<I>: Descend sorting by creation date
diff --git a/test/integration.js b/test/integration.js index <HASH>..<HASH> 100644 --- a/test/integration.js +++ b/test/integration.js @@ -35,20 +35,20 @@ test('should work with a single pid', async t => { test('should work with an array of pids', async t => { const child = spawn( 'node', - ['-e', 'console.log(123); var c = 0; while(true) {c = Math.pow(c, c);}'], + ['-e', 'console.log(`123`); setInterval(() => {}, 1000)'], { windowsHide: true } ) const ppid = process.pid const pid = child.pid - await t.notThrows(() => + await t.notThrowsAsync( new Promise((resolve, reject) => { child.stdout.on('data', d => resolve(d.toString())) child.stderr.on('data', d => reject(d.toString())) child.on('error', reject) - child.on('exit', reject) + child.on('exit', code => reject(new Error('script exited with code ' + code))) }), - 'script not executed' + 'script not executed' ) const pids = [ppid, pid]
test: os x deterministic
diff --git a/revapi-java/src/main/java/org/revapi/java/compilation/ClassTreeInitializer.java b/revapi-java/src/main/java/org/revapi/java/compilation/ClassTreeInitializer.java index <HASH>..<HASH> 100644 --- a/revapi-java/src/main/java/org/revapi/java/compilation/ClassTreeInitializer.java +++ b/revapi-java/src/main/java/org/revapi/java/compilation/ClassTreeInitializer.java @@ -149,7 +149,7 @@ final class ClassTreeInitializer { } } - if (LOG.isInfoEnabled()) { + if (LOG.isTraceEnabled()) { time = System.currentTimeMillis() - time; final int[] num = new int[1]; environment.getTree().searchUnsafe(JavaElement.class, true, new Filter<JavaElement>() { @@ -164,10 +164,7 @@ final class ClassTreeInitializer { return true; } }, null); - LOG.info("Tree init took " + time + "ms. The resulting tree has " + num[0] + " elements."); - } - - if (LOG.isTraceEnabled()) { + LOG.trace("Tree init took " + time + "ms. The resulting tree has " + num[0] + " elements."); LOG.trace("Public API class tree in {} initialized to: {}", environment.getApi(), environment.getTree()); } }
Output class tree init times only on trace level.
diff --git a/lib/wns.js b/lib/wns.js index <HASH>..<HASH> 100644 --- a/lib/wns.js +++ b/lib/wns.js @@ -156,8 +156,10 @@ var obtainAccessToken = function (context) { // queue up the context until the accessToken is obtained var key = getClientKey(context); - if (pendingNotifications[key]) + if (pendingNotifications[key]) { pendingNotifications[key].push(context); + return; + } else pendingNotifications[key] = [ context ];
Fix simultaneous send requests while obtaining token If you are sending a push notification for the first time, a token will be retrieved. During that time, if you attempt to send another message, it gets queued, but produces a fatal error. This is because a new request for a new token is made.
diff --git a/params/version.go b/params/version.go index <HASH>..<HASH> 100644 --- a/params/version.go +++ b/params/version.go @@ -21,10 +21,10 @@ import ( ) const ( - VersionMajor = 1 // Major version component of the current release - VersionMinor = 8 // Minor version component of the current release - VersionPatch = 17 // Patch version component of the current release - VersionMeta = "unstable" // Version metadata to append to the version string + VersionMajor = 1 // Major version component of the current release + VersionMinor = 8 // Minor version component of the current release + VersionPatch = 17 // Patch version component of the current release + VersionMeta = "stable" // Version metadata to append to the version string ) // Version holds the textual version string. diff --git a/swarm/version/version.go b/swarm/version/version.go index <HASH>..<HASH> 100644 --- a/swarm/version/version.go +++ b/swarm/version/version.go @@ -21,10 +21,10 @@ import ( ) const ( - VersionMajor = 0 // Major version component of the current release - VersionMinor = 3 // Minor version component of the current release - VersionPatch = 5 // Patch version component of the current release - VersionMeta = "unstable" // Version metadata to append to the version string + VersionMajor = 0 // Major version component of the current release + VersionMinor = 3 // Minor version component of the current release + VersionPatch = 5 // Patch version component of the current release + VersionMeta = "stable" // Version metadata to append to the version string ) // Version holds the textual version string.
params, swarm: release Geth <I> and Swar <I>
diff --git a/tests/minifier.js b/tests/minifier.js index <HASH>..<HASH> 100644 --- a/tests/minifier.js +++ b/tests/minifier.js @@ -7,6 +7,10 @@ input, output; + test('`minifiy` exists', function() { + ok(minify); + }); + test('parsing non-trivial markup', function() { equal(minify('<p title="</p>">x</p>'), '<p title="</p>">x</p>'); equal(minify('<p title=" <!-- hello world --> ">x</p>'), '<p title=" <!-- hello world --> ">x</p>'); @@ -92,10 +96,6 @@ }); }); - test('`minifiy` exists', function() { - ok(minify); - }); - test('options', function() { input = '<p>blah<span>blah 2<span>blah 3</span></span></p>'; equal(minify(input), input);
test for minify() should come first
diff --git a/examples/nips17_adversarial_competition/run_attacks_and_defenses.py b/examples/nips17_adversarial_competition/run_attacks_and_defenses.py index <HASH>..<HASH> 100644 --- a/examples/nips17_adversarial_competition/run_attacks_and_defenses.py +++ b/examples/nips17_adversarial_competition/run_attacks_and_defenses.py @@ -447,7 +447,7 @@ def compute_and_save_scores_and_ranking(attacks_output, # higher scores are better. defense_scores = (np.sum(accuracy_on_attacks, axis=0) + np.sum(accuracy_on_targeted_attacks, axis=0)) - attack_scores = (attacks_output.dataset_image_count + attack_scores = (attacks_output.dataset_image_count * len(defenses_output) - np.sum(accuracy_on_attacks, axis=1)) targeted_attack_scores = np.sum(hit_target_class, axis=1) write_ranking(os.path.join(output_dir, 'defense_ranking.csv'),
Fix bug in computation of attack score for Adversarial competition.
diff --git a/rulengine/__init__.py b/rulengine/__init__.py index <HASH>..<HASH> 100644 --- a/rulengine/__init__.py +++ b/rulengine/__init__.py @@ -1,7 +1,7 @@ from rulengine.core import RuleOperator from rulengine.conditions import execute_condition -VERSION = (0, 0, 5) +VERSION = (0, 0, 6) __version__ = '.'.join(map(str, VERSION))
version bumped to <I>
diff --git a/packages/plugin-phone/src/call.js b/packages/plugin-phone/src/call.js index <HASH>..<HASH> 100644 --- a/packages/plugin-phone/src/call.js +++ b/packages/plugin-phone/src/call.js @@ -832,11 +832,14 @@ const Call = SparkPlugin.extend({ offerToReceiveAudio: recvOnly || !!options.constraints.audio, offerToReceiveVideo: recvOnly || !!options.constraints.video }); + + this.media.set({ + audio: options.constraints.audio, + video: options.constraints.video + }); } this.media.set({ - audio: options.constraints.audio, - video: options.constraints.video, offerToReceiveAudio: options.offerOptions.offerToReceiveAudio, offerToReceiveVideo: options.offerOptions.offerToReceiveVideo });
fix(plugin-phone): Fix options setting for _join
diff --git a/src/test/java/com/github/kongchen/smp/integration/utils/PetIdToStringModelConverter.java b/src/test/java/com/github/kongchen/smp/integration/utils/PetIdToStringModelConverter.java index <HASH>..<HASH> 100644 --- a/src/test/java/com/github/kongchen/smp/integration/utils/PetIdToStringModelConverter.java +++ b/src/test/java/com/github/kongchen/smp/integration/utils/PetIdToStringModelConverter.java @@ -10,6 +10,9 @@ import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.util.Iterator; +/** + * A ModelConverter used for testing adding custom model converters. + */ public class PetIdToStringModelConverter extends AbstractModelConverter { public PetIdToStringModelConverter() { @@ -26,7 +29,6 @@ public class PetIdToStringModelConverter extends AbstractModelConverter { } catch (ClassNotFoundException e) { throw new RuntimeException(e); } - return iterator.hasNext() ? iterator.next().resolveProperty(type, modelConverterContext, annotations, iterator) : - super.resolveProperty(type, modelConverterContext, annotations, iterator); + return super.resolveProperty(type, modelConverterContext, annotations, iterator); } }
Added comments to PetIdToStringModelConverter
diff --git a/src/SessionTracker.php b/src/SessionTracker.php index <HASH>..<HASH> 100644 --- a/src/SessionTracker.php +++ b/src/SessionTracker.php @@ -2,6 +2,9 @@ namespace Bugsnag; +use Exception; +use InvalidArgumentException; + class SessionTracker { /**
Add missing imports in SessionTracker
diff --git a/src/PlaygroundDesign/Module.php b/src/PlaygroundDesign/Module.php index <HASH>..<HASH> 100644 --- a/src/PlaygroundDesign/Module.php +++ b/src/PlaygroundDesign/Module.php @@ -202,10 +202,10 @@ class Module implements $serviceManager = $e->getApplication()->getServiceManager(); $options = $serviceManager->get('playgroundcore_module_options'); + $translator = $serviceManager->get('translator'); $locale = $options->getLocale(); if (!empty($locale)) { //translator - $translator = $serviceManager->get('translator'); $translator->setLocale($locale); // plugins
PLAYGROUND-<I>, fix translation user
diff --git a/aeron-driver/src/main/java/io/aeron/driver/IpcPublication.java b/aeron-driver/src/main/java/io/aeron/driver/IpcPublication.java index <HASH>..<HASH> 100644 --- a/aeron-driver/src/main/java/io/aeron/driver/IpcPublication.java +++ b/aeron-driver/src/main/java/io/aeron/driver/IpcPublication.java @@ -233,7 +233,7 @@ public class IpcPublication implements DriverManagedResource break; } - if (Status.ACTIVE == status && consumerPosition == lastConsumerPosition) + if (consumerPosition == lastConsumerPosition) { if (producerPosition() > consumerPosition && timeNs > (timeOfLastConsumerPositionChange + unblockTimeoutNs))
[Java] Keep checking for blocked IpcPublication even when inactive.
diff --git a/serviced/cmd.go b/serviced/cmd.go index <HASH>..<HASH> 100644 --- a/serviced/cmd.go +++ b/serviced/cmd.go @@ -127,7 +127,7 @@ func init() { flag.Var(&options.zookeepers, "zk", "Specify a zookeeper instance to connect to (e.g. -zk localhost:2181 )") flag.BoolVar(&options.repstats, "reportstats", true, "report container statistics") flag.StringVar(&options.statshost, "statshost", "127.0.0.1:8443", "host:port for container statistics") - flag.IntVar(&options.statsperiod, "statsperiod", 1, "Period (seconds) for container statistics reporting") + flag.IntVar(&options.statsperiod, "statsperiod", 60, "Period (seconds) for container statistics reporting") flag.StringVar(&options.mcusername, "mcusername", "scott", "Username for the Zenoss metric consumer") flag.StringVar(&options.mcpasswd, "mcpasswd", "tiger", "Password for the Zenoss metric consumer") options.mount = make(ListOpts, 0)
change metric sampling rate to 1 minute
diff --git a/src/AdapterInterface.php b/src/AdapterInterface.php index <HASH>..<HASH> 100644 --- a/src/AdapterInterface.php +++ b/src/AdapterInterface.php @@ -130,4 +130,16 @@ interface AdapterInterface * @return \React\Promise\PromiseInterface */ public function rename($fromPath, $toPath); + + /** + * @param string $path + * @return \React\Promise\PromiseInterface + */ + public function readlink($path); + + /** + * @param string $path + * @return \React\Promise\PromiseInterface + */ + public function symlink($path); }
readlink and symlink methods added to adapter contract
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -100,5 +100,6 @@ setuptools.setup( "requests" ], url="https://github.com/CellProfiler/prokaryote", - version=version + version=version, + zip_safe = False )
Flailing - guess what, pip decided to install as zipped egg, lot of good that does!
diff --git a/plugins/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/validation/XbaseJavaValidator.java b/plugins/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/validation/XbaseJavaValidator.java index <HASH>..<HASH> 100644 --- a/plugins/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/validation/XbaseJavaValidator.java +++ b/plugins/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/validation/XbaseJavaValidator.java @@ -354,4 +354,11 @@ public class XbaseJavaValidator extends AbstractXbaseJavaValidator { return conformanceComputer.isConformant(left, right); } + protected boolean isConformant(JvmTypeReference left, JvmTypeReference right) { + return conformanceComputer.isConformant(left, right); + } + + protected ITypeProvider getTypeProvider() { + return typeProvider; + } }
[xtend] Inferred return type for dispatch method is the same as the one for the dispatching method - inherited return types and explicitly defined return types have higher precedence, though - see <URL>
diff --git a/src/Robo/RoboTasks.php b/src/Robo/RoboTasks.php index <HASH>..<HASH> 100644 --- a/src/Robo/RoboTasks.php +++ b/src/Robo/RoboTasks.php @@ -203,6 +203,14 @@ class RoboTasks extends \Robo\Tasks implements LoggerAwareInterface /** @var RoboFile|CollectionBuilder $collection */ $collection = $this->collectionBuilder(); + // Skip database drop and create incase mysql_bin is not set + $mysqlBin = $this->config(Config::KEY_ENV . '/' . Config::KEY_MYSQL_BIN); + if (empty($mysqlBin)) { + $collection->progressMessage('mySQL database managing skipped'); + + return $collection; + } + // Drop Database if ($dropDatabase === true) { $taskDropDatabase = $this->taskMysqlCommand();
[TASK] skip mysql database drop and create in case mysql bin is not set
diff --git a/src/QueryHelper.php b/src/QueryHelper.php index <HASH>..<HASH> 100644 --- a/src/QueryHelper.php +++ b/src/QueryHelper.php @@ -15,7 +15,7 @@ trait QueryHelper foreach ((array)$this as $i => $element) { $i = (string)$i; if (is_string($element)) { - return $element; + continue; } if ($element instanceof Label && ($element->getElement()->name() == $index
ehm, continue, not return
diff --git a/app/scripts/tests/setup.js b/app/scripts/tests/setup.js index <HASH>..<HASH> 100644 --- a/app/scripts/tests/setup.js +++ b/app/scripts/tests/setup.js @@ -1,5 +1,4 @@ var jsdom = require('jsdom').jsdom; - var exposedProperties = ['window', 'navigator', 'document']; global.document = jsdom(''); @@ -21,3 +20,10 @@ global.navigator = { const noop = () => null require.extensions['.scss'] = noop require.extensions['.png'] = noop + +//// +// Sinon-Chai +//// +import chai from 'chai' +import sinonChai from 'sinon-chai' +chai.use(sinonChai)
Add Sinon-Chai setup when run tests with Mocha.
diff --git a/app/controllers/caboose/application_controller.rb b/app/controllers/caboose/application_controller.rb index <HASH>..<HASH> 100644 --- a/app/controllers/caboose/application_controller.rb +++ b/app/controllers/caboose/application_controller.rb @@ -3,6 +3,7 @@ module Caboose protect_from_forgery before_filter :before_before_action + helper :all def before_before_action
Added all helpers to application controller
diff --git a/TYPO3.TYPO3CR/Classes/TYPO3/TYPO3CR/Domain/Model/NodeData.php b/TYPO3.TYPO3CR/Classes/TYPO3/TYPO3CR/Domain/Model/NodeData.php index <HASH>..<HASH> 100644 --- a/TYPO3.TYPO3CR/Classes/TYPO3/TYPO3CR/Domain/Model/NodeData.php +++ b/TYPO3.TYPO3CR/Classes/TYPO3/TYPO3CR/Domain/Model/NodeData.php @@ -44,11 +44,14 @@ use TYPO3\TYPO3CR\Utility; * }, * indexes={ * @ORM\Index(name="parentpath_sortingindex",columns={"parentpathhash", "sortingindex"}), - * @ORM\Index(name="parentpath",columns={"parentpath"},options={"length": 255}), + * @ORM\Index(name="parentpath",columns={"parentpath"}), * @ORM\Index(name="identifierindex",columns={"identifier"}), * @ORM\Index(name="nodetypeindex",columns={"nodetype"}) * } * ) + * + * The parentpath index above is actually limited to a size of 255 characters in the corresponding MySQL migration, + * something that cannot be expressed through the annotation. */ class NodeData extends AbstractNodeData {
TASK: Remove option from Index annotation It is not supported (like in later versions). Leave a comment instead,
diff --git a/lib/raven/transports/http.rb b/lib/raven/transports/http.rb index <HASH>..<HASH> 100644 --- a/lib/raven/transports/http.rb +++ b/lib/raven/transports/http.rb @@ -56,7 +56,7 @@ module Raven end def ssl_configuration - (configuration.ssl.dup || {}).merge!( + (configuration.ssl || {}).merge( :verify => configuration.ssl_verification, :ca_file => configuration.ssl_ca_file )
Can't 'dup' a nil, besides I can just regular-merge.
diff --git a/telethon/tl/session.py b/telethon/tl/session.py index <HASH>..<HASH> 100644 --- a/telethon/tl/session.py +++ b/telethon/tl/session.py @@ -163,7 +163,8 @@ class Session: rows = [] for p_id, p_hash in data.get('entities', []): - rows.append((p_id, p_hash, None, None, None)) + if p_hash is not None: + rows.append((p_id, p_hash, None, None, None)) return rows except UnicodeDecodeError: return [] # No entities
Assert hash is not None when migrating from JSON sessions
diff --git a/src/File.php b/src/File.php index <HASH>..<HASH> 100644 --- a/src/File.php +++ b/src/File.php @@ -30,13 +30,16 @@ class File extends Field $scale = m('scale'); $scale->resize($upload->fullPath(), $upload->name(), $upload->uploadDir); } + + // TODO: Work with upload real and URL paths + $urlPath = $upload->path().$upload->name(); /** @var \samson\activerecord\materialfield $field Save path to file in DB */ $field = Field::fromMetadata($_GET['e'], $_GET['f'], $_GET['i']); - $field->save($file_path); + $field->save($urlPath); // Return upload object for further usage - return array('status' => 1, 'path' => $upload->fullPath()); + return array('status' => 1, 'path' => $urlPath); } /** Delete file controller */
Fixed full path to support internal web-application paths
diff --git a/goscale/themes/context_processors.py b/goscale/themes/context_processors.py index <HASH>..<HASH> 100644 --- a/goscale/themes/context_processors.py +++ b/goscale/themes/context_processors.py @@ -9,7 +9,8 @@ def theme(request): # set config site_theme = settings.THEME static_theme_url = '%sthemes/%s/static/' % (settings.STATIC_URL, site_theme) - config = {} + static_common_url = '%sthemes/common/static/' % settings.STATIC_URL + config = {} settings_list = ['GOSCALE_BOOTSTRAP_THEMES', 'GOSCALE_BOOTSTRAP_THEME', 'GOSCALE_AJAXLINKS', 'GOSCALE_AJAXLINKS_EXCEPTIONS'] for setting in settings_list: @@ -20,6 +21,7 @@ def theme(request): 'site': get_current_site(request), 'GOSCALE_THEME': site_theme, 'STATIC_THEME_URL': static_theme_url, + 'STATIC_COMMON_URL': static_common_url, 'goscale_config': config, 'goscale_bootstrap_theme': theme if theme else conf.GOSCALE_BOOTSTRAP_THEME, 'goscale_config_json': simplejson.dumps(config),
goscale/themes/context_processors.py
diff --git a/spec/collins/api/asset_spec.rb b/spec/collins/api/asset_spec.rb index <HASH>..<HASH> 100644 --- a/spec/collins/api/asset_spec.rb +++ b/spec/collins/api/asset_spec.rb @@ -119,6 +119,18 @@ describe Collins::Api::Asset do end end + context "#count" do + include_context "collins api" + def method; :get end + def uri; "/api/assets?page=0&size=1" end + + it "basic use-case" do + api.returns 200, CollinsFixture.data('find_no_details.json') + total = subject.count + total.should == 3 + end + end + context "#get" do include_context "collins api" def method; :get end
Add basic unit test for the assets count method
diff --git a/resource_aws_cloudfront_distribution.go b/resource_aws_cloudfront_distribution.go index <HASH>..<HASH> 100644 --- a/resource_aws_cloudfront_distribution.go +++ b/resource_aws_cloudfront_distribution.go @@ -6,6 +6,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/cloudfront" "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" @@ -527,6 +528,12 @@ func resourceAwsCloudFrontDistributionRead(d *schema.ResourceData, meta interfac resp, err := conn.GetDistribution(params) if err != nil { + if errcode, ok := err.(awserr.Error); ok && errcode.Code() == "NoSuchDistribution" { + log.Printf("[WARN] No Distribution found: %s", d.Id()) + d.SetId("") + return nil + } + return err }
providers/aws: cloudfront distribution <I> should mark as gone (#<I>)
diff --git a/spec/cycle_spec.rb b/spec/cycle_spec.rb index <HASH>..<HASH> 100644 --- a/spec/cycle_spec.rb +++ b/spec/cycle_spec.rb @@ -5,6 +5,8 @@ require 'tmpdir' class Chicken < ActiveRecord::Base end +ActiveRecord::Base.logger = Logger.new(File.join(DumpRake::RailsRoot, 'log/dump.log')) + def database_configs YAML.load(IO.read(File.expand_path('../db/database.yml', __FILE__))) end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -3,7 +3,6 @@ ENV['RAILS_ENV'] ||= 'test' require 'dummy_rails_app' require 'dump_rake' -ActiveRecord::Base.logger = Logger.new(File.join(DumpRake::RailsRoot, 'log/dump.log')) def grab_output real_stdout, $stdout = $stdout, StringIO.new
move setting logger to cycle_spec
diff --git a/profile/legacy_profile.go b/profile/legacy_profile.go index <HASH>..<HASH> 100644 --- a/profile/legacy_profile.go +++ b/profile/legacy_profile.go @@ -373,6 +373,15 @@ func cpuProfile(b []byte, period int64, parse func(b []byte) (uint64, []byte)) ( } } + if err := p.ParseMemoryMap(bytes.NewBuffer(b)); err != nil { + return nil, err + } + + cleanupDuplicateLocations(p) + return p, nil +} + +func cleanupDuplicateLocations(p *Profile) { // The profile handler may duplicate the leaf frame, because it gets // its address both from stack unwinding and from the signal // context. Detect this and delete the duplicate, which has been @@ -383,11 +392,6 @@ func cpuProfile(b []byte, period int64, parse func(b []byte) (uint64, []byte)) ( s.Location = append(s.Location[:1], s.Location[2:]...) } } - - if err := p.ParseMemoryMap(bytes.NewBuffer(b)); err != nil { - return nil, err - } - return p, nil } // parseCPUSamples parses a collection of profilez samples from a @@ -936,6 +940,7 @@ func parseThread(b []byte) (*Profile, error) { return nil, err } + cleanupDuplicateLocations(p) return p, nil }
Apply leaf cleanup to threadz samples The legacy profilez parser handles duplicate leaf samples that are a common artifact of satck unwinding. Apply the same technique to threadz profiles where duplicate samples also occur.
diff --git a/indra/tests/test_statements.py b/indra/tests/test_statements.py index <HASH>..<HASH> 100644 --- a/indra/tests/test_statements.py +++ b/indra/tests/test_statements.py @@ -1337,6 +1337,7 @@ def test_serialize(): st2 = stmts_from_json([jstr])[0] assert(st.equals(st2)) assert unicode_strs((ev1, st, st2)) + assert st.evidence[0].source_hash == st2.evidence[0].source_hash def test_location_refinement():
Check hash is persistend through to_json-from_json.
diff --git a/test/test.js b/test/test.js index <HASH>..<HASH> 100644 --- a/test/test.js +++ b/test/test.js @@ -96,15 +96,23 @@ describe('node-serialize', function () { '', 'http://www.w3.org/1999/xhtml' ); - - // Some older browsers require the DOCTYPE to be within a Document, - // otherwise the "serialize" custom event is considered "cancelled". - // See: https://travis-ci.org/webmodules/dom-serialize/builds/47307749 - var doc = document.implementation.createDocument('http://www.w3.org/1999/xhtml', 'root-element', node); + document.implementation.createDocument('http://www.w3.org/1999/xhtml', 'root-element', node); assert.equal('<!DOCTYPE root-element SYSTEM "http://www.w3.org/1999/xhtml">', serialize(node)); }); + + it('should serialize an HTML5 Doctype node', function () { + node = document.implementation.createDocumentType( + 'html', + '', + '' + ); + document.implementation.createDocument('http://www.w3.org/1999/xhtml', 'node', node); + + assert.equal('<!DOCTYPE html>', serialize(node)); + }); + it('should serialize a DocumentFragment node', function () { node = document.createDocumentFragment(); node.appendChild(document.createElement('b'));
test: add HTML5 Doctype test, for <I>% test code coverage!
diff --git a/examples/conversations.php b/examples/conversations.php index <HASH>..<HASH> 100644 --- a/examples/conversations.php +++ b/examples/conversations.php @@ -32,7 +32,7 @@ $filters = (new ConversationFilters()) ->withSortField('createdAt') ->withSortOrder('asc') // See https://developer.helpscout.com/mailbox-api/endpoints/conversations/list/#query for details on what you can do with query - ->withQuery('(email:"john@appleseed.com")') + ->withQuery('email:"john@appleseed.com"') ->withCustomFieldById(123, 'blue'); $conversations = $client->conversations()->list($filters); diff --git a/examples/customers.php b/examples/customers.php index <HASH>..<HASH> 100644 --- a/examples/customers.php +++ b/examples/customers.php @@ -35,7 +35,7 @@ $filters = (new CustomerFilters()) ->withMailbox('12') ->withModifiedSince(new DateTime('last month')) // See https://developer.helpscout.com/mailbox-api/endpoints/customers/list/#query for details on what you can do with query - ->withQuery('(email:"john@appleseed.com")') + ->withQuery('email:"alan@easycrypto.nz"') ->withSortField('createdAt') ->withSortOrder('asc');
Removing parenthesis from the example since it's not required
diff --git a/packages/ember-metal/lib/platform.js b/packages/ember-metal/lib/platform.js index <HASH>..<HASH> 100644 --- a/packages/ember-metal/lib/platform.js +++ b/packages/ember-metal/lib/platform.js @@ -38,7 +38,6 @@ if (!Ember.create) { Ember.create.isSimulated = true; } -Object.defineProperty = null; /** @private */ var defineProperty = Object.defineProperty; var canRedefineProperties, canDefinePropertyOnDOM;
Let ES5 browsers actually work
diff --git a/src/Sql/Relator/OneMany.php b/src/Sql/Relator/OneMany.php index <HASH>..<HASH> 100644 --- a/src/Sql/Relator/OneMany.php +++ b/src/Sql/Relator/OneMany.php @@ -39,6 +39,8 @@ class OneMany extends Base ); if ($relation[0] == 'one' && $result) { $result = current($result); + } else { + $result = null; } return $result; }
result should not return empty array from OneMany getRelated
diff --git a/filter/tex/latex.php b/filter/tex/latex.php index <HASH>..<HASH> 100644 --- a/filter/tex/latex.php +++ b/filter/tex/latex.php @@ -44,14 +44,19 @@ } else { $this->supported_platform = false; - return false; } $this->path_latex = "{$binpath}latex"; $this->path_dvips = "{$binpath}dvips"; $this->path_convert = "{$binpath}convert"; $this->path_identify = "{$binpath}identify"; + } - return true; + /** + * Accessor function for support_platform field. + * @return boolean value of supported_platform + */ + function supported() { + return $this->supported_platform; } /** @@ -101,6 +106,11 @@ * @return bool true if successful */ function render( $formula, $filename, $fontsize=12, $density=240, $background='', $log=null ) { + // quick check - will this work? + if (!$this->supported_platform) { + return false; + } + $doc = $this->construct_latex_document( $formula, $fontsize ); // construct some file paths
Added check so render returns with false if unsupported platform.
diff --git a/base/src/org/droidparts/manager/AbstractPrefsManager.java b/base/src/org/droidparts/manager/AbstractPrefsManager.java index <HASH>..<HASH> 100644 --- a/base/src/org/droidparts/manager/AbstractPrefsManager.java +++ b/base/src/org/droidparts/manager/AbstractPrefsManager.java @@ -67,8 +67,14 @@ public abstract class AbstractPrefsManager { // shortcuts - protected String resToKey(int resId) { - return ctx.getString(resId); + protected boolean getBoolean(int keyResId, int defValueResId) { + return prefs.getBoolean(ctx.getString(keyResId), + Boolean.valueOf(ctx.getString(defValueResId))); + } + + protected String getString(int keyResId, int defValueResId) { + return prefs.getString(ctx.getString(keyResId), + ctx.getString(defValueResId)); } protected boolean saveBoolean(String key, boolean val) {
PrefsManager helper methods.
diff --git a/productmd/composeinfo.py b/productmd/composeinfo.py index <HASH>..<HASH> 100644 --- a/productmd/composeinfo.py +++ b/productmd/composeinfo.py @@ -580,12 +580,8 @@ class VariantBase(productmd.common.MetadataBase): if variant.parent is None and '-' in variant_id and variant.type != "optional": variant_id = variant_id.replace("-", "") - if variant.type == "optional": - if variant.uid != variant_id: - raise ValueError("Variant UID doesn't match: '%s' vs '%s'" % (variant.uid, variant_id)) - else: - if variant.id != variant_id: - raise ValueError("Variant ID doesn't match: '%s' vs '%s'" % (variant.id, variant_id)) + if variant.id != variant_id and variant.uid != variant_id: + raise ValueError("Variant ID doesn't match: '%s' vs '%s'" % (variant.id, variant_id)) def add(self, variant, variant_id=None): if hasattr(self, "uid"):
Fix VariantBase._validate_variants() Refer to the implementation of Variants.add(), variant_id could be any value. This patch could cover the case we met currently, but the validation will fail if people pass other variant_id value to Variants.add() JIRA: RHELCMP-<I>
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -3,6 +3,7 @@ """The setup script.""" import sys + from setuptools import setup, find_packages with open('README.rst') as readme_file:
space btw stdlib and related third-party libs re: pep8 guidance.
diff --git a/fabfile.py b/fabfile.py index <HASH>..<HASH> 100644 --- a/fabfile.py +++ b/fabfile.py @@ -36,8 +36,8 @@ def send(): def start(): with cd(env.tsuru_path): run("tar -xzf dist.tar.gz") - run("nohup %s/dist/collector >& /dev/null < /dev/null &" % env.tsuru_path, pty=False) - run("nohup %s/dist/webserver >& /dev/null < /dev/null &" % env.tsuru_path, pty=False) + run("nohup %s/dist/collector 2>&1 > /tmp/collector.hup.out < /dev/null &" % env.tsuru_path, pty=False) + run("nohup %s/dist/webserver 2>&1 > /tmp/webserver.hup.out < /dev/null &" % env.tsuru_path, pty=False) def deploy():
fabfile: redirecting output from collector and webserver to files
diff --git a/lib/Core/Values/BlockCreateStruct.php b/lib/Core/Values/BlockCreateStruct.php index <HASH>..<HASH> 100644 --- a/lib/Core/Values/BlockCreateStruct.php +++ b/lib/Core/Values/BlockCreateStruct.php @@ -29,10 +29,6 @@ class BlockCreateStruct extends APIBlockCreateStruct */ public function setParameter($parameterName, $parameterValue) { - if ($this->parameters === null) { - $this->parameters = array(); - } - $this->parameters[$parameterName] = $parameterValue; } diff --git a/lib/Core/Values/BlockUpdateStruct.php b/lib/Core/Values/BlockUpdateStruct.php index <HASH>..<HASH> 100644 --- a/lib/Core/Values/BlockUpdateStruct.php +++ b/lib/Core/Values/BlockUpdateStruct.php @@ -29,10 +29,6 @@ class BlockUpdateStruct extends APIBlockUpdateStruct */ public function setParameter($parameterName, $parameterValue) { - if ($this->parameters === null) { - $this->parameters = array(); - } - $this->parameters[$parameterName] = $parameterValue; }
Remove uneeded check from block structs
diff --git a/lib/log.js b/lib/log.js index <HASH>..<HASH> 100644 --- a/lib/log.js +++ b/lib/log.js @@ -13,7 +13,7 @@ log.addLevel('debug', 999, {fg: 'grey'}, 'debu'); // monkey patch npmlog… log.heading = ''; log.headingStyle.fg = 'blue'; -log.disp.verbose = 'verbose'; +log.disp.verbose = 'verb'; log.disp.error = 'err!'; log.disp.warn = 'warn'; log.style.error.bold = true;
normalize verbose level output to 4 char
diff --git a/src/javascripts/ng-admin/Main/component/service/config/Field.js b/src/javascripts/ng-admin/Main/component/service/config/Field.js index <HASH>..<HASH> 100644 --- a/src/javascripts/ng-admin/Main/component/service/config/Field.js +++ b/src/javascripts/ng-admin/Main/component/service/config/Field.js @@ -45,22 +45,6 @@ define(function (require) { Configurable(Field.prototype, config); /** - * Set or get the type - * - * @param {String} type - * @returns string|Field - */ - Field.prototype.type = function (type) { - if (arguments.length === 0) { - return this.config.type; - } - - this.config.type = type; - - return this; - }; - - /** * Add a map function * * @param {Function} fn
Remove needless method (added by Configurable)
diff --git a/nanomath/version.py b/nanomath/version.py index <HASH>..<HASH> 100644 --- a/nanomath/version.py +++ b/nanomath/version.py @@ -1 +1 @@ -__version__ = "0.22.0" +__version__ = "0.23.0"
bumping version after pull request speeding up ave_qual
diff --git a/pyemma/msm/models/msm.py b/pyemma/msm/models/msm.py index <HASH>..<HASH> 100644 --- a/pyemma/msm/models/msm.py +++ b/pyemma/msm/models/msm.py @@ -139,11 +139,9 @@ class MSM(_Model): """ # we set reversible first, so it can be derived from P, if None was given. self.update_model_params(reversible=reversible) - if P is not None: - self.P = P - self.pi = pi - self.dt_model = dt_model - self.neig = neig + self.update_model_params(P=P) + # pi might be derived from P, if None was given. + self.update_model_params(pi=pi, dt_model=dt_model, neig=neig) ################################################################################ # Basic attributes @@ -181,7 +179,6 @@ class MSM(_Model): @reversible.setter def reversible(self, value): - # allow to set it to None, so it can be derived from P in set_model_params self._reversible = value @property
[msm] use multiple calls to update_model_params to preserve order. This restores the old behaviour: if a param is set to None it can be overriden, but not set twice. Setting a parameter twice causes problems with other Estimators like ChapmanKolmogorov, which invokes set_model_params again with None.
diff --git a/test/e2e_node/runner/run_e2e.go b/test/e2e_node/runner/run_e2e.go index <HASH>..<HASH> 100644 --- a/test/e2e_node/runner/run_e2e.go +++ b/test/e2e_node/runner/run_e2e.go @@ -104,7 +104,7 @@ func main() { noColour = "\033[0m" } - go arc.getArchive() + arc.getArchive() defer arc.deleteArchive() var err error
Wait for arc.getArchive() to complete before running tests
diff --git a/server/client.go b/server/client.go index <HASH>..<HASH> 100644 --- a/server/client.go +++ b/server/client.go @@ -310,23 +310,28 @@ func (c *client) processConnect(arg []byte) error { c.mu.Lock() c.clearAuthTimer() c.last = time.Now() + typ := c.typ + r := c.route + srv := c.srv c.mu.Unlock() if err := json.Unmarshal(arg, &c.opts); err != nil { return err } - if c.srv != nil { + if srv != nil { // Check for Auth - if ok := c.srv.checkAuth(c); !ok { + if ok := srv.checkAuth(c); !ok { c.authViolation() return ErrAuthorization } } // Grab connection name of remote route. - if c.typ == ROUTER && c.route != nil { + if typ == ROUTER && r != nil { + c.mu.Lock() c.route.remoteID = c.opts.Name + c.mu.Unlock() } if c.opts.Verbose {
Fix data race When processing a connect request, there was a risk of race condition when the server was being shutdown. Capture fields that are checked under lock and lock when setting the route's remote ID. Resolves #<I>
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -5,7 +5,7 @@ require "rdkafka" def rdkafka_config config = { :"bootstrap.servers" => "localhost:9092", - :"group.id" => "ruby-test-#{Random.new.rand(0..10_000)}", + :"group.id" => "ruby-test-#{Random.new.rand(0..1_000_000)}", :"auto.offset.reset" => "earliest", :"enable.partition.eof" => false } @@ -23,7 +23,6 @@ def native_client end def wait_for_message(topic:, delivery_report:, timeout_in_seconds: 30) - offset = delivery_report.offset - 1 consumer = rdkafka_config.consumer consumer.subscribe(topic) timeout = Time.now.to_i + timeout_in_seconds @@ -32,7 +31,9 @@ def wait_for_message(topic:, delivery_report:, timeout_in_seconds: 30) raise "Timeout of #{timeout_in_seconds} seconds reached in wait_for_message" end message = consumer.poll(100) - if message && message.offset == offset + if message && + message.partition == delivery_report.partition && + message.offset == delivery_report.offset - 1 return message end end
Take partition into account in wait_for_message spec helper
diff --git a/lib/Cake/Cache/Engine/FileEngine.php b/lib/Cake/Cache/Engine/FileEngine.php index <HASH>..<HASH> 100644 --- a/lib/Cake/Cache/Engine/FileEngine.php +++ b/lib/Cake/Cache/Engine/FileEngine.php @@ -388,7 +388,7 @@ class FileEngine extends CacheEngine { return false; } - $key = Inflector::underscore(str_replace(array(DS, '/', '.','<','>','?',':','|','*','"'), '_', strval($key))); + $key = Inflector::underscore(str_replace(array(DS, '/', '.', '<', '>', '?', ':', '|', '*', '"'), '_', strval($key))); return $key; }
convert forbidden character in filename(Windows) with underline
diff --git a/klue/swagger/client.py b/klue/swagger/client.py index <HASH>..<HASH> 100644 --- a/klue/swagger/client.py +++ b/klue/swagger/client.py @@ -218,7 +218,8 @@ class ClientCaller(): raise e # max_attempts has been reached: propagate the last received Exception - log.info("Reached max-attempts. Giving up calling %s %s" % (self.method, self.url)) + if not last_exception: + last_exception = Exception("Reached max-attempts (%s). Giving up calling %s %s" % (self.max_attempts, self.method, self.url) raise last_exception def call(self, force_retry=False):
Fix bug of undefined exception when retrying 3 times with no error
diff --git a/decoda.php b/decoda.php index <HASH>..<HASH> 100644 --- a/decoda.php +++ b/decoda.php @@ -351,25 +351,25 @@ class Decoda { } } } + } + + // Make urls/emails clickable + if ($this->__config['clickable']) { + $string = $this->__clickable($string); + } - // Make urls/emails clickable - if ($this->__config['clickable']) { - $string = $this->__clickable($string); - } - - // Convert smilies - if ($this->__config['emoticons']) { - $string = $this->__emoticons($string); - } + // Convert smilies + if ($this->__config['emoticons']) { + $string = $this->__emoticons($string); + } - // Censor words - if ($this->__config['censor']) { - $string = $this->__censor($string); - } + // Censor words + if ($this->__config['censor']) { + $string = $this->__censor($string); + } - // Clean linebreaks - $string = $this->__cleanup($string); - } + // Clean linebreaks + $string = $this->__cleanup($string); if ($return === false) { echo $string;
Trigger utility functions even if parse is false.
diff --git a/src/Charcoal/Core/IndexableTrait.php b/src/Charcoal/Core/IndexableTrait.php index <HASH>..<HASH> 100644 --- a/src/Charcoal/Core/IndexableTrait.php +++ b/src/Charcoal/Core/IndexableTrait.php @@ -10,11 +10,21 @@ trait IndexableTrait /** * @var mixed $_id The object (unique) identifier */ - public $_id; + protected $_id; /** * @var string $_key The object key */ - public $_key; + protected $_key; + + protected function set_indexable_data($data) + { + if (isset($data['id']) && $data['id'] !== null) { + $this->set_id($data['id']); + } + if (isset($data['key']) && $data['key'] !== null) { + $this->set_key($data['key']); + } + } /** * Set the object's ID. The actual property set depends on `key()`
set_indexable_data, to be called from classes (set_data) that uses the Indexable trait
diff --git a/ph-oton-uicore/src/main/java/com/helger/photon/uicore/icon/DefaultIcons.java b/ph-oton-uicore/src/main/java/com/helger/photon/uicore/icon/DefaultIcons.java index <HASH>..<HASH> 100644 --- a/ph-oton-uicore/src/main/java/com/helger/photon/uicore/icon/DefaultIcons.java +++ b/ph-oton-uicore/src/main/java/com/helger/photon/uicore/icon/DefaultIcons.java @@ -33,7 +33,7 @@ import com.helger.commons.collection.ext.ICommonsMap; @NotThreadSafe public final class DefaultIcons { - private static final ICommonsMap <EDefaultIcon, IIcon> s_aMap = new CommonsHashMap <> (); + private static final ICommonsMap <EDefaultIcon, IIcon> s_aMap = new CommonsHashMap<> (); private DefaultIcons () {} @@ -44,7 +44,7 @@ public final class DefaultIcons */ public static boolean areDefined () { - return !s_aMap.isEmpty (); + return s_aMap.isNotEmpty (); } /** @@ -62,6 +62,10 @@ public final class DefaultIcons return s_aMap.get (eDefaultIcon); } + /** + * @return A copy of all currently defined default icons. Never + * <code>null</code> but maybe empty. + */ @Nonnull @ReturnsMutableCopy public static ICommonsMap <EDefaultIcon, IIcon> getAll ()
Added JavaDocs :)
diff --git a/campaigns.go b/campaigns.go index <HASH>..<HASH> 100644 --- a/campaigns.go +++ b/campaigns.go @@ -1,15 +1,15 @@ package mailgun type Campaign struct { - Id string - Name string - CreatedAt string - DeliveredCount int - ClickedCount int - OpenedCount int - SubmittedCount int - UnsubscribedCount int - BouncedCount int - ComplainedCount int - DroppedCount int + Id string `json:"id"` + Name string `json:"name"` + CreatedAt string `json:"created_at"` + DeliveredCount int `json:"delivered_count"` + ClickedCount int `json:"clicked_count"` + OpenedCount int `json:"opened_count"` + SubmittedCount int `json:"submitted_count"` + UnsubscribedCount int `json:"unsubscribed_count"` + BouncedCount int `json:"bounced_count"` + ComplainedCount int `json:"complained_count"` + DroppedCount int `json:"dropped_count"` }
Added JSON-names and did gofmt.
diff --git a/src/Entity/Base.php b/src/Entity/Base.php index <HASH>..<HASH> 100644 --- a/src/Entity/Base.php +++ b/src/Entity/Base.php @@ -10,6 +10,7 @@ abstract class Base */ protected $apiRequest = null; protected $playerInformation = null; + protected $parameters = null; public function setApiRequest(WowApiRequest $apiRequest) @@ -18,7 +19,11 @@ abstract class Base } abstract public function getRessource(); - abstract public function getParametters(); + + public function getParametters() + { + return $this->parameters; + } public function loadInformation() { diff --git a/src/Entity/Player.php b/src/Entity/Player.php index <HASH>..<HASH> 100644 --- a/src/Entity/Player.php +++ b/src/Entity/Player.php @@ -16,5 +16,11 @@ class Player extends Base if ($locale !== null) { $this->apiRequest->setLocale($locale); } + $this->loadInformation(); + } + + public function getRessource() + { + return "wow/character/". $this->realmName ."/" . $this->characterName; } }
get ressource method for player + method for get parametters
diff --git a/splunklib/searchcommands/internals.py b/splunklib/searchcommands/internals.py index <HASH>..<HASH> 100644 --- a/splunklib/searchcommands/internals.py +++ b/splunklib/searchcommands/internals.py @@ -580,7 +580,7 @@ class RecordWriter(object): value = str(value.real) elif value_t is six.text_type: value = value - elif value_t is int or value_t is int or value_t is float or value_t is complex: + elif isinstance(value, six.integer_types) or value_t is float or value_t is complex: value = str(value) elif issubclass(value_t, (dict, list, tuple)): value = str(''.join(RecordWriter._iterencode_json(value, 0))) @@ -610,7 +610,7 @@ class RecordWriter(object): values += (value, None) continue - if value_t is int or value_t is int or value_t is float or value_t is complex: + if isinstance(value, six.integer_types) or value_t is float or value_t is complex: values += (str(value), None) continue
Pull request for DVPL-<I> to treat the integer and long variables same in both python versions
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -10,6 +10,9 @@ setup( license='MIT', packages=find_packages(), install_requires=['nose>=1.3', 'six'], + dependency_links=[ + 'https://github.com/nose-devs/nose/tarball/c0f777e488337dc7dde933453799986c46b37deb#egg=nose-1.3.0', + ], entry_points={ 'nose.plugins.0.10': [ 'spec = spec:SpecPlugin',
Hit github for Nose for now, boo
diff --git a/src/File/Path/Basepath/DefaultTrait.php b/src/File/Path/Basepath/DefaultTrait.php index <HASH>..<HASH> 100644 --- a/src/File/Path/Basepath/DefaultTrait.php +++ b/src/File/Path/Basepath/DefaultTrait.php @@ -30,6 +30,7 @@ trait DefaultTrait $replacements = [ '{primaryKey}' => $this->entity->get($this->table->primaryKey()), '{model}' => $this->table->alias(), + '{table}' => $this->table->table(), '{field}' => $this->field, '{time}' => time(), '{microtime}' => microtime(),
Add {table} placeholder for path.
diff --git a/src/API/AbstractAPIClient.php b/src/API/AbstractAPIClient.php index <HASH>..<HASH> 100644 --- a/src/API/AbstractAPIClient.php +++ b/src/API/AbstractAPIClient.php @@ -58,9 +58,9 @@ abstract class AbstractAPIClient implements APIInterface $method = $request->getMethod(); // Since Guzzle automatically overwrites a new header when the request - // is POST / PATCH / DELETE, we need to overwrite the Content-Type header + // is POST / PATCH / DELETE / PUT, we need to overwrite the Content-Type header // with setBody() function. - if ($method === 'PATCH' || $method === 'DELETE' || $method === 'POST') { + if ($method !== 'GET') { $apiRequest->setBody(json_encode($request->getBody()), 'application/json'); }
PI-<I> fixed method for Guzzle setBody
diff --git a/ui/plugins/annotations/controller.js b/ui/plugins/annotations/controller.js index <HASH>..<HASH> 100644 --- a/ui/plugins/annotations/controller.js +++ b/ui/plugins/annotations/controller.js @@ -21,8 +21,7 @@ treeherder.controller('AnnotationsPluginCtrl', [ }, true); $scope.deleteClassification = function(classification) { - var jcModel = new ThJobClassificationModel(classification); - jcModel.delete() + classification.delete() .then( function(){ thNotify.send("Classification successfully deleted", "success", false); @@ -42,8 +41,7 @@ treeherder.controller('AnnotationsPluginCtrl', [ }; $scope.deleteBug = function(bug) { - var bjmModel = new ThBugJobMapModel(bug); - bjmModel.delete() + bug.delete() .then( function(){ thNotify.send("Association to bug " + bug.bug_id + " successfully deleted", "success", false);
Bug <I> - Don't re-create bugjobmap and classification objects in the annotations plugin controller
diff --git a/src/Strategies/Settings.php b/src/Strategies/Settings.php index <HASH>..<HASH> 100644 --- a/src/Strategies/Settings.php +++ b/src/Strategies/Settings.php @@ -45,13 +45,13 @@ class Settings implements SettingsStrategyInterface const KEY_SERVER_ORIGIN = 0; /** Settings key */ - const KEY_SERVER_ORIGIN_SCHEMA = 0; + const KEY_SERVER_ORIGIN_SCHEME = 'scheme'; /** Settings key */ - const KEY_SERVER_ORIGIN_HOST = 1; + const KEY_SERVER_ORIGIN_HOST = 'host'; /** Settings key */ - const KEY_SERVER_ORIGIN_PORT = 2; + const KEY_SERVER_ORIGIN_PORT = 'port'; /** Settings key */ const KEY_ALLOWED_ORIGINS = 1; @@ -90,7 +90,7 @@ class Settings implements SettingsStrategyInterface * @see http://php.net/manual/function.parse-url.php */ self::KEY_SERVER_ORIGIN => [ - self::KEY_SERVER_ORIGIN_SCHEMA => '', + self::KEY_SERVER_ORIGIN_SCHEME => '', self::KEY_SERVER_ORIGIN_HOST => ParsedUrlInterface::DEFAULT_PORT, self::KEY_SERVER_ORIGIN_PORT => '', ],
Close #<I> make keys compatible with keys from parse_url
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -57,7 +57,7 @@ class Client { // Shared functions - listBuckets(data) { + listBuckets() { return this.aws.request('S3', 'listBuckets', {}, this.stage, this.region).bind(this); } @@ -107,18 +107,19 @@ class Client { _removeDeployedResources() { this.bucketName = this.serverless.service.custom.client.bucketName; - this.serverless.cli.log(`Preparing to remove bucket ${this.bucketName}`); - - let params = { - Bucket: this.bucketName - }; + var safetyDelay = 3000; + this.serverless.cli.log(`Preparing to empty and remove bucket ${this.bucketName}, waiting for ${safetyDelay/1000} seconds...`); function deleteBucket() { this.serverless.cli.log(`Removing bucket ${this.bucketName}...`); + let params = { + Bucket: this.bucketName + }; return this.aws.request('S3', 'deleteBucket', params, this.stage, this.region); } - return this.listBuckets() + return BbPromise.delay(safetyDelay).bind(this) + .then(this.listBuckets) .then(this.findBucket) .then(this.listObjectsInBucket) .then(this.deleteObjectsFromBucket)
Adds a delay just incase
diff --git a/src/Extensions/GroupSubsites.php b/src/Extensions/GroupSubsites.php index <HASH>..<HASH> 100644 --- a/src/Extensions/GroupSubsites.php +++ b/src/Extensions/GroupSubsites.php @@ -47,7 +47,7 @@ class GroupSubsites extends DataExtension implements PermissionProvider } // Migration for Group.SubsiteID data from when Groups only had a single subsite $schema = DataObject::getSchema(); - $groupTable = $schema->tableName(Group::class); + $groupTable = Convert::raw2sql($schema->tableName(Group::class)); $groupFields = DB::field_list($groupTable); // Detection of SubsiteID field is the trigger for old-style-subsiteID migration
[SS-<I>-<I>] Group table name is escaped to prevent possibility of SQL injection
diff --git a/javascript/node/selenium-webdriver/lib/webdriver.js b/javascript/node/selenium-webdriver/lib/webdriver.js index <HASH>..<HASH> 100644 --- a/javascript/node/selenium-webdriver/lib/webdriver.js +++ b/javascript/node/selenium-webdriver/lib/webdriver.js @@ -1229,6 +1229,19 @@ class WebDriver { if (target && cdpTargets.indexOf(target.toLowerCase()) === -1) { throw new error.InvalidArgumentError('invalid target value') } + + if (debuggerAddress.match(/\/se\/cdp/)) { + if (debuggerAddress.match("ws:\/\/", "http:\/\/")) { + return debuggerAddress.replace("ws:\/\/", "http:\/\/") + } + else if (debuggerAddress.match("wss:\/\/", "https:\/\/")) { + return debuggerAddress.replace("wss:\/\/", "https:\/\/") + } + else { + return debuggerAddress + } + } + const path = '/json/version' let request = new http.Request('GET', path) let client = new http.HttpClient('http://' + debuggerAddress)
[js] Add a check for Grid CDP endpoint
diff --git a/realtime/shake_data.py b/realtime/shake_data.py index <HASH>..<HASH> 100644 --- a/realtime/shake_data.py +++ b/realtime/shake_data.py @@ -336,18 +336,19 @@ class ShakeData: :file:`/tmp/inasafe/realtime/shakemaps-extracted/20131105060809` - After extraction the complete path will appear something like this: + After extraction, under that directory, there will be directory that + appears something like this: - :file:`/tmp/inasafe/realtime/shakemaps-extracted/20131105060809/usr/local/smap/data/20131105060809` + :file:`/usr/local/smap/data/20131105060809` with input and output directories appearing beneath that. This method will then move the grid.xml file up to the root of the extract dir and recursively remove the extracted dirs. - After this final step, the following file will be present: + After this final step, :file:`grid.xml` will be present under: - :file:`/tmp/inasafe/realtime/shakemaps-extracted/20131105060809/grid.xml` + :file:`/tmp/inasafe/realtime/shakemaps-extracted/20131105060809/` If the zips have not already been retrieved from the ftp server, they will be fetched first automatically.
Fix last pylint violation.
diff --git a/instant/templates/instant/channels/superuser/client.js b/instant/templates/instant/channels/superuser/client.js index <HASH>..<HASH> 100644 --- a/instant/templates/instant/channels/superuser/client.js +++ b/instant/templates/instant/channels/superuser/client.js @@ -10,6 +10,7 @@ var superuser_callbacks_{% get_superuser_channel %} = { var data = res['data'] var channel = res['channel']; var uid = res['UID']; + var site = res["site"]; // handlers if (debug === true) { console.log('Msg: '+message+"\nChan: "+channel+"\nEvent_class: "+event_class+'\nData: '+JSON.stringify(data));
Correction in js superuser channel client
diff --git a/lib/ee.js b/lib/ee.js index <HASH>..<HASH> 100644 --- a/lib/ee.js +++ b/lib/ee.js @@ -20,10 +20,8 @@ module.exports = { var args = slice.call(arguments, 1), array = this._events[ev]; - array && array.forEach(invokeHandler, this); - - function invokeHandler(handler) { - handler.apply(this, args); + for (var i = 0, len = array.length; i < len; i++) { + array[i].apply(this, args); } }, once: function once(ev, handler) {
Use `for` instead of `forEach` as it minifies better.
diff --git a/client.go b/client.go index <HASH>..<HASH> 100644 --- a/client.go +++ b/client.go @@ -235,6 +235,12 @@ func (c *Client) User() string { return c.namenode.User } +// Name returns the unique name that the Client uses in communication +// with namenodes and datanodes. +func (c *Client) Name() string { + return c.namenode.ClientName +} + // ReadFile reads the file named by filename and returns the contents. func (c *Client) ReadFile(filename string) ([]byte, error) { f, err := c.Open(filename)
Allow to get an unique name of the client
diff --git a/modules/adgenerationBidAdapter.js b/modules/adgenerationBidAdapter.js index <HASH>..<HASH> 100644 --- a/modules/adgenerationBidAdapter.js +++ b/modules/adgenerationBidAdapter.js @@ -75,11 +75,6 @@ export const spec = { return []; } const bidRequest = bidRequests.bidRequest; - if (!bidRequest.mediaTypes || bidRequest.mediaTypes.banner) { - if (!body.w || !body.h) { - return []; - } - } const bidResponse = { requestId: bidRequest.bidId, cpm: body.cpm || 0, @@ -91,7 +86,7 @@ export const spec = { netRevenue: true, ttl: body.ttl || 10, }; - if (bidRequest.mediaTypes && bidRequest.mediaTypes.native) { + if (isNative(body)) { bidResponse.native = createNativeAd(body); bidResponse.mediaType = NATIVE; } else { @@ -124,6 +119,11 @@ function createAd(body, bidRequest) { return ad; } +function isNative(body) { + if (!body) return false; + return body.native_ad && body.native_ad.assets.length > 0; +} + function createNativeAd(body) { let native = {}; if (body.native_ad && body.native_ad.assets.length > 0) {
update AdGenetation adapter (<I> squashed commit) (#<I>) Squashed commits: [1b<I>ca0] update AdGenetation adapter
diff --git a/tests/unit/AbstractClientTest.php b/tests/unit/AbstractClientTest.php index <HASH>..<HASH> 100644 --- a/tests/unit/AbstractClientTest.php +++ b/tests/unit/AbstractClientTest.php @@ -162,7 +162,7 @@ class ClientTest extends Unit $client->send($request2); $transport = $this->createMock(TransportInterface::class); - $transport->expects($this->exactly(2))->method('send')->withConsecutive([$request, 4 |ApiRequestOption::NO_RESPONSE], [$request2, ApiRequestOption::NO_RESPONSE]); + $transport->expects($this->once())->method('sendMany')->with([[$request, 4 |ApiRequestOption::NO_RESPONSE], [$request2, ApiRequestOption::NO_RESPONSE]]); $client->setTransport($transport); $fluent = $client->commit();
modify the test to be ok with the new commit definition.
diff --git a/api/app.go b/api/app.go index <HASH>..<HASH> 100644 --- a/api/app.go +++ b/api/app.go @@ -1638,6 +1638,15 @@ func forceDeleteLock(w http.ResponseWriter, r *http.Request, t auth.Token) error return nil } +// title: register unit +// path: /apps/{app}/units/register +// method: POST +// consume: application/x-www-form-urlencoded +// produce: application/json +// responses: +// 200: Ok +// 401: Unauthorized +// 404: App not found func registerUnit(w http.ResponseWriter, r *http.Request, t auth.Token) error { appName := r.URL.Query().Get(":app") a, err := app.GetByName(appName)
api/apps: add comments to describe register unit
diff --git a/djstripe/models.py b/djstripe/models.py index <HASH>..<HASH> 100644 --- a/djstripe/models.py +++ b/djstripe/models.py @@ -283,15 +283,13 @@ Use ``Customer.sources`` and ``Customer.subscriptions`` to access them. In this case, use ``Customer.subscriptions`` instead. """ - subscription_count = self.subscriptions.count() + subscriptions = self.subscriptions.exclude(status="canceled") - if subscription_count == 0: - return None - elif subscription_count == 1: - return self.subscriptions.first() - else: + if subscriptions.count() > 1: raise MultipleSubscriptionException("This customer has multiple subscriptions. Use Customer.subscriptions " "to access them.") + else: + return subscriptions.first() # TODO: Accept a coupon object when coupons are implemented def subscribe(self, plan, charge_immediately=True, **kwargs):
Exclude canceled subscriptions from Customer.subscriptions
diff --git a/jquery.multiple.select.js b/jquery.multiple.select.js index <HASH>..<HASH> 100644 --- a/jquery.multiple.select.js +++ b/jquery.multiple.select.js @@ -48,10 +48,6 @@ this.selectAllName = 'name="selectAll' + name + '"'; this.selectGroupName = 'name="selectGroup' + name + '"'; this.selectItemName = 'name="selectItem' + name + '"'; - - if (this.options.isOpen) { - this.open(); - } } MultipleSelect.prototype = { @@ -95,6 +91,10 @@ this.$noResults = this.$drop.find('.ms-no-results'); this.events(); this.update(); + + if (this.options.isOpen) { + this.open(); + } }, optionToHtml: function(i, elm, group, groupDisabled) {
Fix #<I>: call open function after init when isOpen and filter options are set to true.
diff --git a/test/connection_test.py b/test/connection_test.py index <HASH>..<HASH> 100755 --- a/test/connection_test.py +++ b/test/connection_test.py @@ -61,7 +61,7 @@ class BaseTest(unittest.TestCase): json.dump(klass.dbconfig, f) @classmethod - def setUpClass(klass): + def _setUpClass(klass): os.mkdir(klass.mysqldir) klass.dump_config_files() klass.start_mysql() @@ -95,7 +95,7 @@ class BaseTest(unittest.TestCase): connection.commit() @classmethod - def tearDownClass(klass): + def _tearDownClass(klass): try: klass.process.kill() klass.process.wait() @@ -208,9 +208,9 @@ class TestConnection(BaseTest): if __name__=="__main__": try: - BaseTest.setUpClass() + BaseTest._setUpClass() unittest.main(argv=["auth_test.py"]) finally: print "Waiting for processes to terminate...", - BaseTest.tearDownClass() + BaseTest._tearDownClass() print "OK"
Make connection_test.py work in both <I> and <I>.
diff --git a/association.go b/association.go index <HASH>..<HASH> 100644 --- a/association.go +++ b/association.go @@ -267,15 +267,16 @@ func (association *Association) Count() int { query = scope.DB() ) - if relationship.Kind == "many_to_many" { + switch relationship.Kind { + case "many_to_many": query = relationship.JoinTableHandler.JoinWith(relationship.JoinTableHandler, query, scope.Value) - } else if relationship.Kind == "has_many" || relationship.Kind == "has_one" { + case "has_many", "has_one": primaryKeys := scope.getColumnAsArray(relationship.AssociationForeignFieldNames, scope.Value) query = query.Where( fmt.Sprintf("%v IN (%v)", toQueryCondition(scope, relationship.ForeignDBNames), toQueryMarks(primaryKeys)), toQueryValues(primaryKeys)..., ) - } else if relationship.Kind == "belongs_to" { + case "belongs_to": primaryKeys := scope.getColumnAsArray(relationship.ForeignFieldNames, scope.Value) query = query.Where( fmt.Sprintf("%v IN (%v)", toQueryCondition(scope, relationship.AssociationForeignDBNames), toQueryMarks(primaryKeys)),
rewrite if-else chain as switch statement (#<I>) From effective Go: <URL>
diff --git a/packages/blueprint/lib/application.js b/packages/blueprint/lib/application.js index <HASH>..<HASH> 100644 --- a/packages/blueprint/lib/application.js +++ b/packages/blueprint/lib/application.js @@ -145,13 +145,15 @@ module.exports = BO.extend (Events, { * Destroy the application. */ destroy () { - // Instruct each service to destroy itself. - let { services } = this.resources; - - return BPromise.props (mapValues (services, (service, name) => { - debug (`destroying service ${name}`); - return service.destroy (); - })); + return this._server.close ().then (() => { + // Instruct each service to destroy itself. + let { services } = this.resources; + + return BPromise.props (mapValues (services, (service, name) => { + debug (`destroying service ${name}`); + return service.destroy (); + })); + }); }, /**
The application failed to stop at the end of testing
diff --git a/lib/active_record/connection_adapters/oracle_enhanced_schema_statements.rb b/lib/active_record/connection_adapters/oracle_enhanced_schema_statements.rb index <HASH>..<HASH> 100644 --- a/lib/active_record/connection_adapters/oracle_enhanced_schema_statements.rb +++ b/lib/active_record/connection_adapters/oracle_enhanced_schema_statements.rb @@ -165,6 +165,14 @@ module ActiveRecord def remove_index(table_name, options = {}) #:nodoc: index_name = index_name(table_name, options) unless index_name_exists?(table_name, index_name, true) + # sometimes options can be String or Array with column names + options = {} unless options.is_a?(Hash) + if options.has_key? :name + options_without_column = options.dup + options_without_column.delete :column + index_name_without_column = index_name(table_name, options_without_column) + return index_name_without_column if index_name_exists?(table_name, index_name_without_column, false) + end raise ArgumentError, "Index name '#{index_name}' on table '#{table_name}' does not exist" end remove_index!(table_name, index_name)
Use the index name explicitly provided in a migration when reverting see rails/rails#<I>
diff --git a/modules/admin/resources/js/controllers.js b/modules/admin/resources/js/controllers.js index <HASH>..<HASH> 100644 --- a/modules/admin/resources/js/controllers.js +++ b/modules/admin/resources/js/controllers.js @@ -389,11 +389,15 @@ }); }; + $scope.$on('topMenuClick', function(e) { + $scope.currentItem = null; + }); + $scope.init(); }); zaa.controller("DashboardController", function ($scope) { - $scope.logItemOpen = false; + $scope.logItemOpen = false; }); // LayoutMenuController.js @@ -457,6 +461,7 @@ $scope.currentItem = {}; $scope.click = function(menuItem) { + $scope.$broadcast('topMenuClick', { menuItem : menuItem }); if (menuItem.template) { $state.go('custom', { 'templateId' : menuItem.template }); } else {
fixed bug where activ class on dashboard still appears closing #<I>
diff --git a/yarl/__init__.py b/yarl/__init__.py index <HASH>..<HASH> 100644 --- a/yarl/__init__.py +++ b/yarl/__init__.py @@ -10,7 +10,7 @@ import idna from .quoting import _Quoter, _Unquoter -__version__ = '1.2.5a2' +__version__ = '1.2.5a3' __all__ = ('URL',)
Bump to <I>a3
diff --git a/wafer/settings.py b/wafer/settings.py index <HASH>..<HASH> 100644 --- a/wafer/settings.py +++ b/wafer/settings.py @@ -147,9 +147,9 @@ INSTALLED_APPS = ( 'wafer.sponsors', 'wafer.pages', 'wafer.tickets', + 'wafer.compare', # Django isn't finding the overridden templates 'registration', - 'wafer.compare', ) from django.db import migrations
Keep all the wafer apps together in the settings file
diff --git a/src/cli.js b/src/cli.js index <HASH>..<HASH> 100644 --- a/src/cli.js +++ b/src/cli.js @@ -37,17 +37,13 @@ commander /^(trace|debug|info|warn|error|silent)$/i, 'warn') .action((host, file, options) => { - const { port, username, password, loglevel, command } = options; - if (!host) { log.error('Please specify a host to connect to'); commander.help(); } - log.setLevel(loglevel); - const source = file && fs.readFileSync(file); - const xapi = connect(host, { port, username, password, command }) + const xapi = connect(host, options) .on('error', (error) => { log.error('xapi error:', error); }) .on('ready', () => { if (source) {
Fix setting correct cli log level Setting of log level has been moved into `connect`, so whatever we do outside of it will be reverted by connect. Which is why we also have to pass along all options to `connect`.
diff --git a/cloudinit/cloudinit_test.go b/cloudinit/cloudinit_test.go index <HASH>..<HASH> 100644 --- a/cloudinit/cloudinit_test.go +++ b/cloudinit/cloudinit_test.go @@ -220,9 +220,7 @@ var ctests = []struct { }, { "AddFile", - "runcmd:\n" + - "- install -m 644 /dev/null '/etc/apt/apt.conf.d/99proxy'\n" + - "- echo '\"Acquire::http::Proxy \"http://10.0.3.1:3142\";' > '/etc/apt/apt.conf.d/99proxy'\n", + addFileExpected, func(cfg *cloudinit.Config) { cfg.AddFile( "/etc/apt/apt.conf.d/99proxy", @@ -233,7 +231,13 @@ var ctests = []struct { }, } -const header = "#cloud-config\n" +const ( + header = "#cloud-config\n" + addFileExpected = `runcmd: +- install -m 644 /dev/null '/etc/apt/apt.conf.d/99proxy' +- echo '"Acquire::http::Proxy "http://10.0.3.1:3142";' > '/etc/apt/apt.conf.d/99proxy' +` +) func (S) TestOutput(c *C) { for _, t := range ctests {
- Switch expected to a literla string.
diff --git a/DependencyInjection/Compiler/EnvironmentVariablesPass.php b/DependencyInjection/Compiler/EnvironmentVariablesPass.php index <HASH>..<HASH> 100644 --- a/DependencyInjection/Compiler/EnvironmentVariablesPass.php +++ b/DependencyInjection/Compiler/EnvironmentVariablesPass.php @@ -13,6 +13,7 @@ namespace ONGR\SettingsBundle\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\HttpFoundation\Request; /** * Environment variables pass, overrides default variables with environment ones. @@ -26,7 +27,9 @@ class EnvironmentVariablesPass implements CompilerPassInterface */ public function process(ContainerBuilder $container) { - foreach ($_SERVER as $key => $value) { + $request = Request::createFromGlobals(); + + foreach ($request->server as $key => $value) { if (0 === strpos($key, 'ongr__')) { $param = strtolower(str_replace('__', '.', substr($key, 6))); $container->setParameter($param, $value);
Use server value from request instead of super global variable
diff --git a/lib/excon/socket.rb b/lib/excon/socket.rb index <HASH>..<HASH> 100644 --- a/lib/excon/socket.rb +++ b/lib/excon/socket.rb @@ -36,10 +36,20 @@ module Excon end end - def read(max_length) + def read(max_length=nil) begin - until @read_buffer.length >= max_length - @read_buffer << @socket.read_nonblock(max_length - @read_buffer.length) + if max_length + until @read_buffer.length >= max_length + @read_buffer << @socket.read_nonblock(max_length - @read_buffer.length) + end + else + # no length specified, so read until EOFError + begin + while true + @read_buffer << @socket.read_nonblock(CHUNK_SIZE) + end + rescue EOFError + end end rescue OpenSSL::SSL::SSLError => error if error.message == 'read would block' @@ -56,7 +66,12 @@ module Excon raise(Excon::Errors::Timeout.new("read timeout reached")) end end - @read_buffer.slice!(0, max_length) + if max_length + @read_buffer.slice!(0, max_length) + else + # read until EOFError, so return everything + @read_buffer.slice!(0, @read_buffer.length) + end end def write(data)
fix nonblock stuff to work properly in read until socket closes case
diff --git a/lib/pubcontrolclient.js b/lib/pubcontrolclient.js index <HASH>..<HASH> 100644 --- a/lib/pubcontrolclient.js +++ b/lib/pubcontrolclient.js @@ -9,7 +9,7 @@ * Licensed under the MIT License, see file COPYING for details. */ -var fetch = (global.fetch !== undefined) ? global.fetch : require('node-fetch'); +var fetch = (global.fetch !== undefined) ? global.fetch : require('node-fetch').default; var agentkeepalive = require('agentkeepalive'); var url = require('url');
node-fetch workaround for webpack
diff --git a/src/toil/test/docs/scriptsTest.py b/src/toil/test/docs/scriptsTest.py index <HASH>..<HASH> 100644 --- a/src/toil/test/docs/scriptsTest.py +++ b/src/toil/test/docs/scriptsTest.py @@ -127,9 +127,9 @@ class ToilDocumentationTest(ToilTest): def testArguments(self): self.checkExpectedOut("tutorial_arguments.py", "Hello, world!, here's a message: Woot") - @needs_docker + """@needs_docker # timing out; likely need to update docker on toil def testDocker(self): - self.checkExitCode("tutorial_docker.py") + self.checkExitCode("tutorial_docker.py")""" def testPromises(self): self.checkExpectedPattern("tutorial_promises.py", "i is: 1.*i is: 2.*i is: 3")
Comment out docker test and investigate on jenkins later.
diff --git a/lib/turbine/vertex.rb b/lib/turbine/vertex.rb index <HASH>..<HASH> 100644 --- a/lib/turbine/vertex.rb +++ b/lib/turbine/vertex.rb @@ -3,6 +3,9 @@ module Turbine # formed: a directed graph consists of a set of vertices and a set of arcs # (ordered pairs of vertices). class Vertex + # Public: Returns the unique key which identifies the vertex. + attr_reader :key + # Public: Returns edges which connect other vertices to this one. attr_reader :in_edges @@ -10,7 +13,7 @@ module Turbine attr_reader :out_edges # Creates a new Vertex. - def initialize(key = nil) + def initialize(key) @key = key @in_edges = [] @out_edges = [] diff --git a/spec/turbine/vertex_spec.rb b/spec/turbine/vertex_spec.rb index <HASH>..<HASH> 100644 --- a/spec/turbine/vertex_spec.rb +++ b/spec/turbine/vertex_spec.rb @@ -1,7 +1,13 @@ require 'spec_helper' describe 'Turbine::Vertex' do - let(:vertex) { Turbine::Vertex.new } + let(:vertex) { Turbine::Vertex.new(:phil) } + + context 'creating a new vertex' do + context 'without providing a key' do + it { expect(-> { Turbine::Vertex.new }).to raise_error(ArgumentError) } + end + end describe '#in_edges' do subject { vertex.in_edges }
Vertex.new must be provided a key.
diff --git a/model/execution/implementation/KvLtiDeliveryExecutionService.php b/model/execution/implementation/KvLtiDeliveryExecutionService.php index <HASH>..<HASH> 100644 --- a/model/execution/implementation/KvLtiDeliveryExecutionService.php +++ b/model/execution/implementation/KvLtiDeliveryExecutionService.php @@ -147,7 +147,7 @@ class KvLtiDeliveryExecutionService extends AbstractLtiDeliveryExecutionService */ protected function getDeliveryExecutionLinks($userUri, $deliveryExecutionUri) { - $linksOfExecutionAndUser = $this->getPersistence()->get(self::LINKS_OF_DELIVERY_EXECUTION . $userUri . $deliveryExecutionUri . '_'); + $linksOfExecutionAndUser = $this->getPersistence()->get(self::LINKS_OF_DELIVERY_EXECUTION . $userUri . $deliveryExecutionUri); if (empty($linksOfExecutionAndUser)) { $linksOfExecutionAndUser = [];
check if links of execution are not empty
diff --git a/gettext.go b/gettext.go index <HASH>..<HASH> 100644 --- a/gettext.go +++ b/gettext.go @@ -42,9 +42,9 @@ var ( // LcAll is for all of the locale. LcAll = uint(C.LC_ALL) - // LcColate is for regular expression matching (it determines the meaning of + // LcCollate is for regular expression matching (it determines the meaning of // range expressions and equivalence classes) and string collation. - LcColate = uint(C.LC_ALL) + LcCollate = uint(C.LC_COLLATE) // LcCtype is for regular expression matching, character classification, // conversion, case-sensitive comparison, and wide character functions. @@ -64,6 +64,17 @@ var ( LcTime = uint(C.LC_TIME) ) +// Deprecated but kept for backwards compatibility. +var ( + LC_ALL = LcAll + LC_COLLATE = LcCollate + LC_CTYPE = LcCtype + LC_MESSAGES = LcMessages + LC_MONETARY = LcMonetary + LC_NUMERIC = LcNumeric + LC_TIME = LcTime +) + // SetLocale sets the program's current locale. func SetLocale(category uint, locale string) string { clocale := C.CString(locale)
Adding old LC_* style constants for backward compatibility.
diff --git a/bucky/cfg.py b/bucky/cfg.py index <HASH>..<HASH> 100644 --- a/bucky/cfg.py +++ b/bucky/cfg.py @@ -30,7 +30,9 @@ graphite_pickle_buffer_size = 500 full_trace = False name_prefix = None +name_prefix_parts = None name_postfix = None +name_postfix_parts = None name_replace_char = '_' name_strip_duplicates = True name_host_trim = [] diff --git a/bucky/names.py b/bucky/names.py index <HASH>..<HASH> 100644 --- a/bucky/names.py +++ b/bucky/names.py @@ -61,9 +61,13 @@ def statname(host, name): parts = [] if cfg.name_prefix: parts.append(cfg.name_prefix) + if cfg.name_prefix_parts: + parts.extend(cfg.name_prefix_parts) if host: parts.extend(hostname(host)) parts.extend(nameparts) + if cfg.name_postfix_parts: + parts.append(cfg.name_postfix_parts) if cfg.name_postfix: parts.append(cfg.name_postfix) if cfg.name_replace_char is not None:
Allow prefix and postfix to have multiple parts.
diff --git a/cache2k-config/src/test/java/org/cache2k/extra/config/test/IntegrationTest.java b/cache2k-config/src/test/java/org/cache2k/extra/config/test/IntegrationTest.java index <HASH>..<HASH> 100644 --- a/cache2k-config/src/test/java/org/cache2k/extra/config/test/IntegrationTest.java +++ b/cache2k-config/src/test/java/org/cache2k/extra/config/test/IntegrationTest.java @@ -225,7 +225,7 @@ public class IntegrationTest { /** * As of version 2.0 we allow duplicate listeners to simplify the configuration */ - @Test + @Test @Ignore public void duplicateListener() { Cache2kBuilder<String, String> builder = new Cache2kBuilder<String, String>() { }
ignore test again, need to fix module configuration first
diff --git a/lib/happymapper.rb b/lib/happymapper.rb index <HASH>..<HASH> 100644 --- a/lib/happymapper.rb +++ b/lib/happymapper.rb @@ -1,5 +1,3 @@ -require 'rubygems' -gem 'libxml-ruby', '=1.1.3' require 'date' require 'time' require 'xml' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,11 +1,4 @@ -begin - require 'spec' -rescue LoadError - require 'rubygems' - gem 'rspec' - require 'spec' -end - +require 'spec' require File.expand_path('../../lib/happymapper', __FILE__) def fixture_file(filename)
Removing rubygems.
diff --git a/test/e2e/cluster_dns.go b/test/e2e/cluster_dns.go index <HASH>..<HASH> 100644 --- a/test/e2e/cluster_dns.go +++ b/test/e2e/cluster_dns.go @@ -37,6 +37,11 @@ func TestClusterDNS(c *client.Client) bool { return true } + if testContext.provider == "vagrant" { + glog.Infof("Skipping test which is broken for vagrant (See https://github.com/GoogleCloudPlatform/kubernetes/issues/3580)") + return true + } + podClient := c.Pods(api.NamespaceDefault) //TODO: Wait for skyDNS diff --git a/test/e2e/network.go b/test/e2e/network.go index <HASH>..<HASH> 100644 --- a/test/e2e/network.go +++ b/test/e2e/network.go @@ -25,6 +25,11 @@ import ( ) func TestNetwork(c *client.Client) bool { + if testContext.provider == "vagrant" { + glog.Infof("Skipping test which is broken for vagrant (See https://github.com/GoogleCloudPlatform/kubernetes/issues/3580)") + return true + } + ns := api.NamespaceDefault svc, err := c.Services(ns).Create(loadObjectOrDie(assetPath( "contrib", "for-tests", "network-tester", "service.json",
Disable a couple of e2e tests for vagrant for now. The core issue is that vagrant lacks connectivity from master to containers.
diff --git a/samoa-api/src/main/java/com/yahoo/labs/samoa/learners/classifiers/ensemble/Bagging.java b/samoa-api/src/main/java/com/yahoo/labs/samoa/learners/classifiers/ensemble/Bagging.java index <HASH>..<HASH> 100644 --- a/samoa-api/src/main/java/com/yahoo/labs/samoa/learners/classifiers/ensemble/Bagging.java +++ b/samoa-api/src/main/java/com/yahoo/labs/samoa/learners/classifiers/ensemble/Bagging.java @@ -33,7 +33,7 @@ import com.github.javacliparser.ClassOption; import com.github.javacliparser.Configurable; import com.github.javacliparser.IntOption; import com.yahoo.labs.samoa.core.Processor; -import com.yahoo.labs.samoa.learners.classifiers.SingleClassifier; +import com.yahoo.labs.samoa.learners.classifiers.trees.VerticalHoeffdingTree; /** * The Bagging Classifier by Oza and Russell. @@ -45,7 +45,7 @@ public class Bagging implements Learner , Configurable { /** The base learner option. */ public ClassOption baseLearnerOption = new ClassOption("baseLearner", 'l', - "Classifier to train.", Learner.class, SingleClassifier.class.getName()); + "Classifier to train.", Learner.class, VerticalHoeffdingTree.class.getName()); /** The ensemble size option. */
Updated Bagging deafault base classifier option
diff --git a/src/ContainerBuilder.php b/src/ContainerBuilder.php index <HASH>..<HASH> 100644 --- a/src/ContainerBuilder.php +++ b/src/ContainerBuilder.php @@ -492,7 +492,9 @@ class ContainerBuilder { // process services foreach ($config["services"] as $key => $definition) { // check if this is an alias of another service - $key = $this->referenceResolver->aliasThisKey($key, $alias); + if (!$this->referenceResolver->keyIsAliased($key)) { + $key = $this->referenceResolver->aliasThisKey($key, $alias); + } if (!empty($definition["aliasOf"])) { // override any existing definitions for this key
Only alias a key if it is not already aliased
diff --git a/backbone.js b/backbone.js index <HASH>..<HASH> 100644 --- a/backbone.js +++ b/backbone.js @@ -619,7 +619,7 @@ if (ev == 'destroy') { this._remove(model, options); } - if (ev === 'change:' + model.idAttribute) { + if (model && ev === 'change:' + model.idAttribute) { delete this._byId[model.previous(model.idAttribute)]; this._byId[model.id] = model; }
Check for model before accessing its properties, fixes #<I>
diff --git a/trump/orm.py b/trump/orm.py index <HASH>..<HASH> 100644 --- a/trump/orm.py +++ b/trump/orm.py @@ -538,20 +538,25 @@ class Symbol(Base, ReprMixin): def __init__(self, name, description=None, units=None, agg_method="PRIORITY_FILL", indexname="UNNAMED", indeximp="DatetimeIndexImp"): - """ - :param name: str + """A Trump Symbol persistently objectifies indexed data + + Use the SymbolManager class to create or retrieve existing symbols. + + Parameters + ---------- + name : str The name of the symbol to be added to the database, serves as a primary key across the trump installation. - :param description: str, optional + description : str, optional a description of the symbol, just for notes. - :param units: str, optional + units : str, optional a string representing the units for the data. - :param agg_method: str, default PRIORITY_FILL - the method used for aggregating feeds, see + agg_method : str, default PRIORITY_FILL + the method used for aggregating feeds, see trump.extensions.symbol_aggs.py for the list of available options. - :param indexname: str + indexname : str a proprietary name assigned to the index. - :param indeximp: str + indeximp : str a string representing an index implementer (one of the classes in indexing.py) """
Change Symbol docstring to numpy style
diff --git a/lib/inject.js b/lib/inject.js index <HASH>..<HASH> 100644 --- a/lib/inject.js +++ b/lib/inject.js @@ -54,14 +54,11 @@ function injectAllRequirements() { if (!get(f, 'module')) { set(f, ['module'], '.'); } - if (!doneModules.includes(f.module)) { - injectRequirements( - path.join('.serverless', f.module, 'requirements'), - f.package.artifact, - this.options - ); - doneModules.push(f.module); - } + injectRequirements( + path.join('.serverless', f.module, 'requirements'), + f.package.artifact, + this.options + ); }); } else { injectRequirements(
Include requirements into every package, even when it's in the root
diff --git a/src/renderable/sprite.js b/src/renderable/sprite.js index <HASH>..<HASH> 100644 --- a/src/renderable/sprite.js +++ b/src/renderable/sprite.js @@ -21,7 +21,7 @@ * @param {Number} [settings.rotation] Initial rotation angle in radians. * @param {Boolean} [settings.flipX] Initial flip for X-axis. * @param {Boolean} [settings.flipY] Initial flip for Y-axis. - * @param {me.Vector2d} [settings.anchorPoint] Anchor point. + * @param {me.Vector2d} [settings.anchorPoint={x:0.5, y:0.5}] Anchor point (defaults to the center of the sprite). * @example * // create a static Sprite Object * mySprite = new me.Sprite (100, 100, {
[documentation] better highlight the default value for the anchor point in the `me.Sprite` constructor