diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/src/main/java/com/github/davidcarboni/restolino/api/ApiConfiguration.java b/src/main/java/com/github/davidcarboni/restolino/api/ApiConfiguration.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/github/davidcarboni/restolino/api/ApiConfiguration.java +++ b/src/main/java/com/github/davidcarboni/restolino/api/ApiConfiguration.java @@ -484,7 +484,7 @@ public class ApiConfiguration { private static Object invoke(HttpServletRequest request, HttpServletResponse response, Object handler, Method method, Class<?> requestMessage) throws Exception { Object result = null; - log.info("Invoking method " + method.getName() + " on " + handler.getClass().getSimpleName()); + log.info("Invoking method {} on {}", method.getName(), handler.getClass().getSimpleName()); // + " for request message " // + requestMessage); if (requestMessage != null) {
Use placeholders instead of string concatenation to defer string creation and only build the string if logging is enabled.
diff --git a/core/modules.js b/core/modules.js index <HASH>..<HASH> 100644 --- a/core/modules.js +++ b/core/modules.js @@ -34,9 +34,6 @@ }); } - // TODO: use Espruino.Core.Env.getData().info.builtin_modules - var BUILT_IN_MODULES = ["http","fs","CC3000","WIZnet"]; // TODO: get these from board.js (hopefully) - /** Find any instances of require(...) in the code string and return a list */ var getModulesRequired = function(code) { var modules = []; @@ -52,7 +49,11 @@ } else if (state==2 && (tok.type=="STRING")) { state=0; var module = tok.value; - if (BUILT_IN_MODULES.indexOf(module)<0 && modules.indexOf(module)<0) + var d = Espruino.Core.Env.getData(); + var built_in = false; + if ("info" in d && "builtin_modules" in d.info) + built_in = d.info.builtin_modules.indexOf(module)>=0; + if (!built_in && modules.indexOf(module)<0) modules.push(module); } else state = 0;
now automatically figure out which modules we have based on board
diff --git a/authomatic/core.py b/authomatic/core.py index <HASH>..<HASH> 100644 --- a/authomatic/core.py +++ b/authomatic/core.py @@ -905,10 +905,8 @@ class Credentials(ReprMixin): 'To deserialize credentials you need to specify a unique ' 'integer under the "id" key in the config for each provider!') - provider_id = int(split[0]) - # Get provider config by short name. - provider_name = id_to_name(config, provider_id) + provider_name = id_to_name(config, int(split[0])) cfg = config.get(provider_name) # Get the provider class.
Don't use method name as variable.
diff --git a/group/autogroup.php b/group/autogroup.php index <HASH>..<HASH> 100644 --- a/group/autogroup.php +++ b/group/autogroup.php @@ -42,7 +42,6 @@ if (!$course = $DB->get_record('course', array('id'=>$courseid))) { require_login($course); $context = context_course::instance($courseid); -$systemcontext = context_system::instance(); require_capability('moodle/course:managegroups', $context); $returnurl = $CFG->wwwroot.'/group/index.php?id='.$course->id; diff --git a/message/edit.php b/message/edit.php index <HASH>..<HASH> 100644 --- a/message/edit.php +++ b/message/edit.php @@ -61,7 +61,6 @@ if (!$user = $DB->get_record('user', array('id' => $userid))) { $systemcontext = context_system::instance(); $personalcontext = context_user::instance($user->id); -$coursecontext = context_course::instance($course->id); $PAGE->set_context($personalcontext); $PAGE->set_pagelayout('course');
MDL-<I> libraries: Remove unused context calls
diff --git a/intranet/apps/eighth/context_processors.py b/intranet/apps/eighth/context_processors.py index <HASH>..<HASH> 100644 --- a/intranet/apps/eighth/context_processors.py +++ b/intranet/apps/eighth/context_processors.py @@ -3,7 +3,13 @@ from .utils import get_start_date def start_date(request): - """Add the start date to the context for eighth admin views.""" + """ Add the start date to the context for eighth admins. + + Returns: + The start date if an eighth_admin, an empty dictionary + otherwise. + + """ if request.user and request.user.is_authenticated and request.user.is_eighth_admin: return {"admin_start_date": get_start_date(request)} @@ -12,12 +18,24 @@ def start_date(request): def enable_waitlist(request): - """Add whether the waitlist is enabled to the context""" + """ Add whether the waitlist is enabled to the context. + + Returns: + bool: Whether the waitlist is enabled. + + """ + return {"waitlist_enabled": settings.ENABLE_WAITLIST} def absence_count(request): - """Add the absence count to the context for students.""" + """ Add the absence count to the context for students. + + Returns: + Number of absences that a student has if + a student, an empty dictionary otherwise. + + """ if request.user and request.user.is_authenticated and request.user.is_student: absence_info = request.user.absence_info()
doc(eighth): add docstrings for eighth context processors
diff --git a/pypodio2/areas.py b/pypodio2/areas.py index <HASH>..<HASH> 100644 --- a/pypodio2/areas.py +++ b/pypodio2/areas.py @@ -521,3 +521,8 @@ class Files(Area): attributes = {'filename': filename, 'source': filedata} return self.transport.POST(url='/file/v2/', body=attributes, type='multipart/form-data') + + def copy(self, file_id): + """Copy a file to generate a new file_id""" + + return self.transport.POST(url='/file/%s/copy' % file_id)
Adding an api method to generate a copy of the current file
diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/fileImpl.js b/bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/fileImpl.js index <HASH>..<HASH> 100644 --- a/bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/fileImpl.js +++ b/bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/fileImpl.js @@ -625,7 +625,7 @@ define(["orion/Deferred", "orion/xhr", "orion/URL-shim", "orion/operation"], fun "Accept": "application/json", "Orion-Version": "1" }, - timeout: 15000 + timeout: 60000 }).then(function(result) { return result.response ? JSON.parse(result.response) : {}; }).then(function(result) {
Increase the timeout of file search on Orion file system implementation for now till we have a better solution for the Lucene search speed.
diff --git a/pygmsh/built_in/spline.py b/pygmsh/built_in/spline.py index <HASH>..<HASH> 100644 --- a/pygmsh/built_in/spline.py +++ b/pygmsh/built_in/spline.py @@ -10,7 +10,7 @@ class Spline(LineBase): for c in points: assert isinstance(c, Point) - assert len(control_points) > 1 + assert len(points) > 1 self.points = points
Spline has points not the control_points of Bspline #<I>
diff --git a/lib/omnibus/ohai.rb b/lib/omnibus/ohai.rb index <HASH>..<HASH> 100644 --- a/lib/omnibus/ohai.rb +++ b/lib/omnibus/ohai.rb @@ -20,15 +20,7 @@ module Omnibus class Ohai class << self def method_missing(m, *args, &block) - if respond_to_missing?(m) - ohai.send(m, *args, &block) - else - super - end - end - - def respond_to_missing?(m, include_private = false) - ohai.respond_to_missing?(m, include_private) || ohai.attribute?(m) + ohai.send(m, *args, &block) end private
Just fucking delegate everything to Ohai
diff --git a/src/main/java/de/flapdoodle/embed/process/runtime/ProcessControl.java b/src/main/java/de/flapdoodle/embed/process/runtime/ProcessControl.java index <HASH>..<HASH> 100644 --- a/src/main/java/de/flapdoodle/embed/process/runtime/ProcessControl.java +++ b/src/main/java/de/flapdoodle/embed/process/runtime/ProcessControl.java @@ -132,7 +132,7 @@ public class ProcessControl { } if (!stopped) { -// logger.severe(""+runtime.getName()+" NOT exited, thats why we destroy"); + logger.severe(""+runtime.getName()+" NOT exited, thats why we destroy"); process.destroy(); } }
flapdoodle Redis service start cannot start up process on Windows * added debug output for task killing
diff --git a/lib/index_shotgun.rb b/lib/index_shotgun.rb index <HASH>..<HASH> 100644 --- a/lib/index_shotgun.rb +++ b/lib/index_shotgun.rb @@ -7,13 +7,3 @@ module IndexShotgun end require "index_shotgun/railtie" if defined?(Rails) - -begin - require "mysql2/version" - - if Gem::Version.create(Mysql2::VERSION) >= Gem::Version.create("0.4.0") && - ActiveRecord.version < Gem::Version.create("4.2.5") - raise "Requirements activerecord gem v4.2.5+ when using mysql2 gem v0.4.0+" - end -rescue LoadError # rubocop:disable Lint/HandleExceptions -end
Rails <I> is already droppped
diff --git a/flux-link.js b/flux-link.js index <HASH>..<HASH> 100644 --- a/flux-link.js +++ b/flux-link.js @@ -39,8 +39,8 @@ function mkenv(env, log) { abort_after : null, $log : log }, - $throw : cf_throw, - $catch : cf_catch + $throw : _.bind(cf_throw, env), + $catch : _.bind(cf_catch, env) }); }
Added instance binding for and to allow them to be passed as callbacks correctly.
diff --git a/hystrix/settings.go b/hystrix/settings.go index <HASH>..<HASH> 100644 --- a/hystrix/settings.go +++ b/hystrix/settings.go @@ -5,7 +5,7 @@ import ( "time" ) -const ( +var ( // DefaultTimeout is how long to wait for command to complete, in milliseconds DefaultTimeout = 1000 // DefaultMaxConcurrent is how many commands of the same type can run at the same time
Make hystrix Default values writeable This allows an app to override the default settings when it starts up.
diff --git a/integration/shared/isolated/create_shared_domain_test.go b/integration/shared/isolated/create_shared_domain_test.go index <HASH>..<HASH> 100644 --- a/integration/shared/isolated/create_shared_domain_test.go +++ b/integration/shared/isolated/create_shared_domain_test.go @@ -233,7 +233,20 @@ var _ = Describe("create-shared-domain command", func() { Eventually(session).Should(Exit(1)) }) - When("With router-group flag", func() { + When("with --internal flag", func() { + BeforeEach(func() { + helpers.SkipIfVersionLessThan(ccversion.MinVersionInternalDomainV2) + }) + + It("should fail and return an unauthorized message", func() { + session := helpers.CF("create-shared-domain", domainName, "--internal") + Eventually(session).Should(Say("FAILED")) + Eventually(session.Err).Should(Say("You are not authorized to perform the requested action")) + Eventually(session).Should(Exit(1)) + }) + }) + + When("with --router-group flag", func() { BeforeEach(func() { helpers.SkipIfNoRoutingAPI() })
Added integration test for --internal flag of create-shared-domain command [#<I>]
diff --git a/kitnirc/contrib/admintools.py b/kitnirc/contrib/admintools.py index <HASH>..<HASH> 100644 --- a/kitnirc/contrib/admintools.py +++ b/kitnirc/contrib/admintools.py @@ -76,6 +76,9 @@ class AdminModule(Module): client.reply(recipient, actor, "Okay.") elif result is False: client.reply(recipient, actor, "Sorry, try again.") + + # Suprress further handling of the PRIVMSG event. + return True def join(self, client, args): if not args:
Suppress handling of PRIVMSG events after an admintools command.
diff --git a/test/functional/connections_stepdown.test.js b/test/functional/connections_stepdown.test.js index <HASH>..<HASH> 100644 --- a/test/functional/connections_stepdown.test.js +++ b/test/functional/connections_stepdown.test.js @@ -135,14 +135,14 @@ describe('Connections survive primary step down', function () { }); } - it('Not Master - Keep Connection Pool', { + it('Not Primary - Keep Connection Pool', { metadata: { requires: { mongodb: '>=4.2.0', topology: 'replicaset' } }, test: function () { return runStepownScenario(10107, expectPoolWasNotCleared); } }); - it('Not Master - Reset Connection Pool', { + it('Not Primary - Reset Connection Pool', { metadata: { requires: { mongodb: '4.0.x', topology: 'replicaset' } }, test: function () { return runStepownScenario(10107, expectPoolWasCleared);
refactor(NODE-<I>):Update tests with oppressive language in their description
diff --git a/src/Repository/Doctrine/ORMRepository.php b/src/Repository/Doctrine/ORMRepository.php index <HASH>..<HASH> 100644 --- a/src/Repository/Doctrine/ORMRepository.php +++ b/src/Repository/Doctrine/ORMRepository.php @@ -182,7 +182,9 @@ class ORMRepository implements $criteriaParams = $criteria; $criteria = Criteria::create(); - $criteria->where($criteriaParams); + foreach ($criteriaParams as $name => $value) { + $criteria->andWhere($criteria->expr()->eq($name, $value)); + } } $queryBuilder = $this->getQueryBuilder($criteria);
Fixed the findOneBy method for when no criteria is passed.
diff --git a/src/Router.php b/src/Router.php index <HASH>..<HASH> 100644 --- a/src/Router.php +++ b/src/Router.php @@ -254,12 +254,18 @@ final class Router // Drop input & mark fields. $match = array_slice($match, 1, -1); - // Replace conditional replacements. + // Handle conditional replacements. foreach ($calls as $i => $call) { $rep = grep($call, '~{(\w+)}~'); - if ($rep && isset($match[$rep])) { - $calls[$i] = str_replace('{' . $rep . '}', $match[$rep], $call); - $usedArgs[$match[$rep]] = 1; // Tick. + if ($rep) { + if (isset($match[$rep])) { + // Replace & tick ("-" for camel-case). + $calls[$i] = str_replace('{' . $rep . '}', $match[$rep] . '-', $call); + $usedArgs[$match[$rep]] = 1; + } else { + // Remove non-found replacements from call. + $calls[$i] = str_replace('{' . $rep . '}', '', $call); + } } }
Router: fix conditional replacements.
diff --git a/src/ossos-pipeline/ossos/storage.py b/src/ossos-pipeline/ossos/storage.py index <HASH>..<HASH> 100644 --- a/src/ossos-pipeline/ossos/storage.py +++ b/src/ossos-pipeline/ossos/storage.py @@ -382,9 +382,10 @@ def set_property(node_uri, property_name, property_value, ossos_base=True): node = vospace.getNode(node_uri) property_uri = tag_uri(property_name) if ossos_base else property_name - # First clear any existing value - node.props[property_uri] = None - vospace.addProps(node) + # If there is an existing value, clear it first + if property_uri in node.props: + node.props[property_uri] = None + vospace.addProps(node) node.props[property_uri] = property_value vospace.addProps(node)
Only do the extra call to clear the property if the node already has that property.
diff --git a/src/Saft/Addition/ARC2/Store/ARC2.php b/src/Saft/Addition/ARC2/Store/ARC2.php index <HASH>..<HASH> 100644 --- a/src/Saft/Addition/ARC2/Store/ARC2.php +++ b/src/Saft/Addition/ARC2/Store/ARC2.php @@ -315,7 +315,9 @@ class ARC2 extends AbstractSparqlStore // collect graph URI's while ($row = $result->fetch_assoc()) { - $graphs[$row['graphUri']] = $this->nodeFactory->createNamedNode($row['graphUri']); + if (NodeUtils::simpleCheckURI($row['graphUri'])) { + $graphs[$row['graphUri']] = $this->nodeFactory->createNamedNode($row['graphUri']); + } } return $graphs;
ARC2: Add further check in getGraphs to avoid errors if no graph was found
diff --git a/atlassian/bitbucket/cloud/repositories/branchRestrictions.py b/atlassian/bitbucket/cloud/repositories/branchRestrictions.py index <HASH>..<HASH> 100644 --- a/atlassian/bitbucket/cloud/repositories/branchRestrictions.py +++ b/atlassian/bitbucket/cloud/repositories/branchRestrictions.py @@ -145,14 +145,14 @@ class BranchRestriction(BitbucketCloudBase): return self.get_data("kind") @property - def branch_match_kindstring(self): - """The branch restriction match kindstring""" - return self.get_data("branch_match_kindstring") + def branch_match_kind(self): + """The branch restriction match kind""" + return self.get_data("branch_match_kind") @property - def branch_typestring(self): - """The branch restriction typestring""" - return self.get_data("branch_typestring") + def branch_type(self): + """The branch restriction type""" + return self.get_data("branch_type") @property def pattern(self):
fix 'string' typo (#<I>) Both 'branch_type' and 'branch_match_kind' contained a typo adding 'string' which prevented them from working as intended.
diff --git a/guides/bug_report_templates/action_controller_gem.rb b/guides/bug_report_templates/action_controller_gem.rb index <HASH>..<HASH> 100644 --- a/guides/bug_report_templates/action_controller_gem.rb +++ b/guides/bug_report_templates/action_controller_gem.rb @@ -16,6 +16,7 @@ require "action_controller/railtie" class TestApp < Rails::Application config.root = __dir__ + config.hosts << "example.org" config.session_store :cookie_store, key: "cookie_store_key" secrets.secret_key_base = "secret_key_base"
Fixed ActionController Gem bug report by adding allowed hosts config
diff --git a/namer/plural_namer.go b/namer/plural_namer.go index <HASH>..<HASH> 100644 --- a/namer/plural_namer.go +++ b/namer/plural_namer.go @@ -59,7 +59,7 @@ func (r *pluralNamer) Name(t *types.Type) string { return r.finalize(plural) } if len(singular) < 2 { - return r.finalize(plural) + return r.finalize(singular) } switch rune(singular[len(singular)-1]) { @@ -87,7 +87,7 @@ func (r *pluralNamer) Name(t *types.Type) string { plural = sPlural(singular) } case 'f': - plural = vesPlural(singular) + plural = vesPlural(singular) default: plural = sPlural(singular) }
fixes, returns an empty string when the name length is less than 2
diff --git a/src/qjax.js b/src/qjax.js index <HASH>..<HASH> 100644 --- a/src/qjax.js +++ b/src/qjax.js @@ -15,13 +15,13 @@ , defaultHeaders = { contentType: 'application/x-www-form-urlencoded; charset=UTF-8' , Accept: { - '*' : 'text/javascript, text/html, application/xml,' + - ' text/xml, */*' - , xml : 'application/xml, text/xml' - , html : 'text/html' - , text : 'text/plain' - , json : 'application/json, text/javascript' - , js : 'application/javascript, text/javascript' + '*' : 'text/javascript, text/html, application/xml,' + + ' text/xml, */*' + , xml : 'application/xml, text/xml' + , html : 'text/html' + , text : 'text/plain' + , json : 'application/json, text/javascript' + , script : 'application/javascript, text/javascript' } , requestedWith: xmlHttpRequest }
and this is why i need to mock xhr
diff --git a/pygtkhelpers/proxy.py b/pygtkhelpers/proxy.py index <HASH>..<HASH> 100644 --- a/pygtkhelpers/proxy.py +++ b/pygtkhelpers/proxy.py @@ -129,6 +129,7 @@ class StringListProxy(GObjectProxy): def set_widget_value(self, value): self.widget.value = value + class GtkRangeProxy(GObjectProxy): signal_name = 'value-changed' @@ -139,6 +140,25 @@ class GtkRangeProxy(GObjectProxy): self.widget.set_value(value) +class GtkFileChooserButtonProxy(GObjectProxy): + signal_name = 'selection-changed' + + def get_widget_value(self): + if self.widget.get_select_multiple(): + return self.widget.get_filenames() + else: + return self.widget.get_filename() + + def set_widget_value(self, value): + if self.widget.get_select_multiple(): + self.widget.unselect_all() + for filename in value: + self.widget.select_file(filename) + else: + self.widget.set_filename(value) + + + class GtkComboBoxProxy(GObjectProxy): signal_name = 'changed'
Added a file chooser button proxy
diff --git a/aafig/sphinxcontrib/aafig.py b/aafig/sphinxcontrib/aafig.py index <HASH>..<HASH> 100644 --- a/aafig/sphinxcontrib/aafig.py +++ b/aafig/sphinxcontrib/aafig.py @@ -131,7 +131,10 @@ def render_aafig_images(app, doctree): # FIXME: find some way to avoid this hack in aafigure if extra: (width, height) = [x.split('"')[1] for x in extra.split()] - (img['width'], img['height']) = (width, height) + if not img.has_key('width'): + img['width'] = width + if not img.has_key('height'): + img['height'] = height def render_aafigure(app, text, options):
aafig: Don't override width and height for SVG images If width or height options are already present in the figure, don't override them with the width and height provided by the aafigure visitor.
diff --git a/tests/test_parser.py b/tests/test_parser.py index <HASH>..<HASH> 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -172,6 +172,19 @@ class WordTokenizeTestCase(unittest.TestCase): tokenize_whitespace=True )) == [('around',), (' ',), ('the',), (' ',), ('world', )] + def test_tokenize_punctuation_and_whitespace(self): + assert list(textparser.word_tokenize( + text='who, where, what, when, why?', + retain_punctuation=True, + tokenize_whitespace=True + )) == [ + ('who',), (',',), (' ',), + ('where',), (',',), (' ',), + ('what',), (',',), (' ',), + ('when',), (',',), (' ',), + ('why',), ('?',), + ] + class TestNullStemmer(unittest.TestCase): def test_repr(self):
Add test coverage over combination of whitespace + punctuation
diff --git a/src/FreeDSx/Socket/Socket.php b/src/FreeDSx/Socket/Socket.php index <HASH>..<HASH> 100644 --- a/src/FreeDSx/Socket/Socket.php +++ b/src/FreeDSx/Socket/Socket.php @@ -161,7 +161,7 @@ class Socket */ public function isConnected() : bool { - return \is_resource($this->socket); + return $this->socket !== null && !@\feof($this->socket); } /** diff --git a/tests/spec/FreeDSx/Socket/SocketSpec.php b/tests/spec/FreeDSx/Socket/SocketSpec.php index <HASH>..<HASH> 100644 --- a/tests/spec/FreeDSx/Socket/SocketSpec.php +++ b/tests/spec/FreeDSx/Socket/SocketSpec.php @@ -56,4 +56,13 @@ class SocketSpec extends ObjectBehavior { $this::udp('8.8.8.8', ['port' => 53])->getOptions()->shouldHaveKeyWithValue('buffer_size', 65507); } + + function it_should_tell_whether_or_not_it_is_connected() + { + $this->beConstructedThrough('tcp', ['www.google.com', ['port' => 80]]); + + $this->isConnected()->shouldBeEqualTo(true); + $this->close(); + $this->isConnected()->shouldBeEqualTo(false); + } }
Correctly determine if a socket is connected or not.
diff --git a/stats/src/main/java/com/proofpoint/stats/MeterStat.java b/stats/src/main/java/com/proofpoint/stats/MeterStat.java index <HASH>..<HASH> 100644 --- a/stats/src/main/java/com/proofpoint/stats/MeterStat.java +++ b/stats/src/main/java/com/proofpoint/stats/MeterStat.java @@ -57,7 +57,7 @@ public class MeterStat oneMinute.update(value); fiveMinute.update(value); fifteenMinute.update(value); - sum.incrementAndGet(); + sum.addAndGet(value); } @Managed
fix sum computation (it was just counting)
diff --git a/lib/chef/provider/mount.rb b/lib/chef/provider/mount.rb index <HASH>..<HASH> 100644 --- a/lib/chef/provider/mount.rb +++ b/lib/chef/provider/mount.rb @@ -80,7 +80,7 @@ class Chef def action_enable unless @current_resource.enabled && mount_options_unchanged? - converge_by("remount #{@current_resource.device}") do + converge_by("enable #{@current_resource.device}") do status = enable_fs if status Chef::Log.info("#{@new_resource} enabled") @@ -93,7 +93,7 @@ class Chef def action_disable if @current_resource.enabled - converge_by("remount #{@current_resource.device}") do + converge_by("disable #{@current_resource.device}") do status = disable_fs if status Chef::Log.info("#{@new_resource} disabled")
fix copypasta output issues in enable/disable actions these were copied from "remount" without changing.
diff --git a/lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/page_properties.rb b/lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/page_properties.rb index <HASH>..<HASH> 100644 --- a/lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/page_properties.rb +++ b/lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/page_properties.rb @@ -23,10 +23,7 @@ module OoxmlParser def self.parse(sect_pr, default_paragraph, default_character) page_properties = PageProperties.new sect_pr.xpath('w:pgSz').each do |pg_sz| - page_properties.size = Size.new - page_properties.size.orientation = pg_sz.attribute('orient').value.to_sym unless pg_sz.attribute('orient').nil? - page_properties.size.height = pg_sz.attribute('h').value - page_properties.size.width = pg_sz.attribute('w').value + page_properties.size = Size.parse(pg_sz) end sect_pr.xpath('w:pgBorders').each do |pg_borders| page_borders = Borders.new
Use internal parsing of `Size`
diff --git a/lib/ronin/platform/overlay.rb b/lib/ronin/platform/overlay.rb index <HASH>..<HASH> 100644 --- a/lib/ronin/platform/overlay.rb +++ b/lib/ronin/platform/overlay.rb @@ -36,6 +36,9 @@ module Ronin # Overlay Format version VERSION = 1 + # A list of backwards compatible Overlay Format versions + COMPATIBILITY = [1] + # Overlay metadata XML file name METADATA_FILE = 'ronin.xml' @@ -145,6 +148,25 @@ module Ronin end # + # Determines if the given Overlay Format version is backwards + # compatible with {Ronin::Platform::Overlay}. + # + # @param [Integer] version + # The version to check for backwards compatibility. + # + # @return [Boolean] + # Specifies whether the given version is supported by + # {Ronin::Platform::Overlay}. + # + def Overlay.compatible?(version) + COMPATIBILITY.each do |compat| + return true if compat === version + end + + return false + end + + # # @return [Symbol] # The media type of the overlay. #
Added Overlay::COMPATIBILITY and Overlay.compatible? to test for backwards compatibility of overlays.
diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/PublicMetrics.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/PublicMetrics.java index <HASH>..<HASH> 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/PublicMetrics.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/PublicMetrics.java @@ -22,9 +22,12 @@ import org.springframework.boot.actuate.metrics.Metric; /** * Interface to expose specific {@link Metric}s via a {@link MetricsEndpoint}. + * Implementations should take care that the metrics they provide have unique names in the + * application context, but they shouldn't have to care about global uniqueness in the JVM + * or across a distributed system. * * @author Dave Syer - * @see SystemPublicMetrics + * @see SystemPublicMetrics SystemPublicMetrics for an example implementation */ public interface PublicMetrics {
Clarify PublicMetrics (uniqueness of metric names) See gh-<I>
diff --git a/resources/views/roles/index.blade.php b/resources/views/roles/index.blade.php index <HASH>..<HASH> 100644 --- a/resources/views/roles/index.blade.php +++ b/resources/views/roles/index.blade.php @@ -37,7 +37,7 @@ </div> <div class="row"> - <div class="col-md-10 col-md-offset-1"> + <div> <table class="table table-striped table-hover records-table"> diff --git a/resources/views/users/index.blade.php b/resources/views/users/index.blade.php index <HASH>..<HASH> 100644 --- a/resources/views/users/index.blade.php +++ b/resources/views/users/index.blade.php @@ -37,7 +37,7 @@ </div> <div class="row"> - <div class="col-md-10 col-md-offset-1"> + <div> <table class="table table-striped table-hover records-table">
Minor listing view adjustment to conform to models module listings
diff --git a/core/console/commands/views/block/create_block_view.php b/core/console/commands/views/block/create_block_view.php index <HASH>..<HASH> 100644 --- a/core/console/commands/views/block/create_block_view.php +++ b/core/console/commands/views/block/create_block_view.php @@ -1,9 +1,6 @@ <?php echo "<?php\n"; ?> - -use Yii; - /** * View file for block: <?= $blockClassName; ?> * diff --git a/tests/core/console/controllers/BlockControllerTest.php b/tests/core/console/controllers/BlockControllerTest.php index <HASH>..<HASH> 100644 --- a/tests/core/console/controllers/BlockControllerTest.php +++ b/tests/core/console/controllers/BlockControllerTest.php @@ -249,9 +249,6 @@ EOT; $view = <<<'EOT' <?php - -use Yii; - /** * View file for block: MySuperBlock *
remove use Yii in view files.
diff --git a/bigchaindb/models.py b/bigchaindb/models.py index <HASH>..<HASH> 100644 --- a/bigchaindb/models.py +++ b/bigchaindb/models.py @@ -262,7 +262,7 @@ class Block(object): DoubleSpend: if the transaction is a double spend InvalidHash: if the hash of the transaction is wrong InvalidSignature: if the signature of the transaction is wrong - ValidationError: If the block contains a duplicated TX + DuplicateTransaction: If the block contains a duplicated TX """ txids = [tx.id for tx in self.transactions] if len(txids) != len(set(txids)): diff --git a/tests/pipelines/test_block_creation.py b/tests/pipelines/test_block_creation.py index <HASH>..<HASH> 100644 --- a/tests/pipelines/test_block_creation.py +++ b/tests/pipelines/test_block_creation.py @@ -231,7 +231,7 @@ def test_full_pipeline(b, user_pk): def test_block_snowflake(create_tx, signed_transfer_tx): from bigchaindb.pipelines.block import tx_collector snowflake = tx_collector() - snowflake.send(create_tx) + assert snowflake.send(create_tx) == [create_tx] snowflake.send(signed_transfer_tx) snowflake.send(create_tx) assert snowflake.send(None) == [create_tx, signed_transfer_tx]
extra test for tx_collector and docs fix
diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/JdbcSessionDatabaseInitializer.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/JdbcSessionDatabaseInitializer.java index <HASH>..<HASH> 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/JdbcSessionDatabaseInitializer.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/JdbcSessionDatabaseInitializer.java @@ -45,6 +45,7 @@ public class JdbcSessionDatabaseInitializer { aliases.put("apache derby", "derby"); aliases.put("hsql database engine", "hsqldb"); aliases.put("microsoft sql server", "sqlserver"); + aliases.put("postgres", "postgresql"); ALIASES = Collections.unmodifiableMap(aliases); }
Polish contribution Closes gh-<I>
diff --git a/wffweb/src/main/java/com/webfirmframework/wffweb/css/css3/WebkitColumnGap.java b/wffweb/src/main/java/com/webfirmframework/wffweb/css/css3/WebkitColumnGap.java index <HASH>..<HASH> 100644 --- a/wffweb/src/main/java/com/webfirmframework/wffweb/css/css3/WebkitColumnGap.java +++ b/wffweb/src/main/java/com/webfirmframework/wffweb/css/css3/WebkitColumnGap.java @@ -310,9 +310,7 @@ public class WebkitColumnGap extends AbstractCssProperty<WebkitColumnGap> { return true; } } - if (PREDEFINED_CONSTANTS.contains(trimmedCssValue)) { - return true; - } - return false; + + return PREDEFINED_CONSTANTS.contains(trimmedCssValue); } }
Code improvement Avoided unnecessary if..then..else statements when returning booleans
diff --git a/lib/rails_admin/config/labelable.rb b/lib/rails_admin/config/labelable.rb index <HASH>..<HASH> 100644 --- a/lib/rails_admin/config/labelable.rb +++ b/lib/rails_admin/config/labelable.rb @@ -4,7 +4,7 @@ module RailsAdmin module Labelable def self.included(klass) klass.register_instance_option(:label) do - abstract_model.model.model_name.titleize + abstract_model.model.model_name.human(:default => abstract_model.model.model_name.titleize) end klass.register_instance_option(:object_label) do if bindings[:object].respond_to?(:name) && bindings[:object].name
Make model's label to try human method first (which queries translation backend) and fallback to titleized name. Fixes dropped I<I>n support in commit c3cea<I>d<I>ecdb<I>b<I>fbb<I>b4c<I>e9af<I>d.
diff --git a/lxd/network/driver_ovn.go b/lxd/network/driver_ovn.go index <HASH>..<HASH> 100644 --- a/lxd/network/driver_ovn.go +++ b/lxd/network/driver_ovn.go @@ -141,7 +141,7 @@ func (n *ovn) validateExternalSubnet(uplinkRoutes []*net.IPNet, projectRestricte if projectRestrictedSubnets != nil { foundMatch := false for _, projectRestrictedSubnet := range projectRestrictedSubnets { - if !SubnetContains(projectRestrictedSubnet, ipNet) { + if SubnetContains(projectRestrictedSubnet, ipNet) { foundMatch = true break }
lxd/network/driver/ovn: Fix project restricted subnets check in validateExternalSubnet
diff --git a/src/Cors.php b/src/Cors.php index <HASH>..<HASH> 100644 --- a/src/Cors.php +++ b/src/Cors.php @@ -83,6 +83,7 @@ class Cors return $next($request, $response); default: /* Actual CORS request. */ + $response = $next($request, $response); $cors_headers = $cors->getResponseHeaders(); foreach ($cors_headers as $header => $value) { /* Diactoros errors on integer values. */ @@ -91,7 +92,7 @@ class Cors } $response = $response->withHeader($header, $value); } - return $next($request, $response); + return $response; } }
Work on returned response instead, fixes #1
diff --git a/src/Relationships/IRelationshipContainer.php b/src/Relationships/IRelationshipContainer.php index <HASH>..<HASH> 100644 --- a/src/Relationships/IRelationshipContainer.php +++ b/src/Relationships/IRelationshipContainer.php @@ -10,12 +10,10 @@ namespace Nextras\Orm\Relationships; -use Countable; -use IteratorAggregate; use Nextras\Orm\Entity\IEntity; -interface IRelationshipContainer extends IteratorAggregate, Countable +interface IRelationshipContainer { /**
[relationships] fixed interface definition
diff --git a/alot/commands/globals.py b/alot/commands/globals.py index <HASH>..<HASH> 100644 --- a/alot/commands/globals.py +++ b/alot/commands/globals.py @@ -38,8 +38,10 @@ class ExitCommand(Command): """shut down cleanly""" @inlineCallbacks def apply(self, ui): - if settings.get('bug_on_exit'): - if (yield ui.choice('realy quit?', select='yes', cancel='no', + msg = 'index not fully synced. ' if ui.db_was_locked else '' + if settings.get('bug_on_exit') or ui.db_was_locked: + msg += 'really quit?' + if (yield ui.choice(msg, select='yes', cancel='no', msg_position='left')) == 'no': return for b in ui.buffers:
bug on exit if index not synced
diff --git a/fedmsg/core.py b/fedmsg/core.py index <HASH>..<HASH> 100644 --- a/fedmsg/core.py +++ b/fedmsg/core.py @@ -333,7 +333,7 @@ class FedMsgContext(object): import moksha.hub # First, a quick sanity check. if not getattr(moksha.hub, '_hub', None): - raise AttributeError("Unable to publish non-zeromq msg" + raise AttributeError("Unable to publish non-zeromq msg " "without moksha-hub initialization.") # Let moksha.hub do our work. moksha.hub._hub.send_message(
Add missing space to error message Add a missing space in error message in FedMsgContext.publish when moksha-hub has not been initialized.
diff --git a/src/main/launch.js b/src/main/launch.js index <HASH>..<HASH> 100644 --- a/src/main/launch.js +++ b/src/main/launch.js @@ -18,7 +18,7 @@ export function deferURL(event, url) { } } -const iconPath = path.join(__dirname, '../../static/icon.png'); +const iconPath = path.join(__dirname, '..', '..', 'static', 'icon.png'); export function launch(filename) { let win = new BrowserWindow({ @@ -57,4 +57,3 @@ export function launchNewNotebook(kernelSpecName) { }); return win; } -
fix(icon): load icon on windows by fixing path join
diff --git a/worker/task.go b/worker/task.go index <HASH>..<HASH> 100644 --- a/worker/task.go +++ b/worker/task.go @@ -37,6 +37,9 @@ func NewTask(lifecycle Lifecycle, payload []byte) *Task { // worked on. func (t *Task) Bytes() []byte { return t.payload } +// SetBytes sets the bytes that this task is holding. +func (t *Task) SetBytes(bytes []byte) { t.payload = bytes } + // Succeed signals the lifecycle that work on this task has been completed, // and removes the task from the worker queue. func (t *Task) Succeed() error {
feat(lifecycle): added ability to alter payload of a task (#<I>)
diff --git a/lib/cc/cli/runner.rb b/lib/cc/cli/runner.rb index <HASH>..<HASH> 100644 --- a/lib/cc/cli/runner.rb +++ b/lib/cc/cli/runner.rb @@ -11,6 +11,7 @@ module CC $stderr.puts("error: (#{ex.class}) #{ex.message}") CLI.debug("backtrace: #{ex.backtrace.join("\n\t")}") + exit 1 end def initialize(args) diff --git a/spec/cc/cli/runner_spec.rb b/spec/cc/cli/runner_spec.rb index <HASH>..<HASH> 100644 --- a/spec/cc/cli/runner_spec.rb +++ b/spec/cc/cli/runner_spec.rb @@ -30,11 +30,12 @@ module CC::CLI end end - _, stderr = capture_io do + _, stderr, exit_code = capture_io_and_exit_code do Runner.run(["explode"]) end expect(stderr).to match(/error: \(StandardError\) boom/) + expect(exit_code).to eq(1) end it "doesn't check for new version when --no-check-version is passed" do
Exit 1 when due to an unexpected error We exit 0 in `Runner` when handling exceptions. That's pretty surprising, and is very problematic for any attempt to use the CLI within a script or an editor plugin or anything of that kind: it can lead to accidentally think everything went fine & found no issues when in fact analysis just didn't run. I'm shocked we've made it this long without this being a problem, actually.
diff --git a/src/NewCommand.php b/src/NewCommand.php index <HASH>..<HASH> 100644 --- a/src/NewCommand.php +++ b/src/NewCommand.php @@ -44,7 +44,9 @@ class NewCommand extends Command throw new RuntimeException('The Zip PHP extension is not installed. Please install it and try again.'); } - $directory = ($input->getArgument('name')) ? getcwd().'/'.$input->getArgument('name') : getcwd(); + $name = $input->getArgument('name'); + + $directory = $name && $name !== '.' ? getcwd().'/'.$name : getcwd(); if (! $input->getOption('force')) { $this->verifyApplicationDoesntExist($directory);
Create a new project in the current directory using "laravel new ."
diff --git a/lib/onebox/engine.rb b/lib/onebox/engine.rb index <HASH>..<HASH> 100644 --- a/lib/onebox/engine.rb +++ b/lib/onebox/engine.rb @@ -59,7 +59,13 @@ module Onebox end def link - @url.gsub(/['\"<>]/, CGI::TABLE_FOR_ESCAPE_HTML__) + @url.gsub(/['\"<>]/, { + "'" => '&#39;', + '&' => '&amp;', + '"' => '&quot;', + '<' => '&lt;', + '>' => '&gt;', + }) end module ClassMethods
Don't use CGI::TABLE_FOR_ESCAPE_HTML__.
diff --git a/tests/ManagerTest.php b/tests/ManagerTest.php index <HASH>..<HASH> 100644 --- a/tests/ManagerTest.php +++ b/tests/ManagerTest.php @@ -106,8 +106,8 @@ class ManagerStub extends \Orchestra\Support\Manager return new ManagerFoobar($this->app, $name); } - public function createDefaultDriver() + public function getDefaultDriver() { - return $this->createFooDriver(); + return 'foo'; } }
Fixes missing abstract class causing the testcase to fail.
diff --git a/lib/actions/field-trip.js b/lib/actions/field-trip.js index <HASH>..<HASH> 100644 --- a/lib/actions/field-trip.js +++ b/lib/actions/field-trip.js @@ -305,7 +305,7 @@ function makeSaveFieldTripItinerariesData (request, outbound, state) { } } - // itierate through itineraries to construct itinerary and gtfsTrip data to + // iterate through itineraries to construct itinerary and gtfsTrip data to // save the itineraries to otp-datastore. itineraries.forEach((itinerary, itinIdx) => { const itineraryDataToSave = {
Update lib/actions/field-trip.js
diff --git a/cake/libs/folder.php b/cake/libs/folder.php index <HASH>..<HASH> 100644 --- a/cake/libs/folder.php +++ b/cake/libs/folder.php @@ -431,9 +431,6 @@ class Folder extends Object { * @access public */ function tree($path, $exceptions = true, $type = null) { - if (!$this->pwd()) { - return array(); - } $original = $this->path; $path = rtrim($path, DS); $this->__files = array();
rmoving path check from Folder::tree fixes issues with classes not beign found in App::import
diff --git a/lib/OpenLayers/Layer.js b/lib/OpenLayers/Layer.js index <HASH>..<HASH> 100644 --- a/lib/OpenLayers/Layer.js +++ b/lib/OpenLayers/Layer.js @@ -102,7 +102,6 @@ OpenLayers.Layer = OpenLayers.Class({ * will receive an object with a *map* property referencing the map and * a *layer* property referencing the layer. */ - */ events: null, /**
Remove superfluous comment closing (*/), thanks @mprins.
diff --git a/src/diagrams/sequence/sequenceDb.js b/src/diagrams/sequence/sequenceDb.js index <HASH>..<HASH> 100644 --- a/src/diagrams/sequence/sequenceDb.js +++ b/src/diagrams/sequence/sequenceDb.js @@ -1,6 +1,5 @@ import mermaidAPI from '../../mermaidAPI'; import * as configApi from '../../config'; -import common from '../common/common'; import { logger } from '../../logger'; let prevActor = undefined; @@ -138,9 +137,7 @@ export const parseMessage = function(str) { const message = { text: _str.replace(/^[:]?(?:no)?wrap:/, '').trim(), wrap: - _str.match(/^[:]?(?:no)?wrap:/) === null - ? common.hasBreaks(_str) || undefined - : _str.match(/^[:]?wrap:/) !== null + _str.match(/^[:]?wrap:/) !== null ? true : _str.match(/^[:]?nowrap:/) !== null ? false
fix: exclude text with line breaks when parsing wrap setting
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -1,10 +1,17 @@ var _ = require('lodash'); var loaderUtils = require('loader-utils'); +function getOptions(context) { + if (context.options && context.options.ejsLoader) { + return context.options.ejsLoader; + } + return {}; +} + module.exports = function(source) { this.cacheable && this.cacheable(); var query = loaderUtils.parseQuery(this.query); - var options = this.options ? this.options.ejsLoader || {} : {}; + var options = getOptions(this); ['escape', 'interpolate', 'evaluate'].forEach(function(templateSetting) { var setting = query[templateSetting];
refactor: make code more readable and remove ternary
diff --git a/misc.go b/misc.go index <HASH>..<HASH> 100644 --- a/misc.go +++ b/misc.go @@ -23,7 +23,7 @@ func newRequest(index, begin, length pp.Integer) request { func newRequestFromMessage(msg *pp.Message) request { switch msg.Type { - case pp.Request: + case pp.Request, pp.Cancel, pp.Reject: return newRequest(msg.Index, msg.Begin, msg.Length) case pp.Piece: return newRequest(msg.Index, msg.Begin, pp.Integer(len(msg.Piece)))
request can be made from Reject and Cancel messages too
diff --git a/src/Mpociot/BotMan/Drivers/BotFrameworkDriver.php b/src/Mpociot/BotMan/Drivers/BotFrameworkDriver.php index <HASH>..<HASH> 100644 --- a/src/Mpociot/BotMan/Drivers/BotFrameworkDriver.php +++ b/src/Mpociot/BotMan/Drivers/BotFrameworkDriver.php @@ -185,7 +185,7 @@ class BotFrameworkDriver extends Driver 'Authorization:Bearer '.$this->getAccessToken(), ]; - $apiURL = Collection::make($matchingMessage->getPayload())->get('serviceUrl', 'https://skype.botframework.com'); + $apiURL = Collection::make($matchingMessage->getPayload())->get('serviceUrl', Collection::make($additionalParameters)->get('serviceUrl')); if (strstr($apiURL, 'webchat.botframework')) { $parameters['from'] = [
Allow passing the serviceUrl to BotFramework drivers say method
diff --git a/trunk/ipaddr.py b/trunk/ipaddr.py index <HASH>..<HASH> 100644 --- a/trunk/ipaddr.py +++ b/trunk/ipaddr.py @@ -1490,6 +1490,8 @@ class _BaseV6(object): # Whitelist the characters, since int() allows a lot of bizarre stuff. if not self._HEX_DIGITS.issuperset(hextet_str): raise ValueError + if len(hextet_str) > 4: + raise ValueError hextet_int = int(hextet_str, 16) if hextet_int > 0xFFFF: raise ValueError diff --git a/trunk/ipaddr_test.py b/trunk/ipaddr_test.py index <HASH>..<HASH> 100755 --- a/trunk/ipaddr_test.py +++ b/trunk/ipaddr_test.py @@ -133,6 +133,7 @@ class IpaddrUnitTest(unittest.TestCase): AssertInvalidIP(":1:2:3:4:5:6:") AssertInvalidIP("192.0.2.1/32") AssertInvalidIP("2001:db8::1/128") + AssertInvalidIP("02001:db8::") self.assertRaises(ipaddr.AddressValueError, ipaddr.IPv4Network, '') self.assertRaises(ipaddr.AddressValueError, ipaddr.IPv4Network,
ipaddr incorrectly parses some V6 addresses. issue<I>.
diff --git a/src/components/Site/SiteHeader.react.js b/src/components/Site/SiteHeader.react.js index <HASH>..<HASH> 100644 --- a/src/components/Site/SiteHeader.react.js +++ b/src/components/Site/SiteHeader.react.js @@ -8,7 +8,11 @@ import type { Props as AccountDropdownProps } from "../AccountDropdown/AccountDr export type Props = {| +children?: React.Node, /** - * href attributefor the logo + * href attribute for the logo + */ + +align?: string, + /** + * header alignment */ +href?: string, /** @@ -34,6 +38,7 @@ export type Props = {| const SiteHeader = ({ children, href, + align, imageURL, alt, notificationsTray: notificationsTrayFromProps, @@ -50,7 +55,7 @@ const SiteHeader = ({ return ( <div className="header py-4"> - <Container> + <Container className={align}> <div className="d-flex"> {children || ( <React.Fragment>
feat(SiteHeader): header optional alignment Add an alignment tag for header component to put content on the center of the container
diff --git a/src/python/dxpy/scripts/dx_reads_to_fastq.py b/src/python/dxpy/scripts/dx_reads_to_fastq.py index <HASH>..<HASH> 100755 --- a/src/python/dxpy/scripts/dx_reads_to_fastq.py +++ b/src/python/dxpy/scripts/dx_reads_to_fastq.py @@ -75,7 +75,7 @@ def main(**kwargs): exportToFile(columns=col2, table=table, output_file=out_fh2, hasName=hasName, hasQual=hasQual, FASTA=kwargs['output_FASTA']) def exportToFile(columns, table, output_file, hasName = True, hasQual = True, FASTA = False): - for row in table.iterate_query_rows(columns=columns): + for row in table.iterate_rows(columns=columns): if FASTA == True: if hasName == True: # change comment character for FASTA
use iterate_rows, which is currently faster
diff --git a/Gruntfile.js b/Gruntfile.js index <HASH>..<HASH> 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -22,8 +22,8 @@ module.exports = function(grunt) { js: { src: 'tasks/', options: { - collectData: true, - dataStore: 'beaker.json' + collectData: true, + dataStore: 'beaker.json' } } }
Corrected a tab/space formatting issue
diff --git a/lib/puppet/provider/package/pkgin.rb b/lib/puppet/provider/package/pkgin.rb index <HASH>..<HASH> 100644 --- a/lib/puppet/provider/package/pkgin.rb +++ b/lib/puppet/provider/package/pkgin.rb @@ -25,7 +25,7 @@ Puppet::Type.type(:package).provide :pkgin, :parent => Puppet::Provider::Package def self.prefetch(packages) super - # Withouth -f, no fresh pkg_summary files are downloaded + # Without -f, no fresh pkg_summary files are downloaded pkgin("-yf", :update) end
(maint) Spell-check package/pkgin.rb.
diff --git a/source/library/pattern/pattern/apply-transforms.js b/source/library/pattern/pattern/apply-transforms.js index <HASH>..<HASH> 100644 --- a/source/library/pattern/pattern/apply-transforms.js +++ b/source/library/pattern/pattern/apply-transforms.js @@ -1,3 +1,5 @@ +import path from 'path'; + export default applyTransforms; function applyTransforms(file, transformNames, options) { @@ -41,14 +43,15 @@ async function applyTransform(fn, file, config) { } function augmentTransformError(error, file, transformName) { - error.message = [ - `${error.pattern}:${error.file} [${error.transform}]`, - error.message - ].join('\n'); - error.pattern = error.pattern || file.pattern.id; error.file = error.file || error.fileName || file.path; error.fileName = error.file; error.transform = error.transform || transformName; + + error.message = [ + `${error.pattern}:${path.basename(error.file)} [${error.transform}]`, + error.message + ].join('\n'); + return error; }
fix: do not print confusing undefined for transform errors
diff --git a/lib/github/auth/cli.rb b/lib/github/auth/cli.rb index <HASH>..<HASH> 100644 --- a/lib/github/auth/cli.rb +++ b/lib/github/auth/cli.rb @@ -1,4 +1,5 @@ module Github::Auth + # Command Line Interface for parsing and executing commands class CLI attr_reader :command, :usernames diff --git a/lib/github/auth/keys_client.rb b/lib/github/auth/keys_client.rb index <HASH>..<HASH> 100644 --- a/lib/github/auth/keys_client.rb +++ b/lib/github/auth/keys_client.rb @@ -1,6 +1,7 @@ require 'httparty' module Github::Auth + # Client for fetching public SSH keys using the Github API class KeysClient attr_reader :username, :hostname diff --git a/lib/github/auth/keys_file.rb b/lib/github/auth/keys_file.rb index <HASH>..<HASH> 100644 --- a/lib/github/auth/keys_file.rb +++ b/lib/github/auth/keys_file.rb @@ -1,4 +1,5 @@ module Github::Auth + # Write and delete keys from the authorized_keys file class KeysFile attr_reader :path
Fix style violations for KeysFile, KeysClient, CLI
diff --git a/stsci/tools/check_files.py b/stsci/tools/check_files.py index <HASH>..<HASH> 100644 --- a/stsci/tools/check_files.py +++ b/stsci/tools/check_files.py @@ -66,7 +66,7 @@ def checkPhotKeywords(filelist): This only moves keywords from the PRIMARY header if the keywords do not already exist in the SCI header. """ - PHOTKEYS = ['PHOTFLAM','PHOTPLAM','PHOTBW','PHOTZPT','PHOTMODE'] + PHOTKEYS = ['PHOTFLAM','PHOTPLAM','PHOTBW','PHOTZPT','PHOTMODE','PHOTFNU'] for f in filelist: handle = fileutil.openImage(f,mode='update',memmap=0) phdr = handle['PRIMARY'].header
added PHOTFNU to the checkPhotKeywords so IR instruments headers would be updated similar to UVIS git-svn-id: <URL>
diff --git a/logging/nox.py b/logging/nox.py index <HASH>..<HASH> 100644 --- a/logging/nox.py +++ b/logging/nox.py @@ -71,7 +71,13 @@ def system_tests(session, python_version): session.install('.') # Run py.test against the system tests. - session.run('py.test', '-vvv', 'tests/system.py', *session.posargs) + session.run( + 'py.test', + '-vvv', + 'tests/system.py', + *session.posargs, + success_codes=range(0, 100), + ) @nox.session
Allowing logging system tests to fail. (#<I>) These hose our builds.
diff --git a/tests/library/CM/Db/Query/CountTest.php b/tests/library/CM/Db/Query/CountTest.php index <HASH>..<HASH> 100644 --- a/tests/library/CM/Db/Query/CountTest.php +++ b/tests/library/CM/Db/Query/CountTest.php @@ -3,7 +3,8 @@ class CM_Db_Query_CountTest extends CMTest_TestCase { public function testAll() { - $query = new CM_Db_Query_Count('t`est', array('foo' => 'foo1', 'bar' => 'bar1')); + $client = CMTest_TH::createClient(false); + $query = new CM_Db_Query_Count($client, 't`est', array('foo' => 'foo1', 'bar' => 'bar1')); $this->assertSame('SELECT COUNT(*) FROM `t``est` WHERE `foo` = ? AND `bar` = ?', $query->getSqlTemplate()); $this->assertEquals(array('foo1', 'bar1'), $query->getParameters()); }
add CMTest_TH::createClient in CM_Db_Query_CountTest
diff --git a/subdownloader/languages/language.py b/subdownloader/languages/language.py index <HASH>..<HASH> 100644 --- a/subdownloader/languages/language.py +++ b/subdownloader/languages/language.py @@ -102,8 +102,6 @@ class Language: :return: Language instance with instance.xx() == xx """ xx = str(xx).lower() - if xx == 'gr': - xx = 'el' return cls._from_XYZ('ISO639', xx) @classmethod @@ -383,8 +381,8 @@ LANGUAGES = [ 'LanguageID': ['ger'], 'LanguageName': [_('German')] }, { - 'locale': ['el'], - 'ISO639': ['el'], + 'locale': ['el', 'gr'], + 'ISO639': ['el', 'gr'], 'LanguageID': ['ell'], 'LanguageName': [_('Greek')] }, {
lang: add alternative (illegal) language code gr for Greek (el)
diff --git a/raiden/encoding.py b/raiden/encoding.py index <HASH>..<HASH> 100644 --- a/raiden/encoding.py +++ b/raiden/encoding.py @@ -5,11 +5,6 @@ from rlp import DecodingError from c_secp256k1 import ecdsa_recover_compact as c_ecdsa_recover_compact from c_secp256k1 import ecdsa_sign_compact as c_ecdsa_sign_compact import warnings -from rlp.sedes import Binary -from rlp.sedes import big_endian_int as t_int -t_address = Binary.fixed_length(20, allow_empty=False) -t_hash = Binary.fixed_length(32, allow_empty=False) -t_hash_optional = Binary.fixed_length(32, allow_empty=True) class ByteSerializer(object):
Remove code which is overwritten after all
diff --git a/djangocms_text_ckeditor/__init__.py b/djangocms_text_ckeditor/__init__.py index <HASH>..<HASH> 100644 --- a/djangocms_text_ckeditor/__init__.py +++ b/djangocms_text_ckeditor/__init__.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- -__version__ = "3.2.0rc2" +__version__ = "3.2.0rc3" default_app_config = 'djangocms_text_ckeditor.apps.TextCkeditorConfig'
Bumped version to <I>rc3
diff --git a/lib/cloud_crowd/models/node_record.rb b/lib/cloud_crowd/models/node_record.rb index <HASH>..<HASH> 100644 --- a/lib/cloud_crowd/models/node_record.rb +++ b/lib/cloud_crowd/models/node_record.rb @@ -42,7 +42,7 @@ module CloudCrowd end def self.available_actions - all.map(&:actions).flatten.uniq - BlackListedAction.all.pluck(:action) + available.map(&:actions).flatten.uniq - BlackListedAction.all.pluck(:action) end # Dispatch a WorkUnit to this node. Places the node at back at the end of
Only consider actions from available nodes when distributing work.
diff --git a/webdriver_test_tools/classes/page_object_prototypes.py b/webdriver_test_tools/classes/page_object_prototypes.py index <HASH>..<HASH> 100644 --- a/webdriver_test_tools/classes/page_object_prototypes.py +++ b/webdriver_test_tools/classes/page_object_prototypes.py @@ -60,7 +60,7 @@ class NavObject(BasePage): if link_map_key in self.HOVER_MAP: link_tuple = self.HOVER_MAP[link_map_key] link = self.find_element(link_tuple[0]) - action_chain = ActionChains(driver) + action_chain = ActionChains(self.driver) action_chain.move_to_element(link).perform() # Initialize the target page object and return it return None if link_tuple[1] is None else link_tuple[1](self.driver) diff --git a/webdriver_test_tools/version.py b/webdriver_test_tools/version.py index <HASH>..<HASH> 100644 --- a/webdriver_test_tools/version.py +++ b/webdriver_test_tools/version.py @@ -1 +1 @@ -__version__ = '0.10.0' +__version__ = '0.10.1'
Fixed an error with NavObject Fixed reference to driver that should've been self.driver
diff --git a/lib/javascript.php b/lib/javascript.php index <HASH>..<HASH> 100644 --- a/lib/javascript.php +++ b/lib/javascript.php @@ -1,3 +1,5 @@ +<script language="JavaScript" type="text/javascript" + src="<?php echo "$CFG->wwwroot/lib/overlib.js" ?>"></script> <script language="JavaScript"> <!-- //hide
Load overlib.js as an external Javascript file, on all pages
diff --git a/src/Symfony/Component/Translation/Loader/ArrayLoader.php b/src/Symfony/Component/Translation/Loader/ArrayLoader.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/Translation/Loader/ArrayLoader.php +++ b/src/Symfony/Component/Translation/Loader/ArrayLoader.php @@ -25,7 +25,7 @@ class ArrayLoader implements LoaderInterface */ public function load($resource, $locale, $domain = 'messages') { - $catalogue = $this->flatten($resource); + $this->flatten($resource); $catalogue = new MessageCatalogue($locale); $catalogue->addMessages($resource, $domain);
[Translation] removed unneeded assignement
diff --git a/test/test_helper.rb b/test/test_helper.rb index <HASH>..<HASH> 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -70,7 +70,6 @@ class TestApp current.create! current.load! current.migrate! - reload_constant("Flipflop::Feature") end end end @@ -119,9 +118,9 @@ class TestApp load File.expand_path("../../#{path}/config/application.rb", __FILE__) load File.expand_path("../../#{path}/config/environments/test.rb", __FILE__) + Rails.application.config.cache_classes = false Rails.application.initialize! - ActiveSupport::Dependencies.mechanism = :load require "capybara/rails" end @@ -141,6 +140,7 @@ class TestApp Rails.instance_variable_set(:@application, nil) ActiveSupport::Dependencies.remove_constant(name.camelize) + ActiveSupport::Dependencies.remove_constant("Flipflop::Feature") end private
Test improvements for Rails 4.x.
diff --git a/polyfills/Element/polyfill-ie7.js b/polyfills/Element/polyfill-ie7.js index <HASH>..<HASH> 100644 --- a/polyfills/Element/polyfill-ie7.js +++ b/polyfills/Element/polyfill-ie7.js @@ -44,7 +44,8 @@ }, elements = document.getElementsByTagName('*'), - nativeCreateElement = document.createElement; + nativeCreateElement = document.createElement, + interval; prototype.attachEvent('onpropertychange', function (event) { var @@ -75,6 +76,21 @@ }; } + // Apply Element prototype to the pre-existing DOM as soon as the body element appears. + function bodyCheck(e) { + if (document.body && !document.body.prototype && /(complete|interactive)/.test(document.readyState)) { + shiv(document, true); + if (interval && document.body.prototype) clearTimeout(interval); + return (!!document.body.prototype); + } + return false; + } + if (!bodyCheck(true)) { + document.onreadystatechange = bodyCheck; + interval = setInterval(bodyCheck, 1); + } + + // Apply to any new elements created after load document.createElement = function createElement(nodeName) { var element = nativeCreateElement(String(nodeName).toLowerCase()); return shiv(element);
Apply Element prototype polyfill to existing elements in the DOM on page load
diff --git a/scapy.py b/scapy.py index <HASH>..<HASH> 100755 --- a/scapy.py +++ b/scapy.py @@ -1421,6 +1421,9 @@ class ASN1_force(ASN1_Object): return self.val.enc(codec) return self.val +class ASN1_BADTAG(ASN1_force): + pass + class ASN1_INTEGER(ASN1_Object): tag = ASN1_Class_UNIVERSAL.INTEGER @@ -1608,7 +1611,8 @@ class BERcodec_Object: try: return cls.do_dec(s, context, safe) except BER_BadTag_Decoding_Error,e: - return BERcodec_Object.dec(e.remaining, context, safe) + o,remain = BERcodec_Object.dec(e.remaining, context, safe) + return ASN1_BADTAG(o),remain except BER_Decoding_Error, e: return ASN1_DECODING_ERROR(s, exc=e),"" except ASN1_Error, e:
Added ASN1_BADTAG() object and used it ASN1_BADTAG is used when decoding an ASN1 object (syntax is ok) with another tag than the expected one (grammar is bad)
diff --git a/version.go b/version.go index <HASH>..<HASH> 100644 --- a/version.go +++ b/version.go @@ -19,4 +19,4 @@ package grpc // Version is the current grpc version. -const Version = "1.47.0-dev" +const Version = "1.48.0-dev"
Change version to <I>-dev (#<I>)
diff --git a/lib/mediator.js b/lib/mediator.js index <HASH>..<HASH> 100644 --- a/lib/mediator.js +++ b/lib/mediator.js @@ -154,7 +154,7 @@ for(; x<y; x++) { if (this._subscribers[x].id === identifier || this._subscribers[x].fn === identifier){ - this._subscribers[x].priority = priority; + this._subscribers[x].options.priority = priority; break; } }
Update mediator.js Priority is a property of options. Priority was being set on subscriber objects.
diff --git a/salt/fileclient.py b/salt/fileclient.py index <HASH>..<HASH> 100644 --- a/salt/fileclient.py +++ b/salt/fileclient.py @@ -249,14 +249,13 @@ class Client(object): else: return '' else: - dest = os.path.join( - self.opts['cachedir'], - 'extrn_files', - env, - os.path.join( + dest = os.path.normpath( + os.sep.join([ + self.opts['cachedir'], + 'extrn_files', + env, url_data.netloc, - os.path.relpath(os.path.relpath(url_data.path, '/'), '..') - )) + url_data.path])) destdir = os.path.dirname(dest) if not os.path.isdir(destdir): os.makedirs(destdir)
Work around Python <I> bug involving relative paths from root * In Python <I>, calling `os.path.relpath('/foo/bar', '/')` incorrectly returns a path `../foo/bar`. In Python <I> this is fixed, but this commit adds a workaround that works in both <I> and <I>.
diff --git a/src/Symfony/Component/Form/Form.php b/src/Symfony/Component/Form/Form.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/Form/Form.php +++ b/src/Symfony/Component/Form/Form.php @@ -201,7 +201,7 @@ class Form extends Field implements \IteratorAggregate, FormInterface $this->extraFields = array(); - foreach ($data as $name => $value) { + foreach ((array)$data as $name => $value) { if (!$this->has($name)) { $this->extraFields[] = $name; }
[Form] Fixed failing choice field tests
diff --git a/python/neuroglancer/webdriver.py b/python/neuroglancer/webdriver.py index <HASH>..<HASH> 100644 --- a/python/neuroglancer/webdriver.py +++ b/python/neuroglancer/webdriver.py @@ -233,7 +233,7 @@ class Webdriver: @property def root_element(self): - return self.driver.find_element_by_xpath('//body') + return self.driver.find_element('xpath', '//body') def action_chain(self): import selenium.webdriver
fix(python/webdriver): support Selenium <I>
diff --git a/views/js/layout/logout-event.js b/views/js/layout/logout-event.js index <HASH>..<HASH> 100644 --- a/views/js/layout/logout-event.js +++ b/views/js/layout/logout-event.js @@ -26,7 +26,7 @@ define(['jquery', 'i18n', 'helpers', 'ui/dialog/alert'], function ($, __, helpers, alert) { 'use strict'; - return function LogoutEvent() { + return function logoutEvent() { alert(__('You have been logged out. Please login again'), function () { window.location = helpers._url('logout', 'Main', 'tao');
first letter in function name is never capitalized - fixed
diff --git a/includes/modules/export/epub3/class-pb-epub3.php b/includes/modules/export/epub3/class-pb-epub3.php index <HASH>..<HASH> 100644 --- a/includes/modules/export/epub3/class-pb-epub3.php +++ b/includes/modules/export/epub3/class-pb-epub3.php @@ -145,7 +145,7 @@ class Epub3 extends Epub\Epub201 { $config = array ( 'valid_xhtml' => 1, 'no_deprecated_attr' => 2, - 'deny_attribute' => 'cellpadding,cellspacing,frameborder,marginwidth,marginheight,scrolling', + 'deny_attribute' => 'cellpadding,cellspacing,frameborder,marginwidth,marginheight,scrolling,itemscope,itemtype,itemref,itemprop', 'unique_ids' => 'fixme-', 'hook' => '\PressBooks\Sanitize\html5_to_xhtml5', 'tidy' => -1,
epub3 does not like microdata attributes
diff --git a/tests/FullApplicationTest.php b/tests/FullApplicationTest.php index <HASH>..<HASH> 100644 --- a/tests/FullApplicationTest.php +++ b/tests/FullApplicationTest.php @@ -437,6 +437,8 @@ class FullApplicationTest extends PHPUnit_Framework_TestCase public function testRequestUser() { + $this->markTestIncomplete('This test has not been implemented yet.'); + $app = new Application(); $app['auth']->viaRequest('api', function ($request) {
Mark testRequestUser as incomplete.
diff --git a/lib/formtastic/inputs/boolean_input.rb b/lib/formtastic/inputs/boolean_input.rb index <HASH>..<HASH> 100644 --- a/lib/formtastic/inputs/boolean_input.rb +++ b/lib/formtastic/inputs/boolean_input.rb @@ -102,7 +102,9 @@ module Formtastic value when NilClass false - when Integer, String + when Integer + value == checked_value.to_i + when String value == checked_value when Array value.include?(checked_value)
fix bug by ensuring we're comparing Integers
diff --git a/retrofit/src/main/java/retrofit2/Utils.java b/retrofit/src/main/java/retrofit2/Utils.java index <HASH>..<HASH> 100644 --- a/retrofit/src/main/java/retrofit2/Utils.java +++ b/retrofit/src/main/java/retrofit2/Utils.java @@ -376,14 +376,14 @@ final class Utils { throw new IllegalArgumentException(); } - this.ownerType = ownerType; - this.rawType = rawType; - this.typeArguments = typeArguments.clone(); - - for (Type typeArgument : this.typeArguments) { + for (Type typeArgument : typeArguments) { checkNotNull(typeArgument, "typeArgument == null"); checkNotPrimitive(typeArgument); } + + this.ownerType = ownerType; + this.rawType = rawType; + this.typeArguments = typeArguments.clone(); } @Override public Type[] getActualTypeArguments() {
Moved validation first before cloning
diff --git a/aeron-cluster/src/main/java/io/aeron/cluster/service/ClusteredServiceAgent.java b/aeron-cluster/src/main/java/io/aeron/cluster/service/ClusteredServiceAgent.java index <HASH>..<HASH> 100644 --- a/aeron-cluster/src/main/java/io/aeron/cluster/service/ClusteredServiceAgent.java +++ b/aeron-cluster/src/main/java/io/aeron/cluster/service/ClusteredServiceAgent.java @@ -43,9 +43,6 @@ public class ClusteredServiceAgent implements ControlledFragmentHandler, Agent, private static final int FRAGMENT_LIMIT = 10; private static final int INITIAL_BUFFER_LENGTH = 4096; - private long leadershipTermBeginPosition = 0; - private long messageIndex; - private long timestampMs; private final boolean shouldCloseResources; private final Aeron aeron; private final ClusteredService service; @@ -62,11 +59,13 @@ public class ClusteredServiceAgent implements ControlledFragmentHandler, Agent, private final Long2ObjectHashMap<ClientSession> sessionByIdMap = new Long2ObjectHashMap<>(); private final IdleStrategy idleStrategy; - private final RecordingLog recordingLog; private final AeronArchive.Context archiveCtx; private final ClusteredServiceContainer.Context ctx; + private long leadershipTermBeginPosition = 0; + private long messageIndex; + private long timestampMs; private long currentRecordingId; private ReadableCounter consensusPosition; private Image logImage;
[Java] Field grouping.
diff --git a/src/Venturecraft/Revisionable/RevisionableTrait.php b/src/Venturecraft/Revisionable/RevisionableTrait.php index <HASH>..<HASH> 100644 --- a/src/Venturecraft/Revisionable/RevisionableTrait.php +++ b/src/Venturecraft/Revisionable/RevisionableTrait.php @@ -126,7 +126,7 @@ trait RevisionableTrait // we can only safely compare basic items, // so for now we drop any object based items, like DateTime foreach ($this->updatedData as $key => $val) { - $castCheck = ['object', 'array']; + $castCheck = ['object', 'array']; if (isset($this->casts[$key]) && in_array(gettype($val), $castCheck) && in_array($this->casts[$key], $castCheck) && isset($this->originalData[$key])) { // Sorts the keys of a JSON object due Normalization performed by MySQL // So it doesn't set false flag if it is changed only order of key or whitespace after comma
fixed indentation to match original format
diff --git a/pymatgen/io/exciting/tests/test_inputs.py b/pymatgen/io/exciting/tests/test_inputs.py index <HASH>..<HASH> 100644 --- a/pymatgen/io/exciting/tests/test_inputs.py +++ b/pymatgen/io/exciting/tests/test_inputs.py @@ -117,7 +117,7 @@ class ExcitingInputTest(PymatgenTest): 'BSE': {'bsetype': 'singlet', 'nstlbse': '1 5 1 4'}}} test_input = ExcitingInput(struct) - test_string = test_input.write_string('unchanged', paramdict=paradir) + test_string = test_input.write_string('unchanged', **paradir) # read reference file filepath = os.path.join(test_dir, 'input_exciting2.xml')
Update test with new paramdict kwarg format
diff --git a/lib/Boris/ShallowParser.php b/lib/Boris/ShallowParser.php index <HASH>..<HASH> 100644 --- a/lib/Boris/ShallowParser.php +++ b/lib/Boris/ShallowParser.php @@ -207,7 +207,7 @@ class Boris_ShallowParser { } private function _prepareDebugStmt($input) { - if ($this->_isReturnable($input) && !preg_match('/\s*return/i', $input)) { + if ($this->_isReturnable($input) && !preg_match('/^\s*return/i', $input)) { $input = sprintf('return %s', $input); }
Fix issue with regex for return statements
diff --git a/cake/libs/view/helpers/form.php b/cake/libs/view/helpers/form.php index <HASH>..<HASH> 100644 --- a/cake/libs/view/helpers/form.php +++ b/cake/libs/view/helpers/form.php @@ -260,7 +260,7 @@ class FormHelper extends AppHelper { 0 => $id ); if (!empty($options['action']) && !isset($options['id'])) { - $options['id'] = $this->domId(Inflector::camelize($options['action']) . 'Form'); + $options['id'] = $this->domId($options['action'] . 'Form'); } $options['action'] = array_merge($actionDefaults, (array)$options['url']); } elseif (is_string($options['url'])) {
Removing additional call to camelize(). Fixes #<I>
diff --git a/cloudant-http/src/main/java/com/cloudant/http/internal/interceptors/CookieInterceptorBase.java b/cloudant-http/src/main/java/com/cloudant/http/internal/interceptors/CookieInterceptorBase.java index <HASH>..<HASH> 100644 --- a/cloudant-http/src/main/java/com/cloudant/http/internal/interceptors/CookieInterceptorBase.java +++ b/cloudant-http/src/main/java/com/cloudant/http/internal/interceptors/CookieInterceptorBase.java @@ -30,7 +30,6 @@ import java.net.MalformedURLException; import java.net.URISyntaxException; import java.net.URL; import java.util.List; -import java.util.Locale; import java.util.Map; import java.util.concurrent.atomic.AtomicBoolean; import java.util.logging.Level; @@ -54,6 +53,8 @@ public abstract class CookieInterceptorBase implements HttpConnectionRequestInte CookieInterceptorBase(String sessionRequestMimeType, String baseUrl, String endpoint) { this.sessionRequestMimeType = sessionRequestMimeType; try { + baseUrl = baseUrl.endsWith("/") ? baseUrl.substring(0, baseUrl.length()-1): baseUrl; + endpoint = endpoint.startsWith("/") ? endpoint : "/" + endpoint; this.sessionURL = new URL(String.format("%s%s", baseUrl, endpoint)); } catch (MalformedURLException e) { // this should be a valid URL since the builder is passing it in
Added handling for baseUrl vs endpoint /
diff --git a/lib/finder.rb b/lib/finder.rb index <HASH>..<HASH> 100644 --- a/lib/finder.rb +++ b/lib/finder.rb @@ -70,11 +70,9 @@ module ActiveScaffold def self.condition_for_datetime_column(column, value, like_pattern) conversion = value['from']['hour'].blank? && value['to']['hour'].blank? ? 'to_date' : 'to_time' - ['from', 'to'].each do |field| - value[field] = ['year', 'month', 'day', 'hour', 'minutes', 'seconds'].collect {|part| value[field][part].to_i} + from_value, to_value = ['from', 'to'].collect do |field| + Time.zone.local(*['year', 'month', 'day', 'hour', 'minutes', 'seconds'].collect {|part| value[field][part].to_i}) rescue nil end - from_value = Time.zone.local(*value['from']) rescue nil - to_value = Time.zone.local(*value['to']) rescue nil if from_value.nil? and to_value.nil? nil
Fix FieldSearch without javascript, date parameters were broken after redirect
diff --git a/spec/mvcli/router_spec.rb b/spec/mvcli/router_spec.rb index <HASH>..<HASH> 100644 --- a/spec/mvcli/router_spec.rb +++ b/spec/mvcli/router_spec.rb @@ -14,6 +14,10 @@ describe "MVCLI::Router" do end end + def invoke(route = '') + router.call mock(:Command, :argv => route.split(/\s+/)) + end + context "without any routes" do When(:result) {invoke} Then {result.should have_failed self.Router::RoutingError} @@ -53,8 +57,4 @@ describe "MVCLI::Router" do When { invoke "--help me" } Then { @action == 'help#me' } end - - def invoke(route = '') - router.call mock(:Command, :argv => route.split(/\s+/)) - end end
out of sight, out of mind is not a good thing in code. thanks @marcusmateus!
diff --git a/treeherder/client/thclient/client.py b/treeherder/client/thclient/client.py index <HASH>..<HASH> 100644 --- a/treeherder/client/thclient/client.py +++ b/treeherder/client/thclient/client.py @@ -8,6 +8,9 @@ import requests import logging import json +# When releasing a new version to PyPI please also file a bug to request +# that it is uploaded to http://pypi.pub.build.mozilla.org/pub/ too. +# See bug 1191498 for an example of this. __version__ = '1.6.0' logger = logging.getLogger(__name__)
Python Client: Add a comment about uploading to the internal PyPI mirror
diff --git a/src/js/select2/i18n/ru.js b/src/js/select2/i18n/ru.js index <HASH>..<HASH> 100644 --- a/src/js/select2/i18n/ru.js +++ b/src/js/select2/i18n/ru.js @@ -14,6 +14,9 @@ define(function () { } return { + errorLoading: function () { + return 'Невозможно загрузить результаты'; + }, inputTooLong: function (args) { var overChars = args.input.length - args.maximum;
added translation for errorLoading
diff --git a/library/src/main/java/com/balysv/materialripple/MaterialRippleLayout.java b/library/src/main/java/com/balysv/materialripple/MaterialRippleLayout.java index <HASH>..<HASH> 100644 --- a/library/src/main/java/com/balysv/materialripple/MaterialRippleLayout.java +++ b/library/src/main/java/com/balysv/materialripple/MaterialRippleLayout.java @@ -537,6 +537,10 @@ public class MaterialRippleLayout extends FrameLayout { ViewGroup parent = (ViewGroup) child.getParent(); int index = 0; + if (parent != null && parent instanceof MaterialRippleLayout) { + throw new IllegalStateException("MaterialRippleLayout could not be created: parent of the view already is a MaterialRippleLayout"); + } + if (parent != null) { index = parent.indexOfChild(child); parent.removeView(child);
Do not allow stacking MaterialRippleLayouts Contributed by @joaogouveia
diff --git a/invenio_files_rest/models.py b/invenio_files_rest/models.py index <HASH>..<HASH> 100644 --- a/invenio_files_rest/models.py +++ b/invenio_files_rest/models.py @@ -278,7 +278,7 @@ class Location(db.Model, Timestamp): """Validate name.""" if not slug_pattern.match(name) or len(name) > 20: raise ValueError( - 'Invalid location name (lower-case alphanumeric + danshes).') + 'Invalid location name (lower-case alphanumeric + dashes).') return name @classmethod
typo: danshes -> dashes
diff --git a/src/Models/Repository/SubscriptionTypesMetaRepository.php b/src/Models/Repository/SubscriptionTypesMetaRepository.php index <HASH>..<HASH> 100644 --- a/src/Models/Repository/SubscriptionTypesMetaRepository.php +++ b/src/Models/Repository/SubscriptionTypesMetaRepository.php @@ -30,7 +30,7 @@ class SubscriptionTypesMetaRepository extends Repository final public function getMeta(IRow $subscriptionType, string $key): Selection { - return $this->getTable()->where(['subscription_type_id' => $subscriptionType->id, 'key' => $key]); + return $subscriptionType->related('subscription_types_meta')->where(['key' => $key]); } final public function subscriptionTypeMeta(IRow $subscriptionType): array
Correctly utilize Nette's magic of related() method