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
8718efdc5d3e47c6bedd2aaf282ebdb078e71337
diff --git a/plugins/highlight/trumbowyg.highlight.js b/plugins/highlight/trumbowyg.highlight.js index <HASH>..<HASH> 100644 --- a/plugins/highlight/trumbowyg.highlight.js +++ b/plugins/highlight/trumbowyg.highlight.js @@ -64,7 +64,10 @@ }, pt_br: { highlight: 'Realçar sintaxe de código' - } + }, + ko: { + highlight: '코드 문법 하이라이트' + }, }, // Add our plugin to Trumbowyg registred plugins plugins: {
feat: add korean translation to highlight plugin
Alex-D_Trumbowyg
train
js
850fd26321b94259bf568f72c5c0012453d40599
diff --git a/src/Plugin.php b/src/Plugin.php index <HASH>..<HASH> 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -73,6 +73,10 @@ class Plugin implements $this->package = $composer->getPackage(); if (array_key_exists('argv', $GLOBALS)) { + if (in_array('help', $GLOBALS['argv'])) { + return $this->disable(); + } + foreach ($GLOBALS['argv'] as $arg) { switch ($arg) { case 'create-project':
Don't prefetch on help Fixes #<I>
hirak_prestissimo
train
php
280c9a9612af59ee652713a62ea5885deba32626
diff --git a/bids/layout/writing.py b/bids/layout/writing.py index <HASH>..<HASH> 100644 --- a/bids/layout/writing.py +++ b/bids/layout/writing.py @@ -137,7 +137,8 @@ def build_path(entities, path_patterns, strict=False): for v in values.split('|'): valid_values += _expand_options(v) - if entities[name] not in valid_values: + ent_set = entities.get(name) + if ent_set is not None and ent_set not in valid_values: continue # Expanding options here preempts picking them again later
fix: allow for entities not to be defined
bids-standard_pybids
train
py
fd988f7e951636026fba5c3980507629cd2b386c
diff --git a/tarbell/configure.py b/tarbell/configure.py index <HASH>..<HASH> 100644 --- a/tarbell/configure.py +++ b/tarbell/configure.py @@ -284,7 +284,7 @@ def _setup_s3(settings, path, prompt=True): def _setup_tarbell_project_path(settings, path, prompt=True): """Prompt user to set up project path.""" default_path = os.path.expanduser(os.path.join("~", "tarbell")) - projects_path = raw_input("\nWhat is your Tarbell projects path? [Default: {0}, 'none' to skip] ".format(colored.green(default_path))) + projects_path = raw_input("\nWhat is your Tarbell projects path? [Default: {0}, 'none' to skip] ".format(default_path)) if projects_path == "": projects_path = default_path if projects_path.lower() == 'none':
don't use color in raw_input when configuring, closes #<I>
tarbell-project_tarbell
train
py
111cb5ab6c465de1c986b4ca8a41d8f7c27e7480
diff --git a/cli/cli.go b/cli/cli.go index <HASH>..<HASH> 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -343,6 +343,10 @@ func Commands() []*cli.Command { Usage: "Create a service stream", Action: Print(streamService), Flags: []cli.Flag{ + &cli.BoolFlag{ + Name: "platform", + Usage: "Connect to the platform", + }, &cli.StringFlag{ Name: "output, o", Usage: "Set the output format; json (default), raw", diff --git a/cli/helpers.go b/cli/helpers.go index <HASH>..<HASH> 100644 --- a/cli/helpers.go +++ b/cli/helpers.go @@ -116,6 +116,10 @@ func netCall(c *cli.Context, args []string) ([]byte, error) { // TODO: stream via HTTP func streamService(c *cli.Context, args []string) ([]byte, error) { + if c.Bool("platform") { + os.Setenv("MICRO_PROXY", "service") + os.Setenv("MICRO_PROXY_ADDRESS", "proxy.micro.mu:443") + } if len(args) < 2 { return nil, errors.New("require service and endpoint") }
Add platform flag support to cli stream command (#<I>)
micro_micro
train
go,go
72244ba16153099944f3b651fccfa7f79f3bf50c
diff --git a/octodns/provider/base.py b/octodns/provider/base.py index <HASH>..<HASH> 100644 --- a/octodns/provider/base.py +++ b/octodns/provider/base.py @@ -59,7 +59,7 @@ class BaseProvider(BaseSource): ''' for record in desired.records: - if record._type not in self.SUPPORTS: + if not self.supports(record): msg = f'{record._type} records not supported for {record.fqdn}' fallback = 'omitting record' self.supports_warn_or_except(msg, fallback)
Provider._process_desired_zone should call .supports, rather than do in SUPPORTS
github_octodns
train
py
50ee616ff81f94abad152837b12af4153adcdcad
diff --git a/src/main/jquery.continuous-calendar.js b/src/main/jquery.continuous-calendar.js index <HASH>..<HASH> 100755 --- a/src/main/jquery.continuous-calendar.js +++ b/src/main/jquery.continuous-calendar.js @@ -360,9 +360,9 @@ case Status.MOVE: var deltaDays = mouseDownDate.distanceInDays(date) mouseDownDate = date - var newSelection = selection.shiftDays(deltaDays).and(calendarRange) - if(isPermittedRange(newSelection)) { - selection = newSelection + var movedSelection = selection.shiftDays(deltaDays).and(calendarRange) + if(isPermittedRange(movedSelection)) { + selection = movedSelection } break case Status.CREATE:
remove javascript warning by renaming variable
continuouscalendar_dateutils
train
js
da1dca2df85b801927d1bd376b644b83f04de8a9
diff --git a/tests/api-testing/Parsoid.js b/tests/api-testing/Parsoid.js index <HASH>..<HASH> 100644 --- a/tests/api-testing/Parsoid.js +++ b/tests/api-testing/Parsoid.js @@ -896,8 +896,8 @@ describe('Parsoid API', function() { }) .expect(validHtmlResponse(function(doc) { validateDoc(doc, 'P', false); - var p = doc.querySelector('P[typeof="mw:Transclusion"]'); - var dmw = JSON.parse(p.getAttribute('data-mw')); + var span = doc.querySelector('span[typeof="mw:Transclusion"]'); + var dmw = JSON.parse(span.getAttribute('data-mw')); var template = dmw.parts[0].template; template.target.wt.should.equal('1x'); template.params[1].wt.should.equal('foo');
Fix api test broken in <I>f5f The range is no longer expanded to the paragraph. Bug: T<I> Change-Id: I<I>ea<I>c<I>b<I>a<I>c<I>e2d<I>f<I>df
wikimedia_parsoid
train
js
8db3263e2bd6bc81f0e4e69d1216488b232999df
diff --git a/war/src/main/webapp/scripts/hudson-behavior.js b/war/src/main/webapp/scripts/hudson-behavior.js index <HASH>..<HASH> 100644 --- a/war/src/main/webapp/scripts/hudson-behavior.js +++ b/war/src/main/webapp/scripts/hudson-behavior.js @@ -1960,7 +1960,7 @@ var downloadService = { download : function(id,url,info, postBack,completionHandler) { this.continuations[id] = {postBack:postBack,completionHandler:completionHandler}; - loadScript(url+"?"+Hash.toQueryString(info)); + loadScript(url+"?id="+id+'&'+Hash.toQueryString(info)); }, post : function(id,data) {
submit ID to the server so that smart servers can know what IDs to put into JSON
jenkinsci_jenkins
train
js
aa3ffd2f50b3597f3fa38f26cb8e06d01f79ce2b
diff --git a/assert.go b/assert.go index <HASH>..<HASH> 100644 --- a/assert.go +++ b/assert.go @@ -50,6 +50,11 @@ func (a *Assertion) NotNil(val interface{}) { a.True(!isNil, "Expected not nil but was nil") } +func (a *Assertion) Same(actual, expected interface{}) { + eq := reflect.ValueOf(actual).Pointer() == reflect.ValueOf(expected).Pointer() + a.True(eq, "\nExpected: %v\nReceived: %v", expected, actual) +} + func (a *Assertion) Equal(actual, expected interface{}) { eq := reflect.DeepEqual(actual, expected) a.True(eq, "\nExpected: %v\nReceived: %v", expected, actual)
Add assert.Same for testing function pointers
seanpont_assert
train
go
e87a11a4ff43d08b6df766314998660227ad898a
diff --git a/javalang/parser.py b/javalang/parser.py index <HASH>..<HASH> 100644 --- a/javalang/parser.py +++ b/javalang/parser.py @@ -1053,7 +1053,10 @@ class Parser(object): if self.try_accept('throws'): throws = self.parse_qualified_identifier_list() - self.accept(';') + if self.would_accept('{'): + body = self.parse_block() + else: + self.accept(';') return tree.MethodDeclaration(parameters=parameters, throws=throws, @@ -1067,7 +1070,10 @@ class Parser(object): if self.try_accept('throws'): throws = self.parse_qualified_identifier_list() - self.accept(';') + if self.would_accept('{'): + body = self.parse_block() + else: + self.accept(';') return tree.MethodDeclaration(parameters=parameters, throws=throws)
Allow interfaces to have an optional body, fix #<I>.
c2nes_javalang
train
py
55855c6c0641389b9974e8b27c6ba3b8de3462e6
diff --git a/devices.js b/devices.js index <HASH>..<HASH> 100644 --- a/devices.js +++ b/devices.js @@ -261,7 +261,7 @@ const devices = [ model: 'ICTC-G-1', vendor: 'IKEA', description: 'TRADFRI wireless dimmer', - supports: 'brightness (0-255), fast rotate for instant 0/255', + supports: 'brightness [0-255], quick rotate for instant 0/255', fromZigbee: [ fz.ICTC_G_1_move, fz.ICTC_G_1_moveWithOnOff, fz.ICTC_G_1_stop, fz.ICTC_G_1_stopWithOnOff, fz.ICTC_G_1_moveToLevelWithOnOff, fz.ignore_cmd_readRsp, fz.ignore_cmd_discoverRsp,
Update TRADFRI wireless dimmer description
Koenkk_zigbee-shepherd-converters
train
js
55a3adad3ba378032130ea89c7e1da18e74eb05c
diff --git a/s3/integration_test/tests.go b/s3/integration_test/tests.go index <HASH>..<HASH> 100644 --- a/s3/integration_test/tests.go +++ b/s3/integration_test/tests.go @@ -242,7 +242,20 @@ func (t *BucketTest) NonGraphicalCharacterInKey() { } func (t *BucketTest) EmptyKey() { - ExpectEq("TODO", "") + key := "" + var err error + + // Store + err = t.bucket.StoreObject(key, []byte{}) + ExpectThat(err, Error(HasSubstr("empty"))) + + // Get + _, err = t.bucket.GetObject(key) + ExpectThat(err, Error(HasSubstr("empty"))) + + // Delete + err = t.bucket.DeleteObject(key) + ExpectThat(err, Error(HasSubstr("empty"))) } func (t *BucketTest) GetNonExistentObject() {
BucketTest.EmptyKey
jacobsa_aws
train
go
992cdec1b45cab42c7f6943b5024c2e434e934d0
diff --git a/src/helpers/index.js b/src/helpers/index.js index <HASH>..<HASH> 100644 --- a/src/helpers/index.js +++ b/src/helpers/index.js @@ -1,3 +1,4 @@ +export * from './helpers.color'; export * from './helpers.core'; export * from './helpers.canvas'; export * from './helpers.collection'; @@ -5,12 +6,10 @@ export * from './helpers.config'; export * from './helpers.curve'; export * from './helpers.dom'; export {default as easingEffects} from './helpers.easing'; +export * from './helpers.extras'; export * from './helpers.interpolation'; export * from './helpers.intl'; export * from './helpers.options'; export * from './helpers.math'; export * from './helpers.rtl'; export * from './helpers.segment'; - -export {color, getHoverColor} from './helpers.color'; -export {requestAnimFrame, fontString} from './helpers.extras';
Make sure all helpers are exported (#<I>)
chartjs_Chart.js
train
js
b646bfab8500163fb420b7d9349453c68d01798d
diff --git a/bin/inline_forms_installer_core.rb b/bin/inline_forms_installer_core.rb index <HASH>..<HASH> 100755 --- a/bin/inline_forms_installer_core.rb +++ b/bin/inline_forms_installer_core.rb @@ -18,7 +18,7 @@ gem 'devise' gem 'foundation-icons-sass-rails' gem 'foundation-rails', '~> 5.5' gem 'i18n-active_record', :git => 'https://github.com/acesuares/i18n-active_record.git' -gem 'inline_forms', '~> 6.0' +gem 'inline_forms', '~> 6.2' gem 'jquery-rails' gem 'jquery-timepicker-rails' gem 'jquery-ui-sass-rails' @@ -426,7 +426,7 @@ create_file "app/models/ability.rb", <<-END_ABILITY.strip_heredoc END_ABILITY # precompile devise.css -say "- Precompile devise.css in environments/production.rb... (Since Rails 5 in config/initializers/assets.rb !)" +say "- Precompile devise.css" append_file "config/initializers/assets.rb", " Rails.application.config.assets.precompile += %w( inline_forms_devise.css )\n" # devise mailer stuff
upgrade Gemfile, gemspec and delete some files
acesuares_inline_forms
train
rb
680fe6997e4bf5239c44ea2b2c80b1fed6082bf0
diff --git a/packages/site/src/ui/side-nav.js b/packages/site/src/ui/side-nav.js index <HASH>..<HASH> 100644 --- a/packages/site/src/ui/side-nav.js +++ b/packages/site/src/ui/side-nav.js @@ -371,7 +371,6 @@ export default withHeadings(props => ( overflow-x: hidden; overflow-y: auto; transition: transform ${core.motion.speedXFast} ease-in-out; - z-index: 10; /* TODO: arbitrary; above code mirror; come back when ready to systemize */ } .sidenavOpen { transform: translateX(0);
refactor(site): put iconography dialog on top of sidenav remove sidenav z-index to keep them in the same stacking context
pluralsight_design-system
train
js
5b91250cfa02865a62fed63ec64973166be4020b
diff --git a/lib/evalhook/tree_processor.rb b/lib/evalhook/tree_processor.rb index <HASH>..<HASH> 100644 --- a/lib/evalhook/tree_processor.rb +++ b/lib/evalhook/tree_processor.rb @@ -109,14 +109,9 @@ module EvalHook const_id = const_tree end - args1 = s(:arglist, base_class_tree) - args2 = s(:arglist, s(:lit, const_id)) - args3 = s(:arglist, process(value_tree)) + args1 = s(:arglist, base_class_tree, s(:lit, const_id), process(value_tree)) - firstcall = s(:call, hook_handler_reference, :hooked_cdecl, args1 ) - secondcall = s(:call, firstcall, :set_id, args2) - - s(:call, secondcall, :set_value, args3) + s(:call, hook_handler_reference, :hooked_cdecl, args1 ) end def process_dxstr(tree)
-8 test pass: refactor to simplify hook of cdecl with only one call
tario_evalhook
train
rb
a73a22cb9b582bbbd1f1611156422cff445f14c4
diff --git a/src/sap.ui.core/src/sap/ui/core/util/File.js b/src/sap.ui.core/src/sap/ui/core/util/File.js index <HASH>..<HASH> 100644 --- a/src/sap.ui.core/src/sap/ui/core/util/File.js +++ b/src/sap.ui.core/src/sap/ui/core/util/File.js @@ -38,6 +38,9 @@ sap.ui.define(['jquery.sap.global', 'sap/ui/Device'], * <p><b>Android Browser</b><br> * Not supported</p> * + * <p><b>Windows Phone 10 Edge</b><br> + * Not supported</p> + * * @param {string} sData file content * @param {string} sFileName file name * @param {string} sFileExtension file extension
[INTERNAL] Windows Phone <I>: Table export Updated JSDoc, as Windows Phone <I> doesn't support the file export. BCP: <I> Change-Id: Ia4fb<I>d<I>e<I>a5a5c<I>c<I>dce<I>b<I>
SAP_openui5
train
js
a53e5de42b6561024452377fa675b5e9b369725d
diff --git a/src/InlineEditorProviders.js b/src/InlineEditorProviders.js index <HASH>..<HASH> 100644 --- a/src/InlineEditorProviders.js +++ b/src/InlineEditorProviders.js @@ -87,7 +87,8 @@ define(function (require, exports, module) { if (tagInfo.position.tokenType === CodeHintUtils.TAG_NAME) { // Type selector selectorName = tagInfo.tagName; - } else if (tagInfo.position.tokenType === CodeHintUtils.ATTR_VALUE) { + } else if (tagInfo.position.tokenType === CodeHintUtils.ATTR_NAME || + tagInfo.position.tokenType === CodeHintUtils.ATTR_VALUE) { if (tagInfo.attr.name === "class") { // Class selector. We only look for the class name // that includes the insertion point. For example, if
also allow invoking on ATTR_NAME
adobe_brackets
train
js
c16d756efd3299ed2d032a24e73d6dbd37bc6738
diff --git a/lib/rvc/extensions/Datacenter.rb b/lib/rvc/extensions/Datacenter.rb index <HASH>..<HASH> 100644 --- a/lib/rvc/extensions/Datacenter.rb +++ b/lib/rvc/extensions/Datacenter.rb @@ -27,13 +27,24 @@ class RbVmomi::VIM::Datacenter vmFolder, datastoreFolder, networkFolder, hostFolder = collect *%w(vmFolder datastoreFolder networkFolder hostFolder) { - 'vm' => vmFolder, - 'datastore' => datastoreFolder, - 'network' => networkFolder, - 'host' => hostFolder, + 'vms' => vmFolder, + 'datastores' => datastoreFolder, + 'networks' => networkFolder, + 'computers' => hostFolder, } end + # For compatibility with previous RVC versions + def traverse_one arc + children = self.children + return children[arc] if children.member? arc + if arc == 'vm' then return vmFolder + elsif arc == 'datastore' then return datastoreFolder + elsif arc == 'network' then return networkFolder + elsif arc == 'host' then return hostFolder + end + end + def self.folder? true end
rename folders under Datacenter
vmware_rvc
train
rb
26cf74abc44d545ea17a0928a179190609e35140
diff --git a/seleniumbase/utilities/selenium_ide/convert_ide.py b/seleniumbase/utilities/selenium_ide/convert_ide.py index <HASH>..<HASH> 100755 --- a/seleniumbase/utilities/selenium_ide/convert_ide.py +++ b/seleniumbase/utilities/selenium_ide/convert_ide.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """ Converts a Selenium IDE recording that was exported as a Python WebDriver unittest file into SeleniumBase Python file. @@ -50,7 +51,7 @@ def main(): uses_keys = False uses_select = False - f = open(webdriver_python_file, 'r') + f = open(webdriver_python_file, 'r', encoding='utf-8') all_code = f.read() f.close() if "def test_" not in all_code: @@ -722,7 +723,7 @@ def main(): # Create SeleniumBase test file base_file_name = webdriver_python_file.split('.py')[0] converted_file_name = base_file_name + "_SB.py" - out_file = codecs.open(converted_file_name, "w+") + out_file = codecs.open(converted_file_name, "w+", encoding='utf-8') out_file.writelines(seleniumbase_code) out_file.close() print('\n>>> [%s] was created from [%s]\n' % (
Handle utf-8 encoding with the ide export converter tool
seleniumbase_SeleniumBase
train
py
5b08d3b98369fbe8432be0335d7fa92f2f20c219
diff --git a/src/Command/ConfigureCommand.php b/src/Command/ConfigureCommand.php index <HASH>..<HASH> 100644 --- a/src/Command/ConfigureCommand.php +++ b/src/Command/ConfigureCommand.php @@ -39,7 +39,7 @@ class ConfigureCommand extends Command $output->writeln([ '', - 'We did not find configuration file. The following questions will help us to generate it for you.', + 'We did not find a configuration file. The following questions will help us to generate it for you.', '', ]); diff --git a/src/Config/ValueProvider/SourceDirsProvider.php b/src/Config/ValueProvider/SourceDirsProvider.php index <HASH>..<HASH> 100644 --- a/src/Config/ValueProvider/SourceDirsProvider.php +++ b/src/Config/ValueProvider/SourceDirsProvider.php @@ -53,7 +53,7 @@ class SourceDirsProvider $defaultValues = $guessedSourceDirs ? implode(',', $guessedSourceDirs) : null; $questionText = $this->consoleHelper->getQuestion( - 'What source directories do you want to include (comma separated)?', + 'Which source directories do you want to include (comma separated)?', $defaultValues );
fix small typos (#<I>)
infection_infection
train
php,php
ec1243ab0f4de2f22631954745a511f76264911b
diff --git a/src/GO/Scheduler.php b/src/GO/Scheduler.php index <HASH>..<HASH> 100644 --- a/src/GO/Scheduler.php +++ b/src/GO/Scheduler.php @@ -120,7 +120,7 @@ class Scheduler public function php($script, $bin = null, $args = [], $id = null) { $bin = $bin !== null && is_string($bin) && file_exists($bin) ? - $bin : PHP_BINARY === '' ? '/usr/bin/php' : PHP_BINARY; + $bin : (PHP_BINARY === '' ? '/usr/bin/php' : PHP_BINARY); $job = new Job($bin . ' ' . $script, $args, $id);
Fix bug (#<I>) If there is no brackets, the second ternary operation will treat all codes before second question mark as analyzing conditions.
peppeocchi_php-cron-scheduler
train
php
6b3384666663e93afb859d426c8d41968316216d
diff --git a/Holodeck/Sensors.py b/Holodeck/Sensors.py index <HASH>..<HASH> 100644 --- a/Holodeck/Sensors.py +++ b/Holodeck/Sensors.py @@ -12,6 +12,7 @@ class Sensors: RELATIVE_SKELETAL_POSITION_SENSOR = 8 LOCATION_SENSOR = 9 VELOCITY_SENSOR = 10 + ROTATION_SENSOR = 11 # Sizes are the number of entries in the numpy array _shape_dict = { @@ -25,6 +26,7 @@ class Sensors: RELATIVE_SKELETAL_POSITION_SENSOR: [67, 4], LOCATION_SENSOR: [3, 1], VELOCITY_SENSOR: [3, 1], + ROTATION_SENSOR: [3, 1], } _type_dict = { @@ -38,6 +40,7 @@ class Sensors: RELATIVE_SKELETAL_POSITION_SENSOR: np.float32, LOCATION_SENSOR: np.float32, VELOCITY_SENSOR: np.float32, + ROTATION_SENSOR: np.float32, } _name_dict = { @@ -51,6 +54,7 @@ class Sensors: RELATIVE_SKELETAL_POSITION_SENSOR: "RelativeSkeletalPositionSensor", LOCATION_SENSOR: "LocationSensor", VELOCITY_SENSOR: "VelocitySensor", + ROTATION_SENSOR: "RotationSensor" } _reverse_name_dict = {v: k for k, v in _name_dict.items()}
Added RotationSensor to the sensors.py
BYU-PCCL_holodeck
train
py
9521f8e73657262a0df3d10bb686756cd071476f
diff --git a/troposphere/apigateway.py b/troposphere/apigateway.py index <HASH>..<HASH> 100644 --- a/troposphere/apigateway.py +++ b/troposphere/apigateway.py @@ -352,7 +352,7 @@ class RestApi(AWSObject): "CloneFrom": (basestring, False), "Description": (basestring, False), "EndpointConfiguration": (EndpointConfiguration, False), - "FailOnWarnings": (basestring, False), + "FailOnWarnings": (boolean, False), "MinimumCompressionSize": (positive_integer, False), "Name": (basestring, False), "Parameters": (dict, False),
Change ApiGateway::RestApi FailOnWarnings from basestring to boolean (Fixes #<I>)
cloudtools_troposphere
train
py
d8082f4c9ea7d203283e356993401a92e9a06720
diff --git a/cpcss/CpCssPlugin.php b/cpcss/CpCssPlugin.php index <HASH>..<HASH> 100644 --- a/cpcss/CpCssPlugin.php +++ b/cpcss/CpCssPlugin.php @@ -72,6 +72,7 @@ class CpCssPlugin extends BasePlugin craft()->templates->includeJsResource('cpcss/js/codemirror-css.js'); craft()->templates->includeJs(' $(function () { + $("'.addslashes('input[type="hidden"][name="redirect"][value="settings/plugins"]').'").attr("value", Craft.getCpUrl("settings/plugins/cpcss")); CodeMirror.fromTextArea(document.getElementById("settings-additionalCss"), { indentUnit: 4, styleActiveLine: true,
Adds JS hack to redirect back to CPCSS settings page on save
doublesecretagency_craft-cpcss
train
php
82ef56d1ce3a0114d004e829870004a97ea10598
diff --git a/src/Models/Release.php b/src/Models/Release.php index <HASH>..<HASH> 100644 --- a/src/Models/Release.php +++ b/src/Models/Release.php @@ -201,7 +201,7 @@ final class Release return true; } else { - throw new Exception('File is not a zip archive. File is ' . $this->filesystem->mimeType($this->getStoragePath()) . '.'); + throw new Exception('File is not a zip archive. File is '.$this->filesystem->mimeType($this->getStoragePath()).'.'); } }
Apply fixes from StyleCI (#<I>)
codedge_laravel-selfupdater
train
php
9db385332603926467b8d92ba77915b06b66391c
diff --git a/src/main/java/com/googlecode/lanterna/input/BasicCharacterPattern.java b/src/main/java/com/googlecode/lanterna/input/BasicCharacterPattern.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/googlecode/lanterna/input/BasicCharacterPattern.java +++ b/src/main/java/com/googlecode/lanterna/input/BasicCharacterPattern.java @@ -29,7 +29,7 @@ public class BasicCharacterPattern implements CharacterPattern { private final KeyStroke result; private final char[] pattern; - BasicCharacterPattern(KeyStroke result, char... pattern) { + public BasicCharacterPattern(KeyStroke result, char... pattern) { this.result = result; this.pattern = pattern; }
Issue #<I>: Fixing constructor so it's also public
mabe02_lanterna
train
java
2ab0164c1e7d96d3fd629df54177cfe1e71842b3
diff --git a/lib/xmpp/c2s.js b/lib/xmpp/c2s.js index <HASH>..<HASH> 100644 --- a/lib/xmpp/c2s.js +++ b/lib/xmpp/c2s.js @@ -32,9 +32,6 @@ function C2SServer(options) { if (options.tls) { this.credentials = { key: fs.readFileSync(options.tls.keyPath, 'ascii'), cert: fs.readFileSync(options.tls.certPath, 'ascii')}; } - - // Router - this.router = {}; } util.inherits(C2SServer, EventEmitter); @@ -47,15 +44,6 @@ C2SServer.prototype.acceptConnection = function(socket) { this.emit("connect", client); socket.addListener('error', function() { }); client.addListener('error', function() { }); - - var self = this; - client.addListener('online', function() { - self.router.registerRoute(client.jid, client); - - client.addListener('disconnect', function() { - self.router.unregisterRoute(client.jid, client); - }); - }); }; @@ -83,7 +71,6 @@ function C2SStream(socket, server) { if (self.jid) { self.emit("disconnect", self); self.server.emit("disconnect", self); - self.server.router.unregisterRoute(self.jid, self); } });
c2s: remove router this should be done in the xmpp-server
xmppjs_xmpp.js
train
js
c5f9c2cca675226a62caaa3734bba2dff0eb75fe
diff --git a/pkg/npm/npm_test.go b/pkg/npm/npm_test.go index <HASH>..<HASH> 100644 --- a/pkg/npm/npm_test.go +++ b/pkg/npm/npm_test.go @@ -33,10 +33,6 @@ func TestYarnInstall(t *testing.T) { } func testInstall(t *testing.T, expectedBin string) { - // Skip for community PRs - if os.Getenv("COMMUNITY_PR") == "true" { - t.Skip("Skipped for community PRs") - } // Skip during short test runs since this test involves downloading dependencies. if testing.Short() { t.Skip("Skipped in short test run")
Don't skip npm tests
pulumi_pulumi
train
go
16453c372c41a82e676ba95a18b88890060f16b0
diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index <HASH>..<HASH> 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -594,6 +594,8 @@ func (m *Manager) resolveRepoNames(deps []*chart.Dependency) (map[string]string, continue } + // See https://helm.sh/docs/topics/registries/#specifying-dependencies + // See createTestingMetadataForOCI() if registry.IsOCI(dd.Repository) { reposMap[dd.Name] = dd.Repository continue
It appears we never got to this block below. Quick rec by Farina. Untested if necessary
helm_helm
train
go
9154b1bae197754b42b2929be479e191184c7860
diff --git a/src/Illuminate/Routing/Route.php b/src/Illuminate/Routing/Route.php index <HASH>..<HASH> 100755 --- a/src/Illuminate/Routing/Route.php +++ b/src/Illuminate/Routing/Route.php @@ -485,11 +485,11 @@ class Route */ protected function matchToKeys(array $matches) { - if (count($this->parameterNames()) == 0) { + if (empty($parameterNames = $this->parameterNames())) { return []; } - $parameters = array_intersect_key($matches, array_flip($this->parameterNames())); + $parameters = array_intersect_key($matches, array_flip($parameterNames)); return array_filter($parameters, function ($value) { return is_string($value) && strlen($value) > 0;
No need to call parameterNames twice
laravel_framework
train
php
2a9d94c177c34aa9bb9a8b7b4bd23235c74d8389
diff --git a/dispatchers/Html.php b/dispatchers/Html.php index <HASH>..<HASH> 100644 --- a/dispatchers/Html.php +++ b/dispatchers/Html.php @@ -232,6 +232,11 @@ class QM_Dispatcher_Html extends QM_Dispatcher { echo '<script type="text/javascript">' . "\n\n"; echo 'var qm = ' . json_encode( $json ) . ';' . "\n\n"; + ?> + if ( 'undefined' === typeof QM_i18n ) { + document.getElementById( 'qm' ).style.display = 'block'; + } + <?php echo '</script>' . "\n\n"; }
In the event that QM's JavaScript doesn't get enqueued, force the QM output to display so users can at least debug the issue. This situation is only really caused when a site unenqueues jQuery. Fixes #<I>.
johnbillion_query-monitor
train
php
d14802c7cba464211ebb7947eb88eb98fc80fb89
diff --git a/alerta/auth/basic_ldap.py b/alerta/auth/basic_ldap.py index <HASH>..<HASH> 100644 --- a/alerta/auth/basic_ldap.py +++ b/alerta/auth/basic_ldap.py @@ -73,7 +73,7 @@ def login(): raise ApiError('User {} not active'.format(email), 403) user.update_last_login() - scopes = Permission.lookup(login=user.email, roles=user.roles) + scopes = Permission.lookup(login=user.email, roles=user.roles + groups) customers = get_customers(login=user.email, groups=[user.domain] + groups) auth_audit_trail.send(current_app._get_current_object(), event='basic-ldap-login', message='user login via LDAP',
Allow auto-assign roles based on LDAP group (#<I>)
alerta_alerta
train
py
30e6eb6387bde34a8eb3beb82e1497f468c114f3
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -40,8 +40,12 @@ module.exports = function(file, opts) { var filePath = file.path; // Gets file name from file path. - var fileName = filePath.substring(filePath.lastIndexOf('/') + 1); - spritesheet[fileName] = result; + if (opts.showFilePath) { + spritesheet[fileName] = result; + } else { + var fileName = filePath.substring(filePath.lastIndexOf('/') + 1); + spritesheet[fileName] = result; + } }); } catch (error) { this.emit('error', new gutil.PluginError('gulp-svg-json-spritesheet', error));
Add config to show full file path in output JSON
gurmukhp_gulp-svg-json-spritesheet
train
js
e4907cab8583534e4e918e1c577787507fcf0ae1
diff --git a/lib/editor/tinymce/lib.php b/lib/editor/tinymce/lib.php index <HASH>..<HASH> 100644 --- a/lib/editor/tinymce/lib.php +++ b/lib/editor/tinymce/lib.php @@ -106,6 +106,7 @@ class tinymce_texteditor extends texteditor { 'elements' => $elementid, 'relative_urls' => false, 'document_base_url' => $CFG->httpswwwroot, + 'moodle_plugin_base' => "$CFG->httpswwwroot/lib/editor/tinymce/plugins/", 'content_css' => $contentcss, 'language' => $lang, 'directionality' => $directionality, @@ -181,4 +182,15 @@ class tinymce_texteditor extends texteditor { require_once($CFG->dirroot . '/lib/editor/tinymce/classes/plugin.php'); return editor_tinymce_plugin::get($plugin); } + + /** + * Equivalent to tinyMCE.baseURL value available from JavaScript, + * always use instead of /../ when referencing tinymce core code from moodle plugins! + * + * @return moodle_url url pointing to the root of TinyMCE javascript code. + */ + public function get_tinymce_base_url() { + global $CFG; + return new moodle_url("$CFG->httpswwwroot/lib/editor/tinymce/tiny_mce/$this->version/"); + } }
MDL-<I> add base TinyMCE and moodle plugin urls We should never use ../../../.. to reference core TinyMCE or moodle TinyMCE plugins, this crate problems if we ever decide to create improved loaders.
moodle_moodle
train
php
b42a284ec4bf15a55428c48f60316a009a6a5c57
diff --git a/delphi/core.py b/delphi/core.py index <HASH>..<HASH> 100644 --- a/delphi/core.py +++ b/delphi/core.py @@ -445,7 +445,7 @@ def set_indicator_values( for indicator in n[1]["indicators"]: indicator.value = get_indicator_value(indicator, time, df) if not indicator.value is None: - indicator.stdev = 0.1*indicator.value + indicator.stdev = 0.1*abs(indicator.value) n[1]["indicators"] = [ind for ind in n[1]['indicators'] if ind.value is not None]
Fixed bug where stdev was negative
ml4ai_delphi
train
py
7bf9ab3e03d17ef375f2b223979a21e3385b2abf
diff --git a/mob_rotation.rb b/mob_rotation.rb index <HASH>..<HASH> 100644 --- a/mob_rotation.rb +++ b/mob_rotation.rb @@ -117,6 +117,7 @@ class MobRotation srand(seed.to_i) if seed @real_mobsters.shuffle! git_config_update + sync end def extract_next_mobster_email diff --git a/spec/mob_rotation_spec.rb b/spec/mob_rotation_spec.rb index <HASH>..<HASH> 100644 --- a/spec/mob_rotation_spec.rb +++ b/spec/mob_rotation_spec.rb @@ -104,6 +104,12 @@ describe "mob_rotation command line tool" do expect(output).to include("Driver Phoebe", "Navigator Bob") end + it "saves the rotation order" do + run_rotate 'random 0' + run_rotate + expect(output).to include("Driver Phoebe", "Navigator Bob") + end + it "updates the git username" do remove_temp_rotation_db add_name_and_email_to_temp_db 'Bob Example', '[email protected]'
randomizing the rotation also saves it
RubySteps_mob_rotation
train
rb,rb
b95617ff2ed7395a048833cdece1fcf2b2e52e49
diff --git a/androguard/decompiler/dad/ast.py b/androguard/decompiler/dad/ast.py index <HASH>..<HASH> 100644 --- a/androguard/decompiler/dad/ast.py +++ b/androguard/decompiler/dad/ast.py @@ -265,6 +265,8 @@ def visit_expr(op): if isinstance(op, instruction.NewInstance): return dummy("new ", parse_descriptor(op.type)) if isinstance(op, instruction.Param): + if isinstance(op, instruction.ThisParam): + return local('this') return local('p{}'.format(op.v)) if isinstance(op, instruction.StaticExpression): triple = op.clsdesc[1:-1], op.name, op.ftype @@ -276,8 +278,6 @@ def visit_expr(op): return assignment(lhs, rhs) if isinstance(op, instruction.SwitchExpression): return visit_expr(op.var_map[op.src]) - if isinstance(op, instruction.ThisParam): - return local('this') if isinstance(op, instruction.UnaryExpression): lhs = op.var_map.get(op.arg) if isinstance(op, instruction.CastExpression):
Fix ast printing of ThisParam
androguard_androguard
train
py
a0c8a24fa44bc260ea8cdedfee760ba64d3072a3
diff --git a/threadedcomments/migrations/0001_initial.py b/threadedcomments/migrations/0001_initial.py index <HASH>..<HASH> 100644 --- a/threadedcomments/migrations/0001_initial.py +++ b/threadedcomments/migrations/0001_initial.py @@ -23,7 +23,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='ThreadedComment', fields=[ - ('comment_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='django_comments.Comment')), + ('comment_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to=BASE_APP + '.Comment')), ('title', models.TextField(verbose_name='Title', blank=True)), ('tree_path', models.CharField(verbose_name='Tree path', max_length=500, editable=False, db_index=is_index)), ('last_child', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, verbose_name='Last child', blank=True, to='threadedcomments.ThreadedComment', null=True)),
Fix Django <I> migration support for real
HonzaKral_django-threadedcomments
train
py
b6129c55ab8d6e8b6fcce897f407fb28a4616b0d
diff --git a/Swat/SwatYUI.php b/Swat/SwatYUI.php index <HASH>..<HASH> 100644 --- a/Swat/SwatYUI.php +++ b/Swat/SwatYUI.php @@ -301,7 +301,6 @@ class SwatYUI extends SwatObject $components['simpleeditor']->addDependency($components['dom']); $components['simpleeditor']->addDependency($components['event']); $components['simpleeditor']->addDependency($components['element']); - $components['simpleeditor']->addDependency($components['button']); $components['element']->addDependency($components['yahoo']); $components['element']->addDependency($components['dom']);
Button is not a dependency of the simple editor. svn commit r<I>
silverorange_swat
train
php
c2627320df1187a928c227b2405813586b08e059
diff --git a/common.js b/common.js index <HASH>..<HASH> 100644 --- a/common.js +++ b/common.js @@ -62,12 +62,11 @@ function parseCLIArgs (argv) { } function asarApp (appPath, asarOptions, cb) { - var src = path.join(appPath) var dest = path.join(appPath, '..', 'app.asar') debug(`Running asar with the options ${JSON.stringify(asarOptions)}`) - asar.createPackageWithOptions(src, dest, asarOptions, function (err) { + asar.createPackageWithOptions(appPath, dest, asarOptions, function (err) { if (err) return cb(err) - fs.remove(src, function (err) { + fs.remove(appPath, function (err) { if (err) return cb(err) cb(null, dest) }) @@ -254,7 +253,7 @@ module.exports = { let asarOptions = createAsarOpts(opts) if (asarOptions) { operations.push(function (cb) { - asarApp(path.join(appPath), asarOptions, cb) + asarApp(appPath, asarOptions, cb) }) }
Remove unnecessary calls to path.join
electron-userland_electron-packager
train
js
4c30cf3f8e50a0ba45fc35fb35fd90f015981201
diff --git a/duniterpy/documents/transaction.py b/duniterpy/documents/transaction.py index <HASH>..<HASH> 100644 --- a/duniterpy/documents/transaction.py +++ b/duniterpy/documents/transaction.py @@ -1,5 +1,5 @@ import re -from typing import TypeVar, List, Type, Optional, Dict, Union +from typing import TypeVar, List, Any, Type, Optional, Dict, Union import pypeg2 @@ -78,6 +78,24 @@ class InputSource: self.origin_id = origin_id self.index = index + + def __eq__(self, other: Any) -> bool: + """ + Check InputSource instances equality + """ + if not isinstance(other, InputSource): + return NotImplemented + return self.amount == other.amount and\ + self.base == other.base and\ + self.source == other.source and\ + self.origin_id == other.origin_id and\ + self.index == other.index + + + def __hash__(self) -> int: + return hash((self.amount, self.base, self.source, self.origin_id, self.index)) + + @classmethod def from_inline(cls: Type[InputSourceType], tx_version: int, inline: str) -> InputSourceType: """
[feat] InputSource: add equality and hash methods
duniter_duniter-python-api
train
py
426026d0a27113751252625d7bd94f29c6d2a38d
diff --git a/mintapi/api.py b/mintapi/api.py index <HASH>..<HASH> 100644 --- a/mintapi/api.py +++ b/mintapi/api.py @@ -308,6 +308,8 @@ def _sign_in(email, password, driver, mfa_method=None, mfa_token=None, time.sleep(1) try: # try to enter in credentials if username and password are on same page email_input = driver.find_element_by_id("ius-userid") + if not email_input.is_displayed(): + raise ElementNotVisibleException(); email_input.clear() # clear email and user specified email email_input.send_keys(email) driver.find_element_by_id("ius-password").send_keys(password) @@ -317,6 +319,8 @@ def _sign_in(email, password, driver, mfa_method=None, mfa_token=None, driver.implicitly_wait(0) try: email_input = driver.find_element_by_id("ius-identifier") + if not email_input.is_displayed(): + raise ElementNotVisibleException(); email_input.clear() # clear email and use specified email email_input.send_keys(email) driver.find_element_by_id("ius-sign-in-submit-btn").click()
login: detect if element is visible much faster
mrooney_mintapi
train
py
bbf61f92e07c1be2ae35d35e0fe05999495d4c92
diff --git a/src/Smalot/PdfParser/Tests/Units/Element.php b/src/Smalot/PdfParser/Tests/Units/Element.php index <HASH>..<HASH> 100644 --- a/src/Smalot/PdfParser/Tests/Units/Element.php +++ b/src/Smalot/PdfParser/Tests/Units/Element.php @@ -68,7 +68,7 @@ class Element extends atoum\test $this->assert->castToString($elements['NumericType'])->isEqualTo('8'); $this->assert->boolean(array_key_exists('HexaType', $elements))->isEqualTo(true); - $this->assert->object($elements['HexaType'])->isInstanceOf('\Smalot\PdfParser\Element\ElementHexa'); + $this->assert->object($elements['HexaType'])->isInstanceOf('\Smalot\PdfParser\Element\ElementString'); $this->assert->string($elements['HexaType']->getContent())->isEqualTo(' '); $this->assert->boolean(array_key_exists('BooleanType', $elements))->isEqualTo(true);
fix unit test / code was ok
smalot_pdfparser
train
php
dd0fa3f7862719d5150af70beeab93931359b1ec
diff --git a/test/integration/specs/mount/WrapperArray/name.spec.js b/test/integration/specs/mount/WrapperArray/name.spec.js index <HASH>..<HASH> 100644 --- a/test/integration/specs/mount/WrapperArray/name.spec.js +++ b/test/integration/specs/mount/WrapperArray/name.spec.js @@ -1,6 +1,3 @@ -/** - * Created by eyerburgh on 07/06/2017. - */ import { compileToFunctions } from 'vue-template-compiler' import mount from '../../../../../src/mount'
[Tests] Remove Created by comment
vuejs_vue-test-utils
train
js
03720018b82f1ae038b8810a433445bc4594f3dc
diff --git a/ui/src/kapacitor/components/RuleHeader.js b/ui/src/kapacitor/components/RuleHeader.js index <HASH>..<HASH> 100644 --- a/ui/src/kapacitor/components/RuleHeader.js +++ b/ui/src/kapacitor/components/RuleHeader.js @@ -58,7 +58,7 @@ export const RuleHeader = React.createClass({ renderSave() { const {validationError, onSave, timeRange, onChooseTimeRange} = this.props; const saveButton = validationError ? - <button className="btn btn-sm btn-default disabled" data-for="save-kapacitor-tooltip" data-tip={validationError}> + <button className="btn btn-success btn-sm disabled" data-for="save-kapacitor-tooltip" data-tip={validationError}> Save Rule </button> : <button className="btn btn-success btn-sm" onClick={onSave}>Save Rule</button>;
Make rule page save button always "success" style
influxdata_influxdb
train
js
761c39f3ec0f3a4fc01031ed7804f6e2f00b2929
diff --git a/console/command/Create.php b/console/command/Create.php index <HASH>..<HASH> 100644 --- a/console/command/Create.php +++ b/console/command/Create.php @@ -244,7 +244,7 @@ class Create extends \lithium\console\Command { if (file_exists($file)) { $prompt = "{$file} already exists. Overwrite?"; $choices = array('y', 'n'); - if ($this->in($prompt, compact('choices')) == 'n') { + if ($this->in($prompt, compact('choices')) != 'y') { return "{$params['class']} skipped."; } } diff --git a/console/command/create/View.php b/console/command/create/View.php index <HASH>..<HASH> 100644 --- a/console/command/create/View.php +++ b/console/command/create/View.php @@ -47,7 +47,7 @@ class View extends \lithium\console\command\Create { if (file_exists($file)) { $prompt = "{$file} already exists. Overwrite?"; $choices = array('y', 'n'); - if ($this->in($prompt, compact('choices')) == 'n') { + if ($this->in($prompt, compact('choices')) != 'y') { return "{$params['file']} skipped."; } }
Properly handles bad input by skipping instead of overwritting.
UnionOfRAD_lithium
train
php,php
127304c1794aacfcf197ca8ee2077cd14f00cea8
diff --git a/lib/rbbt/tsv/accessor.rb b/lib/rbbt/tsv/accessor.rb index <HASH>..<HASH> 100644 --- a/lib/rbbt/tsv/accessor.rb +++ b/lib/rbbt/tsv/accessor.rb @@ -672,7 +672,7 @@ module TSV peek end - def head(times=10) + def head_str(times=10) stream = dumper_stream str = "" times.times do |i| @@ -682,6 +682,19 @@ module TSV str end + def head_tsv(times = 10) + new = self.annotate({}) + i = 0 + self.each do |k,v| + return new if i == times + new[k] = v + i += 1 + end + new + end + + alias head head_tsv + def summary key = nil
Change head to return a subset of the TSV
mikisvaz_rbbt-util
train
rb
99b39c96efd63194ec985a435491edc3564fca3b
diff --git a/lang/en_utf8/moodle.php b/lang/en_utf8/moodle.php index <HASH>..<HASH> 100644 --- a/lang/en_utf8/moodle.php +++ b/lang/en_utf8/moodle.php @@ -304,6 +304,7 @@ $string['createfolder'] = 'Create a folder in $a'; $string['createuserandpass'] = 'Choose your username and password'; $string['createziparchive'] = 'Create zip archive'; $string['creatingblocks'] = 'Creating blocks'; +$string['creatingblogsinfo'] = 'Creating blogs info'; $string['creatingblocksroles'] = 'Creating block level role assignments and overrides'; $string['creatingcategoriesandquestions'] = 'Creating categories and questions'; $string['creatingcoursemodules'] = 'Creating course modules';
Added string to restore blogs. MDL-<I> ; merged from <I>_STABLE
moodle_moodle
train
php
04fc74c76a265d1b75a2ded0025d982c5946e1aa
diff --git a/tests/parser/parserTests.js b/tests/parser/parserTests.js index <HASH>..<HASH> 100644 --- a/tests/parser/parserTests.js +++ b/tests/parser/parserTests.js @@ -319,7 +319,7 @@ ParserTests.prototype.normalizeHTML = function (source) { // known-ok differences. ParserTests.prototype.normalizeOut = function ( out ) { // TODO: Do not strip newlines in pre and nowiki blocks! - return out.replace(/[\r\n]| data-mw="[^">]*"/g, '') + return out.replace(/[\r\n]| (data-mw|typeof|resource|rel|prefix|about|rev|datatype|inlist|property|vocab|content)="[^">]*"/g, '') .replace(/<!--.*?-->\n?/gm, '') .replace(/<\/?meta[^>]*>/g, ''); };
Strip RDFa attributes in parserTests We are adding some extra information in those, which should not make tests fail. Change-Id: I<I>cca<I>efeff5d<I>f<I>ef1c<I>b
wikimedia_parsoid
train
js
fa91e319a165df2a4a9d28eb83a92958574e3a32
diff --git a/test/manager.js b/test/manager.js index <HASH>..<HASH> 100644 --- a/test/manager.js +++ b/test/manager.js @@ -30,12 +30,10 @@ describe('service manager', function () { }; describe('creation', function (done) { - it('promise should be fullfilled', function () { - const promise = kronos.manager({ + it('promise should be fulfilled', function () { + kronos.manager({ flows: flowDecl - }).then(function(manager) { - manager.shutdown().then(function() { done(); }); - }); + }).should.be.fulfilled.notify(done); }); }); });
test: chai-as-promised the right way with notify(done)
Kronos-Integration_kronos-service-consul
train
js
4b12b93a77f199e100f19d7d9bbe042b00e7a2d5
diff --git a/lib/ticketmaster.rb b/lib/ticketmaster.rb index <HASH>..<HASH> 100644 --- a/lib/ticketmaster.rb +++ b/lib/ticketmaster.rb @@ -3,10 +3,11 @@ interacter project ticket - rubygems systems/github }.each {|lib| require 'ticketmaster/' + lib } +require 'rubygems' + module TicketMaster # @todo: Fix this, and make it new def self.interact_with(client)
Rubygems should not be loaded from ticketmaster/ oops.
hybridgroup_taskmapper
train
rb
485cbf9d0b533bf5a032b70d77f4575143dd70fa
diff --git a/lib/vehicle.js b/lib/vehicle.js index <HASH>..<HASH> 100644 --- a/lib/vehicle.js +++ b/lib/vehicle.js @@ -11,7 +11,7 @@ var util = require('./util'); */ function Vehicle(vid, token, unitSystem) { unitSystem = unitSystem || 'metric'; - if (!(['imperial', 'metric'].includes(unitSystem))) { + if (['imperial', 'metric'].indexOf(unitSystem) < 0) { throw new TypeError('unit system must be one of: \'imperial\', \'metric\''); } @@ -28,7 +28,7 @@ function Vehicle(vid, token, unitSystem) { } Vehicle.prototype.setUnitSystem = function(unitSystem) { - if (!(['imperial', 'metric'].includes(unitSystem))) { + if (['imperial', 'metric'].indexOf(unitSystem) < 0) { throw new TypeError('unit system must be one of: \'imperial\', \'metric\''); }
use indexOf rather than includes for Node 4
smartcar_node-sdk
train
js
22f2115ff2419fcebe6d5cff68b1fde5793e7c85
diff --git a/src/Swoole/Swoole.php b/src/Swoole/Swoole.php index <HASH>..<HASH> 100644 --- a/src/Swoole/Swoole.php +++ b/src/Swoole/Swoole.php @@ -191,4 +191,10 @@ function cors(array $origin = ['*'], array $methods = [], array $headers = []) if (!empty($headers)) { $response->header('Access-Control-Allow-Headers', implode(',', $headers)); } + + $request = Container\get(SWOOLE_HTTP_REQUEST); + + if ('OPTIONS' === $request->server['request_method']) { + $response->end(''); + } }
Handle OPTIONS requests at cors function
leocavalcante_siler
train
php
9817624f131785c2d31cca12763ce84682d7645b
diff --git a/gwpy/plotter/segments.py b/gwpy/plotter/segments.py index <HASH>..<HASH> 100644 --- a/gwpy/plotter/segments.py +++ b/gwpy/plotter/segments.py @@ -238,7 +238,8 @@ class SegmentAxes(TimeSeriesAxes): # make active collection collection = self.plot_segmentlist(flag.active, y=y, label=name, facecolor=facecolor, **kwargs) - if len(self.collections) == 1: + if (known is not None and len(self.collections) == 2 or + len(self.collections) == 1): if len(flag.known): self.set_xlim(*map(float, flag.extent)) self.autoscale(axis='y')
SegmentAxes: minor improvement to autoscaling
gwpy_gwpy
train
py
5a90cb5051996fc370ae00102d9b0d34da2ee53c
diff --git a/mount/mount.go b/mount/mount.go index <HASH>..<HASH> 100644 --- a/mount/mount.go +++ b/mount/mount.go @@ -224,7 +224,6 @@ func (d *Datastore) Delete(key ds.Key) error { func (d *Datastore) Query(master query.Query) (query.Results, error) { childQuery := query.Query{ Prefix: master.Prefix, - Limit: master.Limit, Orders: master.Orders, KeysOnly: master.KeysOnly, ReturnExpirations: master.ReturnExpirations, @@ -254,7 +253,7 @@ func (d *Datastore) Query(master query.Query) (query.Results, error) { queries.addResults(mount, results) } - qr := query.ResultsFromIterator(childQuery, query.Iterator{ + qr := query.ResultsFromIterator(master, query.Iterator{ Next: queries.next, Close: queries.close, }) @@ -269,8 +268,8 @@ func (d *Datastore) Query(master query.Query) (query.Results, error) { qr = query.NaiveOffset(qr, master.Offset) } - if childQuery.Limit > 0 { - qr = query.NaiveLimit(qr, childQuery.Limit) + if master.Limit > 0 { + qr = query.NaiveLimit(qr, master.Limit) } return qr, nil
fix(mount): fix mount query based on new tests
ipfs_go-datastore
train
go
bfffa03925ca877bde1b7ad7111db8cfc64a0f02
diff --git a/system/drivers/DC_General.php b/system/drivers/DC_General.php index <HASH>..<HASH> 100644 --- a/system/drivers/DC_General.php +++ b/system/drivers/DC_General.php @@ -1709,6 +1709,8 @@ class DC_General extends DataContainer implements editable, listable $varNew = $objDate->tstamp; } + $this->import('Input'); + //Handle multi-select fields in "override all" mode // OH: this should be a widget feature if (($arrConfig['inputType'] == 'checkbox' || $arrConfig['inputType'] == 'checkboxWizard') && $arrConfig['eval']['multiple'] && $this->Input->get('act') == 'overrideAll')
Missing Input instance caused an "Call to a member function get() on a non-object" Error.
contao-community-alliance_dc-general
train
php
195c9fc6c44b87d20e084df1d6647e30598298ca
diff --git a/server/sonar-web/src/test/lib.js b/server/sonar-web/src/test/lib.js index <HASH>..<HASH> 100644 --- a/server/sonar-web/src/test/lib.js +++ b/server/sonar-web/src/test/lib.js @@ -53,9 +53,6 @@ exports.changeWorkingDirectory = function (dir) { // Since Casper has control, the invoked script is deep in the argument stack // commandLineArgs = casper/bin/bootstrap.js,--casper-path=.../casperjs,--cli,--test,[file(s) under test],[options] var currentFile = commandLineArgs[4]; - console.log(''); - console.log(currentFile); - console.log(''); var curFilePath = currentFile.split(fs.separator); if (curFilePath.length > 1) { curFilePath.pop(); // test name @@ -69,7 +66,7 @@ exports.changeWorkingDirectory = function (dir) { exports.configureCasper = function () { - casper.options.waitTimeout = 30000; + casper.options.waitTimeout = 60000; };
try to increase timeout for web tests
SonarSource_sonarqube
train
js
6db1d0066037f58fc6e9fabe2787e0f66a63c87a
diff --git a/lib/AUtils.js b/lib/AUtils.js index <HASH>..<HASH> 100644 --- a/lib/AUtils.js +++ b/lib/AUtils.js @@ -166,7 +166,7 @@ var recursivelyOrderKeys = function(unordered) { return unordered; } - if (typeof unordered === 'object') { + if (unordered !== null && typeof unordered === 'object') { var ordered = {}; Object.keys(unordered).sort().forEach(function(key) { ordered[key] = recursivelyOrderKeys(unordered[key]);
don't call `Object.keys(unordered)` when `unordered` is `null`
approvals_Approvals.NodeJS
train
js
93b6eeca54c15fbc433be956918444cfe9f1eb1b
diff --git a/lib/Doctrine/ORM/Tools/ResolveDiscriminatorMapListener.php b/lib/Doctrine/ORM/Tools/ResolveDiscriminatorMapListener.php index <HASH>..<HASH> 100644 --- a/lib/Doctrine/ORM/Tools/ResolveDiscriminatorMapListener.php +++ b/lib/Doctrine/ORM/Tools/ResolveDiscriminatorMapListener.php @@ -40,12 +40,11 @@ class ResolveDiscriminatorMapListener /** * Construct * - * @param string $originalEntity - * @param string $newEntity + * @param array $resolveTargetEntities */ - public function __construct($originalEntity, $newEntity) + public function __construct(array $resolveTargetEntities) { - $this->resolveTargetEntities[ltrim($originalEntity, "\\")] = ltrim($newEntity, "\\"); + $this->resolveTargetEntities = $resolveTargetEntities; } /**
Full resolveTargetEntities as constructor argument
doctrine_orm
train
php
bd587eb7ca500e75866927cb5f8713c4530de7b7
diff --git a/internal/service/cloudformation/wait.go b/internal/service/cloudformation/wait.go index <HASH>..<HASH> 100644 --- a/internal/service/cloudformation/wait.go +++ b/internal/service/cloudformation/wait.go @@ -58,7 +58,7 @@ const ( func WaitStackSetOperationSucceeded(conn *cloudformation.CloudFormation, stackSetName, operationID string, timeout time.Duration) (*cloudformation.StackSetOperation, error) { stateConf := &resource.StateChangeConf{ - Pending: []string{cloudformation.StackSetOperationStatusRunning}, + Pending: []string{cloudformation.StackSetOperationStatusRunning, cloudformation.StackSetOperationStatusQueued}, Target: []string{cloudformation.StackSetOperationStatusSucceeded}, Refresh: StatusStackSetOperation(conn, stackSetName, operationID), Timeout: timeout,
Adds Queued as pending state
terraform-providers_terraform-provider-aws
train
go
ddfccb995d0ad3bf97cef56011555a630191bffa
diff --git a/src/Plugins/DeployOxid/Subscriber/DeployOxidSubscriber.php b/src/Plugins/DeployOxid/Subscriber/DeployOxidSubscriber.php index <HASH>..<HASH> 100644 --- a/src/Plugins/DeployOxid/Subscriber/DeployOxidSubscriber.php +++ b/src/Plugins/DeployOxid/Subscriber/DeployOxidSubscriber.php @@ -112,6 +112,7 @@ class DeployOxidSubscriber implements EventSubscriberInterface $taskHelper->registerTask('Deployee\Plugins\DeployOxid\Tasks\ModuleTask', 'oxidModule'); $taskHelper->registerTask('Deployee\Plugins\DeployOxid\Tasks\ShopTask', 'oxidShop'); $taskHelper->registerTask('Deployee\Plugins\DeployOxid\Tasks\ShopConfigTask', 'oxidShopConfig'); + $taskHelper->registerTask('Deployee\Plugins\DeployOxid\Tasks\ShopLangKeyTask', 'oxidShopLangKey'); // Legacy compatibility $taskHelper->registerTask('Deployee\Plugins\DeployOxid\Tasks\ModuleTask', 'module');
Added shortener for lang key tasks
phizzl_deployee
train
php
cc0cad31fa661c75a2dbd2191a76855bdd465c95
diff --git a/src/lander/ext/parser/pandoc/_convert.py b/src/lander/ext/parser/pandoc/_convert.py index <HASH>..<HASH> 100644 --- a/src/lander/ext/parser/pandoc/_convert.py +++ b/src/lander/ext/parser/pandoc/_convert.py @@ -75,7 +75,7 @@ def convert_text( deparagraph : `bool`, optional If `True`, then the - `lsstprojectmeta.pandoc.filters.deparagraph.deparagraph` filter is + `lander.parse.pandoc.filters.deparagraph.deparagraph` filter is used to remove paragraph (``<p>``, for example) tags around a single paragraph of content. That filter does not affect content that consists of multiple blocks (several paragraphs, or lists, for @@ -121,7 +121,7 @@ def convert_text( extra_args.append("--mathjax") if deparagraph: - extra_args.append("--filter=lsstprojectmeta-deparagraph") + extra_args.append("--filter=lander-deparagraph") extra_args.append("--wrap=none")
Switch to using lander-deparagraph
lsst-sqre_lander
train
py
a8bca9b07e6074b6b2fd9a9ab45ea4b2a139272b
diff --git a/src/core.js b/src/core.js index <HASH>..<HASH> 100644 --- a/src/core.js +++ b/src/core.js @@ -144,7 +144,6 @@ const _fromAST = (node, window, parentNode, document, uppercase) => { if (node.nodeName === '#text') { const text = new window.Text(node.value); text.parentNode = parentNode; - text.ownerDocument = ownerDocument; return text; } else if (node.nodeName === '#comment') { const comment = new window.Comment(node.data);
Small core.js ownerDocument bugfix
exokitxr_exokit
train
js
7df572924d4e2215aa32b5b736dc7304dcad3818
diff --git a/lib/builder.js b/lib/builder.js index <HASH>..<HASH> 100644 --- a/lib/builder.js +++ b/lib/builder.js @@ -14,7 +14,8 @@ function Builder(service_user, git_repository) { if (service_user == null) { throw 'service_user is not specified'; } //Set the service remote - shell("git remote add service https://" + service_user + '@' + this.git_repository + ' > /dev/null 2>&1 || exit 0'); + if(shell('git remote show service > /dev/null 2>&1 || echo 1')) + shell("git remote add service https://" + service_user + '@' + this.git_repository + ' > /dev/null 2>&1 || exit 0'); shell("git fetch service > /dev/null 2>&1 || exit 0"); this.PublishGitTag = PublishGitTag;
Don't create service branch if it already exists.
wparad_Javascript-Travis-Build-Tools
train
js
e5ed2f94dc067c5a2c813900f4047ba40a3b6008
diff --git a/py/testdir_single_jvm/test_GLMGrid_convergence_1.py b/py/testdir_single_jvm/test_GLMGrid_convergence_1.py index <HASH>..<HASH> 100644 --- a/py/testdir_single_jvm/test_GLMGrid_convergence_1.py +++ b/py/testdir_single_jvm/test_GLMGrid_convergence_1.py @@ -99,9 +99,11 @@ class Basic(unittest.TestCase): 'num_cross_validation_folds': 2, 'beta_epsilon': 1e-4, #*********** - 'lambda': '1e-8:1e-3:1e-2', + # FIX! failed with : separator + 'lambda': '1e-8,1e-3,1e-2', 'alpha': '0,0.5,.75', - 'thresholds': '0:1:0.2' + # changed to , separator + 'thresholds': '0,1,0.2' } if USEKNOWNFAILURE:
lambda start/end/step was failing with json error response if : separator used. Changed all start/end/step to , separator
h2oai_h2o-2
train
py
58107a6e5d3c69df99246dd6e4ff60ed2f424afd
diff --git a/test/unit/client-test.js b/test/unit/client-test.js index <HASH>..<HASH> 100644 --- a/test/unit/client-test.js +++ b/test/unit/client-test.js @@ -3,14 +3,15 @@ var Lifx = require('../../').Client; var packet = require('../../').packet; var assert = require('chai').assert; -var client = null; suite('Client', () => { - setup(() => { + var client; + + beforeEach(() => { client = new Lifx(); }); - teardown(() => { + afterEach(() => { client.destroy(); });
Don't share state between tests in client
MariusRumpf_node-lifx
train
js
2a402959fac1d264a0113643d9dde329705f3070
diff --git a/dynamic_scraper/admin.py b/dynamic_scraper/admin.py index <HASH>..<HASH> 100644 --- a/dynamic_scraper/admin.py +++ b/dynamic_scraper/admin.py @@ -6,6 +6,7 @@ from datetime import date from django.contrib import admin from django.contrib.admin import SimpleListFilter from django.core.exceptions import ValidationError +from django import forms from django.forms.models import BaseInlineFormSet from django.utils.translation import ugettext_lazy as _ from dynamic_scraper.models import * @@ -108,8 +109,21 @@ class CheckerInline(admin.StackedInline): model = Checker extra = 0 + +class ScraperElemAdminForm(forms.ModelForm): + def __init__(self, *args, **kwargs): + super(ScraperElemAdminForm, self).__init__(*args, **kwargs) + # access object through self.instance... + if hasattr(self.instance, 'scraper'): + if hasattr(self.instance.scraper, 'scraped_obj_class'): + if self.instance.scraper.scraped_obj_class: + self.fields['scraped_obj_attr'].queryset = ScrapedObjAttr.objects.filter( + obj_class=self.instance.scraper.scraped_obj_class) + + class ScraperElemInline(admin.TabularInline): model = ScraperElem + form = ScraperElemAdminForm extra = 3
Limit number of ScraperElem choices to corresponding ScrapedObjClass (if possible) for performance reasons
holgerd77_django-dynamic-scraper
train
py
d8933fb773bb1d0f55f73334c90cc1e4bd538dce
diff --git a/lib/Cake/tests/Case/Error/ErrorHandlerTest.php b/lib/Cake/tests/Case/Error/ErrorHandlerTest.php index <HASH>..<HASH> 100644 --- a/lib/Cake/tests/Case/Error/ErrorHandlerTest.php +++ b/lib/Cake/tests/Case/Error/ErrorHandlerTest.php @@ -36,7 +36,7 @@ class ErrorHandlerTest extends CakeTestCase { */ function setUp() { App::build(array( - 'views' => array( + 'View' => array( LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS, LIBS . 'libs' . DS . 'view' . DS )
Small change in use of App::build() in ErrorHanlderTest
cakephp_cakephp
train
php
305357a9ed140f5e64c5295b427a3e0a962d2833
diff --git a/lxd/containers.go b/lxd/containers.go index <HASH>..<HASH> 100644 --- a/lxd/containers.go +++ b/lxd/containers.go @@ -433,7 +433,7 @@ func (d *lxdContainer) exportToTar(snap string, w io.Writer) error { cDir := shared.VarPath("lxc", d.name) // Path inside the tar image is the pathname starting after cDir - offset := len(cDir) + offset := len(cDir) + 1 fnam := filepath.Join(cDir, "metadata.yaml") writeToTar := func(path string, fi os.FileInfo, err error) error {
Don't include the leading / in publish tar's, fixes issue #<I>.
lxc_lxd
train
go
8a248d36b79f92281edbf239fe9a5ec608fd5f7e
diff --git a/concrete/elements/express/form/view/author.php b/concrete/elements/express/form/view/author.php index <HASH>..<HASH> 100644 --- a/concrete/elements/express/form/view/author.php +++ b/concrete/elements/express/form/view/author.php @@ -15,5 +15,5 @@ <?php } ?> - </span> + </div> </div>
Swaps closing tag for correct markup
concrete5_concrete5
train
php
78c05efb490bffd3d4c364665f9f18a3e5a5dd7d
diff --git a/Kwc/Basic/LinkTag/News/NewsIdData.php b/Kwc/Basic/LinkTag/News/NewsIdData.php index <HASH>..<HASH> 100644 --- a/Kwc/Basic/LinkTag/News/NewsIdData.php +++ b/Kwc/Basic/LinkTag/News/NewsIdData.php @@ -4,9 +4,10 @@ class Kwc_Basic_LinkTag_News_NewsIdData extends Kwf_Data_Table public function load($row) { $ret = parent::load($row); + if (!$ret) return $ret; $c = Kwf_Component_Data_Root::getInstance()->getComponentByDbId('news_'.$ret, array('ignoreVisible'=>true, 'limit'=>1)); $ret = array( - 'name' => $c->name, + 'name' => $c ? $c->name : $ret, 'id' => $ret ); return $ret;
fix loading if no news is selected or found
koala-framework_koala-framework
train
php
9245568deb5b085278323bdee0ba0cbf3183975d
diff --git a/src/test/moment/is_valid.js b/src/test/moment/is_valid.js index <HASH>..<HASH> 100644 --- a/src/test/moment/is_valid.js +++ b/src/test/moment/is_valid.js @@ -15,6 +15,12 @@ test('array good month', function (assert) { } }); +test('Feb 29 0000 is valid', function (assert) { + // https://github.com/moment/moment/issues/3358 + assert.ok(moment({year:0, month:1, date:29}).isValid(), 'Feb 29 0000 must be valid'); + assert.ok(moment({year:0, month:1, date:28}).add(1, 'd').isValid(), 'Feb 28 0000 + 1 day must be valid'); +}); + test('array bad date', function (assert) { var tests = [ moment([2010, 0, 0]),
Write test for Feb <I> <I> validity
moment_moment
train
js
40bf5b2215235b402e0d243ac2f7166e80d7a5bb
diff --git a/modules/tags/makesynonym.php b/modules/tags/makesynonym.php index <HASH>..<HASH> 100755 --- a/modules/tags/makesynonym.php +++ b/modules/tags/makesynonym.php @@ -110,6 +110,12 @@ else $tag->updateModified(); + $ini = eZINI::instance( 'eztags.ini' ); + if( $ini->variable( 'SearchSettings', 'IndexSynonyms' ) !== 'enabled' ) + { + $tag->registerSearchObjects(); + } + $db->commit(); return $Module->redirectToView( 'id', array( $tagID ) );
reindex objects when making synonyms if synonym indexing is disabled
ezsystems_eztags
train
php
45d132cd05dc429bb28d84aa7eb658e4d4c3b1bb
diff --git a/spec/features/person_membership_spec.rb b/spec/features/person_membership_spec.rb index <HASH>..<HASH> 100644 --- a/spec/features/person_membership_spec.rb +++ b/spec/features/person_membership_spec.rb @@ -65,7 +65,7 @@ feature "Person maintenance" do membership = person.reload.memberships.last expect(membership.role).to eql('Head Honcho') - expect(page).to have_selector('.cb-job-title', text: 'Head Honcho in Digital Justice') + expect(page).to have_selector('.cb-job-title', text: "Head Honcho in\nDigital Justice") end scenario 'Leaving the job title blank', js: true do
Add escaped space to pass test I think this is this is because capybara .text method now includes literals for newlines
ministryofjustice_peoplefinder
train
rb
f20fefaf8732b1dbad81b106faba6da42279ead7
diff --git a/src/lib/storage.js b/src/lib/storage.js index <HASH>..<HASH> 100644 --- a/src/lib/storage.js +++ b/src/lib/storage.js @@ -324,17 +324,20 @@ class Storage implements IStorageHandler { lstream.pipe(stream, {end: false}); lstream.on('error', function(err) { self.logger.error({err: err}, 'uplink error: @{err.message}'); - cb(), cb = function() {}; + cb(); + cb = function() {}; }); lstream.on('end', function() { - cb(), cb = function() {}; + cb(); + cb = function() {}; }); stream.abort = function() { if (lstream.abort) { lstream.abort(); } - cb(), cb = function() {}; + cb(); + cb = function() {}; }; }, // executed after all series
fix: remove use of comma separator (#<I>)
verdaccio_verdaccio
train
js
3af9574d287b13893100f2bb0de38be2639f1676
diff --git a/manifest.php b/manifest.php index <HASH>..<HASH> 100755 --- a/manifest.php +++ b/manifest.php @@ -31,7 +31,7 @@ return array( 'label' => 'LTI library', 'description' => 'TAO LTI library and helpers', 'license' => 'GPL-2.0', - 'version' => '1.2', + 'version' => '1.3.0', 'author' => 'Open Assessment Technologies SA', 'requires' => array( 'tao' => '>=2.7.0' diff --git a/scripts/update/class.Updater.php b/scripts/update/class.Updater.php index <HASH>..<HASH> 100644 --- a/scripts/update/class.Updater.php +++ b/scripts/update/class.Updater.php @@ -33,9 +33,6 @@ class taoLti_scripts_update_Updater extends \common_ext_ExtensionUpdater */ public function update($initialVersion) { - if ($this->isBetween('0', '1.2')){ - $this->setVersion('1.2'); - } - return null; + $this->skip('0', '1.3.0'); } }
Updating version to <I>
oat-sa_extension-tao-lti
train
php,php
aa4bb77ef230758cad84381dde0ec660d2dc340a
diff --git a/salt/client/ssh/__init__.py b/salt/client/ssh/__init__.py index <HASH>..<HASH> 100644 --- a/salt/client/ssh/__init__.py +++ b/salt/client/ssh/__init__.py @@ -79,7 +79,7 @@ SSH_SHIM = '''/bin/sh << 'EOF' exit 1 fi echo "{1}" - {{0}} install -m 1777 -d /tmp/.salt + install -m 1700 -d /tmp/.salt echo "deploy" exit 1 fi
The .salt directory should be owned by the ssh login user Since the ssh login user is used to drop the deployment file they need write permissions, and since the login user can sudo they have rights to manage the salt runs. When salt runs as root it will still have access to said files. We still need more validation around the integrety of the passed files
saltstack_salt
train
py
069c499defcfc8b810d291295677d0a3d0e78566
diff --git a/python/ray/tests/test_client_compat.py b/python/ray/tests/test_client_compat.py index <HASH>..<HASH> 100644 --- a/python/ray/tests/test_client_compat.py +++ b/python/ray/tests/test_client_compat.py @@ -8,7 +8,6 @@ except ImportError: pyspark = None [email protected](sys.platform == "win32", reason="Failing on Windows.") @pytest.mark.skipif(pyspark is None, reason="PySpark dependency not found") @pytest.mark.parametrize( "call_ray_start", [ diff --git a/python/ray/tests/test_multi_tenancy.py b/python/ray/tests/test_multi_tenancy.py index <HASH>..<HASH> 100644 --- a/python/ray/tests/test_multi_tenancy.py +++ b/python/ray/tests/test_multi_tenancy.py @@ -111,7 +111,6 @@ ray.shutdown() all_worker_pids.add(worker_pid) [email protected](sys.platform == "win32", reason="Failing on Windows.") def test_runtime_env(shutdown_only): ray.init( job_config=ray.job_config.JobConfig(
Unskipped tests for Windows (#<I>) This is third unskipping PR.
ray-project_ray
train
py,py
f048a80f32cae6e515cb7d8ae056827cb6bee0a7
diff --git a/src/main/java/io/scalecube/gateway/http/GatewayHttpAcceptor.java b/src/main/java/io/scalecube/gateway/http/GatewayHttpAcceptor.java index <HASH>..<HASH> 100644 --- a/src/main/java/io/scalecube/gateway/http/GatewayHttpAcceptor.java +++ b/src/main/java/io/scalecube/gateway/http/GatewayHttpAcceptor.java @@ -60,10 +60,11 @@ public class GatewayHttpAcceptor return httpRequest .receive() + .aggregate() .map(ByteBuf::retain) .doOnNext(content -> metrics.markRequest()) .flatMap(content -> handleRequest(content, httpRequest, httpResponse)) - .doOnComplete(metrics::markResponse) + .doOnTerminate(metrics::markResponse) .timeout(DEFAULT_TIMEOUT) .onErrorResume(t -> error(httpResponse, ExceptionProcessor.toMessage(t))); }
Fixed support long data in HTTP acceptor
scalecube_scalecube-services
train
java
52eab10c9ef3da779e53043a589fd76b6b40c354
diff --git a/src/main/java/net/jodah/failsafe/CircuitBreaker.java b/src/main/java/net/jodah/failsafe/CircuitBreaker.java index <HASH>..<HASH> 100644 --- a/src/main/java/net/jodah/failsafe/CircuitBreaker.java +++ b/src/main/java/net/jodah/failsafe/CircuitBreaker.java @@ -274,22 +274,25 @@ public class CircuitBreaker { /** * Calls the {@code runnable} when the circuit is closed. */ - public void onClose(CheckedRunnable runnable) { + public CircuitBreaker onClose(CheckedRunnable runnable) { onClose = runnable; + return this; } /** * Calls the {@code runnable} when the circuit is half-opened. */ - public void onHalfOpen(CheckedRunnable runnable) { + public CircuitBreaker onHalfOpen(CheckedRunnable runnable) { onHalfOpen = runnable; + return this; } /** * Calls the {@code runnable} when the circuit is opened. */ - public void onOpen(CheckedRunnable runnable) { + public CircuitBreaker onOpen(CheckedRunnable runnable) { onOpen = runnable; + return this; } /**
Support chaining CircuitBreaker event configurations. Closes #<I>.
jhalterman_failsafe
train
java
5399035dec8e532d6a48f1a586116bb1d8872761
diff --git a/src/test/java/org/sonar/plugins/groovy/GroovyIT.java b/src/test/java/org/sonar/plugins/groovy/GroovyIT.java index <HASH>..<HASH> 100644 --- a/src/test/java/org/sonar/plugins/groovy/GroovyIT.java +++ b/src/test/java/org/sonar/plugins/groovy/GroovyIT.java @@ -152,7 +152,7 @@ public class GroovyIT { // We are getting different results for different Java versions : 1.6.0_21 and 1.5.0_16 assertThat(getPackageMeasure("coverage").getValue(), closeTo(88.3, 0.2)); assertThat(getPackageMeasure("line_coverage").getValue(), closeTo(99.6, 0.2)); - assertThat(getPackageMeasure("lines_to_cover").getValue(), is(278.0)); + assertThat(getPackageMeasure("lines_to_cover").getValue(), closeTo(278.0, 1.0)); assertThat(getPackageMeasure("uncovered_lines").getValue(), anyOf(is(1.0), is(2.0))); assertThat(getPackageMeasure("tests").getValue(), is(60.0));
add case for lines_to_cover due to new CI machine
pmayweg_sonar-groovy
train
java
d2e8dde8e735530261d3218cf76db69bfb0b8fb7
diff --git a/eZ/Publish/Core/Persistence/InMemory/Backend.php b/eZ/Publish/Core/Persistence/InMemory/Backend.php index <HASH>..<HASH> 100644 --- a/eZ/Publish/Core/Persistence/InMemory/Backend.php +++ b/eZ/Publish/Core/Persistence/InMemory/Backend.php @@ -80,9 +80,18 @@ class Backend foreach ( $this->data[$type] as $item ) { - if ( $item[$idColumn] == $data[$idColumn] - && ( ( isset( $item['status'] ) && $item['status'] == $data['status'] ) - || ( isset( $item['_status'] ) && $item['_status'] == $data['_status'] ) ) ) + if ( + // Same identifier + $item[$idColumn] == $data[$idColumn] && + ( + // and "status" matches + ( isset( $item['status'] ) && $item['status'] == $data['status'] ) || + // or "_status" matches + ( isset( $item['_status'] ) && $item['_status'] == $data['_status'] ) || + // or no status available + !( isset( $item['status'] ) || isset( $item['_status'] ) ) + ) + ) throw new LogicException( "'create' logic error, provided id already exist" ); }
Fixed: with no status available 'duplicates' were not detectd (cherry picked from commit efffb<I>f<I>e<I>b<I>f6ec<I>d<I>a5df2) Conflicts: eZ/Publish/Core/Persistence/InMemory/Backend.php
ezsystems_ezpublish-kernel
train
php
22cf096a01a67c933706405ba2c077080d46a7f0
diff --git a/libkbfs/bcache.go b/libkbfs/bcache.go index <HASH>..<HASH> 100644 --- a/libkbfs/bcache.go +++ b/libkbfs/bcache.go @@ -199,6 +199,8 @@ func (b *BlockCacheStandard) makeRoomForSize(size uint64, lifetime BlockCacheLif b.bytesLock.Unlock() doUnlock = false if oldLen == b.cleanTransient.Len() { + doUnlock = true + b.bytesLock.Lock() break } oldLen = b.cleanTransient.Len()
bcache: re-take lock after breaking loop in makeRoomForSize Since `cleanTotalBytes` is manipulated later. Issue: KBFS-<I>
keybase_client
train
go
da439643185e76644dbddfc4f3f4a919e40b3b01
diff --git a/bundles/org.eclipse.orion.client.javascript/web/javascript/ternPlugins/plugins.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/ternPlugins/plugins.js index <HASH>..<HASH> 100644 --- a/bundles/org.eclipse.orion.client.javascript/web/javascript/ternPlugins/plugins.js +++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/ternPlugins/plugins.js @@ -1,6 +1,6 @@ /******************************************************************************* * @license - * Copyright (c) 2015 IBM Corporation and others. + * Copyright (c) 2015, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials are made * available under the terms of the Eclipse Public License v1.0 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution @@ -56,6 +56,8 @@ define([ var env = plugins[key].env; if(env) { envs[env] = true; + } else { + envs[plugins[key]] = true; } } return envs;
Bug <I> - [tern] Plugins should not have to specify an environment
eclipse_orion.client
train
js
32fe576f6a9d7e3696924076b9f3b25d427ab0f2
diff --git a/lang/en_utf8/admin.php b/lang/en_utf8/admin.php index <HASH>..<HASH> 100644 --- a/lang/en_utf8/admin.php +++ b/lang/en_utf8/admin.php @@ -242,7 +242,7 @@ $string['configthemelist'] = 'Leave this blank to allow any valid theme to be us For example: standard,orangewhite.'; $string['configtimezone'] = 'You can set the default timezone here. This is the only the DEFAULT timezone for displaying dates - each user can override this by setting their own in their profile. \"Server time\" here will make Moodle default to the server\'s operating system setting, but \"Server time\" in the user profile will make the user default to this timezone setting. Cronjobs that depend on a time of day to run will use this timezone.'; $string['configunzip'] = 'Indicate the location of your unzip program (Unix only, optional). If specified, this will be used to unpack zip archives on the server. If you leave this blank, then Moodle will use internal routines.'; -$string['configuseexternalyui'] = 'Instead of using local files, use online files available on Yahoo&#145;s servers.'; +$string['configuseexternalyui'] = 'Instead of using local files, use online files available on Yahoo&#145;s servers. WARNING: This requires an internet connection, or no AJAX will work on your site.'; $string['configusetags'] = 'Should tags functionality across the site be enabled?'; $string['configvariables'] = 'Variables'; $string['configwarning'] = 'Be careful modifying these settings - strange values could cause problems.';
MDL-<I> Added warning suggested by Petr
moodle_moodle
train
php
f65ba73d61e9f6dbf780b3b79e15653031b4f8c1
diff --git a/tests/test_api_older.py b/tests/test_api_older.py index <HASH>..<HASH> 100644 --- a/tests/test_api_older.py +++ b/tests/test_api_older.py @@ -6,6 +6,10 @@ import scrubadub.utils class OldAPITestCase(unittest.TestCase): + def setUp(self): + from scrubadub.detectors.text_blob import TextBlobNameDetector + scrubadub.detectors.register_detector(TextBlobNameDetector, autoload=True) + def test_scrubadub_clean(self): """test old scrubadub API""" text = u"John is a cat" @@ -102,3 +106,7 @@ class OldAPITestCase(unittest.TestCase): finally: warnings.simplefilter("default") self.assertTrue(sum(issubclass(w.category, DeprecationWarning) for w in warning_context), 1) + + def tearDown(self) -> None: + from scrubadub.detectors.text_blob import TextBlobNameDetector + del scrubadub.detectors.detector_configuration[TextBlobNameDetector.name]
add the older text_blob detector to the old api test cases
datascopeanalytics_scrubadub
train
py
06bd65bbbb0f61525f851b9e22db49eb357d5bc3
diff --git a/app/models/unidom/common/concerns/md5_digester.rb b/app/models/unidom/common/concerns/md5_digester.rb index <HASH>..<HASH> 100644 --- a/app/models/unidom/common/concerns/md5_digester.rb +++ b/app/models/unidom/common/concerns/md5_digester.rb @@ -53,6 +53,16 @@ module Unidom::Common::Concerns::Md5Digester message.present? ? Digest::MD5.digest("#{message}_#{Rails.application.secrets[:secret_key_base]}_#{pepper}") : nil end + ## + # 对明文 message 进行 MD-5 摘要,并以16进制的形式返回, pepper 是用于增加混乱的内容。如: + # class SomeModel + # include Unidom::Common::Concerns::Md5Digester + # def self.some_method(param_1) + # hex_digest param_1 + # # 或者 + # hex_digest param_1, pepper: 'my_pepper' + # end + # end def hex_digest(message, pepper: nil) message.present? ? Unidom::Common::Numeration.hex(digest(message, pepper: pepper)) : nil end
1, Improve the MD-5 Digester for the document.
topbitdu_unidom-common
train
rb
cd37cf8644b3d3a0ec6afd65cc35aed4d0bd3863
diff --git a/lib/ProMotion/cocoatouch/tab_bar_controller.rb b/lib/ProMotion/cocoatouch/tab_bar_controller.rb index <HASH>..<HASH> 100644 --- a/lib/ProMotion/cocoatouch/tab_bar_controller.rb +++ b/lib/ProMotion/cocoatouch/tab_bar_controller.rb @@ -31,6 +31,7 @@ module ProMotion sorted_controllers << unsorted_controllers[order] end self.viewControllers = sorted_controllers + open_tab(0) # Open the tab on the far left end end
Make sure we always open the tab to the far left Instead of the first one in the view controller list.
infinitered_ProMotion
train
rb
250ef28150591cf81793cd42a5d9fb721610d0b1
diff --git a/src/Xml/NodeStrategyCollation.php b/src/Xml/NodeStrategyCollation.php index <HASH>..<HASH> 100644 --- a/src/Xml/NodeStrategyCollation.php +++ b/src/Xml/NodeStrategyCollation.php @@ -36,7 +36,7 @@ class NodeStrategyCollation extends NodeStrategy $node->depth = $xmlReader->depth; $node->text = $xmlReader->readString(); - if ($xmlReader->moveToFirstAttribute()) { + if ($xmlReader->hasAttributes && $xmlReader->moveToFirstAttribute()) { do { $node->attributes[$xmlReader->name] = $xmlReader->value; } while ($xmlReader->moveToNextAttribute());
testing if a node has attributes before attempting to read them
RhubarbPHP_Rhubarb
train
php
12fccc8271aa87648e491b8a9165a70c736cc126
diff --git a/src/RequestAuthenticator.php b/src/RequestAuthenticator.php index <HASH>..<HASH> 100644 --- a/src/RequestAuthenticator.php +++ b/src/RequestAuthenticator.php @@ -28,7 +28,7 @@ class RequestAuthenticator implements RequestAuthenticatorInterface * @param \Acquia\Hmac\Request\RequestInterface $request * @param \Acquia\Hmac\KeyLoaderInterface $keyLoader * - * @return true + * @return \Acquia\Hmac\KeyInterface * * @throws \Acquia\Hmac\Exception\InvalidRequestException */ @@ -53,6 +53,10 @@ class RequestAuthenticator implements RequestAuthenticatorInterface // Sign the request and check whether it matches the one that was // passed. If it matches, the request is authenticated. $requestSignature = $this->signRequest($this->requestSigner, $request, $key->getSecret()); - return $passedSignature->matches($requestSignature); + if (!$passedSignature->matches($requestSignature)) { + throw new Exception\InvalidSignatureException('Signature not valid'); + } + + return $key; } }
Updated exceptions and responses for RequestAuthenticator::authenticate().
acquia_http-hmac-php
train
php
0b4148f8224a6c12721115e5178d978da2a154a9
diff --git a/test/jupyter/test_sos_magics.py b/test/jupyter/test_sos_magics.py index <HASH>..<HASH> 100644 --- a/test/jupyter/test_sos_magics.py +++ b/test/jupyter/test_sos_magics.py @@ -292,6 +292,7 @@ graph graphname { res = get_display_data(iopub, 'image/png') self.assertGreater(len(res), 1000, 'Expect a image {}'.format(res)) + @unittest.skipIf(sys.platform == 'win32', 'AppVeyor does not support linux based docker') def testMagicRemotePreview(self): # test preview of remote file with sos_kernel() as kc:
Disable a docker based test under windows
vatlab_SoS
train
py
90e040659d08c7bf1fad632b0c1ca3e93b338349
diff --git a/scripts/uninstall.js b/scripts/uninstall.js index <HASH>..<HASH> 100644 --- a/scripts/uninstall.js +++ b/scripts/uninstall.js @@ -8,9 +8,9 @@ var minifyJsPath = path.join(cwd, '..', '..', 'hooks', 'after_prepare', 'cordova fs.unlink(minifyJsPath, function(error){ if(error == undefined){ - console.log('Uninstalled hooks: ', minifyJsPath); - }else{ console.log('Cannot find hook to remove at ' + minifyJsPath + '. It may already have been removed!'); + }else{ + console.log('Uninstalled hooks: ', minifyJsPath); } }); console.log('Uninstalled cordova-minify. We are sad to see you go! See you soon!'); \ No newline at end of file
Fixed uninstall bug with 'it may already have been uninstalled'
alastairparagas_cordova-minify
train
js
d9bc650ce848b430b48b18abc97d0bff6c609fd4
diff --git a/world/components.go b/world/components.go index <HASH>..<HASH> 100644 --- a/world/components.go +++ b/world/components.go @@ -341,7 +341,7 @@ func (maker ComponentMaker) Converger(argv ...string) ifrit.Runner { Name: "converger", AnsiColorCode: "34m", StartCheck: `"converger.started"`, - StartCheckTimeout: 15 * time.Second, + StartCheckTimeout: 25 * time.Second, Command: exec.Command( maker.Artifacts.Executables["converger"],
Increase timeout to allow for new consul API timing issues [#<I>]
cloudfoundry_inigo
train
go
6be6745142b10852110a1218e8c511aa3cf26456
diff --git a/lib/beaker-answers/version.rb b/lib/beaker-answers/version.rb index <HASH>..<HASH> 100644 --- a/lib/beaker-answers/version.rb +++ b/lib/beaker-answers/version.rb @@ -1,5 +1,5 @@ module BeakerAnswers module Version - STRING = '0.21.0' + STRING = '0.22.0' end end
(GEM) update beaker-answers version to <I>
puppetlabs_beaker-answers
train
rb
172895fcbe55612a76847d4ce1018a2a6aa8a703
diff --git a/jss/jssobject.py b/jss/jssobject.py index <HASH>..<HASH> 100644 --- a/jss/jssobject.py +++ b/jss/jssobject.py @@ -215,6 +215,37 @@ class JSSObject(PrettyElement): with open(os.path.expanduser(path), "wb") as pickle: cPickle.Pickler(pickle, cPickle.HIGHEST_PROTOCOL).dump(self) + def tree(self, depth=None): + """Return a formatted string representing object's tags + + This method removes redundent entries, so you only see + unique keys. + + Args: + depth (int): Depth of the tree to represent. Defaults to + showing the entire tree. + + Returns: + str with proper indention and newlines embedded, ready for + printing. + """ + results = self._get_tags(self, depth) + return '\n'.join(results) + + def _get_tags(self, element, depth, level=0): + results = [] + space = ' ' + indent_size = 4 + if depth is None or level < depth: + for child in element: + entry = space * indent_size * level + child.tag + if entry not in results: + results.append(entry) + if len(child): + results.extend(self._get_tags(child, depth, level + 1)) + + return results + # Decorate all public API methods that should trigger a retrival of the # object's full data from the JSS.
Add `JSSObject.tree()` method for pretty printing tag structure
jssimporter_python-jss
train
py
55ad1b6a411d56aecfdda96126d5130e359d4664
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -42,10 +42,6 @@ class PyTest(testcommand): import pytest # Needed in order for pytest_cache to load properly # Alternate fix: import pytest_cache and pass to pytest.main - import _pytest.config - - pm = _pytest.config.get_plugin_manager() - pm.consider_setuptools_entrypoints() errno = pytest.main(self.test_args) sys.exit(errno)
Update setup.py for pytest version Removed call to ``consider_setuptools_entrypoints`` in ``PytestPluginManager`` since that attribute has been removed in current version.
mitodl_PyLmod
train
py
ecfe814e0f407778abec81afc2e3d99e930bfba9
diff --git a/version.php b/version.php index <HASH>..<HASH> 100644 --- a/version.php +++ b/version.php @@ -30,11 +30,11 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2012101400.00; // YYYYMMDD = weekly release date of this DEV branch +$version = 2012101500.00; // YYYYMMDD = weekly release date of this DEV branch // RR = release increments - 00 in DEV branches // .XX = incremental changes -$release = '2.4dev (Build: 20121014)'; // Human-friendly version name +$release = '2.4dev (Build: 20121015)'; // Human-friendly version name $branch = '24'; // this version's branch $maturity = MATURITY_ALPHA; // this version's maturity level
on-demand release <I>dev
moodle_moodle
train
php
9ea4bf903b27a7405c9288b06b73b32ea01bcf30
diff --git a/lib/gauntlt/attack_adapters/support/profile_helper.rb b/lib/gauntlt/attack_adapters/support/profile_helper.rb index <HASH>..<HASH> 100644 --- a/lib/gauntlt/attack_adapters/support/profile_helper.rb +++ b/lib/gauntlt/attack_adapters/support/profile_helper.rb @@ -25,3 +25,4 @@ module Gauntlt end World(Gauntlt::Support::ProfileHelper) +
trying to fix the broken travis build
gauntlt_gauntlt
train
rb