diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -25,8 +25,12 @@ try:
except (IOError, ImportError):
description = ''
-with open('requirements.txt') as fhandle:
- requirements = [line.strip() for line in fhandle]
+on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
+if on_rtd:
+ requirements = []
+else:
+ with open('requirements.txt') as fhandle:
+ requirements = [line.strip() for line in fhandle]
setup(
name='optlang', | Harden setup.py against RTD |
diff --git a/pycbc/inject/injfilterrejector.py b/pycbc/inject/injfilterrejector.py
index <HASH>..<HASH> 100644
--- a/pycbc/inject/injfilterrejector.py
+++ b/pycbc/inject/injfilterrejector.py
@@ -233,7 +233,7 @@ class InjFilterRejector(object):
def generate_short_inj_from_inj(self, inj_waveform, simulation_id):
"""Generate and a store a truncated representation of inj_waveform."""
- if not self.enabled:
+ if not self.enabled or not self.match_threshold:
# Do nothing!
return
if simulation_id in self.short_injections: | Don't gen short injections when not needed (#<I>) |
diff --git a/src/Excel.php b/src/Excel.php
index <HASH>..<HASH> 100644
--- a/src/Excel.php
+++ b/src/Excel.php
@@ -87,7 +87,18 @@ class Excel {
* @throws \PhpOffice\PhpSpreadsheet\Reader\Exception
*/
public static function sheetToArray( $path, $sheetIndex = 0 ) {
- $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx();
+ $path_parts = pathinfo($path);
+ $fileExtension = $path_parts['extension'];
+
+ switch($fileExtension):
+ case 'xls':
+ $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xls();
+ break;
+ case 'xlxs':
+ default:
+ $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx();
+ break;
+ endswitch;
$reader->setLoadSheetsOnly( [ 0 ] );
$spreadsheet = $reader->load( $path );
return $spreadsheet->setActiveSheetIndex( $sheetIndex )->toArray(); | Creating the reader specific to the xls version now. |
diff --git a/app/validators/safe_html.rb b/app/validators/safe_html.rb
index <HASH>..<HASH> 100644
--- a/app/validators/safe_html.rb
+++ b/app/validators/safe_html.rb
@@ -19,14 +19,26 @@ class SafeHtml < ActiveModel::Validator
end
def check_string(record, field_name, string)
- dirty_html = Govspeak::Document.new(string).to_html
- clean_html = Sanitize.clean(dirty_html, sanitize_config)
- # Trying to make whitespace consistent
- if Nokogiri::HTML.parse(dirty_html).to_s != Nokogiri::HTML.parse(clean_html).to_s
+ dirty_html = govspeak_to_html(string)
+ clean_html = sanitize_html(dirty_html)
+ unless normalise_html(dirty_html) == normalise_html(clean_html)
record.errors.add(field_name, "cannot include invalid Govspeak or JavaScript")
end
end
+ # Make whitespace in html tags consistent
+ def normalise_html(string)
+ Nokogiri::HTML.parse(string).to_s
+ end
+
+ def govspeak_to_html(string)
+ Govspeak::Document.new(string).to_html
+ end
+
+ def sanitize_html(string)
+ Sanitize.clean(string, sanitize_config)
+ end
+
def sanitize_config
config = Sanitize::Config::RELAXED.dup | Break out html conversion into separate methods to clarify the intent |
diff --git a/test/testsuite/generator/behavior/AlternativeCodingStandardsBehaviorTest.php b/test/testsuite/generator/behavior/AlternativeCodingStandardsBehaviorTest.php
index <HASH>..<HASH> 100644
--- a/test/testsuite/generator/behavior/AlternativeCodingStandardsBehaviorTest.php
+++ b/test/testsuite/generator/behavior/AlternativeCodingStandardsBehaviorTest.php
@@ -29,13 +29,17 @@ class AlternativeCodingStandardsBehaviorTest extends PHPUnit_Framework_TestCase
{
}"),
array("if (true) {
-}", "if (true) {
+}", "if (true)
+{
}"),
array("} else {
-}", "} else {
+}", "}
+else
+{
}"),
array("foreach (\$i as \$j) {
-}", "foreach (\$i as \$j) {
+}", "foreach (\$i as \$j)
+{
}"),
);
} | Revert bad CS fix (alternative CS behavior) |
diff --git a/firebirdsql/wireprotocol.py b/firebirdsql/wireprotocol.py
index <HASH>..<HASH> 100644
--- a/firebirdsql/wireprotocol.py
+++ b/firebirdsql/wireprotocol.py
@@ -972,6 +972,7 @@ class WireProtocol(object):
while bytes_to_bint(b) == self.op_dummy:
b = self.recv_channel(4)
if bytes_to_bint(b) == self.op_response:
+ self.lazy_response_count -= 1
return self._parse_op_response()
if bytes_to_bint(b) == self.op_exit or bytes_to_bint(b) == self.op_exit:
raise DisconnectByPeer | one more lazy response counter decrement. |
diff --git a/src/RobotsTxt.php b/src/RobotsTxt.php
index <HASH>..<HASH> 100644
--- a/src/RobotsTxt.php
+++ b/src/RobotsTxt.php
@@ -197,7 +197,7 @@ class RobotsTxt
protected function isDisallowLine(string $line): string
{
- return trim(substr(str_replace(' ', '', strtolower(trim($line))), 0, 6), ': ') === 'disall';
+ return trim(substr(str_replace(' ', '', strtolower(trim($line))), 0, 8), ': ') === 'disallow';
}
protected function isAllowLine(string $line): string | - use full word for disallow |
diff --git a/code/MultiFormStep.php b/code/MultiFormStep.php
index <HASH>..<HASH> 100644
--- a/code/MultiFormStep.php
+++ b/code/MultiFormStep.php
@@ -162,12 +162,11 @@ class MultiFormStep extends DataObject {
* Custom validation for a step. In most cases, it should be sufficient
* to have built-in validation through the {@link Validator} class
* on the {@link getValidator()} method.
+ *
* Use {@link Form->sessionMessage()} to feed back validation messages
* to the user. Please don't redirect from this method,
* this is taken care of in {@link next()}.
*
- * @usedby next()
- *
* @param array $data Request data
* @param Form $form
* @return boolean Validation success | MINOR Removed @usedby, it's not a valid phpdoc token |
diff --git a/tests/Fixture/CounterlessMuffinsFixture.php b/tests/Fixture/CounterlessMuffinsFixture.php
index <HASH>..<HASH> 100644
--- a/tests/Fixture/CounterlessMuffinsFixture.php
+++ b/tests/Fixture/CounterlessMuffinsFixture.php
@@ -7,11 +7,6 @@ use Cake\TestSuite\Fixture\TestFixture;
class CounterlessMuffinsFixture extends TestFixture {
/**
- * @var string
- */
- public $table = 'tags_counterless_muffins';
-
- /**
* @var array
*/
public $fields = [
diff --git a/tests/TestCase/Model/Behavior/TagBehaviorTest.php b/tests/TestCase/Model/Behavior/TagBehaviorTest.php
index <HASH>..<HASH> 100644
--- a/tests/TestCase/Model/Behavior/TagBehaviorTest.php
+++ b/tests/TestCase/Model/Behavior/TagBehaviorTest.php
@@ -668,7 +668,7 @@ class TagBehaviorTest extends TestCase {
* @return void
*/
public function testFinderUntaggedWithoutCounterField() {
- $table = TableRegistry::get('Tags.CounterlessMuffins', ['table' => 'tags_counterless_muffins']);
+ $table = TableRegistry::get('Tags.CounterlessMuffins');
$table->addBehavior('Tags.Tag', [
'taggedCounter' => false, | Fix tests after <I> release |
diff --git a/src/python/grpcio_tests/tests/unit/_logging_test.py b/src/python/grpcio_tests/tests/unit/_logging_test.py
index <HASH>..<HASH> 100644
--- a/src/python/grpcio_tests/tests/unit/_logging_test.py
+++ b/src/python/grpcio_tests/tests/unit/_logging_test.py
@@ -45,13 +45,23 @@ class LoggingTest(unittest.TestCase):
def test_handler_found(self):
try:
reload_module(logging)
- logging.basicConfig()
reload_module(grpc)
self.assertFalse(
"No handlers could be found" in sys.stderr.getvalue())
finally:
reload_module(logging)
+ def test_can_configure_logger(self):
+ reload_module(logging)
+ reload_module(grpc)
+ try:
+ intended_stream = six.StringIO()
+ logging.basicConfig(stream=intended_stream)
+ self.assertEqual(1, len(logging.getLogger().handlers))
+ self.assertTrue(logging.getLogger().handlers[0].stream is intended_stream)
+ finally:
+ reload_module(logging)
+
if __name__ == '__main__':
unittest.main(verbosity=2) | Add explicit test that user can configure their own handler |
diff --git a/lib/loga/configuration.rb b/lib/loga/configuration.rb
index <HASH>..<HASH> 100644
--- a/lib/loga/configuration.rb
+++ b/lib/loga/configuration.rb
@@ -29,7 +29,7 @@ module Loga
end
def initialize!
- @service_name.to_s.strip!
+ @service_name = service_name.to_s.strip
@service_version = compute_service_version
initialize_logger
diff --git a/lib/loga/version.rb b/lib/loga/version.rb
index <HASH>..<HASH> 100644
--- a/lib/loga/version.rb
+++ b/lib/loga/version.rb
@@ -1,3 +1,3 @@
module Loga
- VERSION = '1.1.0'
+ VERSION = '1.1.1'
end | Remove service_name mutation when initializing, closes #<I> |
diff --git a/lib/yap/shell/evaluation.rb b/lib/yap/shell/evaluation.rb
index <HASH>..<HASH> 100644
--- a/lib/yap/shell/evaluation.rb
+++ b/lib/yap/shell/evaluation.rb
@@ -55,7 +55,7 @@ module Yap::Shell
@aliases_expanded ||= []
@command_node_args_stack ||= []
with_standard_streams do |stdin, stdout, stderr|
- args = node.args.map(&:lvalue).map{ |arg| variable_expand(arg) }
+ args = node.args.map(&:lvalue).map{ |arg| shell_expand(arg) }
if !node.literal? && !@aliases_expanded.include?(node.command) && _alias=Aliases.instance.fetch_alias(node.command)
@suppress_events = true
@command_node_args_stack << args | When processing arguments shell_expand them (not just variable_expand).
This ensures that expansions like ~ work. |
diff --git a/tests/Negotiation/Tests/NegotiatorTest.php b/tests/Negotiation/Tests/NegotiatorTest.php
index <HASH>..<HASH> 100644
--- a/tests/Negotiation/Tests/NegotiatorTest.php
+++ b/tests/Negotiation/Tests/NegotiatorTest.php
@@ -28,18 +28,22 @@ class NegotiatorTest extends TestCase
{
try {
$acceptHeader = $this->negotiator->getBest($header, $priorities);
-
- if ($acceptHeader === null) {
- $this->assertNull($expected);
- } else {
- $this->assertInstanceOf('Negotiation\Accept', $acceptHeader);
-
- $this->assertSame($expected[0], $acceptHeader->getType());
- $this->assertSame($expected[1], $acceptHeader->getParameters());
- }
} catch (\Exception $e) {
$this->assertEquals($expected, $e);
+
+ return;
+ }
+
+ if ($acceptHeader === null) {
+ $this->assertNull($expected);
+
+ return;
}
+
+ $this->assertInstanceOf('Negotiation\Accept', $acceptHeader);
+
+ $this->assertSame($expected[0], $acceptHeader->getType());
+ $this->assertSame($expected[1], $acceptHeader->getParameters());
}
public static function dataProviderForTestGetBest() | Reduce try/catch to getBest method only.
PHPUnit uses Exceptions in its asserts functions. In case of assertion
failure in test, it is caught by the catch block and give a wrong message. |
diff --git a/datasources/sql/DbModel.php b/datasources/sql/DbModel.php
index <HASH>..<HASH> 100644
--- a/datasources/sql/DbModel.php
+++ b/datasources/sql/DbModel.php
@@ -275,8 +275,8 @@ abstract class DbModel extends BaseModel implements ModelInterface {
}
}
- public function relationIsSet($relatinName) {
- return isset($this->_relations[$relatinName]);
+ public function relationIsSet($relationName) {
+ return isset($this->_relations[$relationName]);
}
/**
@@ -285,7 +285,7 @@ abstract class DbModel extends BaseModel implements ModelInterface {
* @return mixed
*/
public function __get($name) {
- if (isset($this->_attributes[$name])) {
+ if (array_key_exists($name, $this->_attributes)) {
return $this->_attributes[$name];
}
foreach ($this->_columns as $column) { // check for columns that were not read yet [ useful for search and not only ] | Fixed column read when value is null. |
diff --git a/examples/example2.js b/examples/example2.js
index <HASH>..<HASH> 100644
--- a/examples/example2.js
+++ b/examples/example2.js
@@ -13,7 +13,7 @@ hosts.forEach(function (host) {
hosts.forEach(function (host) {
ping.promise.probe(host, {
timeout: 10,
- extra: ["-i 2"]
+ extra: ["-i", "2"]
})
.then(function (res) {
console.log(res); | Fix bug on window platform
--Overview
1. Window's ping command treat '-i 2' as an invalid option. Therefore,
we must split them up. IE using ['-i', '2'] instead of ['-i 2'] |
diff --git a/lib/bento_search/version.rb b/lib/bento_search/version.rb
index <HASH>..<HASH> 100644
--- a/lib/bento_search/version.rb
+++ b/lib/bento_search/version.rb
@@ -1,3 +1,3 @@
module BentoSearch
- VERSION = "0.0.1"
+ VERSION = "0.5.0"
end | time for another gem release, let's call it <I>, it's getting stable-ish |
diff --git a/fireplace/game.py b/fireplace/game.py
index <HASH>..<HASH> 100644
--- a/fireplace/game.py
+++ b/fireplace/game.py
@@ -172,6 +172,9 @@ class BaseGame(Entity):
else:
player.playstate = PlayState.WON
self.state = State.COMPLETE
+ self.manager.step(self.next_step, Step.FINAL_WRAPUP)
+ self.manager.step(self.next_step, Step.FINAL_GAMEOVER)
+ self.manager.step(self.next_step)
raise GameOver("The game has ended.")
def queue_actions(self, source, actions, event_args=None):
diff --git a/fireplace/managers.py b/fireplace/managers.py
index <HASH>..<HASH> 100644
--- a/fireplace/managers.py
+++ b/fireplace/managers.py
@@ -73,11 +73,12 @@ class GameManager(Manager):
for observer in self.observers:
observer.start_game()
- def step(self, step, next_step):
+ def step(self, step, next_step=None):
for observer in self.observers:
observer.game_step(step, next_step)
self.obj.step = step
- self.obj.next_step = next_step
+ if next_step is not None:
+ self.obj.next_step = next_step
class PlayerManager(Manager): | Walk through WRAPUP and GAMEOVER at the end of the game
Touches #<I> |
diff --git a/salt/modules/virtualenv_mod.py b/salt/modules/virtualenv_mod.py
index <HASH>..<HASH> 100644
--- a/salt/modules/virtualenv_mod.py
+++ b/salt/modules/virtualenv_mod.py
@@ -319,7 +319,7 @@ def _install_script(source, cwd, python, user, saltenv='base'):
if not salt.utils.is_windows():
fn_ = __salt__['cp.cache_file'](source, saltenv)
shutil.copyfile(fn_, tmppath)
- os.chmod(tmppath, 320)
+ os.chmod(tmppath, 0o500)
os.chown(tmppath, __salt__['file.user_to_uid'](user), -1)
try:
return __salt__['cmd.run_all']( | Use octal.
Since it's a permission. I can't do decimal -> octal -> unix perms in my head. |
diff --git a/public/js/directives.js b/public/js/directives.js
index <HASH>..<HASH> 100644
--- a/public/js/directives.js
+++ b/public/js/directives.js
@@ -14,7 +14,12 @@ angular.module('njax.directives', ['njax.services'])
try{
var jBody = $(element[0].contentWindow.document.body);
jBody.find('#njax-payload').val(JSON.stringify(NJaxBootstrap.njax_payload));
- jBody.find('#njax-iframe-form').submit();
+ var jForm = jBody.find('#njax-iframe-form');
+ if(jForm.length == 0){
+ console.error("Cannot find #njax-iframe-form waiting for 1000ms");
+ return setTimeout(setup, 1000);
+ }
+ jForm.submit();
}catch(e){
console.error(e);
return setTimeout(setup, 1000); | Trying to squash iframe bug |
diff --git a/code/model/UserDefinedForm.php b/code/model/UserDefinedForm.php
index <HASH>..<HASH> 100755
--- a/code/model/UserDefinedForm.php
+++ b/code/model/UserDefinedForm.php
@@ -838,7 +838,7 @@ JS
* @param ArrayList fields
* @return ArrayData
*/
- private function getMergeFieldsMap($fields = array())
+ protected function getMergeFieldsMap($fields = array())
{
$data = new ArrayData(array()); | Make getMergeFieldsMap protected
Annoying having to copy this method if you want to replace "process" in an extending class so we'll make it a bit looser shall we? |
diff --git a/src/Visitor/QueryItemElastica.php b/src/Visitor/QueryItemElastica.php
index <HASH>..<HASH> 100644
--- a/src/Visitor/QueryItemElastica.php
+++ b/src/Visitor/QueryItemElastica.php
@@ -43,7 +43,7 @@ class QueryItemElastica implements QueryItemVisitorInterface
*/
public function visitPhrase(Node\Phrase $phrase)
{
- $query = new Query\MatchPhrase($this->fieldName, $word->getToken());
+ $query = new Query\MatchPhrase($this->fieldName, $phrase->getToken());
if ($phrase->isBoosted()) {
$query->setBoost($phrase->getBoostBy()); | Fixed typo - wrong param name |
diff --git a/python/phonenumbers/phonemetadata.py b/python/phonenumbers/phonemetadata.py
index <HASH>..<HASH> 100644
--- a/python/phonenumbers/phonemetadata.py
+++ b/python/phonenumbers/phonemetadata.py
@@ -402,6 +402,7 @@ class PhoneMetadata(object):
result += ",\n voip=%s" % self.voip
result += ",\n pager=%s" % self.pager
result += ",\n uan=%s" % self.uan
+ result += ",\n emergency=%s" % self.emergency
result += ",\n no_international_dialling=%s" % self.no_international_dialling
if self.preferred_international_prefix is not None: | Include emergency PhoneNumberDesc in metadata self-serialization output |
diff --git a/docs/_static/js/custom.js b/docs/_static/js/custom.js
index <HASH>..<HASH> 100644
--- a/docs/_static/js/custom.js
+++ b/docs/_static/js/custom.js
@@ -21,8 +21,27 @@ window.onload = function () {
$(" nav.bd-links ").children().hide()
}
- var selected = $("a.current")
- selected.html("→ " + selected.text())
+ // var selected = $("a.current")
+ // selected.html("→ " + selected.text())
+
+ $(".toctree-l3").hide()
+
+ exclude = [
+ 'append', 'clear', 'copy', 'count', 'extend', 'fromkeys', 'get',
+ 'index', 'insert', 'items', 'keys', 'pop', 'popitem', 'remove',
+ 'reverse', 'setdefault', 'sort', 'update', 'values'
+ ]
+
+ for (i in exclude) {
+ // Search through first column of the table for "exclude[i]("
+ tmp = $("tr").find(`td:first:contains(${exclude[i]}()`)
+ // Find the row(s) containing the returned query
+ row = tmp.closest('tr')
+ // Hide that row
+ // row.hide()
+ // Comment the line above and uncomment the next for DEBUGGING
+ row.css("background-color", "red")
+ }
};
// window.onload = function() { | Update custom.js in docs |
diff --git a/irc3/plugins/feeds.py b/irc3/plugins/feeds.py
index <HASH>..<HASH> 100644
--- a/irc3/plugins/feeds.py
+++ b/irc3/plugins/feeds.py
@@ -61,6 +61,7 @@ import time
import irc3
import datetime
from concurrent.futures import ThreadPoolExecutor
+from operator import itemgetter
def default_hook(entries):
@@ -108,7 +109,7 @@ def parse(feedparser, args):
e['feed'] = args
entries.append((e.updated, e))
if entries:
- entries = sorted(entries)
+ entries = sorted(entries, key=itemgetter(0))
with open(filename + '.updated', 'w') as fd:
fd.write(str(entries[-1][0]))
return entries | Sort feed entries with the date field only.
Otherwise, if there are multiple entries at the same date, this fails
because the second field is a `FeedParserDict` which is not sortable. |
diff --git a/tile_generator/package_definitions.py b/tile_generator/package_definitions.py
index <HASH>..<HASH> 100644
--- a/tile_generator/package_definitions.py
+++ b/tile_generator/package_definitions.py
@@ -66,7 +66,7 @@ class PackageBoshRelease(BasePackage):
flags = [flag.BoshRelease]
_schema = {
'jobs': {'type': 'list', 'required': False, 'schema':{'type': 'dict', 'schema': {
- 'name': {'type': 'string', 'required': True, 'regex': '^[a-z][a-zA-Z0-9\-]*$'},
+ 'name': {'type': 'string', 'required': True, 'regex': '^[a-zA-Z0-9\-\_]*$'},
'varname': {'type': 'string', 'default_setter': lambda doc: doc['name'].lower().replace('-','_')}}}},
} | Fix issue #<I>, handle Capital letters as a valid package name start, allow for underscore _ in name |
diff --git a/wordpress_xmlrpc/wordpress.py b/wordpress_xmlrpc/wordpress.py
index <HASH>..<HASH> 100644
--- a/wordpress_xmlrpc/wordpress.py
+++ b/wordpress_xmlrpc/wordpress.py
@@ -50,7 +50,6 @@ class WordPressBase(object):
data[output] = fmap.conversion(getattr(self, var))
else:
data[output] = getattr(self, var)
- print data
return data
def __repr__(self): | Removed erroneous print statement. |
diff --git a/lib/chrome/webdriver/index.js b/lib/chrome/webdriver/index.js
index <HASH>..<HASH> 100644
--- a/lib/chrome/webdriver/index.js
+++ b/lib/chrome/webdriver/index.js
@@ -55,6 +55,13 @@ module.exports.configureBuilder = function(builder, baseDir, options) {
let chromeOptions = new chrome.Options();
chromeOptions.setLoggingPrefs(logPrefs);
+ // Fixing save password popup
+ chromeOptions.setUserPreferences({
+ 'profile.password_manager_enable': false,
+ 'profile.default_content_setting_values.notifications': 2,
+ credentials_enable_service: false
+ });
+
if (options.headless) {
chromeOptions.headless();
} | Disable save passwords popups in Chrome. (#<I>)
This was introduced when we removed the WebExtension for Chrome. |
diff --git a/packages/request-maxdome/src/Asset.js b/packages/request-maxdome/src/Asset.js
index <HASH>..<HASH> 100644
--- a/packages/request-maxdome/src/Asset.js
+++ b/packages/request-maxdome/src/Asset.js
@@ -21,6 +21,7 @@ class Asset {
this.protocol = protocol;
this.id = data.id;
+ this.referenceId = data.referenceId;
const types = {
assetvideofilm: 'movie',
@@ -110,11 +111,11 @@ class Asset {
path = `/${slugify(this.originalTitle)}-${this.id}.html`;
break;
case 'season':
- let season = '';
- if (this.seasonNumber > 1) {
- season = `-s${this.seasonNumber}`;
+ if (this.seasonNumber === 1) {
+ path = `/${slugify(this.originalTitle)}${season}-b${this.referenceId}.html`;
+ } else {
+ path = `/${slugify(this.originalTitle)}${season}-s${this.seasonNumber}-b${this.id}.html`;
}
- path = `/${slugify(this.originalTitle)}${season}-b${this.id}.html`;
break;
case 'series':
path = `/${slugify(this.originalTitle)}-b${this.id}.html`; | Use ID of the series if its the first season |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,8 @@ setup(
entry_points={
'console_scripts': [
'alfred-workflow-packager=awp.main:main',
- 'workflow-packager=awp.main:main'
+ 'workflow-packager=awp.main:main',
+ 'awp=awp.main:main'
]
}
) | Add awp as an additional shell command |
diff --git a/app/assets/javascripts/fastui/app/view/VTab.js b/app/assets/javascripts/fastui/app/view/VTab.js
index <HASH>..<HASH> 100644
--- a/app/assets/javascripts/fastui/app/view/VTab.js
+++ b/app/assets/javascripts/fastui/app/view/VTab.js
@@ -6,7 +6,6 @@ Ext.define('FastUI.view.VTab', {
layout:"card",
initComponent:function () {
this.id = 'tab_' + this.vfactory.getVData().id;
-// alert(this.vfactory.getVData().m_entity_id)
FastUI.Env.setTabCtx(FastUI.Env.getWinCtx('winNo','win_id'),'tabNo','tab_id',this.id);
// FastUI.Env.setTabCtx(FastUI.Env.getWinCtx('winNo','win_id'),'tabNo','m_entity_id',this.vfactory.getVData().m_entity_id);
// alert(FastUI.Env.getTabCtx(FastUI.Env.getWinCtx('winNo','win_id'),'tabNo','tab_id')); | create abstract class MObject
most of class are inherit it |
diff --git a/modules/smartnameattribute/lib/Auth/Process/SmartName.php b/modules/smartnameattribute/lib/Auth/Process/SmartName.php
index <HASH>..<HASH> 100644
--- a/modules/smartnameattribute/lib/Auth/Process/SmartName.php
+++ b/modules/smartnameattribute/lib/Auth/Process/SmartName.php
@@ -21,6 +21,11 @@ class sspmod_smartnameattribute_Auth_Process_SmartName extends SimpleSAML_Auth_P
if (isset($attributes['displayName']))
return $attributes['displayName'][0];
+ if (isset($attributes['cn'])) {
+ if (count(explode(' ', $attributes['cn'][0])) > 1)
+ return $attributes['cn'][0];
+ }
+
if (isset($attributes['sn']) && isset($attributes['givenName']))
return $attributes['givenName'][0] . ' ' . $attributes['sn'][0]; | use cn if contains multiple parts |
diff --git a/lib/chef/json_compat.rb b/lib/chef/json_compat.rb
index <HASH>..<HASH> 100644
--- a/lib/chef/json_compat.rb
+++ b/lib/chef/json_compat.rb
@@ -18,8 +18,6 @@
# Wrapper class for interacting with JSON.
require 'ffi_yajl'
-#require 'json'
-require 'ffi_yajl/json_gem' # XXX: parts of chef require JSON gem's Hash#to_json monkeypatch
require 'chef/exceptions'
class Chef | Removing old .to_json monkeypatching for all objects |
diff --git a/anchore/cli/toolbox.py b/anchore/cli/toolbox.py
index <HASH>..<HASH> 100644
--- a/anchore/cli/toolbox.py
+++ b/anchore/cli/toolbox.py
@@ -325,6 +325,10 @@ def show_analyzer_status():
@click.option('--outfile', help='output file for exported image', required=True, metavar='<file.json>')
def export(outfile):
"""Export image anchore data to a JSON file."""
+
+ if not nav:
+ sys.exit(1)
+
ecode = 0
savelist = list()
for imageId in imagelist: | small fix to disallow export if image has not been analyzed |
diff --git a/tests/Functional/Table/TableServiceFunctionalTest.php b/tests/Functional/Table/TableServiceFunctionalTest.php
index <HASH>..<HASH> 100644
--- a/tests/Functional/Table/TableServiceFunctionalTest.php
+++ b/tests/Functional/Table/TableServiceFunctionalTest.php
@@ -215,7 +215,7 @@ class TableServiceFunctionalTest extends FunctionalTestBase
$this->assertFalse($this->isEmulated(), 'Should succeed when not running in emulator');
- \sleep(10);
+ \sleep(30);
$ret = (is_null($options) ?
$this->restProxy->getServiceProperties() : | Resolve set service properties issue. |
diff --git a/main/cloudfoundry_client/v3/apps.py b/main/cloudfoundry_client/v3/apps.py
index <HASH>..<HASH> 100644
--- a/main/cloudfoundry_client/v3/apps.py
+++ b/main/cloudfoundry_client/v3/apps.py
@@ -11,3 +11,6 @@ class AppManager(EntityManager):
def get_env(self, application_guid: str) -> JsonObject:
return super(AppManager, self)._get('%s%s/%s/env' % (self.target_endpoint, self.entity_uri, application_guid))
+
+ def get_routes(self, application_guid: str) -> JsonObject:
+ return super(AppManager, self)._get('%s%s/%s/routes' % (self.target_endpoint, self.entity_uri, application_guid)) | Adding new method to retrive app routes |
diff --git a/acceptance/tests/resource/service/ticket_1343_should_add_and_remove_symlinks.rb b/acceptance/tests/resource/service/ticket_1343_should_add_and_remove_symlinks.rb
index <HASH>..<HASH> 100644
--- a/acceptance/tests/resource/service/ticket_1343_should_add_and_remove_symlinks.rb
+++ b/acceptance/tests/resource/service/ticket_1343_should_add_and_remove_symlinks.rb
@@ -1,5 +1,7 @@
test_name 'RedHat Service Symlink Validation'
+confine :to, :platform => 'el-5'
+
manifest_httpd_setup = %Q{
package { 'httpd':
ensure => present, | (PUP-<I>) confine test ticket_<I> to el-5
This fixes the acceptance test failures happening for all the
platforms this test wasn't intended for. |
diff --git a/packages/build-tools/svgo-plugins.js b/packages/build-tools/svgo-plugins.js
index <HASH>..<HASH> 100644
--- a/packages/build-tools/svgo-plugins.js
+++ b/packages/build-tools/svgo-plugins.js
@@ -83,9 +83,6 @@ module.exports = [
moveGroupAttrsToElems: true,
},
{
- collapseGroups: true,
- },
- {
removeRasterImages: false,
},
{ | chore: don't collapse SVG groups in SVGO and instead just stick to using the default SVGO config for this |
diff --git a/emirdrp/recipes/image/join.py b/emirdrp/recipes/image/join.py
index <HASH>..<HASH> 100644
--- a/emirdrp/recipes/image/join.py
+++ b/emirdrp/recipes/image/join.py
@@ -128,7 +128,6 @@ class JoinDitheredImagesRecipe(EmirRecipe):
def run_single(self, rinput):
use_errors = True
- datamodel = EmirDataModel()
# Initial checks
fframe = rinput.obresult.frames[0]
img = fframe.open()
@@ -196,9 +195,14 @@ class JoinDitheredImagesRecipe(EmirRecipe):
self.logger.info('sky correction in individual images')
corrector = SkyCorrector(
sky_data,
- datamodel,
- calibid=datamodel.get_imgid(sky_result)
+ self.datamodel,
+ calibid=self.datamodel.get_imgid(sky_result)
)
+ # If we do not update keyword SKYADD
+ # there is no sky subtraction
+ for m in data_hdul:
+ m[0].header['SKYADD'] = True
+ # this is a little hackish
data_hdul_s = [corrector(m) for m in data_hdul]
#data_arr_s = [m[0].data - sky_data for m in data_hdul]
base_header = data_hdul_s[0][0].header | Update SKYADD keyword in Dither to allow forced sky subtraction |
diff --git a/lib/OpenLayers/Control/Scale.js b/lib/OpenLayers/Control/Scale.js
index <HASH>..<HASH> 100644
--- a/lib/OpenLayers/Control/Scale.js
+++ b/lib/OpenLayers/Control/Scale.js
@@ -11,11 +11,12 @@ OpenLayers.Control.Scale = Class.create();
OpenLayers.Control.Scale.prototype =
Object.extend( new OpenLayers.Control(), {
INCHES_PER_UNIT: { // borrowed from MapServer mapscale.c
- dd: 1.0,
+ inches: 1.0,
ft: 12.0,
mi: 63360.0,
m: 39.3701,
- km: 39370.1
+ km: 39370.1,
+ dd: 4374754
},
/** @type DOMElement */ | Fix broken units: inches was missing, and dd was in place of images.
git-svn-id: <URL> |
diff --git a/impl-base/src/test/java/DefaultPackageAddTestCase.java b/impl-base/src/test/java/DefaultPackageAddTestCase.java
index <HASH>..<HASH> 100644
--- a/impl-base/src/test/java/DefaultPackageAddTestCase.java
+++ b/impl-base/src/test/java/DefaultPackageAddTestCase.java
@@ -91,12 +91,27 @@ public class DefaultPackageAddTestCase
assertClassesWereAdded(archive);
}
+ /**
+ * Makes sure classes in the default package, and only in the default package, are added.
+ *
+ * SHRINKWRAP-233, SHRINKWRAP-302
+ */
@Test
public void testAddDefaultPackage() {
JavaArchive archive = ShrinkWrap.create(JavaArchive.class);
archive.addDefaultPackage();
assertClassesWereAdded(archive);
+
+ /*
+ * It should have added only the following three classes:
+ * 1. /DefaultPackageAddTestCase.class
+ * 2. /ClassInDefaultPackage.class
+ * 3. /ClassInDefaultPackage$InnerClassInDefaultPackage.class
+ */
+ final int expectedSize = 3;
+ final int size = archive.getContent().size();
+ Assert.assertEquals("Not the expected number of assets added to the archive", expectedSize, size);
}
private void assertClassesWereAdded(JavaArchive archive) { | [SHRINKWRAP-<I>] Makes sure classes only from the default package are added |
diff --git a/lib/whenever/capistrano/v2/recipes.rb b/lib/whenever/capistrano/v2/recipes.rb
index <HASH>..<HASH> 100644
--- a/lib/whenever/capistrano/v2/recipes.rb
+++ b/lib/whenever/capistrano/v2/recipes.rb
@@ -7,7 +7,7 @@ Capistrano::Configuration.instance(:must_exist).load do
_cset(:whenever_options) { {:roles => fetch(:whenever_roles)} }
_cset(:whenever_command) { "whenever" }
_cset(:whenever_identifier) { fetch :application }
- _cset(:whenever_environment) { fetch :rails_env, "production" }
+ _cset(:whenever_environment) { fetch :rails_env, fetch(:stage, "production") }
_cset(:whenever_variables) { "environment=#{fetch :whenever_environment}" }
_cset(:whenever_update_flags) { "--update-crontab #{fetch :whenever_identifier} --set #{fetch :whenever_variables}" }
_cset(:whenever_clear_flags) { "--clear-crontab #{fetch :whenever_identifier}" } | Default `rails_env` to `:stage` in Capistrano v2
Similar to #<I>. |
diff --git a/lib/Service/Application.js b/lib/Service/Application.js
index <HASH>..<HASH> 100644
--- a/lib/Service/Application.js
+++ b/lib/Service/Application.js
@@ -16,7 +16,7 @@ module.exports = function(di, config) {
methods: ['GET', 'POST', 'PATCH', 'DELETE', 'OPTIONS']
}));
- app.use(require('../express/response/helpers')({continue: false}));
+ app.use(require('../express/response/helpers')({continue: true}));
app.use(bodyParser.json({type: '*/*'})); | fix: no debug response in REST, invalid continue option in Service/Application |
diff --git a/src/main/java/com/dcsquare/hivemq/spi/callback/events/OnPublishReceivedCallback.java b/src/main/java/com/dcsquare/hivemq/spi/callback/events/OnPublishReceivedCallback.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/dcsquare/hivemq/spi/callback/events/OnPublishReceivedCallback.java
+++ b/src/main/java/com/dcsquare/hivemq/spi/callback/events/OnPublishReceivedCallback.java
@@ -44,7 +44,7 @@ public interface OnPublishReceivedCallback extends SynchronousCallback {
* <p/>
* The publish parameter references the publish object, that is sent to the subscribers,
* after the onPublishReceived method was called. So if you don´t want your plugin to
- * interfere in the regular publishing process, you might consider copying the publish object.
+ * interfere in the regular publishing process, you must copy the {@link PUBLISH} object.
* Use the static copy method of the PUBLISH class for this purpose. Similar to the following code example.
* PUBLISH copy = PUBLISH.copy(publish);
* | fixed OnPublishReceivedCallback documentation |
diff --git a/config/pubsub.php b/config/pubsub.php
index <HASH>..<HASH> 100644
--- a/config/pubsub.php
+++ b/config/pubsub.php
@@ -29,8 +29,8 @@ return [
'connections' => [
- 'null' => [
- 'driver' => 'null',
+ '/dev/null' => [
+ 'driver' => '/dev/null',
],
'local' => [ | forgot to rename /dev/null |
diff --git a/content/template/bookingTemplate/questionView.php b/content/template/bookingTemplate/questionView.php
index <HASH>..<HASH> 100644
--- a/content/template/bookingTemplate/questionView.php
+++ b/content/template/bookingTemplate/questionView.php
@@ -16,7 +16,7 @@
}
array_multisort($qCategories, SORT_ASC, $qSortIndex, SORT_ASC, $questions);
- echo "<pre>" . print_r($questions, true) . "</pre>";
+ #echo "<pre>" . print_r($questions, true) . "</pre>";
foreach($questions as $q)
{
if($q->ShowExternal) { | 1 file changed, 1 insertion(+), 1 deletion(-)
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: content/template/bookingTemplate/questionView.php |
diff --git a/lib/jsonapi/resource_serializer.rb b/lib/jsonapi/resource_serializer.rb
index <HASH>..<HASH> 100644
--- a/lib/jsonapi/resource_serializer.rb
+++ b/lib/jsonapi/resource_serializer.rb
@@ -306,7 +306,7 @@ module JSONAPI
if relationship.is_a?(JSONAPI::Relationship::ToMany)
if relationship.polymorphic?
source._model.public_send(relationship.name).pluck(:type, :id).map do |type, id|
- [type.pluralize, IdValueFormatter.format(id)]
+ [type.underscore.pluralize, IdValueFormatter.format(id)]
end
else
source.public_send(relationship.foreign_key).map do |value| | underscorize resource type name in links |
diff --git a/lib/codemirror.js b/lib/codemirror.js
index <HASH>..<HASH> 100644
--- a/lib/codemirror.js
+++ b/lib/codemirror.js
@@ -20,7 +20,7 @@ var CodeMirror = (function() {
// This mess creates the base DOM structure for the editor.
wrapper.innerHTML =
'<div style="overflow: hidden; position: relative; width: 3px; height: 0px;">' + // Wraps and hides input textarea
- '<textarea style="position: absolute; padding: 0; width: 1px;" wrap="off" ' +
+ '<textarea style="position: absolute; padding: 0; width: 1px; height: 1em" wrap="off" ' +
'autocorrect="off" autocapitalize="off"></textarea></div>' +
'<div class="CodeMirror-scroll" tabindex="-1">' +
'<div style="position: relative">' + // Set to the height of the text, causes scrolling | Add explicit height to inner textarea to prevent surprising css rule interactions |
diff --git a/raiden/transfer/events.py b/raiden/transfer/events.py
index <HASH>..<HASH> 100644
--- a/raiden/transfer/events.py
+++ b/raiden/transfer/events.py
@@ -412,7 +412,7 @@ class EventPaymentSentFailed(Event):
pex(self.payment_network_identifier),
pex(self.token_network_identifier),
self.identifier,
- self.target,
+ pex(self.target),
self.reason,
)
diff --git a/raiden/transfer/mediated_transfer/events.py b/raiden/transfer/mediated_transfer/events.py
index <HASH>..<HASH> 100644
--- a/raiden/transfer/mediated_transfer/events.py
+++ b/raiden/transfer/mediated_transfer/events.py
@@ -40,7 +40,7 @@ class SendLockExpired(SendMessageEvent):
return '<SendLockExpired msgid:{} balance_proof:{} secrethash:{} recipient:{}>'.format(
self.message_identifier,
self.balance_proof,
- self.secrethash,
+ pex(self.secrethash),
pex(self.recipient),
)
@@ -417,7 +417,7 @@ class SendRefundTransfer(SendMessageEvent):
return (
f'<'
f'SendRefundTransfer msgid:{self.message_identifier} transfer:{self.transfer} '
- f'recipient:{self.recipient} '
+ f'recipient:{pex(self.recipient)} '
f'>'
) | Fix __repr__ of some classes
[skip ci] |
diff --git a/run.go b/run.go
index <HASH>..<HASH> 100644
--- a/run.go
+++ b/run.go
@@ -33,9 +33,15 @@ func StartWithSize(c *exec.Cmd, sz *Winsize) (pty *os.File, err error) {
return nil, err
}
}
- c.Stdout = tty
- c.Stdin = tty
- c.Stderr = tty
+ if c.Stdout == nil {
+ c.Stdout = tty
+ }
+ if c.Stderr == nil {
+ c.Stderr = tty
+ }
+ if c.Stdin == nil {
+ c.Stdin = tty
+ }
if c.SysProcAttr == nil {
c.SysProcAttr = &syscall.SysProcAttr{}
} | Don't set Stdin/Stdout/Stderr if already set (#<I>)
* only set stdout and stderr if not already set
* Don't set cmd.Stdin if it's already set
Considered @craek's codereview |
diff --git a/lib/ajax/section_classes.js b/lib/ajax/section_classes.js
index <HASH>..<HASH> 100755
--- a/lib/ajax/section_classes.js
+++ b/lib/ajax/section_classes.js
@@ -849,7 +849,9 @@ resource_class.prototype.clear_move_markers = function(target) {
resources = target.parentObj.resources;
}
for (var i=0; i<resources.length; i++) {
- YAHOO.util.Dom.setStyle(resources[i].getEl().id, 'border', 'none');
+ if (resources[i].getEl() != null) {
+ YAHOO.util.Dom.setStyle(resources[i].getEl().id, 'border', 'none');
+ }
}
}
@@ -865,8 +867,10 @@ resource_class.prototype.onDragOver = function(e, ids) {
} else if (target.is == 'section' && target.resources.length > 0) {
// We need to have a border at the bottom of the last activity in
// that section.
- YAHOO.util.Dom.setStyle(target.resources[target.resources.length - 1].getEl().id,
+ if (target.resources[target.resources.length - 1].getEl() != null) {
+ YAHOO.util.Dom.setStyle(target.resources[target.resources.length - 1].getEl().id,
'border-bottom', '1px solid #BBB');
+ }
}
} | MDL-<I> Preventing the border from being assigned to label list elements. Merged from MOODLE_<I>_STABLE |
diff --git a/code/services/QueuedJobService.php b/code/services/QueuedJobService.php
index <HASH>..<HASH> 100644
--- a/code/services/QueuedJobService.php
+++ b/code/services/QueuedJobService.php
@@ -261,7 +261,6 @@ class QueuedJobService
$job->prepareForRestart();
}
-
// make sure the descriptor is up to date with anything changed
$this->copyJobToDescriptor($job, $jobDescriptor);
@@ -371,6 +370,7 @@ class QueuedJobService
// okay, we'll just catch this exception for now
SS_Log::log($e, SS_Log::ERR);
$jobDescriptor->JobStatus = QueuedJob::STATUS_BROKEN;
+ $jobDescriptor->write();
}
$errorHandler->clear(); | Added additional call to 'write' after setting broken job |
diff --git a/src/plugins/background_button/background_button.js b/src/plugins/background_button/background_button.js
index <HASH>..<HASH> 100644
--- a/src/plugins/background_button/background_button.js
+++ b/src/plugins/background_button/background_button.js
@@ -35,7 +35,17 @@ class BackgroundButton extends UICorePlugin {
this.listenTo(this.core.mediaControl, 'mediacontrol:hide', this.hide)
this.listenTo(this.core.mediaControl, 'mediacontrol:playing', this.playing)
this.listenTo(this.core.mediaControl, 'mediacontrol:notplaying', this.notplaying)
- Mediator.on('player:resize', () => this.updateSize())
+ Mediator.on('player:resize', this.updateSize, this)
+ }
+
+ destroy() {
+ super()
+ Mediator.off('player:resize', this.updateSize, this)
+ }
+
+ stopListening() {
+ super()
+ Mediator.off('player:resize', this.updateSize, this)
}
settingsUpdate() { | fix background button mediator event leak (refs #<I>) |
diff --git a/src/Events/EntityWasSaved.php b/src/Events/EntityWasSaved.php
index <HASH>..<HASH> 100644
--- a/src/Events/EntityWasSaved.php
+++ b/src/Events/EntityWasSaved.php
@@ -42,9 +42,15 @@ class EntityWasSaved
if ($relationValue instanceof ValueCollection) {
foreach ($relationValue as $value) {
+ // Set attribute value's entity_id since it's always null,
+ // because when RelationBuilder::build is called very early
+ $value->setAttribute('entity_id', $entity->getKey());
$this->saveOrTrashValue($value);
}
} elseif (! is_null($relationValue)) {
+ // Set attribute value's entity_id since it's always null,
+ // because when RelationBuilder::build is called very early
+ $relationValue->setAttribute('entity_id', $entity->getKey());
$this->saveOrTrashValue($relationValue);
}
} | Set attribute value's entity_id since it's always null |
diff --git a/lib/rspec-puppet/tasks/release_test.rb b/lib/rspec-puppet/tasks/release_test.rb
index <HASH>..<HASH> 100644
--- a/lib/rspec-puppet/tasks/release_test.rb
+++ b/lib/rspec-puppet/tasks/release_test.rb
@@ -128,7 +128,7 @@ task :release_test do
end
end
-class GemfileRewrite < Parser::Rewriter
+class GemfileRewrite < Parser::TreeRewriter
def on_send(node)
_, method_name, *args = *node | Update release_test GemfileRewrite to use Parser::TreeRewriter |
diff --git a/spyderlib/spyder.py b/spyderlib/spyder.py
index <HASH>..<HASH> 100644
--- a/spyderlib/spyder.py
+++ b/spyderlib/spyder.py
@@ -34,7 +34,13 @@ if is_module_installed('IPython', '>=0.12'):
# bootstrap script has eventually set this option), switch to
# PyQt API #2 by simply importing the IPython qt module
os.environ['QT_API'] = 'pyqt'
- from IPython.external import qt #analysis:ignore
+ try:
+ from IPython.external import qt #analysis:ignore
+ except ImportError:
+ # Avoid raising any error here: the spyderlib.requirements module
+ # will take care of it, in a user-friendly way (Tkinter message box
+ # if no GUI toolkit is installed)
+ pass
# Check requirements
from spyderlib import requirements | Fixed regression introduced with revision ed<I>bb<I>b<I>a: no Tkinter message was
shown when neither PyQt4 or PySide was installed |
diff --git a/src/frontend/org/voltdb/SnapshotDaemon.java b/src/frontend/org/voltdb/SnapshotDaemon.java
index <HASH>..<HASH> 100644
--- a/src/frontend/org/voltdb/SnapshotDaemon.java
+++ b/src/frontend/org/voltdb/SnapshotDaemon.java
@@ -965,7 +965,7 @@ public class SnapshotDaemon implements SnapshotCompletionInterest {
processTruncationRequestEvent(new WatchedEvent(
EventType.NodeCreated,
KeeperState.SyncConnected,
- VoltZK.snapshot_truncation_master));
+ VoltZK.request_truncation_snapshot));
}
} | ENG-<I> Fix trunc event on SnapshotDaemon promotion. |
diff --git a/ParameterConverter.php b/ParameterConverter.php
index <HASH>..<HASH> 100644
--- a/ParameterConverter.php
+++ b/ParameterConverter.php
@@ -8,12 +8,12 @@ class ParameterConverter
{
if (is_array($args)) {
$failed = array_filter($args, function ($e) use ($type_of) {
- return $e instanceof $type_of;
+ return ($type_of !== get_class($e));
});
if (0 < count($failed)) { return \DomainException(sprintf('You must provide only objects of class %s.'), $type_of); }
} else {
- if (! $args instanceof $type_of) { return \DomainException(sprintf('You must provide only objects of class %s.', $type_of)); }
+ if ($type_of !== get_class($args)) { return \DomainException(sprintf('You must provide only objects of class %s.', $type_of)); }
$args = array($args);
} | Trying to solve github issues |
diff --git a/lib/active_support/cache/dalli_store.rb b/lib/active_support/cache/dalli_store.rb
index <HASH>..<HASH> 100644
--- a/lib/active_support/cache/dalli_store.rb
+++ b/lib/active_support/cache/dalli_store.rb
@@ -109,13 +109,13 @@ module ActiveSupport
end
if entry == not_found
- result = instrument(:generate, name, options) do |payload|
+ result = instrument(:generate, namespaced_name, options) do |payload|
yield
end
write(name, result, options)
result
else
- instrument(:fetch_hit, name, options) { |payload|}
+ instrument(:fetch_hit, namespaced_name, options) { |payload| }
entry
end
else
@@ -168,7 +168,7 @@ module ActiveSupport
def read_multi(*names)
options = names.extract_options!
mapping = names.inject({}) { |memo, name| memo[namespaced_key(name, options)] = name; memo }
- instrument(:read_multi, names) do
+ instrument(:read_multi, mapping.keys) do
results = {}
if local_cache
mapping.each_key do |key|
@@ -199,7 +199,7 @@ module ActiveSupport
options = names.extract_options!
mapping = names.inject({}) { |memo, name| memo[namespaced_key(name, options)] = name; memo }
- instrument(:fetch_multi, names) do
+ instrument(:fetch_multi, mapping.keys) do
with do |connection|
results = connection.get_multi(mapping.keys) | Always pass namespaced key to the subscriber of instrumentation API
To be consistent with other events (e.g. `read`, `write`), namespaced
keys should be passed to the subscribers of the following events:
- fetch_hit
- generate
- read_multi
- fetch_multi |
diff --git a/gym/lib/gym/detect_values.rb b/gym/lib/gym/detect_values.rb
index <HASH>..<HASH> 100644
--- a/gym/lib/gym/detect_values.rb
+++ b/gym/lib/gym/detect_values.rb
@@ -98,9 +98,12 @@ module Gym
bundle_identifier = current["PRODUCT_BUNDLE_IDENTIFIER"]
provisioning_profile_specifier = current["PROVISIONING_PROFILE_SPECIFIER"]
- next if provisioning_profile_specifier.to_s.length == 0
-
- provisioning_profile_mapping[bundle_identifier] = provisioning_profile_specifier
+ provisioning_profile_uuid = current["PROVISIONING_PROFILE"]
+ if provisioning_profile_specifier.to_s.length > 0
+ provisioning_profile_mapping[bundle_identifier] = provisioning_profile_specifier
+ elsif provisioning_profile_uuid.to_s.length > 0
+ provisioning_profile_mapping[bundle_identifier] = provisioning_profile_uuid
+ end
end
end
rescue => ex | Detect selected provisioning profile UUIDs for Xcode 9 (#<I>)
* Detect selected provisioning profile UUIDs for Xcode 9
The Xcode 9 provisioningProfiles export option allows to specify either
provisioning profile names (specifiers) or UUIDs.
When automatically generating provisioningProfiles from the project file
content, fastlane was only using specifiers.
If no specifier is present but a UUID is, this makes it use the UUID.
* Make emptiness check a bit simpler |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -40,9 +40,14 @@ setup(
packages=find_packages(),
install_requires=['spglib', 'numpy', 'scipy', 'pymatgen>=2017.12.30',
'h5py', 'phonopy', 'matplotlib', 'seekpath'],
- extras_require={'docs': ['sphinx', 'sphinx-argparse']},
+ extras_require={'docs': ['sphinx', 'sphinx-argparse']},
package_data={'sumo': ['symmetry/bradcrack.json',
- 'plotting/orbital_colours.conf']},
+ 'plotting/orbital_colours.conf',
+ 'plotting/sumo_base.mplstyle',
+ 'plotting/sumo_bs.mplstyle',
+ 'plotting/sumo_dos.mplstyle',
+ 'plotting/sumo_optics.mplstyle',
+ 'plotting/sumo_phonon.mplstyle']},
data_files=['examples/orbital_colours.conf', 'LICENSE',
'requirements_rtd.txt'],
entry_points={'console_scripts': [ | Add style sheets to setup.py |
diff --git a/packages/@vue/cli-service/lib/Service.js b/packages/@vue/cli-service/lib/Service.js
index <HASH>..<HASH> 100644
--- a/packages/@vue/cli-service/lib/Service.js
+++ b/packages/@vue/cli-service/lib/Service.js
@@ -189,7 +189,7 @@ module.exports = class Service {
}
plugins = plugins.concat(files.map(file => ({
id: `local:${file}`,
- apply: loadModule(file, this.pkgContext)
+ apply: loadModule(`./${file}`, this.pkgContext)
})))
} | fix: fix resolve project local plugin's file path (#<I>) |
diff --git a/salt/modules/win_file.py b/salt/modules/win_file.py
index <HASH>..<HASH> 100644
--- a/salt/modules/win_file.py
+++ b/salt/modules/win_file.py
@@ -28,6 +28,7 @@ import re # do not remove, used in imported file.py functions
import sys # do not remove, used in imported file.py functions
import fileinput # do not remove, used in imported file.py functions
import fnmatch # do not remove, used in imported file.py functions
+import mmap # do not remove, used in imported file.py functions
from salt.ext.six import string_types # do not remove, used in imported file.py functions
# do not remove, used in imported file.py functions
from salt.ext.six.moves.urllib.parse import urlparse as _urlparse # pylint: disable=import-error,no-name-in-module | Added missing import mmap required by file.py |
diff --git a/staticfy.py b/staticfy.py
index <HASH>..<HASH> 100644
--- a/staticfy.py
+++ b/staticfy.py
@@ -58,8 +58,9 @@ def staticfy(file_, static_endpoint='static', project_type='flask', **kwargs):
file_handle.close()
- # incase filename is a link to a path
+ # extract the filename incase the filename is a path html_files/[home.html]
filename = file_.split(os.path.sep)[-1]
+
# create the staticfy and the appropriate template folder
out_file = os.path.join('staticfy', filename)
makedir(os.path.dirname(out_file))
@@ -106,7 +107,7 @@ def parse_cmd_arguments():
def main():
args = parse_cmd_arguments()
files = args.file
- static_endpoint = args.static_endpoint
+ static_endpoint = args.static_endpoint or 'static' # if it's None
project_type = args.project_type or os.getenv('STATICFY_FRAMEWORK', 'flask')
add_tags = args.add_tags or '{}'
exc_tags = args.exc_tags or '{}' | Fixed issue with staticfy filling in None when the static url is not specified |
diff --git a/lib/core/jhipster/field_types.js b/lib/core/jhipster/field_types.js
index <HASH>..<HASH> 100644
--- a/lib/core/jhipster/field_types.js
+++ b/lib/core/jhipster/field_types.js
@@ -61,7 +61,7 @@ const CommonDBValidations = {
Double: new CustomSet([REQUIRED, UNIQUE, MIN, MAX]),
Enum: new CustomSet([REQUIRED, UNIQUE]),
Boolean: new CustomSet([REQUIRED, UNIQUE]),
- LocalDate: new CustomSet([REQUIRED], UNIQUE),
+ LocalDate: new CustomSet([REQUIRED, UNIQUE]),
ZonedDateTime: new CustomSet([REQUIRED, UNIQUE]),
Blob: new CustomSet([REQUIRED, UNIQUE, MINBYTES, MAXBYTES]),
AnyBlob: new CustomSet([REQUIRED, UNIQUE, MINBYTES, MAXBYTES]), | Fixed issue with unique validation for LocalDate |
diff --git a/src/super_archives/models.py b/src/super_archives/models.py
index <HASH>..<HASH> 100644
--- a/src/super_archives/models.py
+++ b/src/super_archives/models.py
@@ -108,6 +108,10 @@ class Thread(models.Model):
verbose_name_plural = _(u"Threads")
unique_together = ('subject_token', 'mailinglist')
+ @models.permalink
+ def get_absolute_url(self):
+ return ('thread_view', [self.mailinglist, self.subject_token])
+
def __unicode__(self):
return '%s - %s (%s)' % (self.id,
self.subject_token, | Adding get_absolute_url method to thread |
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationFactory.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationFactory.java
index <HASH>..<HASH> 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationFactory.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationFactory.java
@@ -153,7 +153,7 @@ public class TypeDeclarationFactory {
if ( fieldCount != typeDescr.getFields().size() ) {
kbuilder.addBuilderResult(new TypeDeclarationError(typeDescr, "New declaration of "+typeDescr.getType().getFullName()
- +" can't declaredeclares a different set of fields \n" +
+ +" can't declare a different set of fields \n" +
"existing : " + cfi.getFieldTypesField() + "\n" +
"declared : " + typeDescr.getFields() )); | Fix typo in error message
(cherry picked from commit f<I>f<I>ee<I>b<I>cb5bf3ce) |
diff --git a/js/bitfinex.js b/js/bitfinex.js
index <HASH>..<HASH> 100644
--- a/js/bitfinex.js
+++ b/js/bitfinex.js
@@ -673,7 +673,7 @@ module.exports = class bitfinex extends Exchange {
return this.parseOrder (result);
}
- async editOrder (id, symbol = undefined, type = undefined, side = undefined, amount = undefined, price = undefined, params = {}) {
+ async editOrder (id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
await this.loadMarkets ();
let orderType = this.translateOrderType (type);
let order = { | bitfinex editOrder signature compatible with the declaration from the base class |
diff --git a/src/projex/rest.py b/src/projex/rest.py
index <HASH>..<HASH> 100644
--- a/src/projex/rest.py
+++ b/src/projex/rest.py
@@ -116,6 +116,8 @@ def py2json(py_obj):
return py_obj.strftime('%Y-%m-%d')
elif type(py_obj) == datetime.time:
return py_obj.strftime('%H:%M:%S:%f')
+ elif type(py_obj) == set:
+ return list(py_obj)
else:
# look through custom plugins
for encoder in _encoders: | * json cannot serialize set's, converting to a list |
diff --git a/spec/rbnacl/util_spec.rb b/spec/rbnacl/util_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/rbnacl/util_spec.rb
+++ b/spec/rbnacl/util_spec.rb
@@ -118,6 +118,16 @@ describe RbNaCl::Util do
end
end
+ context "check_string" do
+ it "raises EncodingError when given strings with non-BINARY encoding" do
+ string = "foobar"
+ string.force_encoding('UTF-8')
+ expect do
+ RbNaCl::Util.check_string(string, string.bytesize, "encoding test")
+ end.to raise_error(EncodingError)
+ end
+ end
+
context "hex encoding" do
let (:bytes) { [0xDE,0xAD,0xBE,0xEF].pack('c*') }
let (:hex) { "deadbeef" } | Spec for non-BINARY encodings |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ def read(fname):
setup(
name='sqlacfg',
- version='0.3.dev1',
+ version='0.4.dev1',
description='Stores configurations in a database instead of a file',
long_description=read('README.rst'),
author='Marc Brinkmann',
diff --git a/sqlacfg/__init__.py b/sqlacfg/__init__.py
index <HASH>..<HASH> 100644
--- a/sqlacfg/__init__.py
+++ b/sqlacfg/__init__.py
@@ -4,7 +4,7 @@ import json
from sqlalchemy import Column, String, distinct
-__version__ = '0.3.dev1'
+__version__ = '0.4.dev1'
class ConfigSettingMixin(object): | Start developing version <I>.dev1 (after release of <I>) |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -14,6 +14,7 @@ setup(
# long_description=open('README.md').read(),
install_requires=[
'Django>=1.6,<1.7',
+ 'django-shared',
],
dependency_links=[
], | added django-shared dependency |
diff --git a/minimal.js b/minimal.js
index <HASH>..<HASH> 100644
--- a/minimal.js
+++ b/minimal.js
@@ -22,12 +22,11 @@ function unbox(data, unboxers, key) {
for(var i = 0;i < unboxers.length;i++) {
var unboxer = unboxers[i]
- if (key) {
- plaintext = unboxer.value(data.value.content, key)
- } else if (isFunction(unboxer)) {
+ if (isFunction(unboxer))
plaintext = unboxer(data.value.content, data.value)
- } else if (!key && unboxer.key) {
- key = unboxer.key(data.value.content, data.value)
+ else {
+ if (!key) key = unboxer.key(data.value.content, data.value)
+ if (key) plaintext = unboxer.value(data.value.content, key)
}
if(plaintext) {
@@ -236,3 +235,14 @@ module.exports = function (dirname, keys, opts) {
return db
}
+
+
+
+
+
+
+
+
+
+
+ | can't use key if unboxer is old style, without key method. otherwise, handle if key is already available or not. sorry @christianbundy my earlier advice was incorrect |
diff --git a/src/commands/test/util/browser-tests-runner/setup.js b/src/commands/test/util/browser-tests-runner/setup.js
index <HASH>..<HASH> 100644
--- a/src/commands/test/util/browser-tests-runner/setup.js
+++ b/src/commands/test/util/browser-tests-runner/setup.js
@@ -9,12 +9,23 @@ window.mocha.reporter('html');
require('chai').config.includeStack = true;
+function _isPromise(obj) {
+ return (obj && obj.then && (typeof obj.then === 'function'));
+}
+
function runTest(it, name, handler, context) {
if(handler.length <= 1) {
it(name, function() {
context.name = name;
- handler.call(this, context);
- context._afterTest();
+ var testFunction = handler.call(this, context);
+ if (_isPromise(testFunction)) {
+ testFunction.then(function () {
+ context._afterTest();
+ });
+ return testFunction;
+ } else {
+ context._afterTest();
+ }
});
} else if(handler.length >= 2) {
it(name, function(done) { | Add support for promises when testing in the browser |
diff --git a/core/serial_web_bluetooth.js b/core/serial_web_bluetooth.js
index <HASH>..<HASH> 100644
--- a/core/serial_web_bluetooth.js
+++ b/core/serial_web_bluetooth.js
@@ -44,7 +44,7 @@
return {error:"Serving off HTTP (not HTTPS)"};
}
if (!isSupportedByBrowser) {
- // return {error:"Web Bluetooth API available, but not supported by this Browser"};
+ return {error:"Web Bluetooth API available, but not supported by this Browser"};
}
if (!ignoreSettings && !Espruino.Config.WEB_BLUETOOTH)
return {warning:`"Web Bluetooth" disabled in settings`}; | check for 'implemented but not enabled' |
diff --git a/src/config/boomcms/viewHelpers.php b/src/config/boomcms/viewHelpers.php
index <HASH>..<HASH> 100644
--- a/src/config/boomcms/viewHelpers.php
+++ b/src/config/boomcms/viewHelpers.php
@@ -4,15 +4,11 @@ use BoomCMS\Core\Page;
return [
'viewHelpers' => [
- 'assetURL' => function() {
- $args = func_get_args();
- $params = [];
-
- if (isset($params['asset'])) {
- $params['id'] = $asset->getId();
- unset($params['asset']);
+ 'assetURL' => function(array $params) {
+ if (isset($params['asset']) && is_object($params['asset'])) {
+ $params['asset'] = $params['asset']->getId();
}
-
+
if ( !isset($params['action'])) {
$params['action'] = 'view';
} | Fixed bugs in $assetURL view helper |
diff --git a/tests/app/src/Command/CommandRunner.php b/tests/app/src/Command/CommandRunner.php
index <HASH>..<HASH> 100644
--- a/tests/app/src/Command/CommandRunner.php
+++ b/tests/app/src/Command/CommandRunner.php
@@ -4,7 +4,6 @@ namespace App\Command;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArrayInput;
-use Symfony\Component\Console\Output\NullOutput;
use Tienvx\Bundle\MbtBundle\Command\CommandRunner as BaseCommandRunner;
class CommandRunner extends BaseCommandRunner
@@ -29,6 +28,6 @@ class CommandRunner extends BaseCommandRunner
'mbt:bug:remove-screenshots' => ['command', 'bug-id', 'model'],
];
$command = $parameters[0];
- $application->run(new ArrayInput(array_combine($map[$command], $parameters)), new NullOutput());
+ $application->run(new ArrayInput(array_combine($map[$command], $parameters)));
}
} | Report error on running command on unit testing |
diff --git a/pyxel/editor/__init__.py b/pyxel/editor/__init__.py
index <HASH>..<HASH> 100644
--- a/pyxel/editor/__init__.py
+++ b/pyxel/editor/__init__.py
@@ -11,7 +11,7 @@ def run():
print("usage: pyxeleditor pyxel_resource_file")
print("\n")
print("Pyxel Editor {}".format(pyxel.VERSION))
- print("Please specify an arbitrary file name")
+ print("Please specify an arbitrary file name to run Pyxel Editor")
print("e.g. pyxeleditor my_resource") | Modified the usage of Pyxel Editor |
diff --git a/core/src/main/java/hudson/model/Computer.java b/core/src/main/java/hudson/model/Computer.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/hudson/model/Computer.java
+++ b/core/src/main/java/hudson/model/Computer.java
@@ -1313,7 +1313,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces
* Gets the current {@link Computer} that the build is running.
* This method only works when called during a build, such as by
* {@link hudson.tasks.Publisher}, {@link hudson.tasks.BuildWrapper}, etc.
- * @return the {@link Computer} associated with {@link Executor#currentExecutor}, or null if not on an executor thread
+ * @return the {@link Computer} associated with {@link Executor#currentExecutor}, or (consistently as of 1.591) null if not on an executor thread
*/
public static @Nullable Computer currentComputer() {
Executor e = Executor.currentExecutor(); | Expanding Javadoc from #<I> as suggested by @oleg-nenashev. |
diff --git a/future/tests/test_httplib.py b/future/tests/test_httplib.py
index <HASH>..<HASH> 100644
--- a/future/tests/test_httplib.py
+++ b/future/tests/test_httplib.py
@@ -26,7 +26,7 @@ HOST = support.HOST
class FakeSocket(object):
def __init__(self, text, fileclass=io.BytesIO):
- if isinstance(text, str): # i.e. unicode string
+ if isinstance(text, type(u'')): # i.e. unicode string
text = text.encode('ascii')
self.text = text
self.fileclass = fileclass
@@ -38,7 +38,7 @@ class FakeSocket(object):
if utils.PY3:
self.data += data
else:
- if isinstance(data, str): # i.e. unicode
+ if isinstance(data, type(u'')): # i.e. unicode
newdata = data.encode('ascii')
elif isinstance(data, type(b'')): # native string type. FIXME!
newdata = bytes(data) | Use isinstance(blah, type('')) idiom in test_httplib.py
* TODO: The docs should describe the purpose of this too.
* Is there a cleaner alternative that could be recommended over this? |
diff --git a/runipy/main.py b/runipy/main.py
index <HASH>..<HASH> 100644
--- a/runipy/main.py
+++ b/runipy/main.py
@@ -118,7 +118,13 @@ def main():
exporter = HTMLExporter()
else:
exporter = HTMLExporter(
- config=Config({'HTMLExporter':{'template_file':args.template, 'template_path': ['.', '/']}}))
+ config=Config({
+ 'HTMLExporter': {
+ 'template_file':args.template,
+ 'template_path': ['.', '/']
+ }
+ })
+ )
logging.info('Saving HTML snapshot to %s' % args.html)
output, resources = exporter.from_notebook_node(nb_runner.nb) | runipy/main.py: Wrap `HTMLExporter` arguments to make them more readable and shorten the line length. |
diff --git a/blocks/admin_tree/block_admin_tree.php b/blocks/admin_tree/block_admin_tree.php
index <HASH>..<HASH> 100644
--- a/blocks/admin_tree/block_admin_tree.php
+++ b/blocks/admin_tree/block_admin_tree.php
@@ -22,8 +22,11 @@ class block_admin_tree extends block_base {
}
function applicable_formats() {
- //TODO: add 'my' only if user has role assigned in system or any course category context
- return array('site' => true, 'admin' => true, 'my' => true);
+ if (has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) {
+ return array('site' => true, 'admin' => true, 'my' => true);
+ } else {
+ return array('site' => true, 'admin' => true);
+ }
}
function preferred_width() { | Prevent admin tree to be showed for non-admins in 'my' page. MDL-<I> ; merged from <I>_STABLE |
diff --git a/grunt.js b/grunt.js
index <HASH>..<HASH> 100644
--- a/grunt.js
+++ b/grunt.js
@@ -63,6 +63,9 @@ module.exports = function( grunt ) {
lint: {
files: [ "grunt.js", "dist/jquery.js" ]
},
+ qunit: {
+ files: "test/index.html"
+ },
watch: {
files: "<config:lint.files>",
tasks: "concat lint" | Grunt: Add qunit target. Currently finishes with <I>/<I> assertions failing. If that can be made to pass, it should be added to the default task |
diff --git a/rejected/consumer.py b/rejected/consumer.py
index <HASH>..<HASH> 100644
--- a/rejected/consumer.py
+++ b/rejected/consumer.py
@@ -896,6 +896,12 @@ class Consumer(object):
self._republish_processing_error(error_text)
raise gen.Return(data.PROCESSING_EXCEPTION)
+ except NotImplementedError as error:
+ self.log_exception('NotImplementedError processing delivery'
+ ' %s: %s', message_in.delivery_tag, error)
+ self._measurement.set_tag('exception', error.__class__.__name__)
+ raise gen.Return(NotImplementedError)
+
except Exception as error:
exc_info = sys.exc_info()
if concurrent.is_future(result): | Possibly address issue #<I> by catching NotImplementedError |
diff --git a/lib/easypost/object.rb b/lib/easypost/object.rb
index <HASH>..<HASH> 100644
--- a/lib/easypost/object.rb
+++ b/lib/easypost/object.rb
@@ -134,7 +134,9 @@ class EasyPost::EasyPostObject
# The metaclass of an object.
def metaclass
- class << self; self; end
+ class << self
+ self;
+ end
end
# Add accessors of an object.
diff --git a/spec/report_spec.rb b/spec/report_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/report_spec.rb
+++ b/spec/report_spec.rb
@@ -84,7 +84,6 @@ describe EasyPost::Report do
# verify params by checking URL in cassette
# can't do any more verification without downloading CSV
end
-
end
describe '.retrieve' do | - Fix linting issues |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -139,7 +139,7 @@ install_requires=[
'enum34 >= 1.1.6',
'funcsigs >= 0.4',
'futures >= 3.0.5',
- 'hypercube == 0.3.0a6',
+ 'hypercube == 0.3.2',
'numpy >= 1.11.3',
'numexpr >= 2.6.1',
'python-casacore >= 2.1.2', | Upgrade to hypercube <I> |
diff --git a/framework/zii/widgets/CMenu.php b/framework/zii/widgets/CMenu.php
index <HASH>..<HASH> 100644
--- a/framework/zii/widgets/CMenu.php
+++ b/framework/zii/widgets/CMenu.php
@@ -24,6 +24,7 @@
* // Important: you need to specify url as 'controller/action',
* // not just as 'controller' even if default acion is used.
* array('label'=>'Home', 'url'=>array('site/index')),
+ * // 'Products' menu item will be selected no matter which tag parameter value is since it's not specified.
* array('label'=>'Products', 'url'=>array('product/index'), 'items'=>array(
* array('label'=>'New Arrivals', 'url'=>array('product/new', 'tag'=>'new')),
* array('label'=>'Most Popular', 'url'=>array('product/index', 'tag'=>'popular')), | (Fixes issue <I>) More API docs for CMenu |
diff --git a/src/main/java/com/cloudbees/jenkins/support/impl/UpdateCenter.java b/src/main/java/com/cloudbees/jenkins/support/impl/UpdateCenter.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/cloudbees/jenkins/support/impl/UpdateCenter.java
+++ b/src/main/java/com/cloudbees/jenkins/support/impl/UpdateCenter.java
@@ -70,6 +70,8 @@ public class UpdateCenter extends Component {
// Only do this part of the async-http-client plugin is installed.
if (Helper.getActiveInstance().getPlugin("async-http-client") != null) {
addProxyInformation(out);
+ } else {
+ out.println("Proxy: 'async-http-client' not installed so proxy info available.");
}
} finally {
out.flush(); | Mention that the async-http-client plugin is not installed. |
diff --git a/core/src/main/java/jenkins/security/DefaultConfidentialStore.java b/core/src/main/java/jenkins/security/DefaultConfidentialStore.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/jenkins/security/DefaultConfidentialStore.java
+++ b/core/src/main/java/jenkins/security/DefaultConfidentialStore.java
@@ -16,6 +16,7 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.security.GeneralSecurityException;
import java.security.SecureRandom;
+import javax.crypto.BadPaddingException;
import org.apache.commons.io.IOUtils;
/**
@@ -107,6 +108,12 @@ public class DefaultConfidentialStore extends ConfidentialStore {
return verifyMagic(bytes);
} catch (GeneralSecurityException e) {
throw new IOException("Failed to load the key: "+key.getId(),e);
+ } catch (IOException x) {
+ if (x.getCause() instanceof BadPaddingException) {
+ return null; // broken somehow
+ } else {
+ throw x;
+ }
} finally {
IOUtils.closeQuietly(cis);
IOUtils.closeQuietly(fis); | [FIXED JENKINS-<I>] Treat BadPaddingException as an unloadable key and continue.
(cherry picked from commit <I>b8d<I>abdf8b<I>f4e1b8ce8bf<I>e<I>ad)
Conflicts:
changelog.html |
diff --git a/src/parser-flow.js b/src/parser-flow.js
index <HASH>..<HASH> 100644
--- a/src/parser-flow.js
+++ b/src/parser-flow.js
@@ -4,6 +4,8 @@ const createError = require("./parser-create-error");
const includeShebang = require("./parser-include-shebang");
function parse(text) {
+ // Fixes Node 4 issue (#1986)
+ "use strict"; // eslint-disable-line
// Inline the require to avoid loading all the JS if we don't use it
const flowParser = require("flow-parser"); | Add "use strict" to fix SyntaxError on Node@4 (#<I>) |
diff --git a/core/src/main/java/com/google/errorprone/bugpatterns/time/StronglyTypeTime.java b/core/src/main/java/com/google/errorprone/bugpatterns/time/StronglyTypeTime.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/com/google/errorprone/bugpatterns/time/StronglyTypeTime.java
+++ b/core/src/main/java/com/google/errorprone/bugpatterns/time/StronglyTypeTime.java
@@ -185,7 +185,7 @@ public final class StronglyTypeTime extends BugChecker implements CompilationUni
private static final Pattern TIME_UNIT_REMOVER =
Pattern.compile(
- "((_?IN)?_?(NANO|NANOSECOND|NSEC|_NS|MICRO|MSEC|MICROSECOND|MILLI|MILLISECOND|_MS|SEC|SECOND|MINUTE|MIN|HOUR|DAY)S?)?$",
+ "((_?IN)?_?(NANO|NANOSECOND|NSEC|_NS|MICRO|MSEC|USEC|MICROSECOND|MILLI|MILLISECOND|_MS|SEC|SECOND|MINUTE|MIN|HOUR|DAY)S?)?$",
Pattern.CASE_INSENSITIVE);
/** Tries to strip any time-related suffix off the field name. */ | Re-write DEADLINE_USEC to DEADLINE instead of DEADLINE_U.
PiperOrigin-RevId: <I> |
diff --git a/lib/rack/typhoeus/middleware/params_decoder/helper.rb b/lib/rack/typhoeus/middleware/params_decoder/helper.rb
index <HASH>..<HASH> 100644
--- a/lib/rack/typhoeus/middleware/params_decoder/helper.rb
+++ b/lib/rack/typhoeus/middleware/params_decoder/helper.rb
@@ -48,8 +48,12 @@ module Rack
# @return [Boolean] True if its a encoded Array, else false.
def encoded?(hash)
return false if hash.empty?
- keys = hash.keys.map{|i| i.to_i if i.respond_to?(:to_i)}.sort
- keys == hash.keys.size.times.to_a
+ if hash.keys.size > 1
+ keys = hash.keys.map{|i| i.to_i if i.respond_to?(:to_i)}.sort
+ keys == hash.keys.size.times.to_a
+ else
+ hash.keys.first =~ /0/
+ end
end
# If the Hash is an array encoded by typhoeus an array is returned | FIXED: Any key .to_i would turn 0. So if there was only 1 key, converted? returned true wrongly |
diff --git a/src/java/org/apache/cassandra/gms/Gossiper.java b/src/java/org/apache/cassandra/gms/Gossiper.java
index <HASH>..<HASH> 100644
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@ -241,6 +241,7 @@ public class Gossiper implements IFailureDetectionEventListener
*/
void evictFromMembership(InetAddress endpoint)
{
+ endpointStateMap_.remove(endpoint);
unreachableEndpoints_.remove(endpoint);
}
@@ -456,7 +457,6 @@ public class Gossiper implements IFailureDetectionEventListener
if (logger_.isDebugEnabled())
logger_.debug(QUARANTINE_DELAY + " elapsed, " + entry.getKey() + " gossip quarantine over");
justRemovedEndpoints_.remove(entry.getKey());
- endpointStateMap_.remove(entry.getKey());
}
}
} | Keep endpoint state until aVeryLongTime.
Patch by brandonwilliams reviewed by gdusbabek for CASSANDRA-<I>
git-svn-id: <URL> |
diff --git a/spec/rollbar_spec.rb b/spec/rollbar_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/rollbar_spec.rb
+++ b/spec/rollbar_spec.rb
@@ -157,6 +157,7 @@ describe Rollbar do
end
it 'should not modify any parent notifier configuration' do
+ configure
Rollbar.configuration.code_version.should be_nil
Rollbar.configuration.payload_options.should be_empty | Reconfigure Rollbar in a random spec. |
diff --git a/spec/scorm_engine/api/endpoints/registrations_spec.rb b/spec/scorm_engine/api/endpoints/registrations_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/scorm_engine/api/endpoints/registrations_spec.rb
+++ b/spec/scorm_engine/api/endpoints/registrations_spec.rb
@@ -126,7 +126,7 @@ RSpec.describe ScormEngine::Api::Endpoints::Registrations do
it "returns activity_details if requested" do
response = subject.get_registration_progress(registration_id: registration_options[:registration_id], detail: true)
- expect(response.result.activity_details).to be_a Hash
+ expect(response.result.activity_details).to be_a ScormEngine::Models::RegistrationActivityDetail
end
end
end | fix test now that we have new models |
diff --git a/webroot/js/helper.js b/webroot/js/helper.js
index <HASH>..<HASH> 100644
--- a/webroot/js/helper.js
+++ b/webroot/js/helper.js
@@ -585,8 +585,9 @@ foodcoopshop.Helper = {
var root = '#content';
- if (foodcoopshop.Helper.isMobile()) {
- root = '#responsive-header';
+ var responsiveHeaderSelector = '#responsive-header';
+ if (foodcoopshop.Helper.isMobile() && $(resonsiveHeaderSelector).length == 1) {
+ root = responsiveHeaderSelector;
}
var messageNode = $('<div />'); | bugfix: responsive-header not used in admin |
diff --git a/datacats/environment.py b/datacats/environment.py
index <HASH>..<HASH> 100644
--- a/datacats/environment.py
+++ b/datacats/environment.py
@@ -384,7 +384,13 @@ class Environment(object):
port = self.port
production = production or self.always_prod
- override_site_url = self.address == '127.0.0.1' and not is_boot2docker()
+ # We only override the site URL with the docker URL on three conditions
+ # 1 - we're listening on 127.0.0.1
+ override_site_url = (self.address == '127.0.0.1'
+ # 2 - we're not using boot2docker
+ and not is_boot2docker()
+ # 3 - the site url is NOT set.
+ and not self.site_url)
command = ['/scripts/web.sh', str(production), str(override_site_url), str(paster_reload)]
if address != '127.0.0.1' and is_boot2docker(): | Add another condition for the site_url override - that no one has explicitly set the site_url |
diff --git a/etebase/__init__.py b/etebase/__init__.py
index <HASH>..<HASH> 100644
--- a/etebase/__init__.py
+++ b/etebase/__init__.py
@@ -2,7 +2,7 @@ import functools
import msgpack
-from .etebase_python import CollectionAccessLevel, PrefetchOption # noqa
+from .etebase_python import CollectionAccessLevel, PrefetchOption, Utils # noqa
from . import etebase_python | Utils: fix exposing Utils class.
We weren't re-exporting it so it wasn't easily accessible. |
diff --git a/backbone.localStorage.js b/backbone.localStorage.js
index <HASH>..<HASH> 100644
--- a/backbone.localStorage.js
+++ b/backbone.localStorage.js
@@ -122,6 +122,10 @@ Backbone.LocalStorage.sync = window.Store.sync = Backbone.localSync = function(m
if (options && options.error) options.error("Record not found");
if (syncDfd) syncDfd.reject();
}
+
+ // add compatibility with $.ajax
+ // always execute callback for success and error
+ if (options && options.complete) options.complete(resp);
return syncDfd && syncDfd.promise();
}; | add options.complete to Backbone.LocalStorage.sync to add compatibility with $.ajax |
diff --git a/app-examples/MongoNode.php b/app-examples/MongoNode.php
index <HASH>..<HASH> 100644
--- a/app-examples/MongoNode.php
+++ b/app-examples/MongoNode.php
@@ -13,6 +13,7 @@ class MongoNode extends AppInstance {
public $LockClient; // LockClient
public $cursor; // Tailable cursor
public $timer;
+ protected $inited = false;
/**
* Setting default config options | Added missing MongoNode\->inited property |
diff --git a/bokeh/transforms/ar_downsample.py b/bokeh/transforms/ar_downsample.py
index <HASH>..<HASH> 100644
--- a/bokeh/transforms/ar_downsample.py
+++ b/bokeh/transforms/ar_downsample.py
@@ -20,7 +20,7 @@ except:
print("Install from the ./python directory with 'python setup.py install' (may require admin privledges)")
print("Questions and feedback can be directed to Joseph Cottam (jcottam@indiana.edu)")
print("-----------------------------------------------------------------------\n\n")
- raise
+# raise
class Proxy(PlotObject): | Removed raise on import error.
Now it matches behavior of image_downsample. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.