diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/api/auth_test.go b/api/auth_test.go
index <HASH>..<HASH> 100644
--- a/api/auth_test.go
+++ b/api/auth_test.go
@@ -1540,7 +1540,7 @@ func (s *AuthSuite) TestRemoveUserWithTheUserBeingLastMemberOfATeam(c *gocheck.C
c.Assert(e.Code, gocheck.Equals, http.StatusForbidden)
expected := `This user is the last member of the team "painofsalvation", so it cannot be removed.
-Please remove the team, them remove the user.`
+Please remove the team, then remove the user.`
c.Assert(e.Message, gocheck.Equals, expected)
} | api/auth: fixed tests. |
diff --git a/aws/resource_aws_codepipeline_test.go b/aws/resource_aws_codepipeline_test.go
index <HASH>..<HASH> 100644
--- a/aws/resource_aws_codepipeline_test.go
+++ b/aws/resource_aws_codepipeline_test.go
@@ -685,7 +685,7 @@ resource "aws_iam_role_policy" "codepipeline_policy" {
"Action": [
"sts:AssumeRole"
],
- "Resource": aws_iam_role.codepipeline_action_role.arn
+ "Resource": "${aws_iam_role.codepipeline_action_role.arn}"
}
]
} | tests/resource/aws_codepipeline: Fix TestAccAWSCodePipeline_deployWithServiceRole (#<I>) |
diff --git a/mollie/api/objects/payment.py b/mollie/api/objects/payment.py
index <HASH>..<HASH> 100644
--- a/mollie/api/objects/payment.py
+++ b/mollie/api/objects/payment.py
@@ -152,15 +152,15 @@ class Payment(Base):
@property
def get_amount_refunded(self):
try:
- return self._get_property('amountRefunded')
- except TypeError:
+ return self['amountRefunded']
+ except KeyError:
return '0.0'
@property
def get_amount_remaining(self):
try:
- return self._get_property('amountRemaining')
- except TypeError:
+ return self['amountRemaining']
+ except KeyError:
return '0.0'
@property
diff --git a/tests/test_payments.py b/tests/test_payments.py
index <HASH>..<HASH> 100644
--- a/tests/test_payments.py
+++ b/tests/test_payments.py
@@ -73,8 +73,8 @@ def test_get_single_payment(client, response):
assert payment.id == PAYMENT_ID
assert payment.mode == 'test'
assert payment.status == 'open'
- assert payment.get_amount_refunded == 0.0
- assert payment.get_amount_remaining == 0.0
+ assert payment.get_amount_refunded == '0.0'
+ assert payment.get_amount_remaining == '0.0'
assert payment.is_open() is True
assert payment.is_pending() is False
assert payment.is_canceled() is False | make get_amount_remaining and refunded return string instead of float |
diff --git a/test/python_client_test.py b/test/python_client_test.py
index <HASH>..<HASH> 100755
--- a/test/python_client_test.py
+++ b/test/python_client_test.py
@@ -29,6 +29,8 @@ def setUpModule():
global vtgateclienttest_port
global vtgateclienttest_grpc_port
+ environment.topo_server().setup()
+
vtgateclienttest_port = environment.reserve_ports(1)
args = environment.binary_args('vtgateclienttest') + [
'-log_dir', environment.vtlogroot,
@@ -49,6 +51,8 @@ def tearDownModule():
utils.kill_sub_process(vtgateclienttest_process, soft=True)
vtgateclienttest_process.wait()
+ environment.topo_server().teardown()
+
class TestPythonClient(unittest.TestCase):
CONNECT_TIMEOUT = 10.0 | test: Re-adding topo server setup.
I accidentally removed it here: <URL> |
diff --git a/tests/test_schedule.py b/tests/test_schedule.py
index <HASH>..<HASH> 100644
--- a/tests/test_schedule.py
+++ b/tests/test_schedule.py
@@ -45,7 +45,7 @@ class ScheduleTests(PyResTests):
key2 = int(time.mktime(d2.timetuple()))
self.resq.enqueue_at(d, Basic,"test1")
self.resq.enqueue_at(d2, Basic,"test1")
- item = self.resq.next_delayed_timestamp()
+ int(item) = self.resq.next_delayed_timestamp()
assert item == key2
def test_next_item_for_timestamp(self): | change the result to cast to int
The newer version of redis-py no longer tries to extrapolate
the type of a return value. |
diff --git a/lib/danger/danger_core/plugins/dangerfile_messaging_plugin.rb b/lib/danger/danger_core/plugins/dangerfile_messaging_plugin.rb
index <HASH>..<HASH> 100644
--- a/lib/danger/danger_core/plugins/dangerfile_messaging_plugin.rb
+++ b/lib/danger/danger_core/plugins/dangerfile_messaging_plugin.rb
@@ -16,6 +16,9 @@ module Danger
# via the return value for the danger command. If you have linters with errors for this call
# you can use `messaging.fail` instead.
#
+ # You can optionally add `file` and `line` to provide inline feedback on a PR in GitHub, note that
+ # only feedback inside the PR's diff will show up inline. Others will appear inside the main comment.
+ #
# It is possible to have Danger ignore specific warnings or errors by writing `Danger: Ignore "[warning/error text]"`.
#
# Sidenote: Messaging is the only plugin which adds functions to the root of the Dangerfile. | Add a note about file:line: |
diff --git a/cmd/cayley/command/database.go b/cmd/cayley/command/database.go
index <HASH>..<HASH> 100644
--- a/cmd/cayley/command/database.go
+++ b/cmd/cayley/command/database.go
@@ -91,8 +91,11 @@ func NewLoadDatabaseCmd() *cobra.Command {
p := mustSetupProfile(cmd)
defer mustFinishProfile(p)
load, _ := cmd.Flags().GetString(flagLoad)
+ if load == "" && len(args) == 1 {
+ load = args[0]
+ }
if load == "" {
- return errors.New("quads file must be specified")
+ return errors.New("one quads file must be specified")
}
if init, err := cmd.Flags().GetBool("init"); err != nil {
return err
@@ -135,8 +138,11 @@ func NewDumpDatabaseCmd() *cobra.Command {
RunE: func(cmd *cobra.Command, args []string) error {
printBackendInfo()
dump, _ := cmd.Flags().GetString(flagDump)
+ if dump == "" && len(args) == 1 {
+ dump = args[0]
+ }
if dump == "" {
- return errors.New("quads file must be specified")
+ return errors.New("one quads file must be specified")
}
h, err := openDatabase()
if err != nil { | cli: allow to pass file name as argument for load and dump |
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -9,6 +9,7 @@ export {OrmMetadata} from './orm-metadata';
export {EntityManager} from './entity-manager';
export {association} from './decorator/association';
export {resource} from './decorator/resource';
+export {name} from './decorator/name';
export {repository} from './decorator/repository';
export {validation} from './decorator/validation';
export {validatedResource} from './decorator/validated-resource'; | chore(project): Expose @name decorator |
diff --git a/src/embed/world-renderer.js b/src/embed/world-renderer.js
index <HASH>..<HASH> 100644
--- a/src/embed/world-renderer.js
+++ b/src/embed/world-renderer.js
@@ -235,7 +235,13 @@ WorldRenderer.prototype.didLoadFail_ = function(message) {
WorldRenderer.prototype.setDefaultYaw_ = function(angleRad) {
// Rotate the camera parent to take into account the scene's rotation.
// By default, it should be at the center of the image.
- this.camera.parent.rotation.y = (Math.PI / 2.0) + angleRad;
+ var display = this.controls.getVRDisplay();
+ var theta = display.theta_ || 0;
+
+ if ( display.poseSensor_ ) {
+ display.poseSensor_.resetPose();
+ }
+ this.camera.parent.rotation.y = (Math.PI / 2.0) + angleRad - theta;
};
/** | reset pose and account for camera rotation when loading scene |
diff --git a/src/test/java/com/helger/css/reader/AbstractFuncTestCSSReader.java b/src/test/java/com/helger/css/reader/AbstractFuncTestCSSReader.java
index <HASH>..<HASH> 100644
--- a/src/test/java/com/helger/css/reader/AbstractFuncTestCSSReader.java
+++ b/src/test/java/com/helger/css/reader/AbstractFuncTestCSSReader.java
@@ -139,6 +139,9 @@ public abstract class AbstractFuncTestCSSReader
// Handle each error as a fatal error!
final CascadingStyleSheet aCSS = CSSReader.readFromFile (aFile, m_aReaderSettings);
assertNull (sKey, aCSS);
+
+ // For Travis :(
+ System.gc ();
}
}
@@ -173,6 +176,9 @@ public abstract class AbstractFuncTestCSSReader
final CascadingStyleSheet aCSSReRead = CSSReader.readFromStringReader (sCSS, m_aReaderSettings);
assertNotNull ("Failed to parse:\n" + sCSS, aCSSReRead);
assertEquals (sKey, aCSS, aCSSReRead);
+
+ // For Travis :(
+ System.gc ();
}
} | More .gc for Travis :( |
diff --git a/src/router-directive.es5.js b/src/router-directive.es5.js
index <HASH>..<HASH> 100644
--- a/src/router-directive.es5.js
+++ b/src/router-directive.es5.js
@@ -1,9 +1,6 @@
'use strict';
-/**
- * @name ngFuturisticRouter
- *
- * @description
+/*
* A module for adding new a routing system Angular 1.
*/
angular.module('ngFuturisticRouter', ['ngFuturisticRouter.generated']). | docs(router): remove jsdoc for module
For now, the docs will explain the module at the root level |
diff --git a/SoftLayer/CLI/modules/cci.py b/SoftLayer/CLI/modules/cci.py
index <HASH>..<HASH> 100755
--- a/SoftLayer/CLI/modules/cci.py
+++ b/SoftLayer/CLI/modules/cci.py
@@ -838,8 +838,8 @@ usage: sl cci dns sync <identifier> [options]
DNS related actions for a CCI
Options:
- -a Sync only the A record
- --ptr Sync only the PTR record
+ -a Sync the A record for the host
+ --ptr Sync the PTR record for the host
"""
action = 'dns'
options = ['confirm'] | Updating dns sync docs |
diff --git a/lib/linkedin/client.rb b/lib/linkedin/client.rb
index <HASH>..<HASH> 100644
--- a/lib/linkedin/client.rb
+++ b/lib/linkedin/client.rb
@@ -13,7 +13,7 @@ module LinkedIn
def initialize(options={}, &block)
configure options, &block
- self.access_token ||= self.config[:access_token].to_s
+ self.access_token ||= self.config.access_token.to_s
end
def connection
@@ -87,7 +87,7 @@ module LinkedIn
def url_for(option_key)
host = config.auth_host
- path = config["#{option_key}_path".to_sym]
+ path = config.send("#{option_key}_path")
"#{host}#{path}"
end
end
diff --git a/lib/linkedin/configuration.rb b/lib/linkedin/configuration.rb
index <HASH>..<HASH> 100644
--- a/lib/linkedin/configuration.rb
+++ b/lib/linkedin/configuration.rb
@@ -22,7 +22,7 @@ module LinkedIn
module BaseConfiguration
def configure(config={}, &block)
- self.config.marshal_load self.config.to_h.merge(config)
+ self.config.marshal_load self.config.marshal_dump.merge(config)
yield self.config if block_given?
@@ -35,7 +35,7 @@ module LinkedIn
end
def defaults(*keys)
- config.to_h.slice *keys
+ config.marshal_dump.slice *keys
end
end | Pre-<I> openstruct support |
diff --git a/IPython/html/static/widgets/js/widget_int.js b/IPython/html/static/widgets/js/widget_int.js
index <HASH>..<HASH> 100644
--- a/IPython/html/static/widgets/js/widget_int.js
+++ b/IPython/html/static/widgets/js/widget_int.js
@@ -290,7 +290,7 @@ define([
* Called when view is rendered.
*/
this.$el
- .addClass('widget-hbox widget-text');
+ .addClass('widget-hbox widget-numeric-text');
this.$label = $('<div />')
.appendTo(this.$el)
.addClass('widget-label') | wrong css class for widget-int |
diff --git a/lib/tests/behat/behat_navigation.php b/lib/tests/behat/behat_navigation.php
index <HASH>..<HASH> 100644
--- a/lib/tests/behat/behat_navigation.php
+++ b/lib/tests/behat/behat_navigation.php
@@ -736,7 +736,8 @@ class behat_navigation extends behat_base {
* Recognised page names are:
* | Page type | Identifier meaning | description |
* | Category | category idnumber | List of courses in that category. |
- * | Course | course shortname | Main course home page |
+ * | Course | course shortname | Main course home pag |
+ * | Course editing | course shortname | Edit settings page for the course |
* | Activity | activity idnumber | Start page for that activity |
* | Activity editing | activity idnumber | Edit settings page for that activity |
* | [modname] Activity | activity name or idnumber | Start page for that activity |
@@ -778,7 +779,7 @@ class behat_navigation extends behat_base {
$courseid = $this->get_course_id($identifier);
if (!$courseid) {
throw new Exception('The specified course with shortname, fullname, or idnumber "' .
- $identifier . '" does not exist');
+ $identifier . '" does not exist');
}
return new moodle_url('/course/edit.php', ['id' => $courseid]); | MDL-<I> behat: Option to jump to course edit page |
diff --git a/lib/ansible_tower_client/collection.rb b/lib/ansible_tower_client/collection.rb
index <HASH>..<HASH> 100644
--- a/lib/ansible_tower_client/collection.rb
+++ b/lib/ansible_tower_client/collection.rb
@@ -30,6 +30,14 @@ module AnsibleTowerClient
build_object(parse_response(api.get("#{klass.endpoint}/#{id}/")))
end
+ def create!(*args)
+ klass.create!(api, *args)
+ end
+
+ def create(*args)
+ klass.create(api, *args)
+ end
+
private
def class_from_type(type) | Add creation methods to AnsibleTowerClient::Collection
i.e. Ability to do api.job_templates.create(:key => "value") |
diff --git a/website/src/components/charts/sankey/Sankey.js b/website/src/components/charts/sankey/Sankey.js
index <HASH>..<HASH> 100644
--- a/website/src/components/charts/sankey/Sankey.js
+++ b/website/src/components/charts/sankey/Sankey.js
@@ -28,7 +28,7 @@ const initialSettings = {
left: 50,
},
- layout: 'vertical',
+ layout: 'horizontal',
align: 'justify',
sort: 'auto',
colors: 'category10', | feat(website): change sankey default layout |
diff --git a/worker/uniter/filter.go b/worker/uniter/filter.go
index <HASH>..<HASH> 100644
--- a/worker/uniter/filter.go
+++ b/worker/uniter/filter.go
@@ -167,8 +167,8 @@ func (f *filter) loop(unitName string) (err error) {
configw := f.service.WatchConfig()
defer watcher.Stop(configw, &f.tomb)
- // Config events cannot be meaningfully reset until one is available;
- // once we receive the initial change, we unblock reset requests by
+ // Config events cannot be meaningfully discarded until one is available;
+ // once we receive the initial change, we unblock discard requests by
// setting this channel to its namesake on f.
var discardConfig chan struct{}
for {
@@ -228,7 +228,7 @@ func (f *filter) loop(unitName string) (err error) {
f.outResolved = f.outResolvedOn
}
case <-discardConfig:
- log.Debugf("filter: reset config event")
+ log.Debugf("filter: discarded config event")
f.outConfig = nil
}
} | excise remaining resets in favour of discards |
diff --git a/gns3server/web/route.py b/gns3server/web/route.py
index <HASH>..<HASH> 100644
--- a/gns3server/web/route.py
+++ b/gns3server/web/route.py
@@ -180,7 +180,7 @@ class Route(object):
except aiohttp.web.HTTPBadRequest as e:
response = Response(request=request, route=route)
response.set_status(e.status)
- response.json({"message": e.text, "status": e.status, "path": route, "request": request.json})
+ response.json({"message": e.text, "status": e.status, "path": route, "request": request.json, "method": request.method})
except aiohttp.web.HTTPException as e:
response = Response(request=request, route=route)
response.set_status(e.status) | Add the method in the bad request answer |
diff --git a/Eloquent/Model.php b/Eloquent/Model.php
index <HASH>..<HASH> 100755
--- a/Eloquent/Model.php
+++ b/Eloquent/Model.php
@@ -2123,6 +2123,19 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
}
/**
+ * Make the given, typically hidden, attributes visible.
+ *
+ * @param array|string $attributes
+ * @return $this
+ */
+ public function withHidden($attributes)
+ {
+ $this->hidden = array_diff($this->hidden, (array) $attributes);
+
+ return $this;
+ }
+
+ /**
* Get the visible attributes for the model.
*
* @return array | added withHidden method to fluently remove some hidden columns. |
diff --git a/Classes/Util.php b/Classes/Util.php
index <HASH>..<HASH> 100644
--- a/Classes/Util.php
+++ b/Classes/Util.php
@@ -32,6 +32,7 @@ use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\TimeTracker\NullTimeTracker;
use TYPO3\CMS\Core\TypoScript\ExtendedTemplateService;
use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
use TYPO3\CMS\Frontend\Page\PageRepository;
@@ -580,7 +581,7 @@ class Util
{
$isWorkspaceRecord = false;
- if (BackendUtility::isTableWorkspaceEnabled($table)) {
+ if ((ExtensionManagementUtility::isLoaded('workspaces')) && (BackendUtility::isTableWorkspaceEnabled($table))) {
$record = BackendUtility::getRecord($table, $uid);
if ($record['pid'] == '-1' || $record['t3ver_state'] > 0) { | [BUG] Optimize call in isDraftRecord with respect to workspaces |
diff --git a/main/java/uk/co/real_logic/sbe/generation/cpp98/Cpp98Generator.java b/main/java/uk/co/real_logic/sbe/generation/cpp98/Cpp98Generator.java
index <HASH>..<HASH> 100644
--- a/main/java/uk/co/real_logic/sbe/generation/cpp98/Cpp98Generator.java
+++ b/main/java/uk/co/real_logic/sbe/generation/cpp98/Cpp98Generator.java
@@ -749,7 +749,7 @@ public class Cpp98Generator implements CodeGenerator
"# define SBE_FLOAT_NAN NAN\n" +
"# define SBE_DOUBLE_NAN NAN\n" +
"#endif\n\n" +
- "#include \"sbe/sbe.hpp\"\n\n",
+ "#include <sbe/sbe.hpp>\n\n",
className.toUpperCase()
));
@@ -758,7 +758,7 @@ public class Cpp98Generator implements CodeGenerator
for (final String incName : typesToInclude)
{
sb.append(String.format(
- "#include \"%1$s/%2$s.hpp\"\n",
+ "#include <%1$s/%2$s.hpp>\n",
namespaceName,
toUpperFirstChar(incName)
)); | [cpp] Changed #include statements to use '<file.h>' instead of '"file.h"'. This allows cpp projects to more easily share the generated files by setting include paths. |
diff --git a/lib/assets/javascripts/jasmine-runner.js b/lib/assets/javascripts/jasmine-runner.js
index <HASH>..<HASH> 100644
--- a/lib/assets/javascripts/jasmine-runner.js
+++ b/lib/assets/javascripts/jasmine-runner.js
@@ -90,6 +90,10 @@
var address = args[1];
console.log('Running: ' + address);
+ if(phantom.version.major===2){
+ // PhantomJS 2 workaround
+ address+='\n';
+ }
page.open(address, function(status) {
if (status === "success") {
// PhantomJS 2 has a memory consumption problem. This works around it. | phantom2 needs newline after address |
diff --git a/src/org/openscience/cdk/tools/SaturationChecker.java b/src/org/openscience/cdk/tools/SaturationChecker.java
index <HASH>..<HASH> 100644
--- a/src/org/openscience/cdk/tools/SaturationChecker.java
+++ b/src/org/openscience/cdk/tools/SaturationChecker.java
@@ -370,7 +370,16 @@ public class SaturationChecker
int missingHydrogen = (int) (defaultAtom.getMaxBondOrderSum() -
container.getBondOrderSum(atom) +
atom.getFormalCharge());
- if (atom.getFlag(CDKConstants.ISAROMATIC)) missingHydrogen--;
+ if (atom.getFlag(CDKConstants.ISAROMATIC)){
+ Bond[] connectedBonds=container.getConnectedBonds(atom);
+ boolean subtractOne=true;
+ for(int i=0;i<connectedBonds.length;i++){
+ if(connectedBonds[i].getOrder()==2 || connectedBonds[i].getOrder()==CDKConstants.BONDORDER_AROMATIC)
+ subtractOne=false;
+ }
+ if(subtractOne)
+ missingHydrogen--;
+ }
logger.debug("Atom: " + atom.getSymbol());
logger.debug(" max bond order: " + defaultAtom.getMaxBondOrderSum());
logger.debug(" bond order sum: " + container.getBondOrderSum(atom)); | Corrected problems with handling aromatic atoms which have got the correct number of bonds
git-svn-id: <URL> |
diff --git a/tests/contrib/django/conftest.py b/tests/contrib/django/conftest.py
index <HASH>..<HASH> 100644
--- a/tests/contrib/django/conftest.py
+++ b/tests/contrib/django/conftest.py
@@ -91,6 +91,9 @@ def pytest_configure(config):
ELASTIC_APM={
"METRICS_INTERVAL": "0ms",
"TRANSPORT_CLASS": "tests.fixtures.DummyTransport",
+ "SERVICE_NAME": "testapp",
+ "CENTRAL_CONFIG": False,
+ "CLOUD_PROVIDER": False,
}, # avoid autostarting the metrics collector thread
)
settings_dict.update( | disable config updater thread and cloud metadata checker in tests (#<I>) |
diff --git a/src/Wsdl2PhpGenerator/ComplexType.php b/src/Wsdl2PhpGenerator/ComplexType.php
index <HASH>..<HASH> 100644
--- a/src/Wsdl2PhpGenerator/ComplexType.php
+++ b/src/Wsdl2PhpGenerator/ComplexType.php
@@ -98,8 +98,13 @@ class ComplexType extends Type
$comment = new PhpDocComment();
$comment->setVar(PhpDocElementFactory::getVar($type, $name, ''));
- $comment->setAccess(PhpDocElementFactory::getPublicAccess());
- $var = new PhpVariable('public', $name, 'null', $comment);
+ if ($this->config->getCreateAccessors()) {
+ $comment->setAccess(PhpDocElementFactory::getProtectedAccess());
+ $var = new PhpVariable('protected', $name, 'null', $comment);
+ } else {
+ $comment->setAccess(PhpDocElementFactory::getPublicAccess());
+ $var = new PhpVariable('public', $name, 'null', $comment);
+ }
$class->addVariable($var);
if (!$member->getNillable()) { | Members are protected if accessor methods are being used |
diff --git a/js/h5p.js b/js/h5p.js
index <HASH>..<HASH> 100644
--- a/js/h5p.js
+++ b/js/h5p.js
@@ -190,6 +190,16 @@ H5P.cloneObject = function (object, recursive, array) {
return clone;
};
+/**
+ * Remove all empty spaces before and after the value.
+ *
+ * @param {String} value
+ * @returns {@exp;value@call;replace}
+ */
+H5P.trim = function (value) {
+ return value.replace(/^\s+|\s+$/g, '');
+};
+
// We have several situations where we want to shuffle an array, extend array
// to do so.
Array.prototype.shuffle = function() { | Fine tuning on the editor and the boardgame. |
diff --git a/shared/search/index.native.js b/shared/search/index.native.js
index <HASH>..<HASH> 100644
--- a/shared/search/index.native.js
+++ b/shared/search/index.native.js
@@ -6,6 +6,7 @@ import UserGroup from './user-search/user-group'
import UserSearch from './user-search/render'
import {globalStyles} from '../styles'
import {compose, withProps} from 'recompose'
+import {Keyboard} from 'react-native'
import type {Props} from '.'
import type {Props as UserSearchProps} from './user-search/render'
@@ -34,7 +35,10 @@ export default compose(
headerStyle: {
borderBottomWidth: 0,
},
- onCancel: ownProps.onReset,
+ onCancel: () => {
+ ownProps.onReset()
+ Keyboard.dismiss()
+ },
})),
HeaderHoc,
)(SearchRender) | dismiss keyboard on search cancel (#<I>) |
diff --git a/openquake/calculators/ucerf_base.py b/openquake/calculators/ucerf_base.py
index <HASH>..<HASH> 100644
--- a/openquake/calculators/ucerf_base.py
+++ b/openquake/calculators/ucerf_base.py
@@ -311,7 +311,7 @@ class UCERFSource(BaseSeismicSource):
mag, self.rake[ridx], self.tectonic_region_type,
surface_set[len(surface_set) // 2].get_middle_point(),
MultiSurface(surface_set), self.rate[ridx], self.tom)
-
+ rupture.rup_id = self.start + ridx
return rupture
def iter_ruptures(self, **kwargs): | Added rup_id |
diff --git a/openquake/commonlib/readinput.py b/openquake/commonlib/readinput.py
index <HASH>..<HASH> 100644
--- a/openquake/commonlib/readinput.py
+++ b/openquake/commonlib/readinput.py
@@ -908,8 +908,8 @@ def get_sitecol_assetcol(oqparam, haz_sitecol=None, cost_types=()):
if oqparam.region_grid_spacing:
haz_distance = oqparam.region_grid_spacing * 1.414
if haz_distance != asset_hazard_distance:
- logging.info('Using asset_hazard_distance=%d km instead of %d km',
- haz_distance, asset_hazard_distance)
+ logging.debug('Using asset_hazard_distance=%d km instead of %d km',
+ haz_distance, asset_hazard_distance)
else:
haz_distance = asset_hazard_distance | Less logging [ci skip] |
diff --git a/drizzlepac/align.py b/drizzlepac/align.py
index <HASH>..<HASH> 100644
--- a/drizzlepac/align.py
+++ b/drizzlepac/align.py
@@ -362,8 +362,7 @@ def perform_align(input_list, catalog_list, num_sources, archive=False, clobber=
index = np.where(alignment_table.filtered_table['imageName'] == imgname)[0][0]
# First ensure sources were found
-
- if table is None or not table[1]:
+ if table is None:
log.warning("No sources found in image {}".format(imgname))
alignment_table.filtered_table[:]['status'] = 1
alignment_table.filtered_table[:]['processMsg'] = "No sources found" | Remove logic from align (#<I>) |
diff --git a/src/LiteCQRS/Plugin/CRUD/CrudCreatable.php b/src/LiteCQRS/Plugin/CRUD/CrudCreatable.php
index <HASH>..<HASH> 100644
--- a/src/LiteCQRS/Plugin/CRUD/CrudCreatable.php
+++ b/src/LiteCQRS/Plugin/CRUD/CrudCreatable.php
@@ -11,7 +11,7 @@ trait CrudCreatable
$this->apply(new ResourceCreatedEvent(array(
'class' => get_class($this),
'id' => $this->id,
- 'data' => $this->data,
+ 'data' => $data,
)));
}
diff --git a/src/LiteCQRS/Plugin/CRUD/CrudUpdatable.php b/src/LiteCQRS/Plugin/CRUD/CrudUpdatable.php
index <HASH>..<HASH> 100644
--- a/src/LiteCQRS/Plugin/CRUD/CrudUpdatable.php
+++ b/src/LiteCQRS/Plugin/CRUD/CrudUpdatable.php
@@ -11,7 +11,7 @@ trait CrudUpdatable
$this->apply(new ResourceUpdatedEvent(array(
'class' => get_class($this),
'id' => $this->id,
- 'data' => $this->data,
+ 'data' => $data,
)));
} | Fix create() and update() methods for Crud traits, missed in [PR-<I>] |
diff --git a/backoff.go b/backoff.go
index <HASH>..<HASH> 100644
--- a/backoff.go
+++ b/backoff.go
@@ -30,6 +30,8 @@ func (b *Backoff) Duration() time.Duration {
return d
}
+const maxInt64 = float64(math.MaxInt64 - 512)
+
// ForAttempt returns the duration for a specific attempt. This is useful if
// you have a large number of independent Backoffs, but don't want use
// unnecessary memory storing the Backoff parameters per Backoff. The first
@@ -51,7 +53,6 @@ func (b *Backoff) ForAttempt(attempt float64) time.Duration {
// short-circuit
return max
}
-
factor := b.Factor
if factor <= 0 {
factor = 2
@@ -62,9 +63,15 @@ func (b *Backoff) ForAttempt(attempt float64) time.Duration {
if b.Jitter {
durf = rand.Float64()*(durf-minf) + minf
}
+ //ensure float64 wont overflow int64
+ if durf > maxInt64 {
+ return max
+ }
dur := time.Duration(durf)
- if dur > max {
- //cap!
+ //keep within bounds
+ if dur < min {
+ return min
+ } else if dur > max {
return max
}
return dur | validate float for integer overflow (closes #<I>) and add missing min-bound |
diff --git a/config/api-tester.php b/config/api-tester.php
index <HASH>..<HASH> 100644
--- a/config/api-tester.php
+++ b/config/api-tester.php
@@ -44,7 +44,6 @@ return [
Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
Illuminate\Session\Middleware\StartSession::class,
Illuminate\View\Middleware\ShareErrorsFromSession::class,
- Illuminate\Foundation\Http\Middleware\VerifyCsrfToken::class,
],
/* | Remove CSRF check for api-tester. Unneeded. |
diff --git a/BackofficeBundle/Controller/TreeController.php b/BackofficeBundle/Controller/TreeController.php
index <HASH>..<HASH> 100644
--- a/BackofficeBundle/Controller/TreeController.php
+++ b/BackofficeBundle/Controller/TreeController.php
@@ -51,7 +51,7 @@ class TreeController extends Controller
*/
public function showContentTypeForContentAction()
{
- $contentTypes = $this->get('php_orchestra_model.repository.content_type')->findAll();
+ $contentTypes = $this->get('php_orchestra_model.repository.content_type')->findAllByDeletedInLastVersion();
return $this->render(
'PHPOrchestraBackofficeBundle:Tree:showContentTypeForContent.html.twig', | find contentType in last version in the editorial tree |
diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py
index <HASH>..<HASH> 100644
--- a/pyrogram/client/client.py
+++ b/pyrogram/client/client.py
@@ -2231,12 +2231,12 @@ class Client:
If the message is a reply, ID of the original message
Returns:
- On success, the sent Message is returned.
+ On success, the sent :obj:`Message <pyrogram.Message>` is returned.
Raises:
:class:`Error <pyrogram.Error>`
"""
- return self.send(
+ r = self.send(
functions.messages.SendMedia(
peer=self.resolve_peer(chat_id),
media=types.InputMediaVenue(
@@ -2257,6 +2257,13 @@ class Client:
)
)
+ for i in r.updates:
+ if isinstance(i, (types.UpdateNewMessage, types.UpdateNewChannelMessage)):
+ users = {i.id: i for i in r.users}
+ chats = {i.id: i for i in r.chats}
+
+ return message_parser.parse_message(self, i.message, users, chats)
+
def send_contact(self,
chat_id: int or str,
phone_number: str, | Make send_venue return the new type |
diff --git a/rivets-backbone.js b/rivets-backbone.js
index <HASH>..<HASH> 100644
--- a/rivets-backbone.js
+++ b/rivets-backbone.js
@@ -21,7 +21,7 @@
/**
* Resolves path chain
*
- * for a, 'b.c.d' returns {model: a.b.c, key:'d'}
+ * for a, 'b:c:d' returns {model: a:b:c, key:'d'}
*
* @param {Model} model
* @param {String} keypath
@@ -29,7 +29,7 @@
* @returns {{model: Model, key: String}}
*/
function getKeyPathRoot(model, keypath) {
- keypath = keypath.split('.');
+ keypath = keypath.split(':');
while (keypath.length > 1) {
model = model.get(keypath.shift());
@@ -124,12 +124,10 @@
}
// Configure rivets data-bind for Backbone.js
- rivets.configure({
- adapter: {
- subscribe: onOffFactory('on'),
- unsubscribe: onOffFactory('off'),
- read: read,
- publish: publish
- }
- });
+ rivets.adapters[':'] = {
+ subscribe: onOffFactory('on'),
+ unsubscribe: onOffFactory('off'),
+ read: read,
+ publish: publish
+ };
}); | adaptation for rivets <I> |
diff --git a/src/flags.py b/src/flags.py
index <HASH>..<HASH> 100644
--- a/src/flags.py
+++ b/src/flags.py
@@ -108,7 +108,6 @@ def _extract_member_definitions_from_class_attributes(class_dict):
return members
-# TODO: extract a FlagCreateParams from FlagProperties and use that when that is enough
class FlagProperties:
__slots__ = ('name', 'data', 'bits', 'index', 'index_without_aliases', 'readonly')
@@ -125,7 +124,10 @@ class FlagProperties:
raise AttributeError("Attribute '%s' of '%s' object is readonly." % (key, type(self).__name__))
super().__setattr__(key, value)
- # FIXME: bug: missing __delattr__
+ def __delattr__(self, key):
+ if getattr(self, 'readonly', False):
+ raise AttributeError("Can't delete readonly attribute '%s' of '%s' object." % (key, type(self).__name__))
+ super().__delattr__(key)
_readonly_protected_flags_class_attributes = { | bugfix: added the missing FlagProperties.__delattr__ |
diff --git a/pages/calendar/index.js b/pages/calendar/index.js
index <HASH>..<HASH> 100644
--- a/pages/calendar/index.js
+++ b/pages/calendar/index.js
@@ -116,10 +116,7 @@ const CalendarDemo = () => {
</div>
<div className="field col-12 md:col-4">
<label htmlFor="time24">Time / 24h</label>
- <Calendar id="time24" value={date7} onChange={(e) => {
- setDate7(e.value)
- console.log('onChange')
- }} showTime showSeconds />
+ <Calendar id="time24" value={date7} onChange={(e) => setDate7(e.value)} showTime showSeconds />
</div>
<div className="field col-12 md:col-4">
<label htmlFor="time12">Time / 12h</label> | Removed console.log from CalendarDemo |
diff --git a/tests/test_modules/test_ADAndor/test_andordriverpart.py b/tests/test_modules/test_ADAndor/test_andordriverpart.py
index <HASH>..<HASH> 100644
--- a/tests/test_modules/test_ADAndor/test_andordriverpart.py
+++ b/tests/test_modules/test_ADAndor/test_andordriverpart.py
@@ -423,3 +423,16 @@ class TestAndorDetectorDriverPart(ChildTestCase):
exposure=exposure,
frames_per_step=2,
)
+
+ def test_validate_succeeds_without_tweaking_for_positive_exposure(self):
+ generator = self._get_static_generator(1.0)
+ exposure = 0.5
+
+ # Set the readout time
+ self.set_attributes(self.child, andorReadoutTime=0.1)
+
+ tweaks = self.andor_driver_part.on_validate(
+ self.context, generator, exposure=exposure
+ )
+
+ assert tweaks is None | AndorDriverPart: improve test coverage |
diff --git a/Test/Unit/Parsing/PHPTester.php b/Test/Unit/Parsing/PHPTester.php
index <HASH>..<HASH> 100644
--- a/Test/Unit/Parsing/PHPTester.php
+++ b/Test/Unit/Parsing/PHPTester.php
@@ -1012,7 +1012,9 @@ class PHPTester {
return preg_replace('/^ \* /', '', $line);
}, $docblock_lines);
- Assert::assertContains($line, $docblock_lines);
+ // Work around assertContains() not outputting the array on failure by
+ // putting it in the message.
+ Assert::assertContains($line, $docblock_lines, "The line '{$line}' was found in the docblock lines: " . print_r($docblock_lines, TRUE));
}
/** | Fixed assertDocblockHasLine() not outputting searched array in failure message. |
diff --git a/core/src/rabird/__init__.py b/core/src/rabird/__init__.py
index <HASH>..<HASH> 100644
--- a/core/src/rabird/__init__.py
+++ b/core/src/rabird/__init__.py
@@ -5,7 +5,7 @@ __import__('pkg_resources').declare_namespace(__name__)
import sys
-version_info = (0, 0, 7)
+version_info = (0, 0, 8)
__version__ = '.'.join(map(str, version_info))
__monkey_patched = False
diff --git a/core/src/rabird/datetime.py b/core/src/rabird/datetime.py
index <HASH>..<HASH> 100644
--- a/core/src/rabird/datetime.py
+++ b/core/src/rabird/datetime.py
@@ -87,7 +87,10 @@ def __get_cpu_ticks_max_win32():
return 0xFFFFFFFF
def __get_cpu_ticks_win32():
- return win32api.GetTickCount()
+ # FIXED: win32api.GetTickCount()'s value will be converted to an 32bits
+ # integer ! It must be DWORD not integer! We convert it back to unsigned
+ # value.
+ return (win32api.GetTickCount() + 0x100000000) % 0x100000000
def __get_cpu_ticks_per_second_unix():
return 100 | Fixed result of win<I>api.GetTickCount() will be converted to an <I>bits signed integer! We convert it back to dword value! |
diff --git a/blockstack/lib/client.py b/blockstack/lib/client.py
index <HASH>..<HASH> 100644
--- a/blockstack/lib/client.py
+++ b/blockstack/lib/client.py
@@ -3496,6 +3496,15 @@ def resolve_profile(name, include_expired=False, include_name_record=False, host
profile_data = jwt['payload']['claim']
public_key = str(jwt['payload']['issuer']['publicKey'])
+ # return public key that matches address
+ pubkeys = [virtualchain.ecdsalib.ecdsa_public_key(keylib.key_formatting.decompress(public_key)),
+ virtualchain.ecdsalib.ecdsa_public_key(keylib.key_formatting.compress(public_key))]
+
+ if name_rec['address'] == pubkeys[0].address():
+ public_key = pubkeys[0].to_hex()
+ else:
+ public_key = pubkeys[1].to_hex()
+
ret = {
'profile': profile_data,
'zonefile': zonefile_txt, | use the right public key that matches the owner address |
diff --git a/Backtrace.php b/Backtrace.php
index <HASH>..<HASH> 100644
--- a/Backtrace.php
+++ b/Backtrace.php
@@ -151,7 +151,7 @@ class QM_Backtrace {
$trace = array_map( array( $this, 'filter_trace' ), $this->trace );
$trace = array_values( array_filter( $trace ) );
- if ( empty( $trace ) ) {
+ if ( empty( $trace ) && !empty($this->trace) ) {
$lowest = $this->trace[0];
$file = QM_Util::standard_dir( $lowest['file'], '' );
$lowest['calling_file'] = $lowest['file']; | Added a test to make sure ->trace is not empty. Was causing issues in HHVM. |
diff --git a/test/unit/ComparatorTest.php b/test/unit/ComparatorTest.php
index <HASH>..<HASH> 100644
--- a/test/unit/ComparatorTest.php
+++ b/test/unit/ComparatorTest.php
@@ -15,7 +15,7 @@ final class ComparatorTest extends TestCase
public function testCompare(): void
{
$reflectorFactory = new DirectoryReflectorFactory();
- self::assertSame(
+ self::assertEquals(
[
'[BC] Parameter something in Thing::__construct has been deleted',
'[BC] Method methodGone in class Thing has been deleted', | Use assertEquals for comparing arrays because order doesn't matter |
diff --git a/lib/faraday/adapter/net_http.rb b/lib/faraday/adapter/net_http.rb
index <HASH>..<HASH> 100644
--- a/lib/faraday/adapter/net_http.rb
+++ b/lib/faraday/adapter/net_http.rb
@@ -4,6 +4,7 @@ rescue LoadError
warn "Warning: no such file to load -- net/https. Make sure openssl is installed if you want ssl support"
require 'net/http'
end
+require 'zlib'
module Faraday
class Adapter | Require zlib for Ruby <I>
In Ruby <I>, zlib is required by net/http but this is not the case in
Ruby <I>, causing a NameError (uninitialized constant
Faraday::Adapter::NetHttp::Zlib). |
diff --git a/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/command_headers.go b/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/command_headers.go
index <HASH>..<HASH> 100644
--- a/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/command_headers.go
+++ b/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/command_headers.go
@@ -48,8 +48,8 @@ func (c *CommandHeaderRoundTripper) RoundTrip(req *http.Request) (*http.Response
return c.Delegate.RoundTrip(req)
}
-// ParseCommandHeaders fills in a map of X-Headers into the CommandHeaderRoundTripper. These
-// headers are then filled into each request. For details on X-Headers see:
+// ParseCommandHeaders fills in a map of custom headers into the CommandHeaderRoundTripper. These
+// headers are then filled into each request. For details on the custom headers see:
// https://github.com/kubernetes/enhancements/tree/master/keps/sig-cli/859-kubectl-headers
// Each call overwrites the previously parsed command headers (not additive).
// TODO(seans3): Parse/add flags removing PII from flag values. | nit: Update comment to match headers change. |
diff --git a/vault/generate_root.go b/vault/generate_root.go
index <HASH>..<HASH> 100644
--- a/vault/generate_root.go
+++ b/vault/generate_root.go
@@ -39,11 +39,11 @@ type GenerateRootStrategy interface {
type generateStandardRootToken struct{}
func (g generateStandardRootToken) authenticate(ctx context.Context, c *Core, combinedKey []byte) error {
- _, err := c.unsealKeyToMasterKey(ctx, combinedKey)
+ masterKey, err := c.unsealKeyToMasterKey(ctx, combinedKey)
if err != nil {
return errwrap.Wrapf("unable to authenticate: {{err}}", err)
}
- if err := c.barrier.VerifyMaster(combinedKey); err != nil {
+ if err := c.barrier.VerifyMaster(masterKey); err != nil {
return errwrap.Wrapf("master key verification failed: {{err}}", err)
} | Fix a regression introduced in #<I> that breaks root token generation. (#<I>) |
diff --git a/lib/mementus/pipeline/step.rb b/lib/mementus/pipeline/step.rb
index <HASH>..<HASH> 100644
--- a/lib/mementus/pipeline/step.rb
+++ b/lib/mementus/pipeline/step.rb
@@ -58,7 +58,7 @@ module Mementus
end
end
- # Returns the first element in the sequence.
+ # Returns the first value in the sequence.
def first
to_enum.first
end | Make noun consistent in method docs |
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index <HASH>..<HASH> 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -1545,16 +1545,17 @@ class ProjectPipelineManager(RetrieveMixin, CreateMixin, RESTManager):
return CreateMixin.create(self, data, path=path, **kwargs)
-class ProjectSnippetNote(RESTObject):
+class ProjectSnippetNote(SaveMixin, ObjectDeleteMixin, RESTObject):
_constructor_types = {'author': 'User'}
-class ProjectSnippetNoteManager(RetrieveMixin, CreateMixin, RESTManager):
+class ProjectSnippetNoteManager(CRUDMixin, RESTManager):
_path = '/projects/%(project_id)s/snippets/%(snippet_id)s/notes'
_obj_cls = ProjectSnippetNote
_from_parent_attrs = {'project_id': 'project_id',
'snippet_id': 'id'}
_create_attrs = (('body', ), tuple())
+ _update_attrs = (('body', ), tuple())
class ProjectSnippet(SaveMixin, ObjectDeleteMixin, RESTObject): | Snippet notes support all the CRUD methods
Fixes #<I> |
diff --git a/lib/mongoid/version.rb b/lib/mongoid/version.rb
index <HASH>..<HASH> 100644
--- a/lib/mongoid/version.rb
+++ b/lib/mongoid/version.rb
@@ -1,4 +1,4 @@
# encoding: utf-8
module Mongoid #:nodoc
- VERSION = "2.0.0.beta.14"
+ VERSION = "2.0.0.beta.15"
end | Updating version to beta <I> |
diff --git a/src/position.js b/src/position.js
index <HASH>..<HASH> 100644
--- a/src/position.js
+++ b/src/position.js
@@ -75,9 +75,10 @@ var Position = Class(null, /** @lends Position.prototype */ {
* Position parent nodes of the NOI
*/
_positionParents: function() {
+ const top = this.noi.parentStack.length - 1;
this.noi.parentStack.forEach((node, index) => {
node.x = this.noi.x;
- node.y = index;
+ node.y = top - index;
});
}, | fix: positioning of parent nodes
Before this fix parent nodes were positioned in reverse order, i.e. the
NOI's parent was the top most node, under them was his parent and so on. |
diff --git a/hamster_lib/backends/sqlalchemy/storage.py b/hamster_lib/backends/sqlalchemy/storage.py
index <HASH>..<HASH> 100644
--- a/hamster_lib/backends/sqlalchemy/storage.py
+++ b/hamster_lib/backends/sqlalchemy/storage.py
@@ -948,21 +948,15 @@ class FactManager(storage.BaseFactManager):
"""
start, end = fact.start, fact.end
query = self.store.session.query(AlchemyFact)
- query = query.filter(or_(
- and_(AlchemyFact.start >= start, AlchemyFact.start <= end),
- and_(AlchemyFact.end >= start, AlchemyFact.end <= end),
- and_(AlchemyFact.start <= start, AlchemyFact.end >= start),
- ))
- facts_in_timeframe = query.all()
- # Check if passed fact is the only element of the returned list.
- result = not bool(facts_in_timeframe)
- if fact.pk and len(facts_in_timeframe) == 1:
- if facts_in_timeframe[0].pk == fact.pk:
- result = True
- else:
- result = False
- return result
+ condition = and_(AlchemyFact.start < end, AlchemyFact.end > start)
+
+ if fact.pk:
+ condition = and_(condition, AlchemyFact.pk != fact.pk)
+
+ query = query.filter(condition)
+
+ return not bool(query.count())
def _add(self, fact, raw=False):
""" | Refactor timeframe availability check as per suggestion |
diff --git a/lib/events-ha-node.js b/lib/events-ha-node.js
index <HASH>..<HASH> 100644
--- a/lib/events-ha-node.js
+++ b/lib/events-ha-node.js
@@ -230,6 +230,8 @@ class EventsHaNode extends EventsNode {
triggerNode() {}
updateHomeAssistant() {
+ if (!this.isIntegrationLoaded) return;
+
const message = {
type: 'nodered/entity',
server_id: this.nodeConfig.server.id, | fix(trigger-state): Only update HA when integration is loaded
Fixes: #<I> |
diff --git a/library/Theme/Enqueue.php b/library/Theme/Enqueue.php
index <HASH>..<HASH> 100644
--- a/library/Theme/Enqueue.php
+++ b/library/Theme/Enqueue.php
@@ -49,6 +49,12 @@ class Enqueue
*/
public function style()
{
+ $loadWpJquery = apply_filters('Municipio/load-wp-jquery', false);
+
+ if (!$loadWpJquery) {
+ wp_deregister_script('jquery');
+ }
+
if ((defined('DEV_MODE') && DEV_MODE === true) || (isset($_GET['DEV_MODE']) && $_GET['DEV_MODE'] === 'true')) {
wp_register_style('hbg-prime', '//hbgprime.dev/dist/css/hbg-prime.min.css', '', '1.0.0');
} else { | Do not load wp jquery by default (option enable with filter) |
diff --git a/src/Eris/Generator/Natural.php b/src/Eris/Generator/Natural.php
index <HASH>..<HASH> 100644
--- a/src/Eris/Generator/Natural.php
+++ b/src/Eris/Generator/Natural.php
@@ -30,9 +30,10 @@ class Natural implements Generator
public function shrink($element)
{
- if ($element > 0) {
+ if ($element > $this->lowerLimit) {
$element--;
}
+
return $element;
}
diff --git a/test/Eris/Generator/NaturalTest.php b/test/Eris/Generator/NaturalTest.php
index <HASH>..<HASH> 100644
--- a/test/Eris/Generator/NaturalTest.php
+++ b/test/Eris/Generator/NaturalTest.php
@@ -30,10 +30,9 @@ class NaturalTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($lastValue - 1, $generator->shrink($lastValue));
}
- public function testCannotShrinkBelowZero()
+ public function testCannotShrinkBelowTheLowerLimit()
{
- $generator = new Natural($lowerLimit = 0, $upperLimit = 0);
- $lastValue = $generator();
- $this->assertEquals(0, $generator->shrink($lastValue));
+ $generator = new Natural($lowerLimit = 4, $upperLimit = 10);
+ $this->assertEquals(4, $generator->shrink(4));
}
} | Fixed bug in Generator\Natural shrinking: values were going under the lower limit |
diff --git a/src/Colors/Color.php b/src/Colors/Color.php
index <HASH>..<HASH> 100644
--- a/src/Colors/Color.php
+++ b/src/Colors/Color.php
@@ -103,19 +103,28 @@ class Color
{
return $this->isStyleForced;
}
-
+
/**
- * @link https://github.com/symfony/Console/blob/master/Output/StreamOutput.php#L93-112
+ * Returns true if the stream supports colorization.
+ *
+ * Colorization is disabled if not supported by the stream:
+ *
+ * - Windows without Ansicon and ConEmu
+ * - non tty consoles
+ *
+ * @link https://github.com/symfony/Console/blob/master/Output/StreamOutput.php#L95-L102
* @codeCoverageIgnore
+ *
+ * @return bool true if the stream supports colorization, false otherwise
*/
public function isSupported()
{
- if (DIRECTORY_SEPARATOR === '\\') {
- return false !== getenv('ANSICON');
+ if (DIRECTORY_SEPARATOR == '\\') {
+ return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI');
}
- return function_exists('posix_isatty') && @posix_isatty(STDOUT);
- }
+ return function_exists('posix_isatty') && @posix_isatty($this->stream);
+ }
/**
* @codeCoverageIgnore | synced `isSupported` code with symfony StreamOutput
this effectively adds support for `ConEmuANSI` |
diff --git a/examples/consumergroup/main.go b/examples/consumergroup/main.go
index <HASH>..<HASH> 100644
--- a/examples/consumergroup/main.go
+++ b/examples/consumergroup/main.go
@@ -13,7 +13,7 @@ import (
"github.com/Shopify/sarama"
)
-// Sarma configuration options
+// Sarama configuration options
var (
brokers = ""
version = "" | Update documentation with Sarama instead of Sarma |
diff --git a/tests/Api/FocusTest.php b/tests/Api/FocusTest.php
index <HASH>..<HASH> 100644
--- a/tests/Api/FocusTest.php
+++ b/tests/Api/FocusTest.php
@@ -23,7 +23,6 @@ class FocusTest extends MauticApiTestCase
'style' => 'bar',
'htmlMode' => 1,
'html' => '<div><strong style="color:red">html mode enabled</strong></div>',
- 'css' => '.mf-bar-collapser {border-radius: 0 !important}',
'properties' => array(
'bar' =>
array( | The CSS property had been removed from the focus entity (<URL>) |
diff --git a/src/Illuminate/View/Component.php b/src/Illuminate/View/Component.php
index <HASH>..<HASH> 100644
--- a/src/Illuminate/View/Component.php
+++ b/src/Illuminate/View/Component.php
@@ -3,7 +3,6 @@
namespace Illuminate\View;
use Closure;
-use Illuminate\Support\HtmlString;
use Illuminate\Support\Str;
use ReflectionClass;
use ReflectionMethod;
diff --git a/tests/View/ViewComponentAttributeBagTest.php b/tests/View/ViewComponentAttributeBagTest.php
index <HASH>..<HASH> 100644
--- a/tests/View/ViewComponentAttributeBagTest.php
+++ b/tests/View/ViewComponentAttributeBagTest.php
@@ -2,7 +2,6 @@
namespace Illuminate\Tests\View;
-use Illuminate\View\Component;
use Illuminate\View\ComponentAttributeBag;
use PHPUnit\Framework\TestCase; | Apply fixes from StyleCI (#<I>) |
diff --git a/Model/ImportEpisodeJob.php b/Model/ImportEpisodeJob.php
index <HASH>..<HASH> 100644
--- a/Model/ImportEpisodeJob.php
+++ b/Model/ImportEpisodeJob.php
@@ -30,7 +30,7 @@ class ImportEpisodeJob extends BprsContainerAwareJob {
$remote_episode = $this->serializer->deserialize($response->getBody(), $episode_class, 'json');
$series = $this->media_service->getSeries($remote_episode->getSeries()->getUniqID());
if (!$series) {
- $series = $this->importSeries($episode->getSeries()->getUniqID());
+ $series = $this->importSeries($remote_episode->getSeries()->getUniqID());
}
$episode->setSeries($series); | fixed bug for importing remote series if series does not exist
if series does not exist, the episode has no series. duuh. |
diff --git a/examples/chat/app.js b/examples/chat/app.js
index <HASH>..<HASH> 100644
--- a/examples/chat/app.js
+++ b/examples/chat/app.js
@@ -3,9 +3,15 @@ require.paths.unshift('lib')
require('express')
require('express/plugins')
+var messages = [],
+ utils = require('express/utils'),
+ kiwi = require('kiwi')
+
configure(function(){
var fiveMinutes = 300000,
oneMinute = 60000
+ kiwi.seed('haml')
+ kiwi.seed('sass')
use(MethodOverride)
use(ContentLength)
use(CommonLogger)
@@ -15,9 +21,6 @@ configure(function(){
set('root', __dirname)
})
-var messages = [],
- utils = require('express/utils')
-
get('/', function(){
this.redirect('/chat')
})
diff --git a/examples/upload/app.js b/examples/upload/app.js
index <HASH>..<HASH> 100644
--- a/examples/upload/app.js
+++ b/examples/upload/app.js
@@ -3,7 +3,11 @@ require.paths.unshift('lib')
require('express')
require('express/plugins')
+var kiwi = require('kiwi')
+
configure(function(){
+ kiwi.seed('haml')
+ kiwi.seed('sass')
use(MethodOverride)
use(ContentLength)
use(CommonLogger) | Added kiwi.seed() calls to make them available via require()
This is needed since the view plugin uses
the regular require() and not kiwi.require() |
diff --git a/Classes/Neos/Neos/Ui/Aspects/AugmentationAspect.php b/Classes/Neos/Neos/Ui/Aspects/AugmentationAspect.php
index <HASH>..<HASH> 100644
--- a/Classes/Neos/Neos/Ui/Aspects/AugmentationAspect.php
+++ b/Classes/Neos/Neos/Ui/Aspects/AugmentationAspect.php
@@ -103,7 +103,7 @@ class AugmentationAspect
/**
* Hooks into standard content element wrapping to render those attributes needed for the package to identify
- * nodes and typoScript paths
+ * nodes and Fusion paths
*
* @Flow\Around("method(Neos\Neos\Service\ContentElementWrappingService->wrapContentObject())")
* @param JoinPointInterface $joinPoint the join point | TASK: Replace typoScript with Fusion in comment |
diff --git a/persim/persim.py b/persim/persim.py
index <HASH>..<HASH> 100644
--- a/persim/persim.py
+++ b/persim/persim.py
@@ -17,6 +17,7 @@ class PersImage(BaseEstimator):
specs=None,
kernel_type="gaussian",
weighting_type="linear",
+ verbose=True,
):
""" Initialize a persistence image generator.
@@ -31,12 +32,12 @@ class PersImage(BaseEstimator):
self.pixels = pixels
self.N = int(np.sqrt(pixels))
-
- print(
- 'PersImage(pixels={}, spread={}, specs={}, kernel_type="{}", weighting_type="{}")'.format(
- pixels, spread, specs, kernel_type, weighting_type
+ if verbose:
+ print(
+ 'PersImage(pixels={}, spread={}, specs={}, kernel_type="{}", weighting_type="{}")'.format(
+ pixels, spread, specs, kernel_type, weighting_type
+ )
)
- )
def transform(self, diagrams):
""" Convert diagram or list of diagrams to a persistence image | Update persim.py
Add verbose option so users can disable printing on object creation |
diff --git a/src/HtmlElement.php b/src/HtmlElement.php
index <HASH>..<HASH> 100644
--- a/src/HtmlElement.php
+++ b/src/HtmlElement.php
@@ -30,9 +30,9 @@ class HtmlElement
*
* @return string
*/
- public static function render(string $tag, $attributes = null, $content = null) : string
+ public static function render(string $tag, $attributes = null, $contents = null) : string
{
- return (new static(func_get_args()))->renderTag();
+ return (new static([$tag, $attributes, $contents]))->renderTag();
}
protected function __construct(array $arguments) | Scrutinizer nitpicks |
diff --git a/container/src/main/java/org/jboss/forge/furnace/impl/addons/AddonLifecycleManager.java b/container/src/main/java/org/jboss/forge/furnace/impl/addons/AddonLifecycleManager.java
index <HASH>..<HASH> 100644
--- a/container/src/main/java/org/jboss/forge/furnace/impl/addons/AddonLifecycleManager.java
+++ b/container/src/main/java/org/jboss/forge/furnace/impl/addons/AddonLifecycleManager.java
@@ -177,7 +177,7 @@ public class AddonLifecycleManager
master.merge(graph);
logger.log(Level.FINE, " ------------ MASTER GRAPH v" + i++ + "------------ ");
- logger.log(Level.INFO, master.toString());
+ logger.log(Level.FINE, master.toString());
}
MasterGraph last = stateManager.getCurrentGraph(); | Don't log the incremental Addon graphs unless FINE logging is requested. |
diff --git a/src/registry/registry.js b/src/registry/registry.js
index <HASH>..<HASH> 100644
--- a/src/registry/registry.js
+++ b/src/registry/registry.js
@@ -142,8 +142,8 @@ module.exports = {
publish: function(args) {
return initSettings()
.then(function(settings) {
- var p = manifest.generatePackageJsonFromPluginXml(args[0]);
- p.then(function() {
+ return manifest.generatePackageJsonFromPluginXml(args[0])
+ .then(function() {
return Q.ninvoke(npm, 'load', settings);
}).then(function() {
return Q.ninvoke(npm.commands, 'publish', args) | CB-<I> Fix incorrect "success" message when publishing fails.
Problem was introduced by promise refactoring. |
diff --git a/src/SlugGenerator.php b/src/SlugGenerator.php
index <HASH>..<HASH> 100644
--- a/src/SlugGenerator.php
+++ b/src/SlugGenerator.php
@@ -343,7 +343,7 @@ class SlugGenerator
.'$AE > AE;'
.'$OE > OE;'
.'$UE > UE;'
- .'::Latin-ASCII;'
+ .'::Latin-ASCII;' // Any-ASCII is not available in older CLDR versions
;
} | Document the difference to the original de-ASCII rule |
diff --git a/test/kernel_test.rb b/test/kernel_test.rb
index <HASH>..<HASH> 100644
--- a/test/kernel_test.rb
+++ b/test/kernel_test.rb
@@ -2506,4 +2506,52 @@ describe Hanami::Utils::Kernel do
end
end
end
+
+ describe '.numeric?' do
+ describe 'successful operations' do
+ before do
+ @result = Hanami::Utils::Kernel.numeric?(input)
+ end
+
+ describe 'when a numeric in symbol is given' do
+ let(:input) { :'123' }
+
+ it 'returns a true' do
+ @result.wont_equal nil
+ end
+ end
+
+ describe 'when a symbol is given' do
+ let(:input) { :hello }
+
+ it 'returns false' do
+ @result.must_equal nil
+ end
+ end
+
+ describe 'when a numeric in string is given' do
+ let(:input) { '123' }
+
+ it 'returns a symbol' do
+ @result.wont_equal nil
+ end
+ end
+
+ describe 'when a string is given' do
+ let(:input) { 'hello' }
+
+ it 'returns a symbol' do
+ @result.must_equal nil
+ end
+ end
+
+ describe 'when a numeric is given' do
+ let(:input) { 123 }
+
+ it 'returns a symbol' do
+ @result.wont_equal nil
+ end
+ end
+ end
+ end
end | Add missing tests for Kernel#numeric? method |
diff --git a/Eloquent/Builder.php b/Eloquent/Builder.php
index <HASH>..<HASH> 100644
--- a/Eloquent/Builder.php
+++ b/Eloquent/Builder.php
@@ -108,6 +108,19 @@ class Builder {
}
/**
+ * Pluck a single column from the database.
+ *
+ * @param string $column
+ * @return mixed
+ */
+ public function pluck($column)
+ {
+ $result = $this->first(array($column));
+
+ if ($result) return $result->{$column};
+ }
+
+ /**
* Get an array with the values of a given column.
*
* @param string $column | Using `pluck` on Eloquent queries will now call accessors. Fixes #<I>. |
diff --git a/lib/base/components.js b/lib/base/components.js
index <HASH>..<HASH> 100644
--- a/lib/base/components.js
+++ b/lib/base/components.js
@@ -29,12 +29,10 @@ exports.define = {
if (!type) {
return val
}
- console.error('yo!', type)
let result = lookUpComponent(this, type, val, this.ChildType || this.ChildConstructor)
if (result) {
let r = new result.Constructor(val, event, this, key) //, this, key, escape)
if (!r.useVal) {
- // need to clean this up integrate this function into useval much better
r.useVal = true
}
return r | added ChildType -- type overwrite system |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -369,7 +369,8 @@ function chmod(p, mode = '0777'){
if (!isExist(p)) {
return false;
}
- return fs.chmodSync(p, mode);
+ fs.chmodSync(p, mode);
+ return true;
}
exports.chmod = chmod; | return true for chmod method when file is exist |
diff --git a/structs.go b/structs.go
index <HASH>..<HASH> 100644
--- a/structs.go
+++ b/structs.go
@@ -13,9 +13,7 @@ package discordgo
import (
"encoding/json"
- "fmt"
"net"
- "strings"
"sync"
"time"
@@ -27,9 +25,8 @@ import (
// Debug : If set to ture debug logging will be displayed.
type Session struct {
// General configurable settings.
- Token string // Authentication token for this session
- Debug bool // Debug for printing JSON request/responses
- AutoMention bool // if set to True, ChannelSendMessage will auto mention <@ID>
+ Token string // Authentication token for this session
+ Debug bool // Debug for printing JSON request/responses
// Settable Callback functions for Websocket Events
OnEvent func(*Session, Event) // should Event be *Event?
@@ -85,7 +82,7 @@ type Session struct {
VEndpoint string
VGuildID string
VChannelID string
- Vop2 VoiceOP2
+ Vop2 voiceOP2
UDPConn *net.UDPConn
// Managed state object, updated with events. | Removed unused AutoMention, renamed VoiceOP2 |
diff --git a/lib/substation.rb b/lib/substation.rb
index <HASH>..<HASH> 100644
--- a/lib/substation.rb
+++ b/lib/substation.rb
@@ -8,8 +8,8 @@ require 'concord'
# Sustation can be thought of as a domain level request router. It assumes
# that every usecase in your application has a name and is implemented in a
-# dedicated class that will be referred to as an *action* for the purposes of
-# this document. The only protocol such actions must support is `#call(request)`.
+# dedicated class that will be referred to as an *action* in the context of
+# substation. The only protocol such actions must support is `#call(request)`.
#
# Actions can be registered under any given name which allows above
# layers to invoke any specific action if respective conditions are met. | [ci skip] Change wording to better suit code docs |
diff --git a/src/OAuth2/Response/AuthenticationError.php b/src/OAuth2/Response/AuthenticationError.php
index <HASH>..<HASH> 100644
--- a/src/OAuth2/Response/AuthenticationError.php
+++ b/src/OAuth2/Response/AuthenticationError.php
@@ -8,9 +8,9 @@ class OAuth2_Response_AuthenticationError extends OAuth2_Response_Error
public function __construct($statusCode, $error, $errorDescription, $tokenType, $realm, $scope = null)
{
parent::__construct($statusCode, $error, $errorDescription);
- $authHeader = sprintf('%s realm=%s', $tokenType, $realm);
+ $authHeader = sprintf('%s realm="%s"', $tokenType, $realm);
if ($scope) {
- $authHeader = sprintf('%s, scope=%s', $authHeader, $scope);
+ $authHeader = sprintf('%s, scope="%s"', $authHeader, $scope);
}
$this->setHttpHeader('WWW-Authenticate', $authHeader);
} | Place the realm & scope values in ""
- On Android, the lack of "" caused the Java to throw exceptions when
trying to read the response code (Android assumes that when we have a
response code like <I> we have the WWW-Authenticate header set) ... also
... it seems that Android is very particlular about the ""
- Most examples from the specs have the values of realm in "" i.e.
- - <URL> |
diff --git a/photutils/utils/colormaps.py b/photutils/utils/colormaps.py
index <HASH>..<HASH> 100644
--- a/photutils/utils/colormaps.py
+++ b/photutils/utils/colormaps.py
@@ -43,8 +43,8 @@ def random_cmap(ncolors=256, background_color='black', random_state=None):
h = prng.uniform(low=0.0, high=1.0, size=ncolors)
s = prng.uniform(low=0.2, high=0.7, size=ncolors)
v = prng.uniform(low=0.5, high=1.0, size=ncolors)
- hsv = np.transpose(np.array([h, s, v]))
- rgb = colors.hsv_to_rgb(hsv)
+ hsv = np.dstack((h, s, v))
+ rgb = np.squeeze(colors.hsv_to_rgb(hsv))
if background_color is not None:
if background_color not in colors.cnames: | Modify random_cmap to work with matplotlib <I> |
diff --git a/components/link/link.js b/components/link/link.js
index <HASH>..<HASH> 100644
--- a/components/link/link.js
+++ b/components/link/link.js
@@ -97,7 +97,7 @@ export function linkHOC(ComposedComponent) {
type="button"
{...props}
className={classes}
- data-test="ring-link"
+ data-test={dataTests('ring-link', dataTest)}
>{this.getChildren()}</button>
);
} | RG-<I> concat data-test for link with "button" tag as well |
diff --git a/src/bundle/Resources/public/js/scripts/admin.content.tree.js b/src/bundle/Resources/public/js/scripts/admin.content.tree.js
index <HASH>..<HASH> 100644
--- a/src/bundle/Resources/public/js/scripts/admin.content.tree.js
+++ b/src/bundle/Resources/public/js/scripts/admin.content.tree.js
@@ -1,4 +1,4 @@
-(function(global, doc, React, ReactDOM, eZ, localStorage) {
+(function (global, doc, React, ReactDOM, eZ, localStorage) {
const KEY_CONTENT_TREE_EXPANDED = 'ez-content-tree-expanded';
const CLASS_CONTENT_TREE_EXPANDED = 'ez-content-tree-container--expanded';
const CLASS_CONTENT_TREE_ANIMATE = 'ez-content-tree-container--animate';
@@ -12,6 +12,7 @@
const userId = window.eZ.helpers.user.getId();
let frame = null;
const toggleContentTreePanel = () => {
+ doc.activeElement.blur();
contentTreeContainer.classList.toggle(CLASS_CONTENT_TREE_EXPANDED);
contentTreeContainer.classList.add(CLASS_CONTENT_TREE_ANIMATE);
btn.classList.toggle(CLASS_BTN_CONTENT_TREE_EXPANDED); | EZP-<I>: removed focus after content tree expanded (#<I>) |
diff --git a/lib/duration.js b/lib/duration.js
index <HASH>..<HASH> 100644
--- a/lib/duration.js
+++ b/lib/duration.js
@@ -9,7 +9,7 @@ var d = require('d/d')
, mfloor = require('es5-ext/date/#/floor-month')
, yfloor = require('es5-ext/date/#/floor-year')
, toInteger = require('es5-ext/number/to-integer')
- , toUint = require('es5-ext/number/to-uint')
+ , toPosInt = require('es5-ext/number/to-pos-integer')
, abs = Math.abs
@@ -101,7 +101,7 @@ Duration.prototype = Object.create(Object.prototype, {
if (pattern == null) pattern = 0;
if (isNaN(pattern)) return format.call(this, pattern);
pattern = Number(pattern);
- threshold = toUint(arguments[1]);
+ threshold = toPosInt(arguments[1]);
s = "";
if (pattern === 1) {
if (threshold-- <= 0) s += abs(last = this.millisecond) + "ms"; | Update up to changes in es5-ext |
diff --git a/lib/appenders/consoleappender.js b/lib/appenders/consoleappender.js
index <HASH>..<HASH> 100644
--- a/lib/appenders/consoleappender.js
+++ b/lib/appenders/consoleappender.js
@@ -71,7 +71,6 @@ define(function (require) {
message[message.length-1] = lastMsg.substring(0, lastMsg.length - 1);
}
}
- console.log(message);
this.doAppendMessages(level, message);
}
}; | ConsoleAppender: dropped temp debug "console.log" call (sigh)
The call had been introduced to trace the execution of the appender
while implementing support for "appendStrings: false". It's ironic
I suppose to use "console.log" to debug a library meant to help get
rid of these calls. |
diff --git a/osutil/osutil.go b/osutil/osutil.go
index <HASH>..<HASH> 100644
--- a/osutil/osutil.go
+++ b/osutil/osutil.go
@@ -26,7 +26,7 @@ var execPath, execError = executable()
// current process, but there is no guarantee that the path is still
// pointing to the correct executable.
//
-// OpenBSD and Darwin are currently unsupported.
+// OpenBSD is currently unsupported.
func Executable() (string, error) {
return execPath, execError
} | osutil: fix doc now that darwin is supported for Executable
Change-Id: Id3ebd7a2de<I>c<I>ab3e<I>b<I>ecf4e<I>f2d5d |
diff --git a/lib/run-jsdoc.js b/lib/run-jsdoc.js
index <HASH>..<HASH> 100644
--- a/lib/run-jsdoc.js
+++ b/lib/run-jsdoc.js
@@ -12,7 +12,7 @@ var path = require('path')
, log = require('npmlog')
, run = require('./run')
-var jsdocpackfile = require.resolve('../node_modules/jsdoc/package.json')
+var jsdocpackfile = path.join(__dirname, '..', 'node_modules', 'jsdoc', 'package.json')
, jsdocpack = require(jsdocpackfile)
, jsdoc = path.resolve(path.dirname(jsdocpackfile), jsdocpack.bin.jsdoc) | attempt at fixing jsdoc resolve |
diff --git a/lib/sensu/api.rb b/lib/sensu/api.rb
index <HASH>..<HASH> 100644
--- a/lib/sensu/api.rb
+++ b/lib/sensu/api.rb
@@ -143,14 +143,14 @@ module Sensu
ahalt 404
end
- def created!(response_json)
+ def created!(response)
status 201
- body response_json
+ body response
end
- def accepted!(response_json)
+ def accepted!(response)
status 202
- body response_json
+ body response
end
def no_content! | let's rename response_json to response |
diff --git a/numina/core/recipereqs.py b/numina/core/recipereqs.py
index <HASH>..<HASH> 100644
--- a/numina/core/recipereqs.py
+++ b/numina/core/recipereqs.py
@@ -28,7 +28,7 @@ class RecipeRequirementsType(MapStoreType):
'''Metaclass for RecipeRequirements.'''
@classmethod
- def exclude(cls, value):
+ def exclude(cls, name, value):
return isinstance(value, Requirement)
@classmethod
diff --git a/numina/core/reciperesult.py b/numina/core/reciperesult.py
index <HASH>..<HASH> 100644
--- a/numina/core/reciperesult.py
+++ b/numina/core/reciperesult.py
@@ -84,7 +84,7 @@ class ErrorRecipeResult(BaseRecipeResult):
class RecipeResultType(MapStoreType):
'''Metaclass for RecipeResult.'''
@classmethod
- def exclude(cls, value):
+ def exclude(cls, name, value):
return isinstance(value, Product)
class RecipeResultAutoQCType(RecipeResultType): | Update exclude to have two arguments as store |
diff --git a/lib/git-runner/base.rb b/lib/git-runner/base.rb
index <HASH>..<HASH> 100644
--- a/lib/git-runner/base.rb
+++ b/lib/git-runner/base.rb
@@ -9,6 +9,7 @@ module GitRunner
def run
begin
+ load_git_runner_gems
Text.begin
if refs && refs.is_a?(Array)
@@ -58,6 +59,11 @@ module GitRunner
private
+ def load_git_runner_gems
+ # Load all additional gems that start with 'git-runner-'
+ Gem::Specification.all.map(&:name).select { |gem| gem =~ /^git-runner-/ }.each { |name| require(name) }
+ end
+
def write_error_log
log_directory = File.join(Configuration.tmp_directory, 'logs')
error_log = File.join(log_directory, Time.now.strftime("%Y%m%d%H%M%S") + '-error.log') | Load all additional gems that start with 'git-runner-' |
diff --git a/src/Composer/Util/RemoteFilesystem.php b/src/Composer/Util/RemoteFilesystem.php
index <HASH>..<HASH> 100644
--- a/src/Composer/Util/RemoteFilesystem.php
+++ b/src/Composer/Util/RemoteFilesystem.php
@@ -308,6 +308,11 @@ class RemoteFilesystem
case STREAM_NOTIFY_AUTH_RESULT:
if (403 === $messageCode) {
+ // Bail if the caller is going to handle authentication failures itself.
+ if (!$this->retryAuthFailure) {
+ break;
+ }
+
$this->promptAuthAndRetry($messageCode, $message);
break;
} | take care of retry-auth-failure:false in case of <I> as well |
diff --git a/tests/scriptTest.php b/tests/scriptTest.php
index <HASH>..<HASH> 100644
--- a/tests/scriptTest.php
+++ b/tests/scriptTest.php
@@ -29,7 +29,7 @@ class scriptTest extends \PHPUnit_Framework_TestCase
$scheme = (new SchemeCollection)->scheme('http')->host('*')->toAdapter(new Http);
$this->resource->setSchemeCollection($scheme);
$result = $this->resource->get->uri('http://rss.excite.co.jp/rss/excite/odd')->eager->request();
- $this->assertSame(200, $result->code);
+ $this->assertSame('200', $result->code);
}
public function testSetSchemeApp() | make response code string (Guzzle 4) |
diff --git a/examples/geolocation.js b/examples/geolocation.js
index <HASH>..<HASH> 100644
--- a/examples/geolocation.js
+++ b/examples/geolocation.js
@@ -8,7 +8,10 @@ goog.require('ol.dom.Input');
goog.require('ol.geom.Point');
goog.require('ol.layer.Tile');
goog.require('ol.source.OSM');
-
+goog.require('ol.style.Circle');
+goog.require('ol.style.Fill');
+goog.require('ol.style.Stroke');
+goog.require('ol.style.Style');
var view = new ol.View({
center: [0, 0],
@@ -57,6 +60,19 @@ var accuracyFeature = new ol.Feature();
accuracyFeature.bindTo('geometry', geolocation, 'accuracyGeometry');
var positionFeature = new ol.Feature();
+positionFeature.setStyle(new ol.style.Style({
+ image: new ol.style.Circle({
+ radius: 6,
+ fill: new ol.style.Fill({
+ color: '#3399CC'
+ }),
+ stroke: new ol.style.Stroke({
+ color: '#fff',
+ width: 2
+ })
+ })
+}));
+
positionFeature.bindTo('geometry', geolocation, 'position')
.transform(function() {}, function(coordinates) {
return coordinates ? new ol.geom.Point(coordinates) : null; | Use a custom style for the position feature |
diff --git a/lib/reterm/init.rb b/lib/reterm/init.rb
index <HASH>..<HASH> 100644
--- a/lib/reterm/init.rb
+++ b/lib/reterm/init.rb
@@ -37,6 +37,7 @@ module RETerm
Ncurses::cbreak
Ncurses::curs_set(0)
Ncurses::keypad(stdscr, true)
+ #Ncurses::set_escdelay(100) # TODO
no_mouse = opts[:nomouse] || (opts.key?(:mouse) && !opts[:mouse])
Ncurses::mousemask(Ncurses::ALL_MOUSE_EVENTS | Ncurses::REPORT_MOUSE_POSITION, []) unless no_mouse | Stub out TODO about setting esc delay (perhaps parameterize) |
diff --git a/src/urh/dev/config.py b/src/urh/dev/config.py
index <HASH>..<HASH> 100644
--- a/src/urh/dev/config.py
+++ b/src/urh/dev/config.py
@@ -81,14 +81,18 @@ DEVICE_CONFIG["AirSpy R2"] = {
"center_freq": dev_range(start=24, stop=1800 * M, step=1),
"sample_rate": [2.5*M, 10*M],
"bandwidth": [2.5*M, 10*M],
- "rx_rf_gain": list(range(0, 41)),
+ "rx_rf_gain": list(range(0, 16)),
+ "rx_if_gain": list(range(0, 16)),
+ "rx_baseband_gain": list(range(0, 16)),
}
DEVICE_CONFIG["AirSpy Mini"] = {
"center_freq": dev_range(start=24, stop=1800 * M, step=1),
"sample_rate": [3*M, 6*M],
"bandwidth": [3*M, 6*M],
- "rx_rf_gain": list(range(0, 41)),
+ "rx_rf_gain": list(range(0, 16)),
+ "rx_if_gain": list(range(0, 16)),
+ "rx_baseband_gain": list(range(0, 16)),
}
DEVICE_CONFIG["Fallback"] = { | consider gain ranges for airspy in config |
diff --git a/app/Core/Models/Post.php b/app/Core/Models/Post.php
index <HASH>..<HASH> 100644
--- a/app/Core/Models/Post.php
+++ b/app/Core/Models/Post.php
@@ -382,7 +382,6 @@ class Post extends Model
*/
private function filter(Builder $query, $dashboard = false)
{
-
foreach ($this->behavior->filters as $filter) {
$filter = new $filter;
@@ -410,5 +409,4 @@ class Post extends Model
return $this->filter($query, true);
}
-
} | Apply fixes from StyleCI (#<I>)
[ci skip] [skip ci] |
diff --git a/resources/assets/js/attachments.js b/resources/assets/js/attachments.js
index <HASH>..<HASH> 100644
--- a/resources/assets/js/attachments.js
+++ b/resources/assets/js/attachments.js
@@ -27,7 +27,7 @@
thumbnail: attachment.thumbnail ? attachment.thumbnail.thumbnail : null
}
- return output = new EJS({element: my.template.get(0)}).render(data);
+ return new EJS({element: my.template.get(0)}).render(data);
},
escape: function(string)
{ | re #<I> Cleanup. |
diff --git a/lib/flapjack/logger.rb b/lib/flapjack/logger.rb
index <HASH>..<HASH> 100644
--- a/lib/flapjack/logger.rb
+++ b/lib/flapjack/logger.rb
@@ -16,7 +16,7 @@ module Flapjack
@log4r_logger = Log4r::Logger.new(name)
- formatter = Log4r::PatternFormatter.new(:pattern => "[%l] %d :: #{name} :: %m",
+ formatter = Log4r::PatternFormatter.new(:pattern => "%d [%l] :: #{name} :: %m",
:date_pattern => "%Y-%m-%dT%H:%M:%S%z")
[Log4r::StdoutOutputter, Log4r::SyslogOutputter].each do |outp_klass|
@@ -54,4 +54,4 @@ module Flapjack
end
-end
\ No newline at end of file
+end | alter logging format so timestamp is first |
diff --git a/addok/core.py b/addok/core.py
index <HASH>..<HASH> 100644
--- a/addok/core.py
+++ b/addok/core.py
@@ -338,7 +338,9 @@ class Search(BaseHelper):
if self.geohash_key:
keys.append(self.geohash_key)
self.debug('Adding geohash %s', self.geohash_key)
- self.autocomplete(self.tokens, skip_commons=True)
+ if len(self.token) > 1:
+ # Do not give priority to autocomplete when only one token.
+ self.autocomplete(self.tokens, skip_commons=True)
if self.bucket_dry:
self.add_to_bucket(keys)
if not self.bucket_empty: | Do not give priority to autocomplete when only one common token
Rationale: "saintes" will never by found |
diff --git a/src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java b/src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java
index <HASH>..<HASH> 100644
--- a/src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java
+++ b/src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java
@@ -301,7 +301,7 @@ public final class ExtendedEmailPublisherDescriptor extends BuildStepDescriptor<
}
props.put("mail.smtp.socketFactory.fallback", "false");
}
- if (acc.getSmtpUsername() != null) {
+ if (!StringUtils.isBlank(acc.getSmtpUsername())) {
props.put("mail.smtp.auth", "true");
}
@@ -322,7 +322,7 @@ public final class ExtendedEmailPublisherDescriptor extends BuildStepDescriptor<
}
private Authenticator getAuthenticator(final MailAccount acc) {
- if (acc == null || acc.getSmtpUsername() == null) {
+ if (acc == null || !StringUtils.isBlank(acc.getSmtpUsername())) {
return null;
}
return new Authenticator() { | Fix JENKINS-<I>
Updated to check for isBlank rather than null for authentication |
diff --git a/src/Dropdown.js b/src/Dropdown.js
index <HASH>..<HASH> 100644
--- a/src/Dropdown.js
+++ b/src/Dropdown.js
@@ -30,8 +30,13 @@ const Dropdown = ({ children, className, trigger, options, ...props }) => {
});
const renderItems = () =>
- Children.map(children, element => {
- if (element.type.name === 'Divider') {
+ Children.map(children.filter(Boolean), element => {
+ if (element.type === 'li') {
+ return element;
+ } else if (
+ element.type.name === 'Divider' ||
+ element.type.displayName === 'Divider'
+ ) {
return <li key={idgen()} className="divider" tabIndex="-1" />;
} else {
return <li key={idgen()}>{element}</li>; | Filter children in dropdown to allow null entries, direct <li/> children, and properly handle Divider in minimized code. |
diff --git a/server/src/main/resources/assets/js/grapes-webApp.js b/server/src/main/resources/assets/js/grapes-webApp.js
index <HASH>..<HASH> 100644
--- a/server/src/main/resources/assets/js/grapes-webApp.js
+++ b/server/src/main/resources/assets/js/grapes-webApp.js
@@ -178,7 +178,7 @@ function displayModuleLicenseOptions(){
getModuleLicenses();
$(".export").on('click', function (event) {
- exportTableToCSV.apply(this, [$('#table'), 'export.csv']);
+ exportTableToCSV.apply(this, [$('table'), 'export.csv']);
});
}
@@ -1229,7 +1229,7 @@ function getArtifactLicenses(){
var html = "<table class=\"table table-bordered table-hover\" id=\"table-of-result\">\n";
html += "<thead><tr><td>Licenses</td></tr></thead>\n";
html += "<tbody>\n";
-
+
$.ajax({
type: "GET",
url: "/artifact/"+ gavc + "/licenses",
@@ -1572,4 +1572,4 @@ function updateProduct(){
setTimeout(function(){
getProductOverview();
}, 500);
-}
\ No newline at end of file
+} | Fixing the issue of license table generating an empty CSV export file |
diff --git a/hamster/stuff.py b/hamster/stuff.py
index <HASH>..<HASH> 100644
--- a/hamster/stuff.py
+++ b/hamster/stuff.py
@@ -135,7 +135,7 @@ def format_activity(name, category, description, pad_description = False):
if description:
text+= "\n"
if pad_description:
- text += " "
+ text += " " * 23
text += """<span style="italic" size="small">%s</span>""" % description | padding description some more since we have now also end time.
this is somewhat lame though |
diff --git a/mbed/mbed.py b/mbed/mbed.py
index <HASH>..<HASH> 100644
--- a/mbed/mbed.py
+++ b/mbed/mbed.py
@@ -1122,8 +1122,13 @@ class Program(object):
# Gets mbed tools dir (unified)
def get_tools_dir(self):
mbed_os_path = self.get_os_dir()
+ # mbed-os dir identified and tools is a sub dir
if mbed_os_path and os.path.isdir(os.path.join(mbed_os_path, 'tools')):
return os.path.join(mbed_os_path, 'tools')
+ # mbed-os not identified but tools found under cwd/tools
+ elif os.path.isdir(os.path.join(self.path, 'tools')):
+ return os.path.join(self.path, 'tools')
+ # mbed Classic deployed tools
elif os.path.isdir(os.path.join(self.path, '.temp', 'tools')):
return os.path.join(self.path, '.temp', 'tools')
else: | Improved mbed tools detection (#<I>) |
diff --git a/pythran/passmanager.py b/pythran/passmanager.py
index <HASH>..<HASH> 100644
--- a/pythran/passmanager.py
+++ b/pythran/passmanager.py
@@ -137,6 +137,8 @@ class PassManager(object):
n = a.run(node, ctx)
if issubclass(transformation, Transformation):
ast.fix_missing_locations(node)
- else:
+ elif issubclass(transformation, Analysis):
a.display(n)
+ else:
+ pass # FIXME raise unknown_kind_of_pass or internal_error?
return n | Defensive approach in the pass manager when apply() on unknown pass type
I still don't know if we should raise or warn or whatever here. At least
do not call blindly display() unless there is a super-class for passes
that provide it.
Defensive programmign apart, code is more readable with the check for
'Analysis' type. Still wonder if "transformation" is the right name
for the pass. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.