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
18c930e2a7fd065c78ea13ddf9aa54b45316a487
diff --git a/docroot/modules/custom/webforms/src/ContactForm.php b/docroot/modules/custom/webforms/src/ContactForm.php index <HASH>..<HASH> 100644 --- a/docroot/modules/custom/webforms/src/ContactForm.php +++ b/docroot/modules/custom/webforms/src/ContactForm.php @@ -55,7 +55,7 @@ class ContactForm extends CoreContactForm { 'subject' => '', 'content' => [ 'value' => '', - 'format' => 'code', + 'format' => 'full_html', ], ];
[YMCA-<I>] Set full_html by default to email template field
ymcatwincities_openy
train
php
660643ae87b45ec619e2aac59a4f5156b6c70b93
diff --git a/select2.js b/select2.js index <HASH>..<HASH> 100644 --- a/select2.js +++ b/select2.js @@ -473,7 +473,7 @@ the specific language governing permissions and limitations under the Apache Lic * * If the array form is used it is assumed that it contains objects with 'id' and 'text' keys. * - * If the object form is used ti is assumed that it contains 'data' and 'text' keys. The 'data' key should contain + * If the object form is used it is assumed that it contains 'data' and 'text' keys. The 'data' key should contain * an array of objects that will be used as choices. These objects must contain at least an 'id' key. The 'text' * key can either be a String in which case it is expected that each element in the 'data' array has a key with the * value of 'text' which will be used to match choices. Alternatively, text can be a function(item) that can extract
Fix a typo in the docs.
select2_select2
train
js
bc4470633f4d02ed366329983a02900702ff982b
diff --git a/maven-interceptor/src/main/java/hudson/maven/agent/PluginManagerInterceptor.java b/maven-interceptor/src/main/java/hudson/maven/agent/PluginManagerInterceptor.java index <HASH>..<HASH> 100644 --- a/maven-interceptor/src/main/java/hudson/maven/agent/PluginManagerInterceptor.java +++ b/maven-interceptor/src/main/java/hudson/maven/agent/PluginManagerInterceptor.java @@ -116,9 +116,10 @@ public class PluginManagerInterceptor extends DefaultPluginManager { config.config = configuration; config.eval = expressionEvaluator; config.mojo = (Mojo)component; - super.configureComponent(component, configuration, expressionEvaluator, containerRealm, configListener); if(listener!=null) + // this lets preExecute a chance to modify the mojo configuration listener.preExecute(project,mojoExecution, (Mojo)component, configuration,expressionEvaluator); + super.configureComponent(component, configuration, expressionEvaluator, containerRealm, configListener); } catch (IOException e) { throw new ComponentConfigurationException(e); } catch (InterruptedException e) {
preExecute needs to be able to tweak PlexusConfiguration before its values are set to Mojo. Looks like <I> messed this up. git-svn-id: <URL>
jenkinsci_jenkins
train
java
7d10b338789d6fa8586f4a5863da7d7325f18891
diff --git a/lib/wlang/scope.rb b/lib/wlang/scope.rb index <HASH>..<HASH> 100644 --- a/lib/wlang/scope.rb +++ b/lib/wlang/scope.rb @@ -30,6 +30,10 @@ module WLang } end + def root + parent.nil? ? self : parent.root + end + def push(x) Scope.coerce(x, self) end diff --git a/spec/unit/test_scope.rb b/spec/unit/test_scope.rb index <HASH>..<HASH> 100644 --- a/spec/unit/test_scope.rb +++ b/spec/unit/test_scope.rb @@ -28,6 +28,13 @@ module WLang end end + it 'gives access to the root' do + scope.root.should eq(Scope.null) + scope.with(:other => "World2") do |s| + s.root.should eq(Scope.null) + end + end + it 'evaluates `self` accurately' do scope.evaluate(:self).should eq(:who => "World") end
Add Scope#root, returning the top scope.
blambeau_wlang
train
rb,rb
decfc2717ff0128e57a91339eddeba5e59c37875
diff --git a/src/Model/PaperclipTrait.php b/src/Model/PaperclipTrait.php index <HASH>..<HASH> 100644 --- a/src/Model/PaperclipTrait.php +++ b/src/Model/PaperclipTrait.php @@ -160,7 +160,7 @@ trait PaperclipTrait if (isset($this->attachedFiles[ $attachmentName ])) { $attachment = $this->attachedFiles[ $attachmentName ]; - foreach ($attachment->variants() as $variant) { + foreach ($attachment->variants(true) as $variant) { $paths[ $variant ] = $attachment->variantPath($variant); } } @@ -181,7 +181,7 @@ trait PaperclipTrait if (isset($this->attachedFiles[ $attachmentName ])) { $attachment = $this->attachedFiles[ $attachmentName ]; - foreach ($attachment->variants() as $variant) { + foreach ($attachment->variants(true) as $variant) { $urls[ $variant ] = $attachment->url($variant); } }
Updated trait to include original ‘variant’ url/path
czim_laravel-paperclip
train
php
5698fdbc7985f80a7f65feea26f110ef2a82714c
diff --git a/javalink/loader.py b/javalink/loader.py index <HASH>..<HASH> 100644 --- a/javalink/loader.py +++ b/javalink/loader.py @@ -134,9 +134,16 @@ class ExplodedZipFile(ziputils.ExplodedZipFile): """ def open(self, name, mode='rb'): - if not os.path.isfile(os.path.join(self.fn, name)): + try: + return super(ExplodedZipFile, self).open(name, mode) + except IOError: + raise KeyError("There is no item named '{}' in the archive".format(name)) + + def getinfo(self, name): + info = super(ExplodedZipFile, self).getinfo(name) + if not info: raise KeyError("There is no item named '{}' in the archive".format(name)) - return super(ExplodedZipFile, self).open(name, mode) + return info def __enter__(self): return self
Make ExplodedZipFile more like ZipFile getinfo() should raise a KeyError, not return None.
bluekeyes_sphinx-javalink
train
py
6adbd58ed646264a1a796b288ed198ab4934ed63
diff --git a/app/models/puppet_module_rule.rb b/app/models/puppet_module_rule.rb index <HASH>..<HASH> 100644 --- a/app/models/puppet_module_rule.rb +++ b/app/models/puppet_module_rule.rb @@ -30,7 +30,7 @@ class PuppetModuleRule < FilterRule filters = [] filters << version_filter(unit) filters << author_filter(unit) - filters.compact + filters.compact! results = PuppetModule.search(unit[:name], :page_size => repo.puppet_module_count, :repoids => [repo.pulp_id], :filters => filters).map(&:_id).compact
Puppet Filtering: Fixing bug where nil filters not compacted
Katello_katello
train
rb
e73b70b2965baecd631c4d5234d5f3db1cadb4ac
diff --git a/samples/led.go b/samples/led.go index <HASH>..<HASH> 100644 --- a/samples/led.go +++ b/samples/led.go @@ -39,11 +39,11 @@ func main() { for { select { - case <-time.After(500 * time.Millisecond): + case <-time.After(250 * time.Millisecond): if err := led.Toggle(); err != nil { panic(err) } - fmt.Printf("Toggled\n") + fmt.Println("Toggled") case <-quit: return }
samples: changes to led - blink every <I> msec - use Println instead of Printf with \n
kidoman_embd
train
go
d57baf4fd1b3f72d5a679246c6b4a0fc902cdfc8
diff --git a/qface/idl/domain.py b/qface/idl/domain.py index <HASH>..<HASH> 100644 --- a/qface/idl/domain.py +++ b/qface/idl/domain.py @@ -310,6 +310,14 @@ class Module(Symbol): return self.name.split('.') @property + def majorVersion(self): + return self.version.split('.')[0] + + @property + def minorVersion(self): + return self.version.split('.')[1] + + @property def module_name(self): return self.name.split('.')[-1].capitalize()
Add majorVersion and minorVersion properties (#<I>)
Pelagicore_qface
train
py
d56192bc9ef1b4897edba218d9b4f649e11da157
diff --git a/KnplabsPiwikBundle.php b/KnplabsPiwikBundle.php index <HASH>..<HASH> 100644 --- a/KnplabsPiwikBundle.php +++ b/KnplabsPiwikBundle.php @@ -1,6 +1,6 @@ <?php -namespace Bundle\Knplabs\PiwikBundle; +namespace Knplabs\Bundle\PiwikBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; use Symfony\Component\DependencyInjection\ContainerInterface;
ns change (PR7 naming convention)
KnpLabs_KnpPiwikBundle
train
php
695d935b87455c87e18391d6dedeaef78b80a6cf
diff --git a/lib/woodhouse/progress.rb b/lib/woodhouse/progress.rb index <HASH>..<HASH> 100644 --- a/lib/woodhouse/progress.rb +++ b/lib/woodhouse/progress.rb @@ -64,7 +64,11 @@ module Woodhouse::Progress exchange = channel.direct("woodhouse.progress") queue = channel.queue(job_id, :durable => true) queue.bind(exchange, :routing_key => job_id) - _, _, payload = queue.pop + payload = nil + queue.message_count.times do + _, _, next_payload = queue.pop + payload = next_payload if next_payload + end payload ensure bunny.stop
Attempt to return the most recent progress report from queue.
mboeh_woodhouse
train
rb
2a9528635b845e33f6a8907f9b6f2a803104e5c4
diff --git a/packages/availity-workflow/scripts/start.js b/packages/availity-workflow/scripts/start.js index <HASH>..<HASH> 100644 --- a/packages/availity-workflow/scripts/start.js +++ b/packages/availity-workflow/scripts/start.js @@ -207,7 +207,7 @@ function web() { }; - webpackOptions = merge(webpackOptions, settings.config().development.webpackOptions); + webpackOptions = merge(webpackOptions, settings.config().development.webpackDevServer); const proxyConfig = proxy(); if (proxyConfig) {
Rename config webpackOptions to WebpackDevSever
Availity_availity-workflow
train
js
73456f2a030e32e99bec86677f60595b3f6e7d8b
diff --git a/test/vertical_split.py b/test/vertical_split.py index <HASH>..<HASH> 100755 --- a/test/vertical_split.py +++ b/test/vertical_split.py @@ -51,7 +51,8 @@ def setUpModule(): ] utils.Vtctld().start() utils.wait_procs(setup_procs) - except: + except Exception as e: + print "Vertical Split Testing Error: ", e tearDownModule() raise
add debug info to vertical split test
vitessio_vitess
train
py
28ed04aacff5502552af0c8f9e724d0ee0023107
diff --git a/dimod/compatibility23.py b/dimod/compatibility23.py index <HASH>..<HASH> 100644 --- a/dimod/compatibility23.py +++ b/dimod/compatibility23.py @@ -20,8 +20,6 @@ if _PY2: zip_longest = itertools.izip_longest - RecursionError_ = RuntimeError - else: range_ = range @@ -38,8 +36,3 @@ else: return iter(d.keys()) zip_longest = itertools.zip_longest - - if sys.version_info.minor > 4: - RecursionError_ = RecursionError - else: - RecursionError_ = RuntimeError diff --git a/dimod/core/sampler.py b/dimod/core/sampler.py index <HASH>..<HASH> 100644 --- a/dimod/core/sampler.py +++ b/dimod/core/sampler.py @@ -2,7 +2,6 @@ todo - describe how to use the dimod sampler template """ from dimod.binary_quadratic_model_convert import to_qubo, to_ising, from_qubo, from_ising -from dimod.compatibility23 import RecursionError_ from dimod.exceptions import InvalidSampler from dimod.vartypes import Vartype
Remove unnecessary RecursionError_ definition We don't need cross-Python RecursionError_ definition anymore if we're explicitly testing for cycles in Sampler base class.
dwavesystems_dimod
train
py,py
9ebb697eadef9fb49bee238e0565a798cfe113c6
diff --git a/docs/src/modules/components/DemoToolbar.js b/docs/src/modules/components/DemoToolbar.js index <HASH>..<HASH> 100644 --- a/docs/src/modules/components/DemoToolbar.js +++ b/docs/src/modules/components/DemoToolbar.js @@ -279,6 +279,7 @@ export default function DemoToolbar(props) { form.target = '_blank'; form.action = 'https://codeSandbox.io/api/v1/sandboxes/define'; addHiddenInput(form, 'parameters', parameters); + addHiddenInput(form, 'query', 'file=/demo.tsx'); document.body.appendChild(form); form.submit(); document.body.removeChild(form);
[docs] Show a better file on codesandbox (#<I>)
mui-org_material-ui
train
js
87efad4f9082edf7545a414e87cc443843318e2e
diff --git a/dask_ml/cluster/k_means.py b/dask_ml/cluster/k_means.py index <HASH>..<HASH> 100644 --- a/dask_ml/cluster/k_means.py +++ b/dask_ml/cluster/k_means.py @@ -531,7 +531,7 @@ def _kmeans_single_lloyd( labels = labels.astype(np.int32) # distances is always float64, but we need it to match X.dtype # for centers_dense, but remain float64 for inertia - r = da.atop( + r = da.blockwise( _centers_dense, "ij", X,
Change deprecated `da.atop` to `da.blockwise`
dask_dask-ml
train
py
1831f977a21c157f3e5385d8b12ddcdd4a28f95a
diff --git a/plugins/CoreVisualizations/javascripts/jqplotEvolutionGraph.js b/plugins/CoreVisualizations/javascripts/jqplotEvolutionGraph.js index <HASH>..<HASH> 100644 --- a/plugins/CoreVisualizations/javascripts/jqplotEvolutionGraph.js +++ b/plugins/CoreVisualizations/javascripts/jqplotEvolutionGraph.js @@ -75,7 +75,6 @@ }, _bindEvents: function () { - this.setYTicks(); JqplotGraphDataTablePrototype._bindEvents.call(this); var self = this; @@ -124,6 +123,11 @@ _destroyDataPointTooltip: function () { // do nothing, tooltips are destroyed in the jqplotMouseLeave event + }, + + render: function () { + this.setYTicks(); + JqplotGraphDataTablePrototype.render.call(this); } });
Fix regression in row evolution popover: y axis ticks were not reset on series switch.
matomo-org_matomo
train
js
156ce410c31cc5ace173554871f097fc35380774
diff --git a/framework/db/ar/CActiveFinder.php b/framework/db/ar/CActiveFinder.php index <HASH>..<HASH> 100644 --- a/framework/db/ar/CActiveFinder.php +++ b/framework/db/ar/CActiveFinder.php @@ -1442,7 +1442,7 @@ class CStatElement $cols=array(); foreach($pkTable->primaryKey as $n=>$pk) { - $name=$table->columns[$map[$pk]]->rawName; + $name=$tableAlias.'.'.$table->columns[$map[$pk]]->rawName; $cols[$name]=$name.' AS '.$schema->quoteColumnName('c'.$n); } $sql='SELECT '.implode(', ',$cols).", {$relation->select} AS $s FROM {$table->rawName} ".$tableAlias.$join
CStatElement ambiguous fields with join table with composite PK fixed.
yiisoft_yii
train
php
5adc3b4c7ab17df7dbf3a0047abf5281d07a8bb5
diff --git a/media/js/common.js b/media/js/common.js index <HASH>..<HASH> 100644 --- a/media/js/common.js +++ b/media/js/common.js @@ -25,12 +25,27 @@ $.validator.addMethod('alphanum', function(value, element) { $.fn.updateTimeStamp = function() { var $this = $(this); var time = $this.attr('title'); - time = moment(time).fromNow(); + time = moment(time).calendar(); $this.text(time); }; -setInterval(function() { - $('time').each(function() { - $(this).updateTimeStamp(); - }); -}, 60000); +$(function() { + + // Refresh timestamps just after midnight + + var oneMinutePastMidnight = moment() + .endOf('day') + .add(1, 'minutes') + .diff(moment()); + + var interval = moment.duration(24, 'hours').asMilliseconds(); + + setTimeout(function() { + setInterval(function() { + $('time').each(function() { + $(this).updateTimeStamp(); + }); + }, interval); + }, oneMinutePastMidnight); + +});
Changed timestamps to use calendar time, not relative time.
sdelements_lets-chat
train
js
6776a2d4f17f89c9ec0b7221a679c2f0fbd470df
diff --git a/Core/Handlers/MessageHandler.php b/Core/Handlers/MessageHandler.php index <HASH>..<HASH> 100644 --- a/Core/Handlers/MessageHandler.php +++ b/Core/Handlers/MessageHandler.php @@ -480,6 +480,7 @@ class MessageHandler extends Service implements HandlerInterface, ContainerAware * * @param CallbackExchangeEnvelope $envelope * @param ProcessingException $exception + * @param ProcessorInterface $processor */ private function addCallbackHeadersToEnvelope(CallbackExchangeEnvelope $envelope, ProcessingException $exception, ProcessorInterface $processor) {
Add processor description to addCallbackHeadersToEnvelope method
smartboxgroup_integration-framework-bundle
train
php
3dcaccd98c881efab18e2dbfb6a001c1a260ddc4
diff --git a/tests/__init__.py b/tests/__init__.py index <HASH>..<HASH> 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -273,6 +273,40 @@ class ClassTest(TableTest): 'class_test', 'test_one', items) +class SortUrlNotSetTest(TableTest): + def setUp(self): + class MyTable1(Table): + allow_sort = True + name = Col('Name Heading') + self.table_cls1 = MyTable1 + + class MyTable2(Table): + allow_sort = True + name = Col('Name Heading') + + def sort_url(self, col_id, reverse=False): + return '?sort={}&reverse={}'.format(col_id, reverse) + + self.table_cls2 = MyTable2 + + def test_fail(self): + items = [{'name': 'TestName'}] + + def _create_table1(): + html = self.table_cls1(items, sort_by='name').__html__() + + def _create_table2(): + html = self.table_cls2(items, sort_by='name').__html__() + + # table1 should raise a NotImplementedError + self.assertRaises(NotImplementedError, _create_table1) + # table2 should work fine + try: + _create_table2() + except Exception: + self.fail('Table creation failed unexpectedly') + + class NoItemsTest(TableTest): def setUp(self): class MyTable(Table):
Add tests for sort_url being not-set
plumdog_flask_table
train
py
d3633b27810ea47605e6c97097e05f14703fb3b3
diff --git a/src/Traits/ComplementRequest.php b/src/Traits/ComplementRequest.php index <HASH>..<HASH> 100644 --- a/src/Traits/ComplementRequest.php +++ b/src/Traits/ComplementRequest.php @@ -122,7 +122,8 @@ trait ComplementRequest { self::$config['external'] = []; - foreach ($_POST['external'] as $complement => $url) { + $remote = is_array($_POST['external']) ? $_POST['external'] : []; + foreach ($remote as $complement => $url) { $url = filter_var($url, FILTER_VALIDATE_URL); if ($url === false) { return false;
Updated to version <I>
eliasis-framework_complement
train
php
533cfe6fd0f6a2238e08917cfe014b923fc69130
diff --git a/plugins/respimg/ls.respimg.js b/plugins/respimg/ls.respimg.js index <HASH>..<HASH> 100644 --- a/plugins/respimg/ls.respimg.js +++ b/plugins/respimg/ls.respimg.js @@ -84,8 +84,8 @@ if(!lazySizes.hasHDescriptorFix && document.msElementsFromPoint){ lazySizes.hasHDescriptorFix = true; fixEdgeHDescriptor(); - return; } + return; } if(window.picturefill || config.pf){return;}
Extract Fix/Workaround h descriptor parsing in MS edge from respimg polyfill.
aFarkas_lazysizes
train
js
306f3c3262741afbb5cce72b2517e8231be2d735
diff --git a/libplanarradpy/planrad.py b/libplanarradpy/planrad.py index <HASH>..<HASH> 100644 --- a/libplanarradpy/planrad.py +++ b/libplanarradpy/planrad.py @@ -232,7 +232,7 @@ class RunParameters(): f.write('azimuth= ' + str(self.sky_azimuth) + '\n') f.write('zenith= ' + str(self.sky_zenith) + '\n') f.write('sky_save_fp= ' + inp_file.strip('_params.txt') + '\n') - f.write('sky_image_save_fp= image_' + self.sky_file + '.ppm' + '\n') + f.write('sky_image_save_fp= ' + self.sky_file + '.ppm' + '\n') f.write('sky_image_size= 256' + '\n') if self.sky_type == 'hlideal': f.write('C= ' + str(self.sky_c) + '\n')
fixed file path bug for saving sky images
marrabld_planarradpy
train
py
b756a1507f06686540b56b3a29186841ea741bad
diff --git a/pgjdbc/src/test/java/org/postgresql/test/jdbc2/GeometricTest.java b/pgjdbc/src/test/java/org/postgresql/test/jdbc2/GeometricTest.java index <HASH>..<HASH> 100644 --- a/pgjdbc/src/test/java/org/postgresql/test/jdbc2/GeometricTest.java +++ b/pgjdbc/src/test/java/org/postgresql/test/jdbc2/GeometricTest.java @@ -125,9 +125,9 @@ public class GeometricTest extends TestCase { if (roundTripToDatabase) { try { checkReadWrite(new PGline(), columnName); - fail("Expected a PGSQLException to be thrown"); + fail("Expected a PSQLException to be thrown"); } catch (PSQLException e) { - assertTrue(e.getMessage().contains("A and B cannot both be zero")); + assertEquals("22P02", e.getSQLState()); } }
test: make tests independent from server LC_MESSAGES (#<I>)
pgjdbc_pgjdbc
train
java
e0533cf95e2055cf1f5fb9e218179997ed74c064
diff --git a/zfs_test.go b/zfs_test.go index <HASH>..<HASH> 100644 --- a/zfs_test.go +++ b/zfs_test.go @@ -262,7 +262,8 @@ func TestChildren(t *testing.T) { func TestListZpool(t *testing.T) { zpoolTest(t, func() { - _, err := zfs.ListZpools() + pools, err := zfs.ListZpools() + equals(t, "test", pools[0].Name) ok(t, err) }) }
test that ListZpools returns expected zpool
mistifyio_go-zfs
train
go
a7bb65df378b9cd9e4e930976acbe2b7ddc993af
diff --git a/spec/timeliness/parser_spec.rb b/spec/timeliness/parser_spec.rb index <HASH>..<HASH> 100644 --- a/spec/timeliness/parser_spec.rb +++ b/spec/timeliness/parser_spec.rb @@ -156,6 +156,13 @@ describe Timeliness::Parser do end end + context "with time value argument" do + it 'should use argument as :now option value' do + time = parse("12:13:14", Time.local(2010,1,1)) + time.should == Time.local(2010,1,1,12,13,14) + end + end + context "with :zone option" do context ":utc" do it "should return time object in utc timezone" do
spec coverage of time value as 2nd arg to parse
adzap_timeliness
train
rb
3e969999f68cb3244d21b7fbb401f4427c601126
diff --git a/phantomjs/bridge.js b/phantomjs/bridge.js index <HASH>..<HASH> 100644 --- a/phantomjs/bridge.js +++ b/phantomjs/bridge.js @@ -73,8 +73,9 @@ page.open(url, function (status) { break; default: sendMessage("console", 'Unknown standard.'); - phantom.exit(); break; } + + phantom.exit(); });
exit phantom process when processing is done
yargalot_grunt-accessibility
train
js
6080fa821dd941592e1c5f7803e6867d68ad471b
diff --git a/pyblish_qml/host.py b/pyblish_qml/host.py index <HASH>..<HASH> 100644 --- a/pyblish_qml/host.py +++ b/pyblish_qml/host.py @@ -271,7 +271,6 @@ def install_host(use_threaded_wrapper): except ImportError: pass else: - install_event_filter() break @@ -279,9 +278,8 @@ def install_event_filter(): main_window = _state.get("vesselParent") if main_window is None: - sys.stdout.write("Main window not found, event filter did not " - "installed.\n") - return + raise Exception("Main window not found, event filter did not " + "install. This is a bug.") try: host_event_filter = HostEventFilter(main_window) @@ -415,6 +413,8 @@ def _install_maya(use_threaded_wrapper): for widget in QtWidgets.QApplication.topLevelWidgets() }["MayaWindow"] + install_event_filter() + _set_host_label("Maya") @@ -429,6 +429,8 @@ def _common_setup(host_name, threaded_wrapper, use_threaded_wrapper): app.aboutToQuit.connect(_on_application_quit) _acquire_host_main_window(app) + install_event_filter() + _set_host_label(host_name)
Change event installation point, raise if main window not found
pyblish_pyblish-qml
train
py
28a1c600125f33d64107666d4aaf018a2152cd7f
diff --git a/lib/action_kit_api.rb b/lib/action_kit_api.rb index <HASH>..<HASH> 100644 --- a/lib/action_kit_api.rb +++ b/lib/action_kit_api.rb @@ -34,7 +34,7 @@ module ActionKitApi "akid" => user.akid, }) - @@connection.call('act', act_attrs) + response = @@connection.call('act', act_attrs) ActionKitApi::Action.new(response) end
Noticed that the response was not being saved for the next call. Wouldn't have been a big issue unless you tried to use the Action returned by the act method. The Action still would've been recorded and would have been searchable.
Democracy-for-America_ActionKitApi
train
rb
f38c3a4f205930c8852754e70e8fd6cdab5a2469
diff --git a/Query/Builder.php b/Query/Builder.php index <HASH>..<HASH> 100755 --- a/Query/Builder.php +++ b/Query/Builder.php @@ -178,6 +178,7 @@ class Builder { 'like', 'not like', 'between', 'ilike', '&', '|', '^', '<<', '>>', 'rlike', 'regexp', 'not regexp', + '~', '~*', '!~', '!~*' ); /**
Adding the regex operators for PostgreSQL
illuminate_database
train
php
198cad91272b394504dea322725c8b556dc06cf8
diff --git a/go/vt/servenv/buildinfo.go b/go/vt/servenv/buildinfo.go index <HASH>..<HASH> 100644 --- a/go/vt/servenv/buildinfo.go +++ b/go/vt/servenv/buildinfo.go @@ -23,8 +23,6 @@ import ( "strconv" "time" - "vitess.io/vitess/go/vt/sqlparser" - "vitess.io/vitess/go/stats" ) @@ -106,7 +104,6 @@ func init() { goArch: runtime.GOARCH, version: versionName, } - sqlparser.MySQLVersion = AppVersion.MySQLVersion() stats.NewString("BuildHost").Set(AppVersion.buildHost) stats.NewString("BuildUser").Set(AppVersion.buildUser) stats.NewGauge("BuildTimestamp", "build timestamp").Set(AppVersion.buildTime)
don't update the parser version based on the announced version
vitessio_vitess
train
go
a67fdc16ff5d52ff7b188aa657f8595596334cfc
diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py index <HASH>..<HASH> 100644 --- a/tests/test_scheduler.py +++ b/tests/test_scheduler.py @@ -334,16 +334,6 @@ class TestScheduler(RQTestCase): s = Scheduler() self.assertEqual(s.connection, self.testconn) - def test_no_functions_from__main__module(self): - """ - Ensure functions from the __main__ module are not accepted for scheduling. - """ - def dummy(): - return 1 - # Fake __main__ module function - dummy.__module__ = "__main__" - self.assertRaises(ValueError, self.scheduler._create_job, dummy) - def test_small_float_interval(self): """ Test that scheduler accepts 'interval' of type float, less than 1 second.
tests: remove test_no_functions_from__main__module The code this was testing was removed in ea4bef7f: <URL>
rq_rq-scheduler
train
py
fafb44dcadb80d7ee8a2415af606efc2c77c8c2d
diff --git a/test/transports.xhr-polling.test.js b/test/transports.xhr-polling.test.js index <HASH>..<HASH> 100644 --- a/test/transports.xhr-polling.test.js +++ b/test/transports.xhr-polling.test.js @@ -1109,6 +1109,7 @@ module.exports = { msgs[0].should.eql({ type: 'json' , data: 5 + , endpoint: '' }); }); });
Fixed test expectation for xhr-polling.
socketio_socket.io
train
js
a66d9fe4b244b9261621acec1e3777e4628a5ef1
diff --git a/sos/sos_executor.py b/sos/sos_executor.py index <HASH>..<HASH> 100755 --- a/sos/sos_executor.py +++ b/sos/sos_executor.py @@ -202,8 +202,7 @@ class Base_Executor: except Exception as e: if env.verbosity > 2: sys.stderr.write(get_traceback()) - raise RuntimeError('Failed to execute statements\n"{}"\n{}'.format( - self.workflow.global_def, e)) + raise def skip(self, section): if section.global_def: @@ -719,8 +718,7 @@ class MP_Executor(Base_Executor): except RuntimeError as e: if env.verbosity > 2: sys.stderr.write(get_traceback()) - raise RuntimeError('Failed to execute statements\n"{}"\n{}'.format( - section.global_def, e)) + raise # clear existing keys, otherwise the results from some random result # might mess with the execution of another step that does not define input
Fix last patch because it broke some exception related tests Former-commit-id: ad<I>fca<I>a6c<I>d<I>cba1c5bbf<I>a<I>
vatlab_SoS
train
py
49d59b9a0c8a832a8ff165439ee1ede99cda571e
diff --git a/widgetsnbextension/src/widget_output.js b/widgetsnbextension/src/widget_output.js index <HASH>..<HASH> 100644 --- a/widgetsnbextension/src/widget_output.js +++ b/widgetsnbextension/src/widget_output.js @@ -21,9 +21,10 @@ var OutputModel = outputBase.OutputModel.extend({ initialize: function(attributes, options) { OutputModel.__super__.initialize.apply(this, arguments); - this.kernel = this.comm.kernel; this.listenTo(this, 'change:msg_id', this.reset_msg_id); - if (this.kernel) { + + if (this.comm && this.comm.kernel) { + this.kernel = this.comm.kernel; this.kernel.set_callbacks_for_msg(this.model_id, this.callbacks(), false); }
Avoid error initializing output widget when comm is missing
jupyter-widgets_ipywidgets
train
js
1f5763245665d0bcef77d076875d4ac49bc4ac4b
diff --git a/lib/smart_proxy_dynflow_core/log.rb b/lib/smart_proxy_dynflow_core/log.rb index <HASH>..<HASH> 100644 --- a/lib/smart_proxy_dynflow_core/log.rb +++ b/lib/smart_proxy_dynflow_core/log.rb @@ -47,17 +47,7 @@ module SmartProxyDynflowCore super(@fd, rest) end - def add(*args) - handle_log_rolling if @roll_log - super(*args) - end - def roll_log - @roll_log = true - end - - def handle_log_rolling - @roll_log = false unless @file.kind_of? IO @fd.reopen @file, 'a' @fd.sync = true
Fixes #<I> - Reopen logfiles immediately after log rotation
theforeman_smart_proxy_dynflow
train
rb
abce219a9913e1b829f3bc14929f3a19e1d60ef4
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -20,9 +20,18 @@ async function install(givenPackageName: ?string) { } await Helpers.enablePackage('notifications') const view = new View(packageName, dependencies) - view.complete(await Helpers.apmInstall(dependencies, function() { + const errors = await Helpers.apmInstall(dependencies, function() { view.advance() - })) + }) + const promises = [] + view.complete(errors) + for (const dependency of (dependencies: Array<string>)) { + if (errors.has(dependency)) { + continue + } + promises.push(atom.packages.activatePackage(dependency)) + } + await Promise.all(promises) } module.exports.install = install
:new: Activate packages after installation
steelbrain_package-deps
train
js
38ee942a3596ba90614c5c0cdb2365ebb2ee322c
diff --git a/jujupy.py b/jujupy.py index <HASH>..<HASH> 100644 --- a/jujupy.py +++ b/jujupy.py @@ -70,8 +70,6 @@ class Environment: for ignored in until_timeout(300): status = self.get_status() states = self.agent_states(status) - pending = False - state_listing = [] if states.keys() == ['started']: break for state, entries in states.items(): @@ -79,10 +77,9 @@ class Environment: raise ErroredUnit(entries[0], state) print format_listing(states, 'started') sys.stdout.flush() - if not pending: - return status else: raise Exception('Timed out!') + return status def format_listing(listing, expected):
Fix wait_for_started logic.
juju_juju
train
py
0b74f87745b6259db4545b28780273b72583c65b
diff --git a/salt/client.py b/salt/client.py index <HASH>..<HASH> 100644 --- a/salt/client.py +++ b/salt/client.py @@ -80,7 +80,7 @@ class LocalClient(object): if fn_.startswith('.'): continue if not ret.has_key(fn_): - ret[fn_] = pickle.loads(open(os.path.join(jid_dir, + ret[fn_] = pickle.load(open(os.path.join(jid_dir, fn_, 'return.p'), 'r')) if len(ret) >= len(minions): return ret
loading a file pickle, not a string pickle
saltstack_salt
train
py
c8693e778dfdbbc44c21abc7f45742d16b58e237
diff --git a/lib/watson_apis/language_translator_v3.rb b/lib/watson_apis/language_translator_v3.rb index <HASH>..<HASH> 100644 --- a/lib/watson_apis/language_translator_v3.rb +++ b/lib/watson_apis/language_translator_v3.rb @@ -229,7 +229,7 @@ module WatsonAPIs "version" => @version } data = text - headers = { "Content-Type" => "text/plain" } + headers["Content-Type"] = "text/plain" method_url = "/v3/identify" response = request( method: "POST",
refactor(headers): Adjust generated code to avoid useless assignment
watson-developer-cloud_ruby-sdk
train
rb
28579fac1fef51fe92bc9930c6331424f88b02a7
diff --git a/store.go b/store.go index <HASH>..<HASH> 100644 --- a/store.go +++ b/store.go @@ -65,7 +65,7 @@ func NewStore() *Store { if maxValueSize <= 0 { maxValueSize = 4194304 } - allocSize := 1 << PowerOfTwoNeeded(uint64(maxValueSize)) + allocSize := 1 << PowerOfTwoNeeded(uint64(maxValueSize+4)) if allocSize < 4096 { allocSize = 4096 }
gotta have that extra 4 bytes
gholt_store
train
go
019d945bf58f83284e00c6fccaf2c7a0fe8f5b88
diff --git a/cid-fmt/main.go b/cid-fmt/main.go index <HASH>..<HASH> 100644 --- a/cid-fmt/main.go +++ b/cid-fmt/main.go @@ -228,13 +228,11 @@ func fmtCid(fmtStr string, base mb.Encoding, cid *c.Cid) (string, error) { } func baseToString(base mb.Encoding) string { - // FIXME: Use lookup tables when they are added to go-multibase - switch base { - case mb.Base58BTC: - return "base58btc" - default: + baseStr, ok := mb.EncodingToStr[base] + if !ok { return fmt.Sprintf("base?%c", base) } + return baseStr } func codecToString(num uint64) string {
Use lookup table in go-multibase now that it is supported.
ipfs_go-cid
train
go
7092ea5da5dd6660ffb30dfcfa9e147f27e38f1a
diff --git a/lib/pluginlib.php b/lib/pluginlib.php index <HASH>..<HASH> 100644 --- a/lib/pluginlib.php +++ b/lib/pluginlib.php @@ -1085,7 +1085,7 @@ class available_update_checker { return true; } - if ($now - $recent > HOURSECS) { + if ($now - $recent > 24 * HOURSECS) { return false; }
MDL-<I> Fix available_update_checker::cron_has_fresh_fetch() For the purpose of cron based fetching, recently fetched data are valid for <I> hours.
moodle_moodle
train
php
ae95eefcf1f6d4de3bcf3fdfdaa863ad6687bcca
diff --git a/library/CM/Bootloader.php b/library/CM/Bootloader.php index <HASH>..<HASH> 100644 --- a/library/CM/Bootloader.php +++ b/library/CM/Bootloader.php @@ -278,9 +278,11 @@ class CM_Bootloader { $vendorDir = preg_replace('#/?$#', '/', $composerJson->config['vendor-dir']); } foreach ((array) $composerJson->require as $path => $version) { - $parts = explode('/', $path); - $namespace = $parts[1]; - $namespacePaths[$namespace] = $vendorDir . $path . '/'; + if (false !== strpos($path, '/')) { + $parts = explode('/', $path); + $namespace = $parts[1]; + $namespacePaths[$namespace] = $vendorDir . $path . '/'; + } } return $namespacePaths; }
Fixed parsing of $composerJson->require in CM_Bootloader::_getNamespacePathsComposer() - Allowed for platform packages
cargomedia_cm
train
php
635599c28c0e5f3e6655ced4462cd17275210b6d
diff --git a/tests/test_run_app.py b/tests/test_run_app.py index <HASH>..<HASH> 100644 --- a/tests/test_run_app.py +++ b/tests/test_run_app.py @@ -1,6 +1,7 @@ import asyncio import pytest import ssl +import sys from unittest import mock from aiohttp import web @@ -56,7 +57,10 @@ def test_run_app_nondefault_host_port(loop, unused_port): loop.create_server.assert_called_with(mock.ANY, host, port, ssl=None) [email protected](sys.version_info < (3, 5)) def test_run_app_default_eventloop(loop, unused_port): + # Python 3.4 fails on running in debug mode if loop is wrapped by mock + loop = mock.Mock(spec=asyncio.AbstractEventLoop, wrap=loop) asyncio.set_event_loop(loop)
Skip failing test on Python <I>
aio-libs_aiohttp
train
py
be9f8a1476829c5e73c105e8b7f25952365d157d
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 @@ -454,10 +454,8 @@ var Sprite = Renderable.extend({ * mySprite.setRegion(game.texture.getRegion("shadedDark13.png")); */ setRegion : function (region) { - if (this.source !== null) { - // set the source texture for the given region - this.image = this.source.getTexture(region); - } + // set the source texture for the given region + this.image = this.source.getTexture(region); // set the sprite offset within the texture this.current.offset.setV(region.offset); // set angle if defined
remove check, as `source` is never null or undefined at this stage
melonjs_melonJS
train
js
58d4a39d1f82e566880e1ae9e7a69bf4235fbb41
diff --git a/singularity/tests/test_client.py b/singularity/tests/test_client.py index <HASH>..<HASH> 100644 --- a/singularity/tests/test_client.py +++ b/singularity/tests/test_client.py @@ -82,13 +82,6 @@ class TestClient(unittest.TestCase): print(result) self.assertTrue('bin\nboot\ndev' in result) - print("Testing client.inspect command") - result = self.cli.inspect(container,quiet=True) - labels = json.loads(result) - self.assertTrue('data' in labels) - os.remove(container) - - if __name__ == '__main__': unittest.main()
modified: singularity/tests/test_client.py
singularityhub_singularity-python
train
py
056641ff0e373df0925dfba60ed85452daf7c8f7
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ if os.name == 'nt': import py2exe setup(name='marionette-tg', - console=['bin/marionette_client','bin/marionette_server', 'bin/httpserver', 'bin/socksserver'], + console=['bin/marionette_client','bin/marionette_server'], scripts=['bin/marionette_client','bin/marionette_server'], test_suite='marionette_tg', packages=['marionette_tg','marionette_tg.plugins'],
Issue #<I>: build only marionette_(client|server)
marionette-tg_marionette
train
py
a9eff2085c85b4746167658f3efdeb0c2a45e9fc
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ def read(fname): setup( name = "rapid", - version = "0.0.1", + version = "0.0.2", author = "Keshav Gupta", author_email = "[email protected]", description = ("rapid generates boilerplate code through command line"), @@ -14,14 +14,17 @@ setup( keywords = ["boilerplate", "cli", "generate" "command line"], url = "https://github.com/keshav11/rapid", packages=['rapid'], - long_description=read('README.md'), - download_url='https://github.com/keshav11/rapid/tarball/0.0.1', + download_url='https://github.com/keshav11/rapid/tarball/0.0.2', package_data={ 'rapid': [ 'boilerplate/c/*.bp', 'boilerplate/csharp/*.bp', 'boilerplate/html/*.bp', + 'boilerplate/cpp/*.bp', + 'boilerplate/empty/*.bp', + 'boilerplate/python/*.bp', 'boilerplate/java/*.bp' + ] }, entry_points = {
fixed some bugs related to newly added languages
keshav11_rapid
train
py
e58726158d785a4ce9898767518257052fff9c3f
diff --git a/tests/test_views.py b/tests/test_views.py index <HASH>..<HASH> 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +import json from datetime import timedelta try: @@ -225,8 +226,8 @@ class UpdateHitCountJSONTests(TestCase): non_ajax_request = self.factory.get('/', HTTP_X_REQUESTED_WITH='XMLHttpRequest') response = update_hit_count_ajax(non_ajax_request) - self.assertEqual(response.content, - '{"error_message": "Hits counted via POST only.", "success": false}') + self.assertEqual(json.loads(response.content), + json.loads('{"error_message": "Hits counted via POST only.", "success": false}')) def test_count_hit(self): """
build error try to compare json instead of string
thornomad_django-hitcount
train
py
5dc795491bdaadca15c380317568785e0e7105ed
diff --git a/src/sentaku/modeling.py b/src/sentaku/modeling.py index <HASH>..<HASH> 100644 --- a/src/sentaku/modeling.py +++ b/src/sentaku/modeling.py @@ -1,8 +1,20 @@ import attr +class ElementMixin(object): + @property + def context(self): + """the context this element belongs to""" + return self.parent.context + + @property + def impl(self): + """shortcut to get the currently active application implementation""" + return self.context.impl + + @attr.s -class Element(object): +class Element(ElementMixin): """Base class for all application elements :param parent: @@ -13,16 +25,6 @@ class Element(object): parent = attr.ib(repr=False) - @property - def context(self): - """the context this element belongs to""" - return self.parent.context - - @property - def impl(self): - """shortcut to get the currently active application implementation""" - return self.context.impl - @attr.s class Collection(Element):
split ElementMixin out of Element
RedHatQE_Sentaku
train
py
d385992a83c80c9733d565e675487ebad82578c2
diff --git a/lib/github/html/body_content.rb b/lib/github/html/body_content.rb index <HASH>..<HASH> 100644 --- a/lib/github/html/body_content.rb +++ b/lib/github/html/body_content.rb @@ -1,20 +1,38 @@ module GitHub::HTML + # Public: Runs a String of content through an HTML processing pipeline, + # providing easy access to a generated DocumentFragment. class BodyContent attr_reader :result + + # Public: Initialize a BodyContent. + # + # body - A String body. + # context - A Hash of context options for the filters. + # pipeline - A GitHub::HTML::Pipeline object with one or more Filters. def initialize(body, context, pipeline) @body = body @context = context @pipeline = pipeline end + # Public: Gets the memoized result of the body content as it passed through + # the Pipeline. + # + # Returns a Hash, or something similar as defined by @pipeline.result_class. def result @result ||= @pipeline.call @body, @context end + # Public: Gets the updated body from the Pipeline result. + # + # Returns a String or DocumentFragment. def output @output ||= result[:output] end + # Public: Parses the output into a DocumentFragment. + # + # Returns a DocumentFragment. def document @document ||= GitHub::HTML.parse output end
tomdoc. though is #output even necessary?
jch_html-pipeline
train
rb
afb35e3e9b6576bcb6021076eb86b9020516b720
diff --git a/dipper/sources/FlyBase.py b/dipper/sources/FlyBase.py index <HASH>..<HASH> 100644 --- a/dipper/sources/FlyBase.py +++ b/dipper/sources/FlyBase.py @@ -567,6 +567,8 @@ class FlyBase(Source): # 1440 3175682 62137 # 2 3160606 99159 feature_key = feature_id + if feature_key not in self.idhash['feature']: + continue feature_id = self.idhash['feature'][feature_key] pub_key = pub_id pub_id = self.idhash['publication'][pub_key]
check for any missing features in hash
monarch-initiative_dipper
train
py
a9e908c97e02010ccfb87b047d2a6495a704e478
diff --git a/src/Downloader/ImageDownloader.php b/src/Downloader/ImageDownloader.php index <HASH>..<HASH> 100644 --- a/src/Downloader/ImageDownloader.php +++ b/src/Downloader/ImageDownloader.php @@ -29,7 +29,7 @@ final class ImageDownloader implements ImageDownloaderInterface { $pathInfo = pathinfo($url); $extension = $pathInfo['extension']; - $path = sys_get_temp_dir() . md5(random_bytes(10)) . '.' . $extension; + $path = rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . md5(random_bytes(10)) . '.' . $extension; $this->filesystem->dumpFile($path, file_get_contents($url));
Fixes issue with incorrect temp file path
BitBagCommerce_SyliusCmsPlugin
train
php
e23ca1655c205ecbee9a00e7fb2ec04c2132f227
diff --git a/test/spec/ol/feature.test.js b/test/spec/ol/feature.test.js index <HASH>..<HASH> 100644 --- a/test/spec/ol/feature.test.js +++ b/test/spec/ol/feature.test.js @@ -133,6 +133,22 @@ describe('ol.Feature', function() { expect(feature.getGeometry()).toBe(point); }); + it('can be used to set attributes with arbitrary names', function() { + + var feature = new ol.Feature(); + + feature.set('toString', 'string'); + expect(feature.get('toString')).toBe('string'); + expect(typeof feature.toString).toBe('function'); + + feature.set('getGeometry', 'x'); + expect(feature.get('getGeometry')).toBe('x'); + + feature.set('geom', new ol.geom.Point([1, 2])); + expect(feature.getGeometry()).toBeA(ol.geom.Point); + + }); + }); describe('#setGeometry()', function() {
Confirm that arbitrary attribute names can be used
openlayers_openlayers
train
js
02a194746f0629e8c60c9b6eca9fd3bce04145cd
diff --git a/salt/crypt.py b/salt/crypt.py index <HASH>..<HASH> 100644 --- a/salt/crypt.py +++ b/salt/crypt.py @@ -41,7 +41,9 @@ def gen_keys(keydir, keyname, keysize): priv = '{0}.pem'.format(base) pub = '{0}.pub'.format(base) gen = RSA.gen_key(keysize, 1) + cumask = os.umask(191) gen.save_key(priv, callback=foo_pass) + os.umask(cmask) gen.save_pub_key(pub) key = RSA.load_key(priv, callback=foo_pass) os.chmod(priv, 256) diff --git a/salt/master.py b/salt/master.py index <HASH>..<HASH> 100644 --- a/salt/master.py +++ b/salt/master.py @@ -76,7 +76,9 @@ class SMaster(object): return open(keyfile, 'r').read() else: key = salt.crypt.Crypticle.generate_key_string() + cumask = os.umask(191); open(keyfile, 'w+').write(key) + os.umask(cumask) os.chmod(keyfile, 256) return key
Prevent race on private file creation Set umask to <I> during operations that create private files to prevent a race against chmod which comes after.
saltstack_salt
train
py,py
f5635980ecce55df222e28dd3561c2bcf432958a
diff --git a/lib/svtplay_dl/service/kanal5.py b/lib/svtplay_dl/service/kanal5.py index <HASH>..<HASH> 100644 --- a/lib/svtplay_dl/service/kanal5.py +++ b/lib/svtplay_dl/service/kanal5.py @@ -60,9 +60,6 @@ class Kanal5(Service): if data["hasSubtitle"]: yield subtitle_json("http://www.kanal5play.se/api/subtitles/%s" % video_id) - if options.subtitle and options.force_subtitle: - return - steambaseurl = data["streamBaseUrl"] for i in data["streams"]: if i["drmProtected"]:
kanal5: we have this in a other place now
spaam_svtplay-dl
train
py
88fa70c32d35363ad59ddf3a673da88ce4dcf880
diff --git a/account/Controller/Pass/Confirm.php b/account/Controller/Pass/Confirm.php index <HASH>..<HASH> 100644 --- a/account/Controller/Pass/Confirm.php +++ b/account/Controller/Pass/Confirm.php @@ -35,17 +35,23 @@ class Confirm_Pass_Controller extends Controller if (!$this->form->errors()) { extract($args); if (!($error = (new Confirm_Model)->process($hash, $id))) { - $pw = self::adapter()->field( + extract(self::adapter()->row( 'monolyth_auth', - 'pass', + ['name', 'pass'], compact('id') - ); - (new Pass_Model)->update($pw, $id); + )); + (new Pass_Model)->update($pass, $id); + $form = new Login_Form; + $form['name']->value = $name; + $form['pass']->value = $pass; + (new Login_Model)->__invoke($form); self::message()->add( 'success', - $this->text('pass/reset/success', ['pass' => $pw]) + $this->text('pass/reset/success') ); - return $this->view('page/pass/display', ['pass' => $pw]); + throw new HTTP301_Exception($this->url( + 'monolyth/account/new_pass' + )); } elseif ($error == 'contains outdated elements') { self::message()->add( 'error',
slightly different logic here - after resetting, we want the user to choose a new password
monolyth-php_frontal
train
php
385e5833a54aaba5860ca26036b8e8b72135ab96
diff --git a/generator.go b/generator.go index <HASH>..<HASH> 100644 --- a/generator.go +++ b/generator.go @@ -4,6 +4,7 @@ import ( "bytes" "compress/gzip" "errors" + "fmt" "io" "log" "net/http" @@ -23,6 +24,7 @@ func Generate(input http.FileSystem, opt Options) error { opt.fillMissing() // Create output file. + fmt.Println("writing", opt.Filename) f, err := os.Create(opt.Filename) if err != nil { return err
Print to stdout which files are being written. It's common and nice to see this when vfsgen.Generate is invoked in go generate directives.
shurcooL_vfsgen
train
go
10d156bf135cf8a0aefbc9fff6051d3f9c8187ec
diff --git a/spec/features/scripting_test_spec.rb b/spec/features/scripting_test_spec.rb index <HASH>..<HASH> 100644 --- a/spec/features/scripting_test_spec.rb +++ b/spec/features/scripting_test_spec.rb @@ -100,6 +100,7 @@ DELOREAN and_by 'compute attrs with bad params' do wait_for_ajax + find(:xpath, "//div[text()='Compute Attributes']", wait: 5) fill_in('attrs', with: "A.a; A.b; B.a; C.a") fill_in('params', with: "a = 1.1\nc = 2.2") press('Compute') @@ -204,6 +205,7 @@ DELOREAN and_by 'use bad attributes' do wait_for_ajax + find(:xpath, "//div[text()='Compute Attributes']", wait: 5) fill_in('attrs', with: "A; y; >") press('Compute') end @@ -264,6 +266,7 @@ DELOREAN and_by 'use good attr' do wait_for_ajax + find(:xpath, "//div[text()='Compute Attributes']", wait: 5) fill_in('attrs', with: "C.p; B.p") press('Compute') end
fixed timing issue for scripting_test
arman000_marty
train
rb
0bea216ebac7f5ce1b260411c0acd7303622117f
diff --git a/alphatwirl/loop/EventLoopRunner.py b/alphatwirl/loop/EventLoopRunner.py index <HASH>..<HASH> 100755 --- a/alphatwirl/loop/EventLoopRunner.py +++ b/alphatwirl/loop/EventLoopRunner.py @@ -23,7 +23,7 @@ class EventLoopRunner(object): self.results = [ ] def run(self, eventLoop): - self.results.append(eventLoop(self.progressReporter)) + self.results.append(eventLoop(progressReporter=self.progressReporter)) def end(self): return self.results
give progressReporter as a named argument
alphatwirl_alphatwirl
train
py
83a1d5ea45141daa635c13cbee66c54d63880bde
diff --git a/karyon-core/src/main/java/com/netflix/karyon/transport/http/SimpleUriRouter.java b/karyon-core/src/main/java/com/netflix/karyon/transport/http/SimpleUriRouter.java index <HASH>..<HASH> 100644 --- a/karyon-core/src/main/java/com/netflix/karyon/transport/http/SimpleUriRouter.java +++ b/karyon-core/src/main/java/com/netflix/karyon/transport/http/SimpleUriRouter.java @@ -1,6 +1,5 @@ package com.netflix.karyon.transport.http; -import com.netflix.karyon.transport.RequestRouter; import com.netflix.karyon.transport.interceptor.InterceptorKey; import io.netty.handler.codec.http.HttpResponseStatus; import io.reactivex.netty.protocol.http.server.HttpServerRequest; @@ -19,7 +18,7 @@ import java.util.concurrent.CopyOnWriteArrayList; * * @author Nitesh Kant */ -public class SimpleUriRouter<I, O> implements RequestRouter<HttpServerRequest<I>, HttpServerResponse<O>> { +public class SimpleUriRouter<I, O> implements HttpRequestRouter<I, O> { private final CopyOnWriteArrayList<Route> routes;
Change implementation to be in terms of HttpRequestRouter instead of RequestRouter, as it is more type specific.
Netflix_karyon
train
java
11762220ac6ebde3f1a0c8de9e07bd44a6e49b18
diff --git a/src/Helper/MetricHelper.php b/src/Helper/MetricHelper.php index <HASH>..<HASH> 100644 --- a/src/Helper/MetricHelper.php +++ b/src/Helper/MetricHelper.php @@ -40,7 +40,7 @@ class MetricHelper */ public static function setRequestDurationHistogram(int $durationInMilliseconds, string $handler) { - if (env('APP_ENV') != 'testing') { + if (env('APP_ENV') != 'testing' && php_sapi_name() !== 'cli') { PrometheusExporterFacade::setHistogram( 'query_duration_milliseconds', 'Get the request duration for an elasticsearch query.',
Don't set the metric in cli mode.
triadev_LaravelElasticsearchProvider
train
php
8f054a7dbbc7df7ca2e0877333345b6721da9f4a
diff --git a/src/Illuminate/Database/DetectsLostConnections.php b/src/Illuminate/Database/DetectsLostConnections.php index <HASH>..<HASH> 100644 --- a/src/Illuminate/Database/DetectsLostConnections.php +++ b/src/Illuminate/Database/DetectsLostConnections.php @@ -56,6 +56,7 @@ trait DetectsLostConnections 'SQLSTATE[HY000]: General error: 7 SSL SYSCALL error: No route to host', 'The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior.', 'SQLSTATE[08006] [7] could not translate host name', + 'TCP Provider: Error code 0x274C', ]); } }
Add new lost connection error message for sqlsrv (#<I>)
laravel_framework
train
php
4bafb4f95b38dbccfdd4d95cc3e591676c1f4a3c
diff --git a/transport/src/main/java/io/netty/channel/nio/AbstractNioByteChannel.java b/transport/src/main/java/io/netty/channel/nio/AbstractNioByteChannel.java index <HASH>..<HASH> 100644 --- a/transport/src/main/java/io/netty/channel/nio/AbstractNioByteChannel.java +++ b/transport/src/main/java/io/netty/channel/nio/AbstractNioByteChannel.java @@ -116,6 +116,7 @@ public abstract class AbstractNioByteChannel extends AbstractNioChannel { if (localReadAmount <= 0) { // not was read release the buffer byteBuf.release(); + byteBuf = null; close = localReadAmount < 0; break; }
[#<I>] Ensure ByteBuf is not release two times Motivation: As the ByteBuf is not set to null after release it we may try to release it again in handleReadException() Modifications: - set ByteBuf to null to avoid another byteBuf.release() to be called in handleReadException() Result: No IllegalReferenceCountException anymore
netty_netty
train
java
b001834d3c9da38b122f687ee994e800b7b8802c
diff --git a/openquake/baselib/parallel.py b/openquake/baselib/parallel.py index <HASH>..<HASH> 100644 --- a/openquake/baselib/parallel.py +++ b/openquake/baselib/parallel.py @@ -512,7 +512,6 @@ class Starmap(object): @classmethod def shutdown(cls, poolsize=None): if hasattr(cls, 'pool'): - logging.info('Closing process pool') cls.pool.close() cls.pool.terminate() cls.pool.join()
Removed another warning [skip CI]
gem_oq-engine
train
py
231e246f972474e8214629c6adbc05a8db97d806
diff --git a/lib/server.js b/lib/server.js index <HASH>..<HASH> 100644 --- a/lib/server.js +++ b/lib/server.js @@ -62,13 +62,14 @@ server.createPhantom = function() { console.log('starting phantom'); var args = ["--load-images=false", "--ignore-ssl-errors=true", "--ssl-protocol=tlsv1"]; + var port = this.options.phantomBasePort || 12300; if(this.options.phantomArguments) { args = this.options.phantomArguments; } args.push({ - port: this.options.phantomBasePort || 12300, + port: port + this.options.worker.id, binary: require('phantomjs').path, onExit: function() { _this.phantom = null;
fixing bug where starting multiple phantomjs servers on the same port caused unexpected callback
prerender_prerender
train
js
67a4c0a053cac2419632e497656d6cdbacceab14
diff --git a/core/interpreter/src/main/java/org/overture/interpreter/values/ObjectValue.java b/core/interpreter/src/main/java/org/overture/interpreter/values/ObjectValue.java index <HASH>..<HASH> 100644 --- a/core/interpreter/src/main/java/org/overture/interpreter/values/ObjectValue.java +++ b/core/interpreter/src/main/java/org/overture/interpreter/values/ObjectValue.java @@ -289,7 +289,7 @@ public class ObjectValue extends Value if (val instanceof ObjectValue) { - return val == this; // Direct object comparison? + return ((ObjectValue) val).objectReference == this.objectReference; } }
Problem with object reference compares in postconditions, fixes #<I>
overturetool_overture
train
java
c138272d6356f3189ac35bd03d2504da35fd49d3
diff --git a/cmd/bucket-handlers.go b/cmd/bucket-handlers.go index <HASH>..<HASH> 100644 --- a/cmd/bucket-handlers.go +++ b/cmd/bucket-handlers.go @@ -1032,6 +1032,12 @@ func (api objectAPIHandlers) PutBucketObjectLockConfigHandler(w http.ResponseWri return } + // Deny object locking configuration settings on existing buckets without object lock enabled. + if _, err = globalBucketMetadataSys.GetObjectLockConfig(bucket); err != nil { + writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL, guessIsBrowserReq(r)) + return + } + if err = globalBucketMetadataSys.Update(bucket, objectLockConfig, configData); err != nil { writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL, guessIsBrowserReq(r)) return
reject object lock requests on existing buckets (#<I>) a regression was introduced fix it to ensure that we do not allow object locking settings on existing buckets without object locking
minio_minio
train
go
f1dc685a2f829f69362752c26d8f7cb486bc3f9a
diff --git a/Facades/Http.php b/Facades/Http.php index <HASH>..<HASH> 100644 --- a/Facades/Http.php +++ b/Facades/Http.php @@ -19,7 +19,7 @@ use Illuminate\Http\Client\Factory; * @method static \Illuminate\Http\Client\PendingRequest contentType(string $contentType) * @method static \Illuminate\Http\Client\PendingRequest dd() * @method static \Illuminate\Http\Client\PendingRequest dump() - * @method static \Illuminate\Http\Client\PendingRequest retry(int $times, int $sleep = 0, ?callable $when = null) + * @method static \Illuminate\Http\Client\PendingRequest retry(int $times, int $sleep = 0, ?callable $when = null, bool $throw = true) * @method static \Illuminate\Http\Client\PendingRequest sink(string|resource $to) * @method static \Illuminate\Http\Client\PendingRequest stub(callable $callback) * @method static \Illuminate\Http\Client\PendingRequest timeout(int $seconds)
[9.x] Fix retry method arguments on Http facade's docblock (#<I>)
illuminate_support
train
php
9681a1e309e8fbcd8f6ca37dcffc63b10382ae80
diff --git a/elastic_doc_manager.py b/elastic_doc_manager.py index <HASH>..<HASH> 100755 --- a/elastic_doc_manager.py +++ b/elastic_doc_manager.py @@ -82,7 +82,7 @@ class DocManager(): """Called to query Elastic for documents in a time range. This method is only used by rollbacks to query all the documents in - Solr within a certain timestamp window. The input will be two longs + Elastic within a certain timestamp window. The input will be two longs (converted from Bson timestamp) which specify the time range. The return value should be an iterable set of documents. """ @@ -113,9 +113,9 @@ class DocManager(): def run_auto_commit(self): """Periodically commits to the Elastic server. - This function commits all changes to the Solr engine, and then starts a + This function commits all changes to the Elastic engine, and then starts a timer that calls this function again in one second. The reason for this - function is to prevent overloading Solr from other searchers. This + function is to prevent overloading Elastic from other searchers. This function may be modified based on the backend engine and how commits are handled, as timers may not be necessary in all instances. """ @@ -129,7 +129,7 @@ class DocManager(): This method is used for rollbacks to establish the rollback window, which is the gap between the last document on a mongo shard and the - last document in Solr. If there are no documents, this functions + last document in Elastic. If there are no documents, this functions returns None. Otherwise, it returns the first document. """
fixed commands inelastic doc manager
yougov_mongo-connector
train
py
3c89871ca2fb83c9aad87576d47c5694824c21f2
diff --git a/src/Illuminate/Pagination/LengthAwarePaginator.php b/src/Illuminate/Pagination/LengthAwarePaginator.php index <HASH>..<HASH> 100644 --- a/src/Illuminate/Pagination/LengthAwarePaginator.php +++ b/src/Illuminate/Pagination/LengthAwarePaginator.php @@ -109,7 +109,7 @@ class LengthAwarePaginator extends AbstractPaginator implements Arrayable, Array return collect($item)->map(function ($url, $page) { return [ 'url' => $url, - 'label' => $page, + 'label' => (string) $page, 'active' => $this->currentPage() === $page, ]; });
The label for page number in pagination should always be as string (#<I>)
laravel_framework
train
php
235f00ae8bd5d4e660358cc92db06db8e9917ea2
diff --git a/src/Handlers/RoleHandler.php b/src/Handlers/RoleHandler.php index <HASH>..<HASH> 100644 --- a/src/Handlers/RoleHandler.php +++ b/src/Handlers/RoleHandler.php @@ -102,7 +102,7 @@ class RoleHandler // Early auto generate slugs before validation, since it's required if ($role->exists && $role->getSlugOptions()->generateSlugsOnUpdate) { $role->generateSlug(); - } elseif ($role->getSlugOptions()->generateSlugsOnCreate) { + } elseif (! $role->exists && $role->getSlugOptions()->generateSlugsOnCreate) { $role->generateSlug(); } }
Fix role slug generation on update condition
rinvex_laravel-auth
train
php
1c4d1e4150c7fa1d1b4bd00b65d4fed63e3d2578
diff --git a/lib/localKeyUtil.js b/lib/localKeyUtil.js index <HASH>..<HASH> 100644 --- a/lib/localKeyUtil.js +++ b/lib/localKeyUtil.js @@ -236,7 +236,7 @@ function installPrivateKey(privateKeyFile, folder, name, options) { return createBigIpFolder(`/${folder}`); }) .then(() => { - return util.runTmshCommand(installCmd); + return util.tryUntil(util, util.MEDIUM_RETRY, util.runTmshCommand, [installCmd]); }) .then(() => { fs.unlink(privateKeyFile, (err) => {
add retry for runTmsCommand call intended for getting crypto key; this is done to addresses failures during clustering for autoscale solutions
F5Networks_f5-cloud-libs
train
js
b361168bb9232ea9809b49c5c268c5888b54bbf6
diff --git a/guacamole/src/main/webapp/app/client/directives/guacClient.js b/guacamole/src/main/webapp/app/client/directives/guacClient.js index <HASH>..<HASH> 100644 --- a/guacamole/src/main/webapp/app/client/directives/guacClient.js +++ b/guacamole/src/main/webapp/app/client/directives/guacClient.js @@ -414,8 +414,10 @@ angular.module('client').directive('guacClient', [function guacClient() { // Update remote clipboard if local clipboard changes $scope.$on('guacClipboard', function onClipboard(event, mimetype, data) { - if (client) + if (client && data !== $scope.client.clipboardData) { client.setClipboard(data); + $scope.client.clipboardData = data; + } }); // Translate local keydown events to remote keydown events if keyboard is enabled
GUAC-<I>: Don't set the clipboard state if it hasn't changed.
glyptodon_guacamole-client
train
js
c0849ba2b24fce0f6ccde2bada2ea10e7a473775
diff --git a/buildozer/__init__.py b/buildozer/__init__.py index <HASH>..<HASH> 100644 --- a/buildozer/__init__.py +++ b/buildozer/__init__.py @@ -6,7 +6,7 @@ Generic Python packager for Android / iOS. Desktop later. ''' -__version__ = '0.38' +__version__ = '0.39.dev0' import os import re
Bump to <I>.dev0
kivy_buildozer
train
py
19ae9506b40b5fd7089c273e13a73a44214d50c5
diff --git a/src/main/java/com/github/jmchilton/galaxybootstrap/BootStrapper.java b/src/main/java/com/github/jmchilton/galaxybootstrap/BootStrapper.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/github/jmchilton/galaxybootstrap/BootStrapper.java +++ b/src/main/java/com/github/jmchilton/galaxybootstrap/BootStrapper.java @@ -101,6 +101,8 @@ public class BootStrapper { } if(galaxyData != null) { + executeGalaxyScript("sh manage_db.sh -c config/galaxy.ini upgrade 1> " + + buildLogPath(bootstrapLogDir,"upgrade_db.log") + " 2>&1"); galaxyData.writeSeedScript(new File(getRoot(), "seed.py")); executeGalaxyScript("python seed.py 1> " + buildLogPath(bootstrapLogDir,"seed.log") + " 2>&1");
Update database schema before seeding with data
jmchilton_galaxy-bootstrap
train
java
b9915855ad54c1b1e2f4c3217a1a7da45f58872b
diff --git a/src/Http/Request.php b/src/Http/Request.php index <HASH>..<HASH> 100644 --- a/src/Http/Request.php +++ b/src/Http/Request.php @@ -2,8 +2,8 @@ namespace Laravel\Lumen\Http; -use Illuminate\Http\Request as BaseRequest; use Illuminate\Support\Arr; +use Illuminate\Http\Request as BaseRequest; class Request extends BaseRequest { diff --git a/tests/FullApplicationTest.php b/tests/FullApplicationTest.php index <HASH>..<HASH> 100644 --- a/tests/FullApplicationTest.php +++ b/tests/FullApplicationTest.php @@ -1,8 +1,8 @@ <?php use Mockery as m; -use Laravel\Lumen\Http\Request; use Laravel\Lumen\Application; +use Laravel\Lumen\Http\Request; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
A small formatting fix in order to comply with the style guide.
laravel_lumen-framework
train
php,php
8c15386574b00ecc2a0827ebb95192576b592492
diff --git a/wal_e/blobstore/wabs/wabs_util.py b/wal_e/blobstore/wabs/wabs_util.py index <HASH>..<HASH> 100644 --- a/wal_e/blobstore/wabs/wabs_util.py +++ b/wal_e/blobstore/wabs/wabs_util.py @@ -132,7 +132,7 @@ def uri_get_file(creds, uri, conn=None): part = conn.get_blob(url_tup.netloc, url_tup.path, x_ms_range=ms_range) - except Exception, e: + except EnvironmentError as e: if e.errno in (errno.EBUSY, errno.ECONNRESET): logger.warning( msg="retrying after encountering exception",
Inspect .errno only on EnvironmentError in WABS support Previously, it would seem other exceptions would crash the program if an errno was not present, and EnvironmentError typically is a parent of exceptions that yield an errno.
wal-e_wal-e
train
py
a89173fa75454e2edc3438725e62d7a36215558e
diff --git a/src/Persistence/Db/Mapping/Orm.php b/src/Persistence/Db/Mapping/Orm.php index <HASH>..<HASH> 100644 --- a/src/Persistence/Db/Mapping/Orm.php +++ b/src/Persistence/Db/Mapping/Orm.php @@ -63,9 +63,18 @@ abstract class Orm implements IOrm $definition = new OrmDefinition($iocContainer); $this->define($definition); - $definition->finalize(function (array $entityMapperFactories, array $embeddedObjectMapperFactories, array $includedOrms) { + $definition->finalize(function (array $entityMapperFactories, array $embeddedObjectMapperFactories, array $includedOrms) use ($iocContainer) { $this->includedOrms = $includedOrms; + if ($iocContainer) { + $originalOrm = $iocContainer->has(IOrm::class) ? $iocContainer->get(IOrm::class) : null; + $iocContainer->bindValue(IOrm::class, $this); + } + $this->initializeMappers($entityMapperFactories, $embeddedObjectMapperFactories); + + if ($iocContainer) { + $iocContainer->bindValue(IOrm::class, $originalOrm); + } }); }
Bind orm in ioc container while initializing object mappers to prevent infinite recursion
dms-org_core
train
php
ce5140febd21076d4ea362450f719580d47e59ae
diff --git a/bridge/xmpp/xmpp.go b/bridge/xmpp/xmpp.go index <HASH>..<HASH> 100644 --- a/bridge/xmpp/xmpp.go +++ b/bridge/xmpp/xmpp.go @@ -158,8 +158,13 @@ func (b *Bxmpp) postSlackCompatibleWebhook(msg config.Message) error { } resp, err := http.Post(b.GetString("WebhookURL")+"/"+msg.Channel, "application/json", bytes.NewReader(webhookBody)) + if err != nil { + b.Log.Errorf("Failed to POST webhook: %s", err) + return err + } + resp.Body.Close() - return err + return nil } func (b *Bxmpp) createXMPP() error {
Fix panic when the webhook fails (xmpp) (#<I>)
42wim_matterbridge
train
go
3099041494bec4a42bb53e75c5a85f30e50718f6
diff --git a/lxd/network/driver_ovn.go b/lxd/network/driver_ovn.go index <HASH>..<HASH> 100644 --- a/lxd/network/driver_ovn.go +++ b/lxd/network/driver_ovn.go @@ -1149,8 +1149,6 @@ func (n *ovn) setup(update bool) error { return errors.Wrapf(err, "Failed setting IP allocation settings on internal switch") } - // Find MAC address for internal router port. - var dhcpv4UUID, dhcpv6UUID string if update {
lxd/network/driver/ovn: Removes old comment
lxc_lxd
train
go
51dbd5f664b67e8f32fc8f8823cfa4d527cc9b42
diff --git a/src/components/utils/ObjectUtils.js b/src/components/utils/ObjectUtils.js index <HASH>..<HASH> 100644 --- a/src/components/utils/ObjectUtils.js +++ b/src/components/utils/ObjectUtils.js @@ -59,27 +59,29 @@ export default class ObjectUtils { } static resolveFieldData(data, field) { - if(data && field) { - if (this.isFunction(field)) { - return field(data); - } - else if(field.indexOf('.') === -1) { - return data[field]; - } - else { - let fields = field.split('.'); - let value = data; - for(var i = 0, len = fields.length; i < len; ++i) { - if (value == null) { - return null; + if (this.isFunction(field)) { + return field(data); + } + else { + if (data && field) { + if (field.indexOf('.') === -1) { + return data[field]; + } + else { + let fields = field.split('.'); + let value = data; + for(var i = 0, len = fields.length; i < len; ++i) { + if (value == null) { + return null; + } + value = value[fields[i]]; } - value = value[fields[i]]; + return value; } - return value; } - } - else { - return null; + else { + return null; + } } }
Refactor on resolveFieldData function
primefaces_primereact
train
js
2b2285528e905a40bfa61f459b013553a2a2a80e
diff --git a/packages/react/src/components/NumberInput/NumberInput.js b/packages/react/src/components/NumberInput/NumberInput.js index <HASH>..<HASH> 100644 --- a/packages/react/src/components/NumberInput/NumberInput.js +++ b/packages/react/src/components/NumberInput/NumberInput.js @@ -223,6 +223,7 @@ class NumberInput extends Component { if (!disabled && conditional) { value = direction === 'down' ? value - step : value + step; + value = capMax(max, capMin(min, value)); evt.persist(); evt.imaginaryTarget = this._inputRef; this.setState(
fix: respect max and min when using arrows (#<I>)
carbon-design-system_carbon-components
train
js
a75496e5ed2a615158c2701d64f967aebf1db956
diff --git a/client/html/templates/common/partials/price-standard.php b/client/html/templates/common/partials/price-standard.php index <HASH>..<HASH> 100644 --- a/client/html/templates/common/partials/price-standard.php +++ b/client/html/templates/common/partials/price-standard.php @@ -88,9 +88,11 @@ $notax = $this->translate( 'client', '+ %1$s%% VAT' ); </span> <?php endif ?> - <span class="taxrate"> - <?= $enc->html( sprintf( ( $priceItem->getTaxFlag() ? $withtax : $notax ), $this->number( $priceItem->getTaxrate() ) ), $enc::TRUST ) ?> - </span> + <?php if( $priceItem->getTaxrate() > 0 ) : ?> + <span class="taxrate"> + <?= $enc->html( sprintf( ( $priceItem->getTaxFlag() ? $withtax : $notax ), $this->number( $priceItem->getTaxrate() ) ), $enc::TRUST ) ?> + </span> + <?php endif ?> </div> <?php endforeach ?>
Show VAT only if greater than zero
aimeos_ai-client-html
train
php
6d295923f54fb2ad6914ef2240a0132c644d6073
diff --git a/src/cli/commands/test_commands/deploy.js b/src/cli/commands/test_commands/deploy.js index <HASH>..<HASH> 100644 --- a/src/cli/commands/test_commands/deploy.js +++ b/src/cli/commands/test_commands/deploy.js @@ -208,7 +208,7 @@ exports.handler = opts => { // Give app time to start setTimeout(() => { // Test versioned url of "default" module - let demoUrl = utils.getUrl(opts.version, opts.project); + let demoUrl = utils.getUrl(opts); // Test that app is running successfully utils.testRequest(demoUrl, opts).then( diff --git a/src/utils/index.js b/src/utils/index.js index <HASH>..<HASH> 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -106,8 +106,8 @@ exports.parseArgs = (args = '') => { return parsed; }; -exports.getUrl = (version, project) => { - return `https://${version}-dot-${project}.appspot-preview.com`; +exports.getUrl = opts => { + return `https://${opts.version}-dot-${opts.project}.appspot.com`; }; exports.finalize = (err, resolve, reject) => {
Fix getUrl function signature not matching its use in getRequest (#<I>)
GoogleCloudPlatform_nodejs-repo-tools
train
js,js
4ba01bb558f5fe9cb333c2cb723a06e903f57181
diff --git a/lnwallet/wallet.go b/lnwallet/wallet.go index <HASH>..<HASH> 100644 --- a/lnwallet/wallet.go +++ b/lnwallet/wallet.go @@ -1467,7 +1467,7 @@ func (e StaticFeeEstimator) EstimateFeePerByte(numBlocks uint32) uint64 { // EstimateFeePerWeight will return a static value for fee calculations. func (e StaticFeeEstimator) EstimateFeePerWeight(numBlocks uint32) uint64 { - return e.FeeRate * 4 + return e.FeeRate / 4 } // EstimateConfirmation will return a static value representing the estimated
lnwallet: correct scaling for fee-per-byte to fee-per-weight, divide by 4 This commit corrects an error in the scaling as currently implemented in the default static fee estimator. The spec draft has an error and erroneously recommends multiplying by 4 to arrive at the fee-per-weight from the fee-per-byte. This is incorrect as with the segwit block-size increase, the ratio is 1/4 rather than 4.
lightningnetwork_lnd
train
go
16782d9988986a44e96337878e127363f29cccf6
diff --git a/modules/caddyhttp/caddyhttp.go b/modules/caddyhttp/caddyhttp.go index <HASH>..<HASH> 100644 --- a/modules/caddyhttp/caddyhttp.go +++ b/modules/caddyhttp/caddyhttp.go @@ -427,7 +427,7 @@ func (app *App) automaticHTTPS() error { }, Handlers: []MiddlewareHandler{ StaticResponse{ - StatusCode: WeakString(strconv.Itoa(http.StatusTemporaryRedirect)), // TODO: use permanent redirect instead + StatusCode: WeakString(strconv.Itoa(http.StatusPermanentRedirect)), Headers: http.Header{ "Location": []string{redirTo}, "Connection": []string{"close"}, @@ -447,8 +447,8 @@ func (app *App) automaticHTTPS() error { var redirRoutes []Route // for each redirect listener, see if there's already a - // server configured to listen on that exact address; if - // so, simply the redirect route to the end of its route + // server configured to listen on that exact address; if so, + // simply add the redirect route to the end of its route // list; otherwise, we'll create a new server for all the // listener addresses that are unused and serve the // remaining redirects from it
http: Use permanent redirects for HTTP->HTTPS
mholt_caddy
train
go
12a6492ca8ff48b162c088465b1ab8af901153bd
diff --git a/spyderlib/widgets/helperwidgets.py b/spyderlib/widgets/helperwidgets.py index <HASH>..<HASH> 100644 --- a/spyderlib/widgets/helperwidgets.py +++ b/spyderlib/widgets/helperwidgets.py @@ -124,11 +124,14 @@ class HTMLDelegate(QStyledItemDelegate): painter.save() if style.objectName() in ['oxygen', 'qtcurve', 'breeze']: if options.widget.files_list: - painter.translate(textRect.topLeft() + QPoint(2, -9)) + painter.translate(textRect.topLeft() + QPoint(4, -9)) else: - painter.translate(textRect.topLeft() + QPoint(2, 0)) + painter.translate(textRect.topLeft()) else: - painter.translate(textRect.topLeft() + QPoint(2, 4)) + if options.widget.files_list: + painter.translate(textRect.topLeft() + QPoint(4, 4)) + else: + painter.translate(textRect.topLeft() + QPoint(2, 4)) doc.documentLayout().draw(painter, ctx) painter.restore()
File switcher: More adjustments to the html delegate layout
spyder-ide_spyder
train
py
37861dbe31474b15f93391c4e808b1a1f1c46772
diff --git a/src/main/java/com/aoindustries/sql/tracker/ConnectionTracker.java b/src/main/java/com/aoindustries/sql/tracker/ConnectionTracker.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/aoindustries/sql/tracker/ConnectionTracker.java +++ b/src/main/java/com/aoindustries/sql/tracker/ConnectionTracker.java @@ -724,12 +724,9 @@ public class ConnectionTracker extends ConnectionWrapper implements IConnectionT matched = (value == savepointTracker); } } - if(!matched) { - toRelease.add(savepointTracker); - } } Throwable t0 = null; - for(int len = toRelease.size(), i = len-1; i >= 0; i--) { + for(int i = toRelease.size() - 1; i >= 0; i--) { SavepointTracker releaseMe = toRelease.get(i); try { releaseMe.onRelease(); @@ -776,7 +773,7 @@ public class ConnectionTracker extends ConnectionWrapper implements IConnectionT } } Throwable t0 = null; - for(int len = toRelease.size(), i = len-1; i >= 0; i--) { + for(int i = toRelease.size() - 1; i >= 0; i--) { SavepointTracker releaseMe = toRelease.get(i); try { releaseMe.onRelease();
Don't release savepoint itself on rollback(Savepoint) Only release the savepoints that follow it.
aoindustries_aocode-public
train
java
25681aac868f072e011683aa4d01b3609899fbe8
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup setup(name='unbabel-py', - version='0.38', + version='0.39', description='Python Wrapper around Unbabel HTTP API', author='Joao Graca', author_email='[email protected]', diff --git a/unbabel/api.py b/unbabel/api.py index <HASH>..<HASH> 100644 --- a/unbabel/api.py +++ b/unbabel/api.py @@ -308,11 +308,14 @@ class UnbabelApi(object): - def get_translations(self): + def get_translations(self,status=None): ''' Returns the translations requested by the user ''' - result = self.api_call('translation/') + if status is not None: + result = self.api_call('translation/?status=%s'%status) + else: + result = self.api_call('translation/') if result.status_code == 200: translations_json = json.loads(result.content)["objects"] translations = [Translation(**tj) for tj in translations_json]
added filter to get_translations
Unbabel_unbabel-py
train
py,py
0aeec3058fc8ba7d50a61494a9459ce96008f5f7
diff --git a/src/scales/scale.realtime.js b/src/scales/scale.realtime.js index <HASH>..<HASH> 100644 --- a/src/scales/scale.realtime.js +++ b/src/scales/scale.realtime.js @@ -289,6 +289,7 @@ var datasetPropertyKeys = [ 'pointBorderColor', 'pointBorderWidth', 'pointRadius', + 'pointRotation', 'pointStyle', 'pointHitRadius', 'pointHoverBackgroundColor', @@ -297,6 +298,7 @@ var datasetPropertyKeys = [ 'pointHoverRadius', 'backgroundColor', 'borderColor', + 'borderSkipped', 'borderWidth', 'hoverBackgroundColor', 'hoverBorderColor',
Support for pointRotation and borderSkipped arrays
nagix_chartjs-plugin-streaming
train
js
cb276bfc156f0d89ac76df8cbf9121fe4e238243
diff --git a/polyfills/Array/prototype/fill/tests.js b/polyfills/Array/prototype/fill/tests.js index <HASH>..<HASH> 100644 --- a/polyfills/Array/prototype/fill/tests.js +++ b/polyfills/Array/prototype/fill/tests.js @@ -17,10 +17,6 @@ it('has correct argument length', function () { expect(Array.prototype.fill.length).to.be(1); }); -it('is not enumerable', function () { - expect(Array.prototype.propertyIsEnumerable('fill')).to.eql(false); -}); - it('fills whole array when using only one argument', function () { expect([1, 2, 3].fill(0)).to.eql([0, 0, 0]); });
Remove test which won't work on <IE9
Financial-Times_polyfill-service
train
js
c1899d9d8ed7971036e65a07576b3f98518f1fd1
diff --git a/hammer.js b/hammer.js index <HASH>..<HASH> 100644 --- a/hammer.js +++ b/hammer.js @@ -72,7 +72,7 @@ function Hammer(element, options, undefined) // holds the exact angle that has been moved var _angle = 0; - // holds the diraction that has been moved + // holds the direction that has been moved var _direction = 0; // holds position movement for sliding
Corrected silly typo. Changed "diraction" to "direction".
hammerjs_hammer.js
train
js
97af84d79eea17f22bc99e432e3ee47edd81123e
diff --git a/testing/test_integration.py b/testing/test_integration.py index <HASH>..<HASH> 100644 --- a/testing/test_integration.py +++ b/testing/test_integration.py @@ -1,6 +1,5 @@ from __future__ import annotations -import os import sys import textwrap from pathlib import Path @@ -136,19 +135,6 @@ def test_pretend_version_accepts_bad_string( assert pyver == "0.0.0" -def test_own_setup_fails_on_old_python(monkeypatch: pytest.MonkeyPatch) -> None: - monkeypatch.setattr("sys.version_info", (3, 5)) - monkeypatch.syspath_prepend(os.path.dirname(os.path.dirname(__file__))) - - import setup - - with pytest.raises( - RuntimeError, - match="support for python < 3.6 has been removed in setuptools_scm>=6.0.0", - ): - setup.scm_version() - - def testwarn_on_broken_setuptools() -> None: _warn_on_old_setuptools("45") with pytest.warns(RuntimeWarning, match="ERROR: setuptools==44"):
remove integration test for setup.py error as annotations are only supported on <I>
pypa_setuptools_scm
train
py
45c58442d120da3cc7a735dc41d4ad59d647f02c
diff --git a/js/bittrex.js b/js/bittrex.js index <HASH>..<HASH> 100644 --- a/js/bittrex.js +++ b/js/bittrex.js @@ -3,7 +3,7 @@ // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange') -const { ExchangeError, InsufficientFunds, OrderNotFound, DDoSProtection } = require ('./base/errors') +const { ExchangeError, InvalidOrder, InsufficientFunds, OrderNotFound, DDoSProtection } = require ('./base/errors') // --------------------------------------------------------------------------- @@ -506,4 +506,4 @@ module.exports = class bittrex extends Exchange { throw new InsufficientFunds (this.id + ' ' + this.json (response)); throw new ExchangeError (this.id + ' ' + this.json (response)); } -} \ No newline at end of file +}
bittrex "InvalidOrder is not defined" bug fix
ccxt_ccxt
train
js
3074c9eaa5c3354a6c99067240bfc547d6127e2e
diff --git a/docs/src/utils.js b/docs/src/utils.js index <HASH>..<HASH> 100644 --- a/docs/src/utils.js +++ b/docs/src/utils.js @@ -2,12 +2,13 @@ import Router from 'next/router' import getConfig from 'next/config' import TreeModel from 'tree-model' -export const CommonStyles = () => ( - <> - <link rel="stylesheet" href={assetPrefix + '/_next/static/css/styles.chunk.css'} /> - <link rel="stylesheet" href={getAssetPath('github/styleguide.css')} /> - </> -) +export const CommonStyles = () => { + const sheets = [ + config.production ? getAssetPath('primer.css') : assetPrefix + '/_next/static/css/styles.chunk.css', + getAssetPath('github/styleguide.css') + ] + return sheets.map(href => <link href={href} rel="stylesheet" />) +} export const CommonScripts = () => ( <script src={getAssetPath('github/styleguide.js')} />
fix: load static primer.css in production
primer_css
train
js
ec6a235203cc965dda54fa473309b31b0046c100
diff --git a/spec/by_star_spec.rb b/spec/by_star_spec.rb index <HASH>..<HASH> 100644 --- a/spec/by_star_spec.rb +++ b/spec/by_star_spec.rb @@ -111,8 +111,12 @@ describe Post do end it "should be able to use an alternative field" do - stub_time(1, 12) - Event.by_month(nil, :field => "start_time").size.should eql(1) + if Time.zone.now.month == 12 + Event.by_month(nil, :field => "start_time").size.should eql(4) + else + stub_time(1, 12) + Event.by_month(nil, :field => "start_time").size.should eql(1) + end end it "should be able to specify the year as a string" do
Events in the current month are different for December.
radar_by_star
train
rb
34c46c17242b035fd4759daf7df3c00b06637d09
diff --git a/lang/en_us/moodle.php b/lang/en_us/moodle.php index <HASH>..<HASH> 100644 --- a/lang/en_us/moodle.php +++ b/lang/en_us/moodle.php @@ -226,7 +226,7 @@ $string['downloadtext'] = 'Download in text format'; $string['doyouagree'] = 'Have you read these conditions and understood them?'; $string['edit'] = 'Edit $a'; $string['editcoursesettings'] = 'Edit course settings'; -$string['editinga'] = 'Editing a $a'; +$string['editinga'] = 'Editing $a'; $string['editmyprofile'] = 'Edit profile'; $string['editsummary'] = 'Edit summary'; $string['editthisactivity'] = 'Edit this activity'; @@ -770,8 +770,8 @@ $string['updatemyprofile'] = 'Update profile'; $string['updatesevery'] = 'Updates every $a seconds'; $string['updatethis'] = 'Update this $a'; $string['updatethiscourse'] = 'Update this course'; -$string['updatinga'] = 'Updating a $a'; -$string['updatingain'] = 'Updating a $a->what in $a->in'; +$string['updatinga'] = 'Updating $a'; +$string['updatingain'] = 'Updating $a->what in $a->in'; $string['upload'] = 'Upload'; $string['uploadafile'] = 'Upload a file'; $string['uploadedfileto'] = 'Uploaded $a->file to $a->directory';
Grammar fixes for "updating" and "editing"
moodle_moodle
train
php