hash
stringlengths
40
40
diff
stringlengths
131
26.7k
message
stringlengths
7
694
project
stringlengths
5
67
split
stringclasses
1 value
diff_languages
stringlengths
2
24
2033e5d7726016908e850cfe8ddebb0aad1d7d4a
diff --git a/autoload.php b/autoload.php index <HASH>..<HASH> 100644 --- a/autoload.php +++ b/autoload.php @@ -4,7 +4,7 @@ * FancyManiaLinks - ManiaLink Generator Framework * * @author steeffeen <mail@steeffeen.com> - * @version 1.4.1 + * @version 1.4.2-dev * @link http://github.com/steeffeen/FancyManiaLinks * @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -20,7 +20,7 @@ if (!defined('FML_VERSION')) { /** * @const FML_VERSION Installed version of FancyManiaLinks */ - define('FML_VERSION', '1.4.1'); + define('FML_VERSION', '1.4.2-dev'); } /*
Update version to <I>-dev
steeffeen_FancyManiaLinks
train
php
e787f5701e521d753c0df8294cbc05236d17dd92
diff --git a/core/src/main/java/hudson/model/View.java b/core/src/main/java/hudson/model/View.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/hudson/model/View.java +++ b/core/src/main/java/hudson/model/View.java @@ -1009,8 +1009,6 @@ public abstract class View extends AbstractModelObject implements AccessControll * An API method to get the allowed {$link TopLevelItem}s and its categories. * * @return A {@link Categories} entity that is shown as JSON file. - * - * @since TODO */ @Restricted(DoNotUse.class) public Categories doCategories(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
[JENKINS-<I>] Removed a @since annotation in javadoc
jenkinsci_jenkins
train
java
4349b3d64df5536ebfd7033336cd84c3f7800fa8
diff --git a/lib/flipper/version.rb b/lib/flipper/version.rb index <HASH>..<HASH> 100644 --- a/lib/flipper/version.rb +++ b/lib/flipper/version.rb @@ -1,3 +1,3 @@ module Flipper - VERSION = '0.11.0.beta9'.freeze + VERSION = '0.11.0.rc1'.freeze end
Release <I>.rc1
jnunemaker_flipper
train
rb
d6ca6b321dc333df91ec0915a39c97dabf378b6f
diff --git a/cyclotron_aio/driver/dispose.py b/cyclotron_aio/driver/dispose.py index <HASH>..<HASH> 100644 --- a/cyclotron_aio/driver/dispose.py +++ b/cyclotron_aio/driver/dispose.py @@ -4,28 +4,30 @@ import asyncio Sink = namedtuple('Sink', ['dispose']) + def make_driver(loop=None): ''' Returns a dispose driver function. The optional loop argument can be provided to use the driver in another loop than the default one. ''' - def dispose(i): - if i is not True: - return - + def dispose(i = None): if loop is not None: loop.stop() else: asyncio.get_event_loop().stop() def driver(sink): - ''' The dispose driver stops the asyncio event loop as soon as a True - event is received on the dispose stream. + ''' The dispose driver stops the asyncio event loop as soon as an + event is received on the dispose stream or when it completes (both + in case of success or error). arguments: - sink: A DisposeSink object. ''' - sink.dispose.subscribe(lambda i: dispose(i)) + sink.dispose.subscribe( + on_next=dispose, + on_error=dispose, + on_completed=dispose) return None return Component(call=driver, input=Sink)
Dispose: Handle errors and completion
MainRo_cyclotron-aio
train
py
f0beaeb92f1f8ad955c06f15090c6a92f7421154
diff --git a/epab/_logging.py b/epab/_logging.py index <HASH>..<HASH> 100644 --- a/epab/_logging.py +++ b/epab/_logging.py @@ -13,8 +13,6 @@ LOGGER = logging.getLogger('EPAB') _LOGGING_CONSOLE_FORMAT = '%(relativeCreated)10d ms ' \ '%(levelname)8s ' \ - '%(name)s ' \ - '[%(pathname)s@%(lineno)d %(funcName)s]: ' \ '%(message)s'
chg: strip down console logging verbosity
etcher-be_epab
train
py
33031452b4c5529704bde8b371e86f19b6524f04
diff --git a/src/Controller/LeagueController.php b/src/Controller/LeagueController.php index <HASH>..<HASH> 100644 --- a/src/Controller/LeagueController.php +++ b/src/Controller/LeagueController.php @@ -20,8 +20,8 @@ class LeagueController extends ControllerBase { public function index(League $league) { $betController = new BettingController(); - $last_bets = $betController->lastBets($league); - $next_bets = $betController->nextBets($league); + $last_bets = $betController->lastBets($league,100); + $next_bets = $betController->nextBets($league,100); $ranking = RankingController::getRankingLeague($league); return [ '#theme' =>'league-details',
Last bets / Next bets - Page league - use limit
mespronos_mespronos
train
php
707cf514cf464c9f0a10a0426c4661e88038c778
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -5,9 +5,9 @@ from setuptools import setup setup(name="replacer", - version="1.0.3", + version="1.0.4", description="Replace text in files", - url="http://github.com/yannicklm/replacer", + url="http://github.com/dmerejkowsky/replacer", author="Dimitri Merejkowky", author_email="d.merej@gmail.com", scripts=["bin/replacer"],
setup: bump to <I> fix url
dmerejkowsky_replacer
train
py
5fa240766d4b6c753f3972c79387da3db36d89e3
diff --git a/read_roi/_read_roi.py b/read_roi/_read_roi.py index <HASH>..<HASH> 100644 --- a/read_roi/_read_roi.py +++ b/read_roi/_read_roi.py @@ -161,9 +161,9 @@ def extract_basic_roi_data(data): top = get_short(data, OFFSET['TOP']) left = get_short(data, OFFSET['LEFT']) - if top > 6000: + if top >= 32768: # 2**15 top -= 2**16 - if left > 6000: + if left >= 32768: # 2**15 left -= 2**16 bottom = get_short(data, OFFSET['BOTTOM'])
BUG: int<I> boundary for negation This should be at 2^<I> == <I>, not <I>.
hadim_read-roi
train
py
1c6f08203950a97ff74312b78619ed1e0b685aed
diff --git a/lib/reporters/pretty.js b/lib/reporters/pretty.js index <HASH>..<HASH> 100644 --- a/lib/reporters/pretty.js +++ b/lib/reporters/pretty.js @@ -83,7 +83,7 @@ module.exports = { }); if (Array.isArray (fixesApplied)) { - counts.fixes = fixesApplied.length; + counts.fixes = (counts.fixes || 0) + fixesApplied.length; } console.log ('\n');
pretty reporter bug fix finalize(): print total no. of fixes applied
duaraghav8_Ethlint
train
js
da695ff4918165c9763ef80a700cbd68e55ba7d2
diff --git a/src/Common/Factory/AbstractFactoryRule.php b/src/Common/Factory/AbstractFactoryRule.php index <HASH>..<HASH> 100644 --- a/src/Common/Factory/AbstractFactoryRule.php +++ b/src/Common/Factory/AbstractFactoryRule.php @@ -25,7 +25,7 @@ abstract class AbstractFactoryRule extends SprykerAbstractRule { $className = $this->getClassName($node); - if (preg_match(self::PATTERN_FACTORY, $className) === 0) { + if (preg_match(static::PATTERN_FACTORY, $className) === 0) { return false; } @@ -41,7 +41,7 @@ abstract class AbstractFactoryRule extends SprykerAbstractRule { $className = $this->getClassName($node); - if (preg_match(self::PATTERN_FACTORY_EXCEPT_PERSISTENCE, $className) === 0) { + if (preg_match(static::PATTERN_FACTORY_EXCEPT_PERSISTENCE, $className) === 0) { return false; }
[DT-<I>] Exchanged self with static
spryker_architecture-sniffer
train
php
de61e7fc9446eea89f2b73b5a2f8c66f284106ff
diff --git a/neo/Implementations/Blockchains/LevelDB/LevelDBBlockchain.py b/neo/Implementations/Blockchains/LevelDB/LevelDBBlockchain.py index <HASH>..<HASH> 100644 --- a/neo/Implementations/Blockchains/LevelDB/LevelDBBlockchain.py +++ b/neo/Implementations/Blockchains/LevelDB/LevelDBBlockchain.py @@ -812,8 +812,8 @@ class LevelDBBlockchain(Blockchain): self.TXProcessed += len(block.Transactions) - for event in to_dispatch: - events.emit(event.event_type, event) + for event in to_dispatch: + events.emit(event.event_type, event) def PersistBlocks(self):
Process events after write_batch() commit * Fixed a bug with smart contract events not being able to lookup the current block being processed due to the fact that the block persistence hasn't finalized via write_batch() commit. Events are now emitted after the commit, so that blocks can be looked up. fixes #<I>
CityOfZion_neo-python
train
py
b2a43bee367a4d2af714b343c4048834c7e906ad
diff --git a/src/Teleport/Action/Extract.php b/src/Teleport/Action/Extract.php index <HASH>..<HASH> 100644 --- a/src/Teleport/Action/Extract.php +++ b/src/Teleport/Action/Extract.php @@ -214,6 +214,10 @@ class Extract extends Action case '\\Teleport\\Transport\\xPDOObjectVehicle': case 'xPDOObjectVehicle': $realClass = $this->modx->loadClass($vehicle['object']['class']); + if ($realClass === false) { + $this->request->log("Invalid class {$vehicle['object']['class']} specified; skipping vehicle"); + break; + } $graph = isset($vehicle['object']['graph']) && is_array($vehicle['object']['graph']) ? $vehicle['object']['graph'] : array(); $graphCriteria = isset($vehicle['object']['graphCriteria']) && is_array($vehicle['object']['graphCriteria'])
Skip vehicles with invalid classes This should address problems experienced when new classes are added in new versions of MODX Revolution and the teleport tpls, but teleport is run against older versions of MODX Revolution See issue #<I>
modxcms_teleport
train
php
b0914092e118d87450efbafb3ebba626d93306c6
diff --git a/qiskit/transpiler/__init__.py b/qiskit/transpiler/__init__.py index <HASH>..<HASH> 100644 --- a/qiskit/transpiler/__init__.py +++ b/qiskit/transpiler/__init__.py @@ -377,6 +377,8 @@ Pass Manager Construction PassManagerConfig PropertySet FlowController + ConditionalController + DoWhileController Layout and Topology ------------------- @@ -423,7 +425,7 @@ Exceptions TranspilerAccessError """ -from .runningpassmanager import FlowController +from .runningpassmanager import FlowController, ConditionalController, DoWhileController from .passmanager import PassManager from .passmanager_config import PassManagerConfig from .propertyset import PropertySet
Expose conditional `FlowController` classes (#<I>) In #<I>, the conditional flow-controller classes `ConditionalController` and `DoWhileController` were promoted to being able to be added to a `PassManager` directly via `PassManager.append`. Since they are now a bit more public, this commit exposes them in the `qiskit.transpiler` module (the same as `PassManager`), and adds them to the documentation.
Qiskit_qiskit-terra
train
py
f3d212d253a2ad1eebbbd0c1c4b385cb01e142d6
diff --git a/channel.js b/channel.js index <HASH>..<HASH> 100644 --- a/channel.js +++ b/channel.js @@ -225,6 +225,8 @@ function TChannel(options) { }); } + self.traceSample = self.options.traceSample || 0.01; // sample 1% by default + // lazily created by .getServer (usually from .listen) self.serverSocket = null; self.serverConnections = null; @@ -606,6 +608,13 @@ TChannel.prototype.request = function channelRequest(options) { var self = this; options = options || {}; + + if (options.hasNoParent && (Math.random() < self.traceSample)) { + options.trace = true; + } else { + options.trace = false; + } + var opts = new RequestOptions(self, options); self.fastRequestDefaults(opts);
trace sampling w/ 1% default
uber_tchannel-node
train
js
8676c17c77298917467451ea4730fd236ee4a2ac
diff --git a/aiogram/utils/payload.py b/aiogram/utils/payload.py index <HASH>..<HASH> 100644 --- a/aiogram/utils/payload.py +++ b/aiogram/utils/payload.py @@ -16,11 +16,11 @@ def generate_payload(exclude=None, **kwargs): def prepare_arg(value): if value is None: - return None + return value elif isinstance(value, (list, dict)): return json.dumps(value) - elif hasattr(value, 'to_json'): - return json.dumps(value.to_json()) + elif hasattr(value, 'to_python'): + return json.dumps(value.to_python()) elif isinstance(value, datetime.timedelta): now = datetime.datetime.now() return int((now + value).timestamp())
Update `prepare_arg` for new types.
aiogram_aiogram
train
py
13a4b75528b2a1faf7979883aacdd1e3eaeda33f
diff --git a/lib/etl/control/source/database_source.rb b/lib/etl/control/source/database_source.rb index <HASH>..<HASH> 100644 --- a/lib/etl/control/source/database_source.rb +++ b/lib/etl/control/source/database_source.rb @@ -172,7 +172,7 @@ module ETL #:nodoc: def query return @query if @query q = "SELECT #{select} FROM #{@table}" - q << " #{join}" if join + q << " JOIN #{join}" if join conditions = [] if new_records_only
Fix for #<I> - source :join does not prepend 'join' in SQL query
activewarehouse_activewarehouse-etl
train
rb
96b14dca599e94c7b7e81fdf77281ef6a5f09a0a
diff --git a/src/Osiset/BasicShopifyAPI/BasicShopifyAPI.php b/src/Osiset/BasicShopifyAPI/BasicShopifyAPI.php index <HASH>..<HASH> 100755 --- a/src/Osiset/BasicShopifyAPI/BasicShopifyAPI.php +++ b/src/Osiset/BasicShopifyAPI/BasicShopifyAPI.php @@ -354,7 +354,7 @@ class BasicShopifyAPI implements SessionAware, ClientAware // Grab the HMAC, remove it from the params, then sort the params for hashing $hmac = $params['hmac']; $params = array_filter($params, function ($v, $k) { - return in_array($k, ['code', 'shop', 'timestamp']); + return in_array($k, ['code', 'shop', 'timestamp', 'state', 'locale', 'nonce', 'protocol']); }, ARRAY_FILTER_USE_BOTH); ksort($params);
Add other potential HMAC parameters Shopify may have other parameters to be included in the HMAC calculation. Discussion: <URL>
ohmybrew_Basic-Shopify-API
train
php
059b8960622f2ee82776810a6d2acfc752214c06
diff --git a/core/src/main/java/com/google/bitcoin/core/Wallet.java b/core/src/main/java/com/google/bitcoin/core/Wallet.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/com/google/bitcoin/core/Wallet.java +++ b/core/src/main/java/com/google/bitcoin/core/Wallet.java @@ -515,9 +515,11 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi BlockChain.NewBlockType blockType) throws VerificationException { lock.lock(); try { - Transaction tx = pending.get(txHash); - if (tx == null) + Transaction tx = transactions.get(txHash); + if (tx == null) { + log.error("TX {} not found despite being sent to wallet", txHash); return; + } receive(tx, block, blockType); } finally { lock.unlock();
Wallet: another re-org fix.
bitcoinj_bitcoinj
train
java
f5d90a54a8a5b168ef39c25aad2f3f74042f0008
diff --git a/src/Controller/CsvMigrationUploadTrait.php b/src/Controller/CsvMigrationUploadTrait.php index <HASH>..<HASH> 100644 --- a/src/Controller/CsvMigrationUploadTrait.php +++ b/src/Controller/CsvMigrationUploadTrait.php @@ -40,9 +40,17 @@ trait CsvMigrationUploadTrait ] ); if ($this->{$this->name}->uploaddocuments->save($entity)) { + $assocFile = $this->{$this->name}->association('documentidfiles'); + $fileEntity = $this->{$this->name}->documentidfiles->newEntity([ + 'document_id' => $relatedEntity->get('id'), + 'file_id' => $entity->get('id') + ]); + if (!$this->{$this->name}->documentidfiles->save($fileEntity)) { + $this->Flash->error(__('Failed to update related entity.')); + } $relatedEntity = $this->{$this->name}->patchEntity($relatedEntity, [$uploadField => $entity->get('id')]); if (!$this->{$this->name}->save($relatedEntity)) { - $this->Flash->error(__('Failed to update related entity.')); + $this->Flash->error(__('Failed to update related to entity\'s field.')); } $this->Flash->success(__('File uploaded.')); } else {
Save to files module as well (task #<I>)
QoboLtd_cakephp-csv-migrations
train
php
ad2ca8e614c67a0958c54134f5464924fea6380d
diff --git a/src/Reports/Report.php b/src/Reports/Report.php index <HASH>..<HASH> 100644 --- a/src/Reports/Report.php +++ b/src/Reports/Report.php @@ -128,6 +128,8 @@ class Report /** * Set the during clause. * + * dates format 'Ymd' => e.g. 20170112,20171020 + * * @param $dates * @return $this * @throws \Edujugon\GoogleAds\Exceptions\Report @@ -137,6 +139,9 @@ class Report if(func_num_args() != 2) throw new \Edujugon\GoogleAds\Exceptions\Report('During clause only accepts 2 parameters. if dates, the format should be as follow: 20170112,20171020'); + if( ! empty(preg_grep("/ /", $dates)) ) + throw new \Edujugon\GoogleAds\Exceptions\Report('During clause only accepts the following format for dates: "Ymd" => e.g. 20170112,20171020'); + $this->during = func_get_args(); return $this;
Added new check in during clause. Google ads only accepts Ymd format in dates.
Edujugon_laravel-google-ads
train
php
e4864a11e47004731b57b6efe1d2b5928c20a4df
diff --git a/pkg/docker/config/config_unsupported.go b/pkg/docker/config/config_unsupported.go index <HASH>..<HASH> 100644 --- a/pkg/docker/config/config_unsupported.go +++ b/pkg/docker/config/config_unsupported.go @@ -3,18 +3,18 @@ package config -func getAuthFromKernelKeyring(registry string) (string, string, error) { +func getAuthFromKernelKeyring(registry string) (string, string, error) { //nolint:deadcode,unused return "", "", ErrNotSupported } -func deleteAuthFromKernelKeyring(registry string) error { +func deleteAuthFromKernelKeyring(registry string) error { //nolint:deadcode,unused return ErrNotSupported } -func setAuthToKernelKeyring(registry, username, password string) error { +func setAuthToKernelKeyring(registry, username, password string) error { //nolint:deadcode,unused return ErrNotSupported } -func removeAllAuthFromKernelKeyring() error { +func removeAllAuthFromKernelKeyring() error { //nolint:deadcode,unused return ErrNotSupported }
Fix build on non-Linux Annotate unused functions similarly to the config_linux.go variants.
containers_image
train
go
58909117bea6a8185df3335300426b8a49542235
diff --git a/crypto/key.go b/crypto/key.go index <HASH>..<HASH> 100644 --- a/crypto/key.go +++ b/crypto/key.go @@ -26,7 +26,6 @@ package crypto import ( "bytes" "crypto/ecdsa" - "crypto/elliptic" "encoding/json" "io" @@ -87,18 +86,16 @@ func (k *Key) UnmarshalJSON(j []byte) (err error) { } func NewKey(rand io.Reader) *Key { - randBytes := make([]byte, 32) + randBytes := make([]byte, 64) _, err := rand.Read(randBytes) if err != nil { panic("key generation: could not read from random source: " + err.Error()) } reader := bytes.NewReader(randBytes) - _, x, y, err := elliptic.GenerateKey(S256(), reader) + privateKeyECDSA, err := ecdsa.GenerateKey(S256(), reader) if err != nil { - panic("key generation: elliptic.GenerateKey failed: " + err.Error()) + panic("key generation: ecdsa.GenerateKey failed: " + err.Error()) } - privateKeyMarshalled := elliptic.Marshal(S256(), x, y) - privateKeyECDSA := ToECDSA(privateKeyMarshalled) id := uuid.NewRandom() key := &Key{
Use ECDSA instead of elliptic
ethereum_go-ethereum
train
go
94a60cbd1f9491263b404374909e3f3313a9795e
diff --git a/lib/transforms/inlineCssImagesWithLegacyFallback.js b/lib/transforms/inlineCssImagesWithLegacyFallback.js index <HASH>..<HASH> 100644 --- a/lib/transforms/inlineCssImagesWithLegacyFallback.js +++ b/lib/transforms/inlineCssImagesWithLegacyFallback.js @@ -10,7 +10,7 @@ var _ = require('underscore'), module.exports = function (queryObj, sizeThreshold) { return function inlineCssImagesWithLegacyFallback(assetGraph) { - assetGraph.findAssets(_.extend({type: 'Html'}, queryObj)).forEach(function (htmlAsset) { + assetGraph.findAssets(_.extend({type: 'Html', isInline: false}, queryObj)).forEach(function (htmlAsset) { assetGraph.findRelations({type: 'HtmlStyle', from: htmlAsset}).forEach(function (htmlStyle) { var cssAsset = htmlStyle.to, cssImages = assetGraph.findRelations({from: cssAsset, to: {isImage: true, isInline: false}}),
transforms.inlineCssImagesWithLegacyFallback: Default to non-inline Html assets to avoid processing HtmlStyle relations in existing conditional comments.
assetgraph_assetgraph
train
js
da5ae27eaaefb65284eefea3f0d3344003f81970
diff --git a/src/scs_core/aws/data/device_report.py b/src/scs_core/aws/data/device_report.py index <HASH>..<HASH> 100644 --- a/src/scs_core/aws/data/device_report.py +++ b/src/scs_core/aws/data/device_report.py @@ -3,11 +3,14 @@ Created on 26 Nov 2020 @author: Jade Page (Jade.Page@southcoastscience.com) """ + from collections import OrderedDict from scs_core.data.json import JSONable +# -------------------------------------------------------------------------------------------------------------------- + class DeviceReport(JSONable): diff --git a/src/scs_core/aws/data/email_list.py b/src/scs_core/aws/data/email_list.py index <HASH>..<HASH> 100644 --- a/src/scs_core/aws/data/email_list.py +++ b/src/scs_core/aws/data/email_list.py @@ -98,6 +98,13 @@ class EmailList(PersistentJSONable): # ---------------------------------------------------------------------------------------------------------------- + def emails(self, device_tag): + try: + return self.__email_list[device_tag] + except KeyError: + return None + + @property def email_list(self): return self.__email_list
Updated device_monitor.py
south-coast-science_scs_core
train
py,py
91097e4a1e4790c72a9fb6ece5ee49b5f886c67f
diff --git a/lib/jekyll_picture_tag/output_formats/img.rb b/lib/jekyll_picture_tag/output_formats/img.rb index <HASH>..<HASH> 100644 --- a/lib/jekyll_picture_tag/output_formats/img.rb +++ b/lib/jekyll_picture_tag/output_formats/img.rb @@ -16,20 +16,19 @@ module PictureTag add_srcset(img, srcset) add_sizes(img, srcset) - add_dimensions(img, srcset) img.attributes << PictureTag.html_attributes['parent'] + add_dimensions(img, srcset) + img end def add_dimensions(img, srcset) return unless PictureTag.preset['dimension_attributes'] - img.attributes << { - width: srcset.width_attribute, - height: srcset.height_attribute - } + img.width = srcset.width_attribute + img.height = srcset.height_attribute end end end
Ensure width and height are replaced instead of appended
robwierzbowski_jekyll-picture-tag
train
rb
7d230ae9bc463e68e5709a067a16b9013efdbe5c
diff --git a/lib/request_log_analyzer/output/html.rb b/lib/request_log_analyzer/output/html.rb index <HASH>..<HASH> 100644 --- a/lib/request_log_analyzer/output/html.rb +++ b/lib/request_log_analyzer/output/html.rb @@ -53,7 +53,7 @@ module RequestLogAnalyzer::Output rows = Array.new yield(rows) - @io << tag(:table, {:id => 'mytable', :cellspacing => 0}) do |content| + @io << tag(:table, {:class => 'rla-report-table', :cellspacing => 0}) do |content| if table_has_header?(columns) content << tag(:tr) do columns.map { |col| tag(:th, col[:title]) }.join("\n") @@ -102,7 +102,7 @@ module RequestLogAnalyzer::Output background: #CAE8EA; } - #mytable { + .rla-report-table { width: 700px; padding: 0; margin: 0; @@ -184,4 +184,4 @@ module RequestLogAnalyzer::Output end end end -end \ No newline at end of file +end
Ref #<I> - Changes html id to class
wvanbergen_request-log-analyzer
train
rb
9e86ecd8a9dea5822b649501de12bcd9ad6b74c1
diff --git a/lib/CLIntegracon/version.rb b/lib/CLIntegracon/version.rb index <HASH>..<HASH> 100644 --- a/lib/CLIntegracon/version.rb +++ b/lib/CLIntegracon/version.rb @@ -1,3 +1,3 @@ module CLIntegracon - VERSION = "0.2.0" + VERSION = "0.3.0" end
Bumped version to <I>
mrackwitz_CLIntegracon
train
rb
b79d2da16f1ef213efe093a5906091321e2489d1
diff --git a/test/Integration/QueryBuilderTest.php b/test/Integration/QueryBuilderTest.php index <HASH>..<HASH> 100644 --- a/test/Integration/QueryBuilderTest.php +++ b/test/Integration/QueryBuilderTest.php @@ -82,14 +82,14 @@ class QueryBuilderTest extends TestCase { $query = new Query(); $query->from(array('13:100', '13:101')) - ->orderBy('rid ASC') + ->orderBy('@rid ASC') ->orderBy('street DESC'); $result = $this->doQuery($query); $this->assertHttpStatus(200, $result); $this->assertFirstRid('13:100', $result); - $query->orderBy('rid DESC', false); + $query->orderBy('@rid DESC', false); $result = $this->doQuery($query); $this->assertHttpStatus(200, $result);
Fix tests when ordering by RIDs.
doctrine_orientdb-odm
train
php
f11c75f9266f0c43b12c3c65e26b4ea056179bd6
diff --git a/h2o-core/src/main/java/hex/grid/HyperSpaceWalker.java b/h2o-core/src/main/java/hex/grid/HyperSpaceWalker.java index <HASH>..<HASH> 100644 --- a/h2o-core/src/main/java/hex/grid/HyperSpaceWalker.java +++ b/h2o-core/src/main/java/hex/grid/HyperSpaceWalker.java @@ -300,7 +300,7 @@ public interface HyperSpaceWalker<MP extends Model.Parameters, C extends HyperSp protected int integerHash(int[] ar) { Integer[] hashMe = new Integer[ar.length]; for (int i = 0; i < ar.length; i++) - hashMe[i] = ar[i]; + hashMe[i] = ar[i] * _hyperParams.get(_hyperParamNames[i]).length; return Arrays.deepHashCode(hashMe); } }
Fix PUBDEV-<I> by avoiding hash collisions.
h2oai_h2o-3
train
java
4be9a40b8969f86b003c50c079e3f492ed924bbd
diff --git a/web/web_test.go b/web/web_test.go index <HASH>..<HASH> 100644 --- a/web/web_test.go +++ b/web/web_test.go @@ -15,6 +15,7 @@ package web import ( "context" + "fmt" "io/ioutil" "net/http" "net/http/httptest" @@ -115,7 +116,7 @@ func TestReadyAndHealthy(t *testing.T) { go func() { err := webHandler.Run(context.Background()) if err != nil { - t.Fatalf("Can't start web handler:%s", err) + panic(fmt.Sprintf("Can't start web handler:%s", err)) } }() @@ -211,7 +212,7 @@ func TestRoutePrefix(t *testing.T) { go func() { err := webHandler.Run(context.Background()) if err != nil { - t.Fatalf("Can't start web handler:%s", err) + panic(fmt.Sprintf("Can't start web handler:%s", err)) } }()
fatalf is not thread safe so using panic instead (#<I>)
prometheus_prometheus
train
go
5b7c4c73123281387a27476019950d18e5e48315
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ setup( author = 'Joshua Ehrlich', author_email = 'jehrlich@linkedin.com', url = 'http://github.com/linkedin/zopkio', - download_url = 'https://github.com/linkedin/zopkio/tarball/0.1.5', + download_url = 'https://github.com/linkedin/zopkio/tarball/0.1.6', license = 'Apache', packages = ['zopkio', 'zopkio.web_resources'], package_dir = { 'zopkio' : 'zopkio'}, diff --git a/zopkio/__init__.py b/zopkio/__init__.py index <HASH>..<HASH> 100644 --- a/zopkio/__init__.py +++ b/zopkio/__init__.py @@ -19,4 +19,4 @@ """Zopkio test framework""" -__version__ = '0.1.5' +__version__ = '0.1.6'
packaging criccomini's changes
linkedin_Zopkio
train
py,py
b0fdd2d106f668fe1fbe2429d16365b944ddedef
diff --git a/duniterpy/documents/__init__.py b/duniterpy/documents/__init__.py index <HASH>..<HASH> 100644 --- a/duniterpy/documents/__init__.py +++ b/duniterpy/documents/__init__.py @@ -5,5 +5,6 @@ from .peer import endpoint, BMAEndpoint, UnknownEndpoint, Peer, SecuredBMAEndpoi from .transaction import SimpleTransaction, Transaction, InputSource, OutputSource, \ SIGParameter, Unlock, UnlockParameter from .document import Document, MalformedDocumentError +from .crc_pubkey import CRCPubkey from . import constants
Import CRCPubkey from documents
duniter_duniter-python-api
train
py
ed7de15d01f67b3ddcc86759bd46f0d114cd747e
diff --git a/stage0/run.go b/stage0/run.go index <HASH>..<HASH> 100644 --- a/stage0/run.go +++ b/stage0/run.go @@ -443,11 +443,6 @@ func setupAppImage(cfg RunConfig, appName types.ACName, img types.Hash, cdir str } } - err := os.MkdirAll(filepath.Join(ad, "rootfs/tmp"), 0777) - if err != nil { - return fmt.Errorf("error creating tmp directory: %v", err) - } - return nil }
stage0: don't create app/tmp directory This was creating the apps' /tmp directory with the wrong permissions. We're already creating it in prepare-app with the right ones.
rkt_rkt
train
go
a3721d25d915236f5040efacb5537935dbb82479
diff --git a/version.php b/version.php index <HASH>..<HASH> 100644 --- a/version.php +++ b/version.php @@ -5,7 +5,7 @@ // database to determine whether upgrades should // be performed (see lib/db/*.php) -$version = 2004091100; // The current version is a date (YYYYMMDDXX) +$version = 2004091700; // The current version is a date (YYYYMMDDXX) $release = "1.5 unstable development"; // User-friendly version number
Upgraded to cover things like new upload files class
moodle_moodle
train
php
6c9ea71e24c361e5b91c05ea11af1af567dfad36
diff --git a/tests/command_functions/GetMemoryLimitInBytesTest.php b/tests/command_functions/GetMemoryLimitInBytesTest.php index <HASH>..<HASH> 100644 --- a/tests/command_functions/GetMemoryLimitInBytesTest.php +++ b/tests/command_functions/GetMemoryLimitInBytesTest.php @@ -3,12 +3,19 @@ namespace Psalm\Tests\Functions; use function getMemoryLimitInBytes; use function ini_set; +use function ini_get; class GetMemoryLimitInBytesTest extends \Psalm\Tests\TestCase { + /** + * @var string + */ + private $previousLimit; + public function setUp(): void { require_once 'src/command_functions.php'; + $this->previousLimit = (string)ini_get('memory_limit'); parent::setUp(); } @@ -56,4 +63,10 @@ class GetMemoryLimitInBytesTest extends \Psalm\Tests\TestCase ini_set('memory_limit', (string)$setting); $this->assertSame($expectedBytes, getMemoryLimitInBytes(), 'Memory limit in bytes does not fit setting'); } + + public function tearDown(): void + { + ini_set('memory_limit', $this->previousLimit); + parent::tearDown(); + } }
Ensured resetting previous memory limit in after test has run.
vimeo_psalm
train
php
67d6e167eabd51dec4ab4ac40ff23d11722e1173
diff --git a/src/Result.php b/src/Result.php index <HASH>..<HASH> 100644 --- a/src/Result.php +++ b/src/Result.php @@ -133,11 +133,11 @@ class Result */ public function hasErrors() { - return count($this->exceptions) > 0; + return $this->errorCount > 0; } /** - * @return ExceptionInterface[] + * @return \SplObjectStorage */ public function getExceptions() {
Correct return type, reusing variable instead of recount
portphp_portphp
train
php
7dc71e901d156a9df2ba75ec9c55b79e60910de1
diff --git a/src/Negotiation/FormatNegotiator.php b/src/Negotiation/FormatNegotiator.php index <HASH>..<HASH> 100644 --- a/src/Negotiation/FormatNegotiator.php +++ b/src/Negotiation/FormatNegotiator.php @@ -8,7 +8,7 @@ namespace Negotiation; class FormatNegotiator extends Negotiator { // https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/Request.php - private $formats = array( + protected $formats = array( 'html' => array('text/html', 'application/xhtml+xml'), 'txt' => array('text/plain'), 'js' => array('application/javascript', 'application/x-javascript', 'text/javascript'),
Made $formats protected One can now extend the class and overwrite all built-in formats, with a app-specific smaller/restricted set of possible mime types.
willdurand_Negotiation
train
php
a20d19217d136461b78d9a53c167aab47fc3adba
diff --git a/plinq.go b/plinq.go index <HASH>..<HASH> 100644 --- a/plinq.go +++ b/plinq.go @@ -68,7 +68,7 @@ func (q ParallelQuery) AsOrdered() (p ParallelQuery) { // See AsOrdered() for remarks. func (q ParallelQuery) AsUnordered() (p ParallelQuery) { p = q.copyMetaWithValues() - p.ordered = true + p.ordered = false return }
fix: make AsUnordered really unordered
ahmetb_go-linq
train
go
24054307f2ec7895da3c44f90cc522b22a994cdc
diff --git a/lib/compiler.js b/lib/compiler.js index <HASH>..<HASH> 100644 --- a/lib/compiler.js +++ b/lib/compiler.js @@ -63,7 +63,7 @@ module.exports = function compiler(source) { const query = loaderUtils.getOptions(this) || {}; const callback = this.async(); const spriteName = query.defaultName || 'sprite'; - basePATH = this.options.output.path; + basePATH = this._compilation.options.output.path; const padding = query.padding || 20; const queryParam = query.queryParam || 'sprite'; const filter = query.filter || 'all'; diff --git a/lib/main.js b/lib/main.js index <HASH>..<HASH> 100644 --- a/lib/main.js +++ b/lib/main.js @@ -1,6 +1,5 @@ const compiler = require('./compiler.js'); module.exports = function loader(source) { - this.cacheable && this.cacheable(); const result = compiler.call(this, source); return result; };
:feat: 适配webpack4
vusion_svg-classic-sprite-loader
train
js,js
4755f21e2d6ae8913884ffc7d92c9d5931bf6e8f
diff --git a/lib/traject/command_line.rb b/lib/traject/command_line.rb index <HASH>..<HASH> 100644 --- a/lib/traject/command_line.rb +++ b/lib/traject/command_line.rb @@ -33,14 +33,8 @@ module Traject # Returns true on success or false on failure; may also raise exceptions; # may also exit program directly itself (yeah, could use some normalization) def execute - if options[:version] - self.console.puts "traject version #{Traject::VERSION}" - return - end - if options[:help] - self.console.puts slop.help - return - end + # Do bundler setup FIRST to try and initialize all gems from gemfile + # if requested. # have to use Slop object to tell diff between # no arg supplied and no option -g given at all @@ -48,11 +42,21 @@ module Traject require_bundler_setup(options[:Gemfile]) end + # We require them here instead of top of file, # so we have done bundler require before we require these. require 'traject' require 'traject/indexer' + if options[:version] + self.console.puts "traject version #{Traject::VERSION}" + return + end + if options[:help] + self.console.puts slop.help + return + end + (options[:load_path] || []).each do |path| $LOAD_PATH << path unless $LOAD_PATH.include? path
do bundler setup absolutely first, don't try to do version etc until requires happen
traject_traject
train
rb
7d5b1137760084d647c7a7df02f97e50bb28b7a4
diff --git a/app-vite/lib/quasar-config-file.js b/app-vite/lib/quasar-config-file.js index <HASH>..<HASH> 100644 --- a/app-vite/lib/quasar-config-file.js +++ b/app-vite/lib/quasar-config-file.js @@ -307,7 +307,8 @@ class QuasarConfFile { metaConf } - if (this.#ctx.dev) { + // if DEV and not BEX mode (BEX does not use a regular devserver) + if (this.#ctx.dev && this.#ctx.mode.bex !== true) { if (this.#opts.host) { cfg.devServer.host = this.#opts.host }
feat(app-vite): do not parse and configure devserver options when in BEX mode (not needed)
quasarframework_quasar
train
js
708c5a97405464af4da9c67478dafe2f27e2075f
diff --git a/core/vmutils/src/test/java/org/arakhne/afc/vmutil/FileSystemTest.java b/core/vmutils/src/test/java/org/arakhne/afc/vmutil/FileSystemTest.java index <HASH>..<HASH> 100644 --- a/core/vmutils/src/test/java/org/arakhne/afc/vmutil/FileSystemTest.java +++ b/core/vmutils/src/test/java/org/arakhne/afc/vmutil/FileSystemTest.java @@ -277,7 +277,7 @@ public class FileSystemTest { URLHandlerUtil.installArakhneHandlers(); try { File f1 = new File("/toto"); //$NON-NLS-1$ - URL u1 = f1.toURI().toURL(); + URL u1 = new URL("file:/toto"); //$NON-NLS-1$ URL u2 = Resources.getResource("org/arakhne/afc/vmutil/test.txt"); //$NON-NLS-1$ URL u2e = new URL("resource:org/arakhne/afc/vmutil/test.txt"); //$NON-NLS-1$ File f2 = FileSystem.convertURLToFile(u2);
[vmutils] Fixing unit tests for Windows platform.
gallandarakhneorg_afc
train
java
ac0b62680f7ba525a287bdecb7a5e67394294d3f
diff --git a/pkg/model/openstackmodel/firewall.go b/pkg/model/openstackmodel/firewall.go index <HASH>..<HASH> 100644 --- a/pkg/model/openstackmodel/firewall.go +++ b/pkg/model/openstackmodel/firewall.go @@ -337,7 +337,6 @@ func (b *FirewallModelBuilder) addCNIRules(c *fi.ModelBuilderContext, sgMap map[ udpPorts = append(udpPorts, 6783) tcpPorts = append(tcpPorts, 6783) udpPorts = append(udpPorts, 6784) - protocols = append(protocols, ProtocolIPEncap) } if b.Cluster.Spec.Networking.Flannel != nil { @@ -345,7 +344,6 @@ func (b *FirewallModelBuilder) addCNIRules(c *fi.ModelBuilderContext, sgMap map[ case "", "udp": udpPorts = append(udpPorts, 8285) case "vxlan": - protocols = append(protocols, ProtocolIPEncap) udpPorts = append(udpPorts, 8472) default: glog.Warningf("unknown flannel networking backend %q", b.Cluster.Spec.Networking.Flannel.Backend)
Omit protocols in Openstack CNI Rules
kubernetes_kops
train
go
8a7b66d69df2bc4e257726efc3a756d6c6369fe5
diff --git a/recorder.go b/recorder.go index <HASH>..<HASH> 100644 --- a/recorder.go +++ b/recorder.go @@ -387,6 +387,10 @@ func (r *Recorder) reconnectClient(now time.Time) { } } +func (r *Recorder) TracerID() uint64 { + return r.tracerID +} + func (r *Recorder) Close() error { r.lock.Lock() conn := r.conn
expose TracerID (#<I>)
lightstep_lightstep-tracer-go
train
go
84954c8860d987fced8da031f0f6fdd03612b6f2
diff --git a/src/util/Constants.js b/src/util/Constants.js index <HASH>..<HASH> 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -21,8 +21,9 @@ exports.Package = require('../../package.json'); * @property {number} [restWsBridgeTimeout=5000] Maximum time permitted between REST responses and their * corresponding websocket events * @property {WSEventType[]} [disabledEvents] An array of disabled websocket events. Events in this array will not be - * processed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on - * large-scale bots. + * processed, potentially resulting in performance improvements for larger bots. Only disable events you are + * 100% certain you don't need, as many are important, but not obviously so. The safest one to disable with the + * most impact is typically `TYPING_START`. * @property {WebsocketOptions} [ws] Options for the websocket */ exports.DefaultOptions = {
Add notice about disabling events (#<I>) * Add notice about disabling events * fix english * Update Constants.js * Update Constants.js * Update Constants.js * Update Constants.js
discordjs_discord.js
train
js
ec56eaaffe443f10b11baa11c15ee4d4b5e7a349
diff --git a/test/walk-test.js b/test/walk-test.js index <HASH>..<HASH> 100644 --- a/test/walk-test.js +++ b/test/walk-test.js @@ -41,6 +41,23 @@ require('vows').describe('walk()').addBatch({ } }, - 'behaves like /bin/find': 'TBD', - 'walking through directory with given file mask': 'TBD' + 'walking through directory with pattern': { + topic: function () { + var callback = this.callback, result; + + result = 0; + FsTools.walk(SANDBOX, /file$/, function (path, stats, next) { + result += 1; + next(); + }, function (err) { + callback(err, result); + }); + }, + 'calls itertor on matching entries only': function (err, result) { + Assert.ok(!err, 'Has no errors'); + Assert.equal(result, 4); + } + }, + + 'behaves like GNU find': 'TBD', }).export(module);
Adds test of pattern matcher for walk()
Trott_fs-tools
train
js
69cf7f6eec152dbc5964b9e796324eef56fe0db2
diff --git a/src/main/java/net/dv8tion/jda/core/entities/impl/JDAImpl.java b/src/main/java/net/dv8tion/jda/core/entities/impl/JDAImpl.java index <HASH>..<HASH> 100644 --- a/src/main/java/net/dv8tion/jda/core/entities/impl/JDAImpl.java +++ b/src/main/java/net/dv8tion/jda/core/entities/impl/JDAImpl.java @@ -27,6 +27,7 @@ import net.dv8tion.jda.core.audio.AudioWebSocket; import net.dv8tion.jda.core.audio.factory.DefaultSendFactory; import net.dv8tion.jda.core.audio.factory.IAudioSendFactory; import net.dv8tion.jda.core.entities.*; +import net.dv8tion.jda.core.events.StatusChangeEvent; import net.dv8tion.jda.core.exceptions.AccountTypeException; import net.dv8tion.jda.core.exceptions.RateLimitedException; import net.dv8tion.jda.core.hooks.IEventManager; @@ -135,8 +136,7 @@ public class JDAImpl implements JDA Status oldStatus = this.status; this.status = status; - //TODO: Fire status change event. -// eventManager.handle(new StatusChangeEvent(this, status, oldStatus)); + eventManager.handle(new StatusChangeEvent(this, status, oldStatus)); } }
Reenabled the StatusChangeEvent
DV8FromTheWorld_JDA
train
java
6bf8be0302220355ed54817a7e07b0cf4e4e0c4a
diff --git a/test/http_streaming_response_test.rb b/test/http_streaming_response_test.rb index <HASH>..<HASH> 100644 --- a/test/http_streaming_response_test.rb +++ b/test/http_streaming_response_test.rb @@ -4,7 +4,7 @@ require "rack/http_streaming_response" class HttpStreamingResponseTest < Test::Unit::TestCase def setup - host, req = "trix.pl", Net::HTTP::Get.new("/") + host, req = "www.trix.pl", Net::HTTP::Get.new("/") @response = Rack::HttpStreamingResponse.new(req, host) end diff --git a/test/rack_proxy_test.rb b/test/rack_proxy_test.rb index <HASH>..<HASH> 100644 --- a/test/rack_proxy_test.rb +++ b/test/rack_proxy_test.rb @@ -4,7 +4,7 @@ require "rack/proxy" class RackProxyTest < Test::Unit::TestCase class TrixProxy < Rack::Proxy def rewrite_env(env) - env["HTTP_HOST"] = "trix.pl" + env["HTTP_HOST"] = "www.trix.pl" env end end
fix broken tests that were depending on trix.pl url to <I> instead of <I>
ncr_rack-proxy
train
rb,rb
c013661880d0682521813f9374e16e8704636e7e
diff --git a/cache.go b/cache.go index <HASH>..<HASH> 100644 --- a/cache.go +++ b/cache.go @@ -397,7 +397,8 @@ type SimpleCache struct { } func (s *SimpleCache) Fetch(id uint64) (*Bitmap, bool) { - return s.cache[id] + m, ok := s.cache[id] + return m, ok } func (s *SimpleCache) Add(id uint64, b *Bitmap) {
bug fix in SimpleCache.Fetch (really just reverting my change)
pilosa_pilosa
train
go
226bbc5b8103f62e3b8d4106e11088596ca1d0a8
diff --git a/src/presenters/Whip_WPMessagePresenter.php b/src/presenters/Whip_WPMessagePresenter.php index <HASH>..<HASH> 100644 --- a/src/presenters/Whip_WPMessagePresenter.php +++ b/src/presenters/Whip_WPMessagePresenter.php @@ -48,12 +48,12 @@ class Whip_WPMessagePresenter implements Whip_MessagePresenter { /* translators: 1: is a link to dismiss url 2: closing link tag */ $dismissButton = sprintf( - __( '<p>%1$sRemind me again after 4 weeks.%2$s</p>', 'wordpress' ), + __( '%1$sRemind me again in 4 weeks.%2$s', 'wordpress' ), '<a href="' . $dismissListener->getDismissURL() . '">', '</a>' ); - printf( '<div class="error">%1$s<p>%2$s</p></div>', $this->kses( $this->message->body() ), $dismissButton ); + printf( '<div class="error"><p>%1$s</p><p>%2$s</p></div>', $this->kses( $this->message->body() ), $dismissButton ); } /**
Move the paragraph out of the translation Change the `after` to an `in`
Yoast_whip
train
php
2d14b00cbb2112f32d9118d31d99d6dc65cef983
diff --git a/test/monitor/start-stop-test.js b/test/monitor/start-stop-test.js index <HASH>..<HASH> 100644 --- a/test/monitor/start-stop-test.js +++ b/test/monitor/start-stop-test.js @@ -1,5 +1,5 @@ /* - * simple-test.js: Simple tests for using Monitor instances. + * start-stop-test.js: Start/Stop tests for using Monitor instances. * * (C) 2010 Nodejitsu Inc. * MIT LICENCE @@ -38,20 +38,23 @@ vows.describe('forever-monitor/monitor/start-stop').addBatch({ var that = this; timer = setTimeout(function () { that.callback(new Error('Child did not die when killed by forever'), child); - }, 6000); + }, 8000); process.on('uncaughtException', function(err) { - console.log('Caught exception: ' + err); + that.callback(err, child) }); - setTimeout(function(){ + child.start(); + setTimeout(function() { child.stop(); - setTimeout(function(){ + setTimeout(function() { child.restart(); - }, 1000) - }, 2000) - - child.start(); + child.once("restart", function(){ + child.stop() + }) + child.once("exit", function(){ that.callback(null, child) }) + }, 2000); + }, 1000); }, "should restart the child process": function (err, child) { assert.isNull(err)
better monitor/start-stop-test * test name renamed in header comment section * better test case implementation covering: start -> stop -> restart and reproducing issue #<I>
foreverjs_forever-monitor
train
js
5d9e10a74b86e5f4cb0b6c9738d07b3f5d31700e
diff --git a/getgauge/refactor.py b/getgauge/refactor.py index <HASH>..<HASH> 100644 --- a/getgauge/refactor.py +++ b/getgauge/refactor.py @@ -29,7 +29,7 @@ def refactor_impl(decorator, func, request): def get_param_name(prefix, param_name): if sys.version_info < (3, 0): - return prefix + "".join([s for s in param_name if re.match(r'^[a-z_][a-z0-9_]*$', s, re.I) is not None]) + return prefix + "".join([s for s in param_name if re.match(r'^[a-z_][a-z_]*$', s, re.I) is not None or s.isalnum()]) return prefix + "".join([s for s in param_name if s.isidentifier() or s.isalnum()])
Adding refactoring support for python2
getgauge_gauge-python
train
py
38bc08e2d5998a0beb4e948186096aaf86537785
diff --git a/lib/Less/Tree/Import.php b/lib/Less/Tree/Import.php index <HASH>..<HASH> 100755 --- a/lib/Less/Tree/Import.php +++ b/lib/Less/Tree/Import.php @@ -238,6 +238,10 @@ class Less_Tree_Import extends Less_Tree{ $full_path = Less_Environment::normalizePath($path); $uri = Less_Environment::normalizePath(dirname($rooturi.$evald_path)); return array( $full_path, $uri ); + } elseif( file_exists($path.'.less') ){ + $full_path = Less_Environment::normalizePath($path.'.less'); + $uri = Less_Environment::normalizePath(dirname($rooturi.$evald_path.'.less')); + return array( $full_path, $uri ); } } }
Fix: Import Less files even if they do not have the .less extension See <URL>
oyejorge_less.php
train
php
dd2c935cfe305e564898629c4e4c663f52f7ab76
diff --git a/src/Client.php b/src/Client.php index <HASH>..<HASH> 100644 --- a/src/Client.php +++ b/src/Client.php @@ -5,6 +5,7 @@ namespace Billplz; use InvalidArgumentException; use Psr\Http\Message\StreamInterface; use Http\Discovery\HttpClientDiscovery; +use Psr\Http\Message\ResponseInterface; use Http\Discovery\MessageFactoryDiscovery; use Http\Client\Common\HttpMethodsClient as HttpClient; @@ -205,12 +206,24 @@ class Client { list($headers, $body) = $this->prepareRequestPayloads($headers, $body); - return new Response( + return $this->responseWith( $this->http->send($method, $uri, $headers, $body) ); } /** + * Resolve the responder class. + * + * @param \Psr\Http\Message\ResponseInterface $response + * + * @return \Billplz\Response + */ + protected function responseWith(ResponseInterface $response) + { + return new Response($response); + } + + /** * Prepare request headers. * * @param array $headers
Allow dev to extends Client and modify Response class.
jomweb_billplz
train
php
e36cebd6cf1cee7445079bb58d44af56c34327d2
diff --git a/src/listeners.js b/src/listeners.js index <HASH>..<HASH> 100644 --- a/src/listeners.js +++ b/src/listeners.js @@ -76,7 +76,7 @@ export default class ListenerGenerator { if (isObject(rules)) { Object.keys(rules).forEach(r => { // eslint-disable-line if (/confirmed|after|before/.test(r)) { - fieldName = rules[r]; + fieldName = rules[r].split(',')[0]; return false; }
#<I> - "after" validation rule new feature problem
baianat_vee-validate
train
js
5fc5dc0190fd2141ba6033c244bf1fc1b74b5167
diff --git a/Gruntfile.js b/Gruntfile.js index <HASH>..<HASH> 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -68,6 +68,7 @@ module.exports = function (grunt) { wp_deploy: { deploy: { options: { + svn_user: 'johnbillion', plugin_slug: '<%= pkg.name %>', build_dir: 'build', assets_dir: 'assets-wp-repo'
Specify the svn user to use during deployment.
johnbillion_query-monitor
train
js
24af5eb5e1a8849d52f9f4a89e45990098fb7057
diff --git a/spyder/plugins/help/plugin.py b/spyder/plugins/help/plugin.py index <HASH>..<HASH> 100644 --- a/spyder/plugins/help/plugin.py +++ b/spyder/plugins/help/plugin.py @@ -294,9 +294,9 @@ class Help(SpyderPluginWidget): cb = self._last_editor_cb if cb is None: if self.is_plain_text_mode(): - self.plain_text.clear() + self.switch_to_plain_text() else: - self.rich_text.clear() + self.switch_to_rich_text() else: func = cb[0] args = cb[1:]
Fix switch to editor in combo at the start
spyder-ide_spyder
train
py
16d39d11076c29d67bb45112ea8e137b03d33d1a
diff --git a/ospd/ospd.py b/ospd/ospd.py index <HASH>..<HASH> 100644 --- a/ospd/ospd.py +++ b/ospd/ospd.py @@ -765,10 +765,17 @@ class OSPDaemon: if self.get_scan_status(scan_id) == ScanStatus.RUNNING: return 0 + # Don't delete the scan until the process stops + exitcode = None try: - del self.scan_processes[scan_id] + self.scan_processes[scan_id].join() + exitcode = self.scan_processes[scan_id].exitcode except KeyError: logger.debug('Scan process for %s not found', scan_id) + + if exitcode or exitcode == 0: + del self.scan_processes[scan_id] + return self.scan_collection.delete_scan(scan_id) def get_scan_results_xml(
Don't delete the scan until the scan and the process are already stopped
greenbone_ospd
train
py
8e84deb60c8c19acd9fa6ace8942ec831ed6a241
diff --git a/lib/puppet.rb b/lib/puppet.rb index <HASH>..<HASH> 100644 --- a/lib/puppet.rb +++ b/lib/puppet.rb @@ -40,9 +40,6 @@ module Puppet # the hash that determines how our system behaves @@settings = Puppet::Settings.new - # The services running in this process. - @services ||= [] - require 'puppet/util/logging' extend Puppet::Util::Logging diff --git a/spec/unit/application/agent_spec.rb b/spec/unit/application/agent_spec.rb index <HASH>..<HASH> 100755 --- a/spec/unit/application/agent_spec.rb +++ b/spec/unit/application/agent_spec.rb @@ -558,7 +558,6 @@ describe Puppet::Application::Agent do Puppet[:onetime] = true @puppetd.options[:client] = :client @puppetd.options[:detailed_exitcodes] = false - Puppet.stubs(:newservice) end it "should exit if no defined --client" do
(maint) remove dead services code from puppet.rb Commit c0fcb<I> removed all uses of the @services instance variable from Puppet as well as the Puppet.newservice method; we no longer need the instance variable or test stub.
puppetlabs_puppet
train
rb,rb
87caa0d6ff0d15356536942e31cabe04193a4d1f
diff --git a/cherrypy/_cphttpserver.py b/cherrypy/_cphttpserver.py index <HASH>..<HASH> 100644 --- a/cherrypy/_cphttpserver.py +++ b/cherrypy/_cphttpserver.py @@ -91,8 +91,16 @@ class CherryHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): wfile = self.wfile wfile.write("%s %s\r\n" % (self.protocol_version, cherrypy.response.status)) + has_close_conn = False for name, value in cherrypy.response.headers: wfile.write("%s: %s\r\n" % (name, value)) + if name.lower == 'connection' and value.lower == 'close': + has_close_conn = True + if not has_close_conn: + # This server doesn't support persistent connections yet, so we + # must add a "Connection: close" header to tell the client that + # we will close the connection when we're done sending output. + wfile.write("Connection: close\r\n") wfile.write("\r\n") try: @@ -105,6 +113,9 @@ class CherryHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): if self.command == "POST": self.connection = self.request + + # Close the conn, since we do not yet support persistent connections. + self.close_connection = 1 def log_message(self, format, *args): """ We have to override this to use our own logging mechanism """
The native HTTP server now handles <I> responses by explicitly closing the connection on each request, and sending "Connection: close".
cherrypy_cheroot
train
py
86a950175098d17cc1334ddf73f1364a6e8450fa
diff --git a/lib/rib/runner.rb b/lib/rib/runner.rb index <HASH>..<HASH> 100644 --- a/lib/rib/runner.rb +++ b/lib/rib/runner.rb @@ -169,7 +169,7 @@ module Rib::Runner if path == '' Rib.warn( "Can't find #{bin} in $PATH. Please make sure it is installed,", - "or is there any typo? You can try this to install it:\n" , + "or is there any typo? You can try this to install it:\n" , " gem install #{bin}") else Rib.config[:name] = bin @@ -179,5 +179,7 @@ module Rib::Runner def which_bin bin # handle windows here `which #{bin}`.strip + rescue Errno::ENOENT # probably a windows platform, try where + `where #{bin}`.lines.first.strip end end
try to make rib all work on windows
godfat_rib
train
rb
7f3072b01689ed9a28e0bb0d9363e42335a5271f
diff --git a/service/command.go b/service/command.go index <HASH>..<HASH> 100644 --- a/service/command.go +++ b/service/command.go @@ -33,6 +33,12 @@ func (c *Config) AddCommand(cmd *Command) { c.service.registerCommand(cmd) } +// SetDefaultCommand sets the given command to be the default when +// the app is started without a command. +func (c *Config) SetDefaultCommand(keyword string) { + c.service.defaultCommand = keyword +} + // CommandContext is passed to the command when it is run, // containing an array of parsed arguments. type CommandContext struct { diff --git a/service/service.go b/service/service.go index <HASH>..<HASH> 100644 --- a/service/service.go +++ b/service/service.go @@ -30,6 +30,8 @@ type Service struct { configs map[string]*Config commands map[string]*Command + defaultCommand string + started sync.WaitGroup running sync.WaitGroup } @@ -116,7 +118,10 @@ func (s *Service) Run() { flag.Usage = s.Usage flag.Parse() args := flag.Args() - if len(args) < 1 { + if len(args) == 0 && s.defaultCommand != "" { + args = append([]string{s.defaultCommand}, args...) + } + if len(args) == 0 { s.Usage() BootPrintln() return
service: Add SetDefaultCommand.
octavore_naga
train
go,go
015274e88c9ad44304a217f660522c542d566e1e
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -958,7 +958,7 @@ AFRAME.registerComponent('geojson-texture', { this.el.emit(CANVAS_GENERATED_EVENT, {}); }, getStrokeColorOr: function (feature, defaultColor) { - if (feature.properties.stroke) { + if (feature.properties && feature.properties.stroke) { const color = feature.properties.stroke; const opacity = feature.properties['stroke-opacity'] || 1.0; @@ -967,7 +967,7 @@ AFRAME.registerComponent('geojson-texture', { return defaultColor; }, getFillColorOr: function (feature, defaultColor) { - if (feature.properties.fill) { + if (feature.properties && feature.properties.fill) { const color = feature.properties.fill; const opacity = feature.properties['fill-opacity'] || 0.6; @@ -976,7 +976,7 @@ AFRAME.registerComponent('geojson-texture', { return defaultColor; }, getLineWidthOr: function (feature, defaultWidth) { - return feature.properties['stroke-width'] || defaultWidth; + return (feature.properties && feature.properties['stroke-width']) || defaultWidth; }, _getColorStyle: function (color, opacity) { const r = (color.r * 255) | 0;
Fix geojson-texture so it can handle geojson features without properties
mattrei_aframe-geojson-component
train
js
988d4f56316e3b13d10c124ce1fc0f85a64dce2b
diff --git a/flight/Engine.php b/flight/Engine.php index <HASH>..<HASH> 100644 --- a/flight/Engine.php +++ b/flight/Engine.php @@ -133,10 +133,11 @@ class Engine { * @param int $errstr Error string * @param int $errfile Error file name * @param int $errline Error file line number + * @throws \ErrorException */ public function handleError($errno, $errstr, $errfile, $errline) { if ($errno & error_reporting()) { - $this->handleException(new \ErrorException($errstr, $errno, 0, $errfile, $errline)); + throw new \ErrorException($errstr, $errno, 0, $errfile, $errline); } }
Exception should be thrown and not handled.
mikecao_flight
train
php
f317ba15bb4a368597ae973aa24e9c53323e4cb1
diff --git a/lib/github-backup.rb b/lib/github-backup.rb index <HASH>..<HASH> 100644 --- a/lib/github-backup.rb +++ b/lib/github-backup.rb @@ -33,7 +33,7 @@ class Github::Backup def execute backup_all - rescue Octokit::Unauthorized => e + rescue Octokit::Unauthorized puts "Github API authentication failed." puts "Please add a [github] section to your ~/.gitconfig" puts " See: http://github.com/guides/tell-git-your-user-name-and-email-address"
Don’t need to map Octokit::Unauthorized exceptions
ddollar_github-backup
train
rb
559c53902ff6c315cc277fa36ff59fe49c4294d1
diff --git a/index.js b/index.js index <HASH>..<HASH> 100755 --- a/index.js +++ b/index.js @@ -418,7 +418,7 @@ function createFsWatchInstance(item, options, callback, errHandler, emitRaw) { callback(item); emitRaw(rawEvent, path, {watchedPath: item}); if (path && item !== path) { - fsWatchBroadcast(sysPath.resolve(path), 'listeners', path); + fsWatchBroadcast(sysPath.resolve(item, path), 'listeners', path); } }; try {
Fix resolution of relative paths gh-<I>
paulmillr_chokidar
train
js
25712c839043436cd923f6868c3dcc3af0faa492
diff --git a/lib/algoliasearch/utilities.rb b/lib/algoliasearch/utilities.rb index <HASH>..<HASH> 100644 --- a/lib/algoliasearch/utilities.rb +++ b/lib/algoliasearch/utilities.rb @@ -13,7 +13,7 @@ module AlgoliaSearch def reindex_all_models get_model_classes.each do |klass| - klass.reindex! + klass.reindex end end end
Use a temporary index to reindex instead of the inplace one.
algolia_algoliasearch-rails
train
rb
e5a5e55dce3e1a42579890ae7ca6cc6634b4b4ca
diff --git a/pycbc/ahope/legacy_ihope.py b/pycbc/ahope/legacy_ihope.py index <HASH>..<HASH> 100644 --- a/pycbc/ahope/legacy_ihope.py +++ b/pycbc/ahope/legacy_ihope.py @@ -190,7 +190,14 @@ class LegacySplitBankJob(Job): The node to run the job """ node = LegacyAnalysisNode(self) + # FIXME: This is a hack because SplitBank fails if given an input file + # whose path contains the character '-' or if the input file is not in + # the same directory as the output. Therefore we just set the path to + # be the local path + fullPath = bank.cache_entries[0].path + bank.cache_entries[0].path = os.path.basename(fullPath) node.add_input(bank, opt='bank-file') + bank.cache_entries[0].path = fullPath # Get the output (taken from inspiral.py) url_list = []
Adding a hack to SplitBank class so that it gets fed the input as a basename, not a full path. SplitBank will fail if the "-" character appears in the directory name, and start doing potentially horrible things if multiple "-" characters appear.
gwastro_pycbc
train
py
eb090c2ba29050c6d8fa9e2a8923996ce7ffc62d
diff --git a/tests/contrib/test_iterio.py b/tests/contrib/test_iterio.py index <HASH>..<HASH> 100644 --- a/tests/contrib/test_iterio.py +++ b/tests/contrib/test_iterio.py @@ -18,6 +18,7 @@ class TestIterO(object): def test_basic_native(self): io = IterIO(["Hello", "World", "1", "2", "3"]) + io.seek(0) assert io.tell() == 0 assert io.read(2) == "He" assert io.tell() == 2 diff --git a/werkzeug/contrib/iterio.py b/werkzeug/contrib/iterio.py index <HASH>..<HASH> 100644 --- a/werkzeug/contrib/iterio.py +++ b/werkzeug/contrib/iterio.py @@ -258,7 +258,7 @@ class IterO(IterIO): raise IOError('Invalid argument') buf = [] try: - tmp_end_pos = len(self._buf) + tmp_end_pos = len(self._buf or '') while pos > tmp_end_pos: item = next(self._gen) tmp_end_pos += len(item)
fix IterO.seek on newly created IterO object
pallets_werkzeug
train
py,py
70c48fd5f5bf2c80c97b502f172dd3abe0e1e926
diff --git a/metric_learn/itml.py b/metric_learn/itml.py index <HASH>..<HASH> 100644 --- a/metric_learn/itml.py +++ b/metric_learn/itml.py @@ -80,7 +80,8 @@ class ITML(BaseMetricLearner): X : (n x d) data matrix each row corresponds to a single instance constraints : 4-tuple of arrays - (a,b,c,d) indices into X, such that d(X[a],X[b]) < d(X[c],X[d]) + (a,b,c,d) indices into X, with (a,b) specifying positive and (c,d) + negative pairs bounds : list (pos,neg) pairs, optional bounds on similarity, s.t. d(X[a],X[b]) < pos and d(X[c],X[d]) > neg """
Clarified documentation of ITML (resolves #<I>) (#<I>)
metric-learn_metric-learn
train
py
b0de5fe379e60ecadd81dd254ebbbcdb604b2eaf
diff --git a/src/plugman/init-defaults.js b/src/plugman/init-defaults.js index <HASH>..<HASH> 100644 --- a/src/plugman/init-defaults.js +++ b/src/plugman/init-defaults.js @@ -55,7 +55,6 @@ function readDeps (test) { }; } -/* eslint-disable */ var name = package.name || defaults.id || basename; exports.name = yes ? name : prompt('name', name); @@ -154,6 +153,5 @@ var license = package.license || config.get('init.license') || config.get('init-license') || 'ISC'; -/* eslint-enable */ exports.license = yes ? license : prompt('license', license);
Removed redundant eslint-disable/enable directives, now that we're excluding the whole file.
apache_cordova-lib
train
js
8f383376d63ff937d5a9bb8632ce57302b3742f0
diff --git a/goldman/resources/base.py b/goldman/resources/base.py index <HASH>..<HASH> 100644 --- a/goldman/resources/base.py +++ b/goldman/resources/base.py @@ -35,3 +35,15 @@ class Resource(object): if name not in disable: setattr(self, name, func) + + @property + def deserializer_mimetypes(self): + """ Return a list of string mimetypes supported as deserializers """ + + return [d.MIMETYPE for d in self.DESERIALIZERS] + + @property + def serializer_mimetypes(self): + """ Return a list of string mimetypes supported as serializers """ + + return [s.MIMETYPE for s in self.SERIALIZERS]
base resource helper properties for aggregating mimetypes
sassoo_goldman
train
py
4f46ce8360e696aff8b2594ae21536f8b42b043f
diff --git a/library/ImboClient/Driver/cURL.php b/library/ImboClient/Driver/cURL.php index <HASH>..<HASH> 100644 --- a/library/ImboClient/Driver/cURL.php +++ b/library/ImboClient/Driver/cURL.php @@ -57,6 +57,13 @@ class cURL implements DriverInterface { private $curlHandle; /** + * Options for cURL + * + * @var array + */ + private $curlOptions; + + /** * Request headers * * @var array @@ -96,7 +103,7 @@ class cURL implements DriverInterface { } // Default cURL options - $options = array( + $this->curlOptions = array( CURLOPT_RETURNTRANSFER => true, CURLOPT_HEADER => true, CURLOPT_CONNECTTIMEOUT => $this->params['connectTimeout'], @@ -106,10 +113,10 @@ class cURL implements DriverInterface { if (!empty($curlOptions)) { // Merge with user specified options, overwriting default values - $options = $curlOptions + $options; + $this->curlOptions = $curlOptions + $this->curlOptions; } - curl_setopt_array($this->curlHandle, $options); + curl_setopt_array($this->curlHandle, $this->curlOptions); } /**
Added a property that holds the current cURL options so they can be inspected in tests
imbo_imboclient-php
train
php
13d6f58bbb7e0af02c3536ce151cb34c2414b0a4
diff --git a/bundles/org.eclipse.orion.client.cf/web/cfui/plugins/cFDeployService.js b/bundles/org.eclipse.orion.client.cf/web/cfui/plugins/cFDeployService.js index <HASH>..<HASH> 100644 --- a/bundles/org.eclipse.orion.client.cf/web/cfui/plugins/cFDeployService.js +++ b/bundles/org.eclipse.orion.client.cf/web/cfui/plugins/cFDeployService.js @@ -174,7 +174,7 @@ define(['i18n!cfui/nls/messages', 'orion/bootstrap', 'orion/Deferred', 'orion/cf var wizardReferences = serviceRegistry.getServiceReferences("orion.project.deploy.wizard"); /* figure out which deployment plan & wizard to use */ - var relativeFilePath = new URL(project.ContentLocation).href; + var relativeFilePath = new URL(project.ContentLocation + appPath).href; var orionHomeUrl = new URL(PageLinks.getOrionHome()); if(relativeFilePath.indexOf(orionHomeUrl.origin) === 0)
[nobug] Pass correct contentLocation to the deployment planers
eclipse_orion.client
train
js
900f6e03f03301b51db6fb5855e59c31915b0aa0
diff --git a/autotime/__init__.py b/autotime/__init__.py index <HASH>..<HASH> 100644 --- a/autotime/__init__.py +++ b/autotime/__init__.py @@ -23,7 +23,7 @@ class LineWatcher(object): def stop(self): delta = monotonic() - self.start_time - print('time: {}'.format(format_delta(delta))) + print(u'time: {}'.format(format_delta(delta))) timer = LineWatcher()
Fix printing 'time: <I> µs' on py<I>
cpcloud_ipython-autotime
train
py
4df7e4ac939d5e511b0dac1496717c12f8f8e3fa
diff --git a/lib/utils.js b/lib/utils.js index <HASH>..<HASH> 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -4,11 +4,11 @@ var utils = {}; utils.addFiltersToTerm = function(term, data) { var newTerm = term; if (data.uid && Array.isArray(data.uid) && data.uid.length) { - newTerm += ' AND ( ' + data.uid.map(function(uid) { return 'uid_i:' + uid; }).join(' OR ') + ' )'; + newTerm += (newTerm.length ? ' AND ' : '') + '( ' + data.uid.map(function(uid) { return 'uid_i:' + uid; }).join(' OR ') + ' )'; } if (data.cid && Array.isArray(data.cid) && data.cid.length) { - newTerm += ' AND ( ' + data.cid.map(function(cid) { return 'cid_i:' + cid; }).join(' OR ') + ' )'; + newTerm += (newTerm.length ? ' AND ' : '') + '( ' + data.cid.map(function(cid) { return 'cid_i:' + cid; }).join(' OR ') + ' )'; } return newTerm;
updated plugin to query properly if no term is supplied but a uid or cid is
julianlam_nodebb-plugin-solr
train
js
c29120ec5fd871d7a0553e5a3435b62b40cca665
diff --git a/petl/io/pandas.py b/petl/io/pandas.py index <HASH>..<HASH> 100644 --- a/petl/io/pandas.py +++ b/petl/io/pandas.py @@ -28,11 +28,11 @@ def todataframe(table, index=None, exclude=None, columns=None, """ import pandas as pd - l = list(table) - data = l[1:] + it = iter(table) + header = next(it) if columns is None: - columns = l[0] - return pd.DataFrame.from_records(data, index=index, exclude=exclude, + columns = header + return pd.DataFrame.from_records(it, index=index, exclude=exclude, columns=columns, coerce_float=coerce_float, nrows=nrows)
Fix todataframe() to do not iterate the table multiple times Converting the table data to a list simply with list() causes the table to be materialized three times because list() calls __len__() on the table twice to populate the list. Anyhow, there is no need to have the table data in a list when an iteratotor can be passed to pandas.DataFrame.from_records(). Fixes #<I>.
petl-developers_petl
train
py
1464c1152102c8b4d344e07f31dc6370d68c6cf8
diff --git a/api.py b/api.py index <HASH>..<HASH> 100644 --- a/api.py +++ b/api.py @@ -2,6 +2,7 @@ import httplib2 import urllib + class Api(): """Api Object"""
Added some white space to the imports of the api module
travisby_pyrest
train
py
3db276b7bc7ec7ff41bba5e60522654577a34559
diff --git a/LDAP.js b/LDAP.js index <HASH>..<HASH> 100644 --- a/LDAP.js +++ b/LDAP.js @@ -258,7 +258,7 @@ var LDAP = function(opts) { if (!s_opts) { throw new Error("Opts required"); } - if (!s_opts.base) { + if (typeof s_opts.base != 'string') { throw new Error("Base required"); }
Allow passing an empty string ( "" ) as base to support reading rootDSE entry Active Directory makes extensive use of rootDSE entry to provide information about the environment to clients. Empty string evaluates to FALSE so reading rootDSE is currently not possible.
jeremycx_node-LDAP
train
js
fffb8dd3c9c72a127d38fba1a95bc9e589beb525
diff --git a/js/jquery.fileupload.js b/js/jquery.fileupload.js index <HASH>..<HASH> 100644 --- a/js/jquery.fileupload.js +++ b/js/jquery.fileupload.js @@ -1,5 +1,5 @@ /* - * jQuery File Upload Plugin 5.8 + * jQuery File Upload Plugin 5.8.1 * https://github.com/blueimp/jQuery-File-Upload * * Copyright 2010, Sebastian Tschan @@ -18,7 +18,7 @@ // Register as an anonymous AMD module: define([ 'jquery', - './vendor/jquery.ui.widget', + 'jquery.ui.widget', './jquery.iframe-transport' ], factory); } else {
Use an absolute ID to reference the jQuery UI widget factory for AMD loaders. Fixes #<I>.
blueimp_jQuery-File-Upload
train
js
911fcc4a6647be4dbd7d0bb70361c2d7f6cee271
diff --git a/lib/config.js b/lib/config.js index <HASH>..<HASH> 100644 --- a/lib/config.js +++ b/lib/config.js @@ -190,7 +190,7 @@ AWS.Config = inherit({ /** * Represents your AWS security credentials, specifically the - * {accessKeyId}, {secretAcessKey}, and optional {sessionToken}. + * {accessKeyId}, {secretAccessKey}, and optional {sessionToken}. * Creating a +Credentials+ object allows you to pass around your * security information to configuration and service objects. *
Fix typo in reference to secretAccessKey
aws_aws-sdk-js
train
js
b6bbb528e971912a6a4a1873214c9a0cb33c128e
diff --git a/src/Keboola/Syrup/Command/JobCommand.php b/src/Keboola/Syrup/Command/JobCommand.php index <HASH>..<HASH> 100644 --- a/src/Keboola/Syrup/Command/JobCommand.php +++ b/src/Keboola/Syrup/Command/JobCommand.php @@ -226,7 +226,7 @@ class JobCommand extends ContainerAwareCommand // Update job with results $endTime = time(); $createdTime = $this->job->getCreatedTime(); - $waitSeconds = is_null($createdTime)?:$endTime - strtotime($createdTime); + $waitSeconds = is_null($createdTime)?:$startTime - strtotime($createdTime); $this->job->setStatus($jobStatus); $this->job->setResult($jobResult);
fix: waitSeconds in job
keboola_syrup
train
php
b562d277f2e4d59f717bbd71e80c92c5c4c079c3
diff --git a/test/unit/logger.spec.js b/test/unit/logger.spec.js index <HASH>..<HASH> 100644 --- a/test/unit/logger.spec.js +++ b/test/unit/logger.spec.js @@ -43,6 +43,9 @@ test.group('Logger | File Driver', (group) => { }) group.after((done) => { + if (process.platform === 'win32') { + return done() + } fs.remove(path.join(__dirname, 'tmp'), done) })
ci(logger): do not remove dir after test on win<I>
adonisjs_adonis-framework
train
js
f54bd6eea4b0fb76f551301befee54c58655fc72
diff --git a/pnc_cli/makemead.py b/pnc_cli/makemead.py index <HASH>..<HASH> 100644 --- a/pnc_cli/makemead.py +++ b/pnc_cli/makemead.py @@ -297,7 +297,7 @@ def create_build_configuration(environment_id, bc_set, product_version_id, art_p pprint("!! IMPORTANT !! - ACTION REQUIRED !!") pprint("External repository " + scm_repo_url + " was forked to internal Git server. YOU MUST TO UPDATE YOUR CONFIG FILE WITH THE NEW VALUE.") - pprint("New repository URL is: " + build_config.scm_repo_url) + pprint("New repository URL is: " + build_config.scm_repo_url + "#" + build_config.scm_revision) buildconfigurationsets.add_build_configuration_to_set(set_id=bc_set.id, config_id=build_config.id) return build_config
Fix make-mead message when repo is clonned
project-ncl_pnc-cli
train
py
4ca0199f6351899b1b6438931ce150b93befe05d
diff --git a/jwt/jwa.py b/jwt/jwa.py index <HASH>..<HASH> 100644 --- a/jwt/jwa.py +++ b/jwt/jwa.py @@ -120,8 +120,8 @@ RS512 = RSAAlgorithm(SHA512) def supported_signing_algorithms(): + # NOTE(yosida95): exclude vulnerable 'none' algorithm by default. return { - 'none': none, 'HS256': HS256, 'HS384': HS384, 'HS512': HS512,
exclude none algorithm from supported_signing_algorithms
GehirnInc_python-jwt
train
py
e1ebafcbe27f9044d54bdceea319957c90763b11
diff --git a/cirq/sim/density_matrix_simulator_test.py b/cirq/sim/density_matrix_simulator_test.py index <HASH>..<HASH> 100644 --- a/cirq/sim/density_matrix_simulator_test.py +++ b/cirq/sim/density_matrix_simulator_test.py @@ -667,6 +667,9 @@ def test_density_matrix_trial_result_str(): measurements={}, final_simulator_state=final_simulator_state) - assert str(result) == ('measurements: (no measurements)\n' - 'final density matrix:\n' - '[[0.5 0.5]\n [0.5 0.5]]') + # numpy varies whitespace in its representation for different versions + # Eliminate whitespace to harden tests against this variation + result_no_whitespace = str(result).replace('\n', '').replace(' ', '') + assert result_no_whitespace == ('measurements:(nomeasurements)' + 'finaldensitymatrix:' + '[[0.50.5][0.50.5]]')
Remove whitespace in density simulator test (#<I>) - Remove whitespace in density simulator test - Numpy does not have a consistent whitespace across versions, so this test can fail in other contexts
quantumlib_Cirq
train
py
d5441f4898da3c629c28b03972f88e3aee5adc3b
diff --git a/precise/util.py b/precise/util.py index <HASH>..<HASH> 100644 --- a/precise/util.py +++ b/precise/util.py @@ -46,9 +46,10 @@ def load_audio(file: Any) -> np.ndarray: samples: Sample rate and audio samples from 0..1 """ import wavio + import wave try: wav = wavio.read(file) - except EOFError: + except (EOFError, wave.Error): wav = wavio.Wav(np.array([[]], dtype=np.int16), 16000, 2) if wav.data.dtype != np.int16: raise InvalidAudio('Unsupported data type: ' + str(wav.data.dtype))
Add wave.Error in clause when loading audio Sometimes this gets thrown
MycroftAI_mycroft-precise
train
py
39918ac49f09b16376ed4fa5d06eb509fdf5bca4
diff --git a/config/blog.php b/config/blog.php index <HASH>..<HASH> 100644 --- a/config/blog.php +++ b/config/blog.php @@ -17,4 +17,26 @@ return [ 'route' => [ 'prefix' => 'blog', ], + + /* ------------------------------------------------------------------------------------------------ + | Models + | ------------------------------------------------------------------------------------------------ + */ + 'posts' => [ + 'table' => 'posts', + 'model' => Arcanesoft\Blog\Models\Post::class, + 'observer' => Arcanesoft\Blog\Observers\PostObserver::class, + ], + + 'categories' => [ + 'table' => 'categories', + 'model' => Arcanesoft\Blog\Models\Category::class, + 'observer' => Arcanesoft\Blog\Observers\CategoryObserver::class, + ], + + 'tags' => [ + 'table' => 'tags', + 'model' => Arcanesoft\Blog\Models\Tag::class, + 'observer' => Arcanesoft\Blog\Observers\TagObserver::class, + ], ];
Updating config file (Models, Tables & Observers)
ARCANESOFT_Blog
train
php
0618e58b791edd91eb3c6ed91bad122dd8c0ffb1
diff --git a/nunaliit2-js/src/main/js/nunaliit2/n2.schema.js b/nunaliit2-js/src/main/js/nunaliit2/n2.schema.js index <HASH>..<HASH> 100644 --- a/nunaliit2-js/src/main/js/nunaliit2/n2.schema.js +++ b/nunaliit2-js/src/main/js/nunaliit2/n2.schema.js @@ -259,7 +259,7 @@ function _formField() { var options = args.pop(); // Compute current selector - var currentSelector = []; + var currentSelector = null; if( options && options.data && options.data.n2_selector ){ @@ -534,7 +534,7 @@ function _selectorField(){ var options = args.pop(); // Compute current selector - var currentSelector = []; + var currentSelector = null; if( options && options.data && options.data.n2_selector ){ @@ -546,6 +546,10 @@ function _selectorField(){ && this[SELECT]){ currentSelector = this[SELECT]; }; + + if( !currentSelector ){ + return ''; + }; // Gets the text between start and end tags and // parse it
nunaliit2-js: Prevent errors when {{#:selector}} is used against a primitive type. Issue #<I>
GCRC_nunaliit
train
js
fccf0a89c78b2ba3cfd5fdee044861f5dac6a76b
diff --git a/sos/report/plugins/selinux.py b/sos/report/plugins/selinux.py index <HASH>..<HASH> 100644 --- a/sos/report/plugins/selinux.py +++ b/sos/report/plugins/selinux.py @@ -23,9 +23,11 @@ class SELinux(Plugin, RedHatPlugin): def setup(self): self.add_copy_spec([ '/etc/sestatus.conf', - '/etc/selinux', - '/var/lib/selinux' + '/etc/selinux' ]) + # capture this with a higher log limit since #2035 may limit this + # collection + self.add_copy_spec('/var/lib/selinux', sizelimit=50) self.add_cmd_output('sestatus') state = self.exec_cmd('getenforce')['output']
[selinux] Increase default size limit for /var/lib/selinux Increase the default size limit for /var/lib/selinux, as the global default of <I> MB is too small to collect both the 'active' and 'targeted' subdirs in many test scenarios. Previously this had been copied in full due to the size limiting bug that #<I> resolved, so now we need to properly scope the size limit for this collection. Resolves: #<I>
sosreport_sos
train
py
365f8d29cbfa4864db6ae0c7642db5eb288df18a
diff --git a/spec/baton/server_spec.rb b/spec/baton/server_spec.rb index <HASH>..<HASH> 100644 --- a/spec/baton/server_spec.rb +++ b/spec/baton/server_spec.rb @@ -4,18 +4,19 @@ require "baton/server" describe Baton::Server do context "stubbed ohai" do + + before(:each) do + Baton::Server.any_instance.stub(:facts).and_return({ + "chef_environment" => "production", + "fqdn" => "build-prod-i-722b0004.dsci.it", + "trebuchet" => ["octobutler"] + }) + Baton::Server.any_instance.stub(:setup_ohai) + end + describe "#configure" do context "given data from Ohai" do - before(:each) do - Baton::Server.any_instance.stub(:facts).and_return({ - "chef_environment" => "production", - "fqdn" => "build-prod-i-722b0004.dsci.it", - "trebuchet" => ["octobutler"] - }) - Baton::Server.any_instance.stub(:setup_ohai) - end - it "will set the fqdn" do subject.fqdn.should eq("build-prod-i-722b0004.dsci.it") end
moved before :each block to the context above so that it could affect the rest of the specs in the context
digital-science_baton
train
rb
8c0bdff81a7da813fab1f7cd23c56cb7b25943ec
diff --git a/cmd/juju/commands/upgrademodel.go b/cmd/juju/commands/upgrademodel.go index <HASH>..<HASH> 100644 --- a/cmd/juju/commands/upgrademodel.go +++ b/cmd/juju/commands/upgrademodel.go @@ -583,11 +583,10 @@ func (c *upgradeJujuCommand) validateModelUpgrade() error { return errors.Trace(err) } // TODO (stickupkid): Define force for validation of model upgrade. - if err := client.ValidateModelUpgrade(names.NewModelTag(details.ModelUUID), false); err != nil { - return errors.Trace(err) + if err = client.ValidateModelUpgrade(names.NewModelTag(details.ModelUUID), false); errors.IsNotImplemented(err) { + return nil } - - return nil + return errors.Trace(err) } // environConfigGetter implements environs.EnvironConfigGetter for use
Fix the validate model upgrade from a facade This was fixed originally in develop, but actually needed to be fixed in the <I> branch. Essentially this makes upgrading to <I> invalid because it expects that you already have the facade available.
juju_juju
train
go
eaa34c9d9601fc40575ea98cb7edb25afb083f27
diff --git a/pyradigm/classify.py b/pyradigm/classify.py index <HASH>..<HASH> 100644 --- a/pyradigm/classify.py +++ b/pyradigm/classify.py @@ -152,6 +152,11 @@ class ClassificationDataset(BaseDataset): if features.size <= 0: raise ValueError('provided features are empty.') + if not self._allow_nan_inf: + if np.isnan(features).any() or np.isinf(features).any(): + raise ValueError('NaN or Inf values found! They are disabled.' + 'Use allow_nan_inf=True if you want to allow them.') + if features.ndim > 1: features = np.ravel(features)
checkin on what values are allowed or not
raamana_pyradigm
train
py
d9935518b7766539ffab0658388adbc66874303c
diff --git a/dist/smart-area.js b/dist/smart-area.js index <HASH>..<HASH> 100644 --- a/dist/smart-area.js +++ b/dist/smart-area.js @@ -228,6 +228,7 @@ angular.module('smartArea', []) },0); }else{ $scope.dropdown.filterElement.focus(); + checkTriggers(); } } };
Refresh trigger check when irrelevant for dropdown This solves this bug : - When you type : @sa => it proposes Samantha - When you type : @sam => nothing is proposed
aurbano_smart-area
train
js
1fa090c656cbab55bdbfb101b503b53811b50dff
diff --git a/lib/runner.js b/lib/runner.js index <HASH>..<HASH> 100644 --- a/lib/runner.js +++ b/lib/runner.js @@ -45,7 +45,7 @@ var config = { */ var merge = function(into, from) { for (key in from) { - if (into[key] instanceof Object) { + if (into[key] instanceof Object && !(into[key] instanceof Array)) { merge(into[key], from[key]); } else { into[key] = from[key];
fix(runner): merge should override entire arrays, not just parts of them Closes #<I>
angular_protractor
train
js
cc92ff7313282a40c87373272231c2bdbe66e1db
diff --git a/pyverilog/ast_code_generator/codegen.py b/pyverilog/ast_code_generator/codegen.py index <HASH>..<HASH> 100644 --- a/pyverilog/ast_code_generator/codegen.py +++ b/pyverilog/ast_code_generator/codegen.py @@ -695,9 +695,9 @@ class ASTCodeGenerator(ConvertVisitor): filename = getfilename(node) template = self.env.get_template(filename) template_dict = { - 'pre' : '' if node.pre is None else self.visit(node.pre), - 'cond' : '' if node.cond is None else del_paren(self.visit(node.cond)), - 'post' : '' if node.post is None else self.visit(node.post).replace(';', ''), + 'pre' : '' if node.pre is None else del_space(self.visit(node.pre)), + 'cond' : '' if node.cond is None else del_space(del_paren(self.visit(node.cond))), + 'post' : '' if node.post is None else del_space(self.visit(node.post).replace(';', '')), 'statement' : '' if node.statement is None else self.visit(node.statement), } rslt = template.render(template_dict)
ast_code_generator: redundant spaces of for-statement are removed.
PyHDI_Pyverilog
train
py
904714fbeb874e2091447fb610337ca44c701ef3
diff --git a/src/extensions/default/WebPlatformDocs/main.js b/src/extensions/default/WebPlatformDocs/main.js index <HASH>..<HASH> 100644 --- a/src/extensions/default/WebPlatformDocs/main.js +++ b/src/extensions/default/WebPlatformDocs/main.js @@ -84,9 +84,9 @@ define(function (require, exports, module) { * @return {?$.Promise} resolved with an InlineWidget; null if we're not going to provide anything */ function inlineProvider(hostEditor, pos) { + var langId = hostEditor.getLanguageForSelection().getId(); // Only provide docs when cursor is in CSS content - if (hostEditor.getLanguageForSelection().getId() !== "css" && - hostEditor.getLanguageForSelection().getId() !== "scss") { + if (langId !== "css" && langId !== "scss") { return null; }
Use a variable to store the language ID so that we don't have to call the same functions multiple times when checking it.
adobe_brackets
train
js
8a97e38bccf7e1569e32566dc7f1ace694afbf57
diff --git a/lib/modules/apostrophe-schemas/public/js/array-modal.js b/lib/modules/apostrophe-schemas/public/js/array-modal.js index <HASH>..<HASH> 100644 --- a/lib/modules/apostrophe-schemas/public/js/array-modal.js +++ b/lib/modules/apostrophe-schemas/public/js/array-modal.js @@ -176,7 +176,9 @@ apos.define('apostrophe-array-editor-modal', { // then dismisses the modal via `hide`. self.saveArray = function() { - options.save(self.arrayItems); + options.save(_.map(self.arrayItems, function(item) { + return _.omit(item, '_ordinal'); + })); self.hide(); };
bring back drop of ordinal on save
apostrophecms_apostrophe
train
js
81746bcaeefb916e348f5e3eb825fb5bbb4ba982
diff --git a/salt/modules/grains.py b/salt/modules/grains.py index <HASH>..<HASH> 100644 --- a/salt/modules/grains.py +++ b/salt/modules/grains.py @@ -514,9 +514,12 @@ def get_or_set_hash(name, val = ''.join([random.SystemRandom().choice(chars) for _ in range(length)]) if ':' in name: - name, rest = name.split(':', 1) + root, rest = name.split(':', 1) + curr = get(root, _infinitedict()) val = _dict_from_path(rest, val) - - setval(name, val) + curr.update(val) + setval(root, curr) + else: + setval(name, val) return get(name)
Fix grains.get_or_set_hash to work with multiple entries under same key
saltstack_salt
train
py
9c249a9ee51feb3a6b27d6caed084b9d09153344
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,5 @@ exports.Parser = require("./lib/parser").Parser; exports.rules = require("./lib/rules"); -exports.testing = require("./lib/testing"); exports.errors = require("./lib/errors"); exports.results = require("./lib/parsing-results"); exports.StringSource = require("./lib/StringSource"); diff --git a/test/lop.test.js b/test/lop.test.js index <HASH>..<HASH> 100644 --- a/test/lop.test.js +++ b/test/lop.test.js @@ -1,7 +1,7 @@ var lop = require("../"); var Parser = lop.Parser; var rules = lop.rules; -var testing = lop.testing; +var testing = require("../lib/testing"); var Tokeniser = require("./Tokeniser"); exports.canParseUsingParser = function(test) {
Remove testing module from index.js This prevents duck from pulled into production code that won't normally use the testing module
mwilliamson_lop
train
js,js