diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/src/Update/Updates.php b/src/Update/Updates.php index <HASH>..<HASH> 100644 --- a/src/Update/Updates.php +++ b/src/Update/Updates.php @@ -480,6 +480,7 @@ class Updates { unset($files[$key]); } } + $this->updater->getFileSystem()->chmod('docroot/sites/default', 0755); $this->updater->getFileSystem()->chmod($files, 0777); $this->updater->deleteFile($files); $this->updater->getFileSystem()->mirror('drush/site-aliases', 'drush/sites');
Fixes #<I>: File permission error during upgrade to <I>-beta2. (#<I>)
diff --git a/cobald_tests/controller/test_switch.py b/cobald_tests/controller/test_switch.py index <HASH>..<HASH> 100644 --- a/cobald_tests/controller/test_switch.py +++ b/cobald_tests/controller/test_switch.py @@ -6,7 +6,7 @@ from cobald.controller.linear import LinearController from cobald.controller.switch import DemandSwitch -class TestLinearController(object): +class TestSwitchController(object): def test_select(self): pool = MockPool() switch_controller = DemandSwitch(pool, LinearController(pool, rate=1), 5, LinearController(pool, rate=2))
renamted test from TestLinearController to TestSwitchController
diff --git a/cobe/scoring.py b/cobe/scoring.py index <HASH>..<HASH> 100644 --- a/cobe/scoring.py +++ b/cobe/scoring.py @@ -70,11 +70,23 @@ class CobeScorer(Scorer): info += -math.log(p, 2) - n_edges = len(reply.edges) - if n_edges > 8: - info /= math.sqrt(n_edges - 1) - elif n_edges >= 16: - info /= n_edges + # Approximate the number of cobe 1.2 contexts in this reply, so the + # scorer will have similar results. + + # First, we have (graph.order - 1) extra edges on either end of the + # reply, since cobe 2.0 learns from (_END_TOKEN, _END_TOKEN, ...). + n_words = len(reply.edges) - (reply.graph.order - 1) * 2 + + # Add back one word for each space between edges, since cobe 1.2 + # treated those as separate parts of a context. + for edge in reply.edges: + if edge.has_space: + n_words += 1 + + if n_words > 8: + info /= math.sqrt(n_words - 1) + elif n_words >= 16: + info /= n_words return self.finish(self.normalize(info))
Tweak CobeScorer to behave more like cobe <I> Use a context count that is more similar to the old count, by taking spacing and extra <I> edges into account.
diff --git a/clearly/client.py b/clearly/client.py index <HASH>..<HASH> 100644 --- a/clearly/client.py +++ b/clearly/client.py @@ -197,7 +197,7 @@ class ClearlyClient: pass @set_user_friendly_errors - def stats(self) -> None: + def metrics(self) -> None: """List some metrics about the capturing system itself, which of course reflects the actual celery pool being monitored.
rene\ame stats to metrics
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -37,16 +37,18 @@ function createFunctions(Reflux, PromiseFactory) { } if (canHandlePromise) { - var removeSuccess = me.completed.listen(function(argsArr) { + var removeSuccess = me.completed.listen(function () { + var args = Array.prototype.slice.call(arguments); removeSuccess(); removeFailed(); - resolve(argsArr); + resolve(args.length > 1 ? args : args[0]); }); - var removeFailed = me.failed.listen(function(argsArr) { + var removeFailed = me.failed.listen(function () { + var args = Array.prototype.slice.call(arguments); removeSuccess(); removeFailed(); - reject(argsArr); + reject(args.length > 1 ? args : args[0]); }); }
Support multiple arguments (as array) in Promise's
diff --git a/routing/router_test.go b/routing/router_test.go index <HASH>..<HASH> 100644 --- a/routing/router_test.go +++ b/routing/router_test.go @@ -2,6 +2,7 @@ package routing import ( "bytes" + "errors" "fmt" "image/color" "math" @@ -2978,13 +2979,14 @@ func TestRouterPaymentStateMachine(t *testing.T) { // On startup, the router should fetch all pending payments // from the ControlTower, so assert that here. - didFetch := make(chan struct{}) + errCh := make(chan error) go func() { + close(errCh) select { case <-control.fetchInFlight: - close(didFetch) + return case <-time.After(1 * time.Second): - t.Fatalf("router did not fetch in flight " + + errCh <- errors.New("router did not fetch in flight " + "payments") } }() @@ -2994,7 +2996,10 @@ func TestRouterPaymentStateMachine(t *testing.T) { } select { - case <-didFetch: + case err := <-errCh: + if err != nil { + t.Fatalf("error in anonymous goroutine: %s", err) + } case <-time.After(1 * time.Second): t.Fatalf("did not fetch in flight payments at startup") }
routing: fix use of T.Fatal() in test goroutine
diff --git a/undertow/src/main/java/org/wildfly/extension/undertow/ListenerService.java b/undertow/src/main/java/org/wildfly/extension/undertow/ListenerService.java index <HASH>..<HASH> 100644 --- a/undertow/src/main/java/org/wildfly/extension/undertow/ListenerService.java +++ b/undertow/src/main/java/org/wildfly/extension/undertow/ListenerService.java @@ -38,6 +38,7 @@ import org.jboss.msc.service.StartContext; import org.jboss.msc.service.StartException; import org.jboss.msc.service.StopContext; import org.jboss.msc.value.InjectedValue; +import org.xnio.ByteBufferSlicePool; import org.xnio.ChannelListener; import org.xnio.ChannelListeners; import org.xnio.OptionMap; @@ -101,6 +102,11 @@ public abstract class ListenerService<T> implements Service<T> { } protected int getBufferSize() { + //not sure if this is best possible solution + if (bufferPool.getValue() instanceof ByteBufferSlicePool){ + ByteBufferSlicePool pool =(ByteBufferSlicePool)bufferPool.getValue(); + return pool.getBufferSize(); + } return 8192; }
Use buffersize that is configured/calculated for buffer pool
diff --git a/lib/aims/geometry.rb b/lib/aims/geometry.rb index <HASH>..<HASH> 100644 --- a/lib/aims/geometry.rb +++ b/lib/aims/geometry.rb @@ -402,9 +402,9 @@ module Aims nz_sign = (0 < nz) ? 1 : -1 new_atoms = [] - nx.abs.times do |i| - ny.abs.times do |j| - nz.abs.times do |k| + nx.to_i.abs.times do |i| + ny.to_i.abs.times do |j| + nz.to_i.abs.times do |k| new_atoms << self.displace(nx_sign*i*v1[0] + ny_sign*j*v2[0] + nz_sign*k*v3[0], nx_sign*i*v1[1] + ny_sign*j*v2[1] + nz_sign*k*v3[1], nx_sign*i*v1[2] + ny_sign*j*v2[2] + nz_sign*k*v3[2]).atoms
Fixed bug when repeat is not an integer
diff --git a/lib/sugarcrm/associations/association_cache.rb b/lib/sugarcrm/associations/association_cache.rb index <HASH>..<HASH> 100644 --- a/lib/sugarcrm/associations/association_cache.rb +++ b/lib/sugarcrm/associations/association_cache.rb @@ -19,8 +19,10 @@ module SugarCRM; module AssociationCache # Updates an association cache entry if it's been initialized def update_association_cache_for(association, target) + return unless association_cached? association + return if @association_cache[association].collection.include? target # only add to the cache if the relationship has been queried - @association_cache[association] << target if association_cached? association + @association_cache[association] << target end # Resets the association cache diff --git a/lib/sugarcrm/associations/association_collection.rb b/lib/sugarcrm/associations/association_collection.rb index <HASH>..<HASH> 100644 --- a/lib/sugarcrm/associations/association_collection.rb +++ b/lib/sugarcrm/associations/association_collection.rb @@ -2,6 +2,8 @@ module SugarCRM # A class for handling association collections. Basically just an extension of Array # doesn't actually load the records from Sugar until you invoke one of the public methods class AssociationCollection + + attr_reader :collection # creates a new instance of an AssociationCollection # Owner is the parent object, and association is the target
don't update association collection if relationship already exists associating a contact to an account twice shouldn't increase account.contacts.size each time
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -103,7 +103,7 @@ http://api.mongodb.org/python/current/installation.html#osx kwargs = {} -version = "4.5.1" +version = "5.0.dev1" with open('README.rst') as f: kwargs['long_description'] = f.read() diff --git a/tornado/__init__.py b/tornado/__init__.py index <HASH>..<HASH> 100644 --- a/tornado/__init__.py +++ b/tornado/__init__.py @@ -25,5 +25,5 @@ from __future__ import absolute_import, division, print_function # is zero for an official release, positive for a development branch, # or negative for a release candidate or beta (after the base version # number has been incremented) -version = "4.5.1" -version_info = (4, 5, 1, 0) +version = "5.0.dev1" +version_info = (5, 0, 0, -100)
Bump master version to <I>.dev1
diff --git a/lib/nydp/pair.rb b/lib/nydp/pair.rb index <HASH>..<HASH> 100644 --- a/lib/nydp/pair.rb +++ b/lib/nydp/pair.rb @@ -161,13 +161,7 @@ class Nydp::Pair end def to_s - if (car == nil) - "nil" - elsif car.is_a?(String) - car.inspect - elsif car.is_a?(Nydp::Fn) - car.to_s - elsif (car == :quote) + if (car == :quote) if Nydp::NIL.is? cdr.cdr "'#{cdr.car.to_s}" else @@ -202,6 +196,16 @@ class Nydp::Pair end end + def to_s_car + if (car == nil) + "nil" + elsif car.is_a?(String) + car.inspect + else + car.to_s + end + end + def to_s_rest cdr_s = if cdr.is_a?(self.class) cdr.to_s_rest @@ -211,7 +215,7 @@ class Nydp::Pair ". #{cdr.to_s}" end - [car.to_s, cdr_s].compact.join " " + [to_s_car, cdr_s].compact.join " " end def inspect_rest
pair: fix #to_s after making nicer broke it. It's still nicer though.
diff --git a/fetcher/nvd/json/nvd.go b/fetcher/nvd/json/nvd.go index <HASH>..<HASH> 100644 --- a/fetcher/nvd/json/nvd.go +++ b/fetcher/nvd/json/nvd.go @@ -3,6 +3,7 @@ package json import ( "encoding/json" "fmt" + "sort" "strings" "time" @@ -31,6 +32,10 @@ func FetchConvert(metas []models.FeedMeta) (cves []models.CveDetail, err error) fmt.Errorf("Failed to fetch. err: %s", err) } + // The redis-put-process overwrite without referring the last modified date. + // Sort so that recent-feed is the last element. + sort.Slice(results, func(i, j int) bool { return results[i].URL < results[j].URL }) + errs := []error{} for _, res := range results { var nvd, nvdIncludeRejectedCve NvdJSON
fix(fetch-nvd): prevent overwriting with old cve-details on redis (#<I>)
diff --git a/cherrypy/_cpcompat_subprocess.py b/cherrypy/_cpcompat_subprocess.py index <HASH>..<HASH> 100644 --- a/cherrypy/_cpcompat_subprocess.py +++ b/cherrypy/_cpcompat_subprocess.py @@ -883,7 +883,7 @@ class Popen(object): startupinfo.dwFlags |= _subprocess.STARTF_USESHOWWINDOW startupinfo.wShowWindow = _subprocess.SW_HIDE comspec = os.environ.get("COMSPEC", "cmd.exe") - args = '{} /c "{}"'.format(comspec, args) + args = '{0} /c "{1}"'.format(comspec, args) if (_subprocess.GetVersion() >= 0x80000000 or os.path.basename(comspec).lower() == "command.com"): # Win9x, or using command.com on NT. We need to @@ -1029,7 +1029,7 @@ class Popen(object): elif sig == signal.CTRL_BREAK_EVENT: os.kill(self.pid, signal.CTRL_BREAK_EVENT) else: - raise ValueError("Unsupported signal: {}".format(sig)) + raise ValueError("Unsupported signal: {0}".format(sig)) def terminate(self): """Terminates the process
Python <I> str.format does not support unindexed parameters The code using Python <I>+ only code was used on Windows only. --HG-- branch : subprocess-py<I>-win<I>-fix
diff --git a/pkg/controller/service/servicecontroller.go b/pkg/controller/service/servicecontroller.go index <HASH>..<HASH> 100644 --- a/pkg/controller/service/servicecontroller.go +++ b/pkg/controller/service/servicecontroller.go @@ -498,6 +498,11 @@ func (s *ServiceController) needsUpdate(oldService *api.Service, newService *api if !reflect.DeepEqual(oldService.Annotations, newService.Annotations) { return true } + if oldService.UID != newService.UID { + s.eventRecorder.Eventf(newService, api.EventTypeNormal, "UID", "%v -> %v", + oldService.UID, newService.UID) + return true + } return false }
A load balancer should be updated if a service's UID has changed. The load balancer's name is determined by the service's UID. If the service's UID has changed (presumably due to a delete and recreate), then we need to recreate the load balancer as well to avoid eventually leaking the old one.
diff --git a/lib/Alchemy/Phrasea/Filesystem/FilesystemService.php b/lib/Alchemy/Phrasea/Filesystem/FilesystemService.php index <HASH>..<HASH> 100644 --- a/lib/Alchemy/Phrasea/Filesystem/FilesystemService.php +++ b/lib/Alchemy/Phrasea/Filesystem/FilesystemService.php @@ -45,7 +45,7 @@ class FilesystemService $pathout = sprintf('%s%s%05d', $repository_path, $comp, $n++); } while (is_dir($pathout) && iterator_count(new \DirectoryIterator($pathout)) > 100); - $this->filesystem->mkdir($pathout, 0750); + $this->filesystem->mkdir($pathout, 0770); return $pathout . DIRECTORY_SEPARATOR; }
Change right mask to asset dir PHRAS-<I> Change right mask to asset dir PHRAS-<I>
diff --git a/pysat/_instrument.py b/pysat/_instrument.py index <HASH>..<HASH> 100644 --- a/pysat/_instrument.py +++ b/pysat/_instrument.py @@ -1074,7 +1074,7 @@ class Instrument(object): output_str += 'Cleaning Level: ' + self.clean_level + '\n' output_str += 'Data Padding: ' + self.pad.__repr__() + '\n' output_str += 'Keyword Arguments Passed to load(): ' - output_str += self.kwargs.__repr__() + '\n' + output_str += self.kwargs.__str__() + '\n' output_str += self.custom.__repr__() # Print out the orbit settings
TST: use str instead of repr in str Use dictionary str representation.
diff --git a/src/EvalFile_Command.php b/src/EvalFile_Command.php index <HASH>..<HASH> 100644 --- a/src/EvalFile_Command.php +++ b/src/EvalFile_Command.php @@ -57,15 +57,16 @@ class EvalFile_Command extends WP_CLI_Command { WP_CLI::get_runner()->load_wordpress(); } - self::execute_eval( $file ); + self::execute_eval( $file, $args ); } /** * Evaluate a provided file. * * @param string $file Filepath to execute, or - for STDIN. + * @param mixed $args One or more arguments to pass to the file. */ - private static function execute_eval( $file ) { + private static function execute_eval( $file, $args ) { if ( '-' === $file ) { eval( '?>' . file_get_contents( 'php://stdin' ) ); } else {
Do not strip $args, as it is needed
diff --git a/neural/afni.py b/neural/afni.py index <HASH>..<HASH> 100644 --- a/neural/afni.py +++ b/neural/afni.py @@ -86,7 +86,7 @@ def dset_info(dset): for d in details_regex: m = re.findall(details_regex[d],raw_info) if len(m): - setattr(info,d,m[0].group(1)) + setattr(info,d,m[0]) return info
align_epi_anat seems to be deleting more than it should...
diff --git a/modeldict/base.py b/modeldict/base.py index <HASH>..<HASH> 100644 --- a/modeldict/base.py +++ b/modeldict/base.py @@ -5,8 +5,9 @@ import base64 class PersistedDict(object): """ Dictionary that calls out to its persistant data store when items are - created or deleted. Caches data in process for a set time period before - refreshing from the persistant data store. + created or deleted. Syncs with data fron the data store before every read, + unless ``autosync=False`` is passed, which causes the dict to only sync + data from the data store on writes and when ``sync()`` is called. """ def __init__(self, autosync=True):
Change docstring for class to actually make sense.
diff --git a/src/LaravelAnalyticsServiceProvider.php b/src/LaravelAnalyticsServiceProvider.php index <HASH>..<HASH> 100644 --- a/src/LaravelAnalyticsServiceProvider.php +++ b/src/LaravelAnalyticsServiceProvider.php @@ -75,6 +75,8 @@ class LaravelAnalyticsServiceProvider extends ServiceProvider 'use_objects' => true, ] ); + + $client->setClassConfig('Google_Cache_File', 'directory', storage_path('app/google_cache')); $client->setAccessType('offline');
Set the google cache path to the Laravel storage dir Keeps temporary files inside the storage directory. Useful for servers with open_basedir restrictions.
diff --git a/server/Top.rb b/server/Top.rb index <HASH>..<HASH> 100755 --- a/server/Top.rb +++ b/server/Top.rb @@ -25,7 +25,6 @@ require 'Measure.rb' require 'Actuator.rb' require 'Publish.rb' require 'globals.rb' -require 'sql.rb' # List of library include require 'yaml' @@ -122,6 +121,7 @@ class Top } if @config['database'] + require 'sql.rb' $database = Database.new(@config) # store config if not done before
Include sql.rb only if database is present in config
diff --git a/src/android/LocationManager.java b/src/android/LocationManager.java index <HASH>..<HASH> 100644 --- a/src/android/LocationManager.java +++ b/src/android/LocationManager.java @@ -1267,7 +1267,9 @@ public class LocationManager extends CordovaPlugin implements BeaconConsumer { private void _handleExceptionOfCommand(CallbackContext callbackContext, Exception exception) { Log.e(TAG, "Uncaught exception: " + exception.getMessage()); - Log.e(TAG, "Stack trace: " + exception.getStackTrace()); + final StackTraceElement[] stackTrace = exception.getStackTrace(); + final String stackTraceElementsAsString = Arrays.toString(stackTrace); + Log.e(TAG, "Stack trace: " + stackTraceElementsAsString); // When calling without a callback from the client side the command can be null. if (callbackContext == null) {
Android - Fixed IDE (Android Studio) warning where toString() was implicitly called on an array (the stack trace elements of exceptions').
diff --git a/graylog2-server/src/main/java/org/graylog2/database/PersistedServiceImpl.java b/graylog2-server/src/main/java/org/graylog2/database/PersistedServiceImpl.java index <HASH>..<HASH> 100644 --- a/graylog2-server/src/main/java/org/graylog2/database/PersistedServiceImpl.java +++ b/graylog2-server/src/main/java/org/graylog2/database/PersistedServiceImpl.java @@ -287,6 +287,7 @@ public class PersistedServiceImpl implements PersistedService { // Work on embedded Maps, too. if (x.getValue() instanceof Map) { + x.setValue(Maps.newHashMap((Map<String, Object>) x.getValue())); fieldTransformations((Map<String, Object>) x.getValue()); continue; }
Ensure we use a mutable map to persist data
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ CHANGES = open(os.path.join(here, 'HISTORY.rst')).read() requires = [ 'pyramid', - 'skosprovider>=0.2.0dev' + 'skosprovider>=0.2.0a1' ] tests_requires = [ @@ -26,7 +26,7 @@ setup( long_description=README + '\n\n' + CHANGES, classifiers=[ 'Intended Audience :: Developers', - 'Development Status :: 4 - Beta', + 'Development Status :: 3 - Alpha', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', @@ -48,6 +48,6 @@ setup( }, test_suite='nose.collector', dependency_links = [ - 'https://github.com/koenedaele/skosprovider/tarball/zerotwo#egg=skosprovider-0.2.0', + 'https://github.com/koenedaele/skosprovider/tarball/zerotwo#egg=skosprovider-0.2.0a1', ] )
Mark as version <I>a1
diff --git a/tornado/test/twisted_test.py b/tornado/test/twisted_test.py index <HASH>..<HASH> 100644 --- a/tornado/test/twisted_test.py +++ b/tornado/test/twisted_test.py @@ -24,6 +24,7 @@ import shutil import signal import tempfile import threading +import warnings try: import fcntl @@ -444,7 +445,11 @@ class CompatibilityTests(unittest.TestCase): # a Protocol. client = Agent(self.reactor) response = yield client.request('GET', url) - body[0] = yield readBody(response) + with warnings.catch_warnings(): + # readBody has a buggy DeprecationWarning in Twisted 15.0: + # https://twistedmatrix.com/trac/changeset/43379 + warnings.simplefilter('ignore', category=DeprecationWarning) + body[0] = yield readBody(response) self.stop_loop() self.io_loop.add_callback(f) runner()
Fix a DeprecationWarning in twisted_test with Twisted <I>.
diff --git a/salt/config.py b/salt/config.py index <HASH>..<HASH> 100644 --- a/salt/config.py +++ b/salt/config.py @@ -1722,9 +1722,10 @@ def get_id(root_dir=None, minion_id=False, cache=True): with salt.utils.fopen('/etc/hosts') as hfl: for line in hfl: names = line.split() - if not names: + try: + ip_ = names.pop(0) + except IndexError: continue - ip_ = names.pop(0) if ip_.startswith('127.'): for name in names: if name != 'localhost':
More concise fix for empty /etc/hosts line check
diff --git a/clarent/certificate.py b/clarent/certificate.py index <HASH>..<HASH> 100644 --- a/clarent/certificate.py +++ b/clarent/certificate.py @@ -104,7 +104,9 @@ class SecureCiphersContextFactory(object): # Since we can multiplex everything over a single connection, this # doesn't really matter as much. Also, GCM is not as preferred, # because GHASH is apparently very hard to implement without leaking -# timing information. +# timing information. It's still available, so that clients who know +# that theirs is good (i.e. they have a hardware implementation) can +# still get it. ciphersuites = ":".join(( # Fast, PFS, secure. Yay! "ECDHE-RSA-AES128-SHA", "ECDHE-ECDSA-AES128-SHA",
Clarify ciphersuite choices
diff --git a/manifest.php b/manifest.php index <HASH>..<HASH> 100755 --- a/manifest.php +++ b/manifest.php @@ -36,7 +36,7 @@ return array( 'taoLti' => '>=3.2.2', 'taoLtiBasicOutcome' => '>=2.6', 'taoResultServer' => '>=4.2.0', - 'taoDelivery' => '>=7.0.0' + 'taoDelivery' => '>=7.5.1' ), 'models' => array( 'http://www.tao.lu/Ontologies/TAOLTI.rdf',
Require correct taoDelivery version
diff --git a/tickets/views.py b/tickets/views.py index <HASH>..<HASH> 100644 --- a/tickets/views.py +++ b/tickets/views.py @@ -50,4 +50,5 @@ class TicketCreateView(CreateView): ticket.creator = self.request.user ticket.save() self.success_url = reverse('tickets:detail', args=[ticket.id]) + messages.success(self.request, 'Ticket created.') return super(TicketCreateView, self).form_valid(form)
add ticket created success message to ticket create view
diff --git a/tensor2tensor/utils/learning_rate.py b/tensor2tensor/utils/learning_rate.py index <HASH>..<HASH> 100644 --- a/tensor2tensor/utils/learning_rate.py +++ b/tensor2tensor/utils/learning_rate.py @@ -52,6 +52,14 @@ def learning_rate_factor(name, step_num, hparams): return tf.math.cos( step * np.pi / (hparams.train_steps - hparams.learning_rate_warmup_steps)) / 2.0 + 0.5 + elif name == "multi_cycle_cos_decay": + # Cosine decay with a variable number of cycles. This is different from + # "cosdecay" because it starts at 1 when the warmup steps end. Use + # hparams.learning_rate_decay_steps to determine the number of cycles. + x = tf.maximum(step_num, hparams.learning_rate_warmup_steps) + step = x - hparams.learning_rate_warmup_steps + return tf.math.cos( + step * np.pi / hparams.learning_rate_decay_steps) / 2.0 + 0.5 elif name == "rsqrt_decay": return tf.rsqrt(tf.maximum(step_num, hparams.learning_rate_warmup_steps)) elif name == "rsqrt_normalized_decay":
Cosine learning rate decay with multiple cycles. PiperOrigin-RevId: <I>
diff --git a/lockfile.js b/lockfile.js index <HASH>..<HASH> 100644 --- a/lockfile.js +++ b/lockfile.js @@ -33,20 +33,21 @@ process.on('uncaughtException', function H (er) { exports.unlock = function (path, cb) { // best-effort. unlocking an already-unlocked lock is a noop - fs.unlink(path, function (unlinkEr) { - if (!hasOwnProperty(locks, path)) return cb() - fs.close(locks[path], function (closeEr) { - delete locks[path] - cb() - }) - }) + if (hasOwnProperty(locks, path)) + fs.close(locks[path], unlink) + else + unlink() + + function unlink () { + delete locks[path] + fs.unlink(path, function (unlinkEr) { cb() }) + } } exports.unlockSync = function (path) { - try { fs.unlinkSync(path) } catch (er) {} - if (!hasOwnProperty(locks, path)) return // best-effort. unlocking an already-unlocked lock is a noop - try { fs.close(locks[path]) } catch (er) {} + try { fs.closeSync(locks[path]) } catch (er) {} + try { fs.unlinkSync(path) } catch (er) {} delete locks[path] }
unlock: Close before unlinking the unlink() triggers watches to try to acquire a lock, but the fd might not be closed yet, leading to a race condition where the new lock gets fs.close'd instead of the old one.
diff --git a/tests/parser/functions/test_send.py b/tests/parser/functions/test_send.py index <HASH>..<HASH> 100644 --- a/tests/parser/functions/test_send.py +++ b/tests/parser/functions/test_send.py @@ -1,6 +1,3 @@ -from web3.exceptions import ValidationError - - def test_send(assert_tx_failed, get_contract): send_test = """ @public @@ -25,7 +22,7 @@ def pay_me() -> bool: """ c = get_contract(code) - assert_tx_failed(lambda: c.pay_me(transact={"value": w3.toWei(0.1, "ether")}), ValidationError) + assert_tx_failed(lambda: c.pay_me(transact={"value": w3.toWei(0.1, "ether")})) def test_default_gas(get_contract, w3):
bug: Raises TransactionFailed instead of ValidationError
diff --git a/web/concrete/src/File/FileList.php b/web/concrete/src/File/FileList.php index <HASH>..<HASH> 100644 --- a/web/concrete/src/File/FileList.php +++ b/web/concrete/src/File/FileList.php @@ -171,8 +171,7 @@ class FileList extends DatabaseItemList implements PermissionableListItemInterfa */ public function filterByDateAdded($date, $comparison = '=') { - $this->query->andWhere('f.fDateAdded ' . $comparison . ' :fDateAdded'); - $this->query->setParameter('fDateAdded', $date); + $this->query->andWhere($this->query->expr()->comparison('f.fDateAdded', $comparison, $this->query->createNamedParameter($date))); } public function filterByOriginalPageID($ocID)
Files: allow filtering by date ranges of date added Former-commit-id: e<I>ed5ccb<I>c8b<I>f<I>a6
diff --git a/cmd/boulder-publisher/main.go b/cmd/boulder-publisher/main.go index <HASH>..<HASH> 100644 --- a/cmd/boulder-publisher/main.go +++ b/cmd/boulder-publisher/main.go @@ -2,6 +2,7 @@ package notmain import ( "flag" + "fmt" "os" "runtime" @@ -87,6 +88,9 @@ func main() { cmd.FailOnError(err, "failed to load chain.") issuer := chain[0] id := issuer.NameID() + if _, exists := bundles[id]; exists { + cmd.Fail(fmt.Sprintf("Got multiple chains configured for issuer %q", issuer.Subject.CommonName)) + } bundles[id] = publisher.GetCTBundleForChain(chain) }
Publisher: abort if conflicting chains configured (#<I>) Fixes #<I>
diff --git a/src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java b/src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java index <HASH>..<HASH> 100644 --- a/src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java +++ b/src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java @@ -487,10 +487,7 @@ public class ExtendedEmailPublisher extends Publisher { } public String getHudsonUrl() { - if(hudsonUrl!=null) - return hudsonUrl; - // if the value is not configured yet, try to get some reasonable default from elsewhere. - return Hudson.getInstance().getRootUrl(); + return hudsonUrl; } public String getSmtpServer() { @@ -583,6 +580,8 @@ public class ExtendedEmailPublisher extends Publisher { String url = nullify(req.getParameter("ext_mailer_hudson_url")); if(url!=null && !url.endsWith("/")) url += '/'; + if(url==null) + url = Hudson.getInstance().getRootUrl(); hudsonUrl = url; //specify authentication information
this is probably better way to make this fool-proof.
diff --git a/modules/router5.js b/modules/router5.js index <HASH>..<HASH> 100644 --- a/modules/router5.js +++ b/modules/router5.js @@ -145,6 +145,7 @@ class Router5 { } else { // Initialise router with provided start state this.lastKnownState = startState + browser.replaceState(this.lastKnownState, '', this.buildUrl(startState.name, startState.params)) cb(null, startState) } // Listen to popstate
fix: replace history state on start when supplying a starting state
diff --git a/src/Token.php b/src/Token.php index <HASH>..<HASH> 100644 --- a/src/Token.php +++ b/src/Token.php @@ -41,6 +41,7 @@ class Token ->setSecret($secret) ->setExpiration(Carbon::parse($expiration)->getTimestamp()) ->setIssuer($issuer) + ->setIssuedAt(time()) ->build() ->getToken(); }
Added issued at claim to the Token create method.
diff --git a/spec/mongoid/slug_spec.rb b/spec/mongoid/slug_spec.rb index <HASH>..<HASH> 100644 --- a/spec/mongoid/slug_spec.rb +++ b/spec/mongoid/slug_spec.rb @@ -55,7 +55,6 @@ module Mongoid entity = Entity.create(:_id => UUID.generate, :name => 'Adele', :user_edited_variation => 'adele') entity.to_param.should eql "adele" end - end context "when the object is top-level" do @@ -405,30 +404,6 @@ module Mongoid dup.to_param.should eql character.to_param end end - - context "when using history and reusing a slug within the scope" do - let!(:subject1) do - book.subjects.create(:name => "A Subject") - end - let!(:subject2) do - book.subjects.create(:name => "Another Subject") - end - - before(:each) do - subject1.name = "Something Else Entirely" - subject1.save - subject2.name = "A Subject" - subject2.save - end - - it "allows using the slug" do - subject2.slugs.should include("a-subject") - end - - it "removes the slug from the old owner's history" do - subject1.slugs.should_not include("a-subject") - end - end end context "when slug is scoped by one of the class's own fields" do
remove failing history transfer specs after history transfer removal
diff --git a/lib/github_api/request.rb b/lib/github_api/request.rb index <HASH>..<HASH> 100644 --- a/lib/github_api/request.rb +++ b/lib/github_api/request.rb @@ -1,6 +1,7 @@ # encoding: utf-8 module Github + # Defines HTTP verbs module Request @@ -27,7 +28,7 @@ module Github request(:delete, path, params, options) end - def request(method, path, params, options) + def request(method, path, params, options) # :nodoc: if !METHODS.include?(method) raise ArgumentError, "unkown http method: #{method}" end @@ -45,7 +46,7 @@ module Github request.body = extract_data_from_params(params) unless params.empty? end end - response.body + ResponseWrapper.new(response, self) end private
Use response wrapper when returning from request.
diff --git a/CHANGES.rst b/CHANGES.rst index <HASH>..<HASH> 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,14 @@ Change Log ---------- +0.9999 +~~~~~~ + +Released on XXX, 2014 + +* XXX + + 0.999 ~~~~~ diff --git a/html5lib/__init__.py b/html5lib/__init__.py index <HASH>..<HASH> 100644 --- a/html5lib/__init__.py +++ b/html5lib/__init__.py @@ -20,4 +20,4 @@ from .serializer import serialize __all__ = ["HTMLParser", "parse", "parseFragment", "getTreeBuilder", "getTreeWalker", "serialize"] -__version__ = "0.999" +__version__ = "0.9999-dev" diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ with codecs.open(os.path.join(current_dir, 'README.rst'), 'r', 'utf8') as readme long_description = readme_file.read() + '\n' + changes_file.read() setup(name='html5lib', - version='0.999', + version='0.9999-dev', url='https://github.com/html5lib/html5lib-python', license="MIT License", description='HTML parser based on the WHATWG HTML specifcation',
And back to dev for <I>.
diff --git a/cihai/__about__.py b/cihai/__about__.py index <HASH>..<HASH> 100644 --- a/cihai/__about__.py +++ b/cihai/__about__.py @@ -1,6 +1,6 @@ __title__ = 'cihai' __package_name__ = 'cihai' -__version__ = '0.8.0' +__version__ = '0.8.1' __description__ = 'Library for CJK (chinese, japanese, korean) language data.' __author__ = 'Tony Narlock' __email__ = 'tony@git-pull.com'
Release <I> This release loosen version requirements for dependency packages. This should make a life bit easier in downstream packages. There were issues with a pyyaml version release that broke compatibility with Python <I>. This should handle that. Also update Sphinx <I> to <I>, and releases <I> to <I>
diff --git a/src/main/java/org/vesalainen/parser/util/Input.java b/src/main/java/org/vesalainen/parser/util/Input.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/vesalainen/parser/util/Input.java +++ b/src/main/java/org/vesalainen/parser/util/Input.java @@ -836,10 +836,9 @@ public abstract class Input<I,B extends Buffer> implements InputReader return cursor; } /** - * @deprecated Not that feasible * Returns a reference to current field. Field start and length are decoded * in int value. This method is used in postponing or avoiding string object - * creation. String or Iterator<String> can be constructed later by using + * creation. String or Iterator&gt;String&lt; can be constructed later by using * getString(int fieldRef) or getCharSequence(fieldRef) methods. * * <p>Note! If buffer size is too small the fieldRef might not be available.
Removed deprecation from fieldRef
diff --git a/featuretests/cmd_juju_dumplogs_test.go b/featuretests/cmd_juju_dumplogs_test.go index <HASH>..<HASH> 100644 --- a/featuretests/cmd_juju_dumplogs_test.go +++ b/featuretests/cmd_juju_dumplogs_test.go @@ -61,6 +61,7 @@ func (s *dumpLogsCommandSuite) TestRun(c *gc.C) { Location: "location", Level: loggo.INFO, Message: fmt.Sprintf("%d", i), + Labels: []string{"http"}, }}) c.Assert(err, jc.ErrorIsNil) } @@ -72,7 +73,7 @@ func (s *dumpLogsCommandSuite) TestRun(c *gc.C) { c.Assert(err, jc.ErrorIsNil) // Check the log file for each environment - expectedLog := "machine-42: 2015-11-04 03:02:01 INFO module %d" + expectedLog := "machine-42: 2015-11-04 03:02:01 INFO module %d http" for _, st := range states { logName := context.AbsPath(fmt.Sprintf("%s.log", st.ModelUUID())) logFile, err := os.Open(logName)
Featuretests: Fix log message output Fix the message log output with in the feature tests for dumplogs.
diff --git a/spec/integration/qless_spec.rb b/spec/integration/qless_spec.rb index <HASH>..<HASH> 100644 --- a/spec/integration/qless_spec.rb +++ b/spec/integration/qless_spec.rb @@ -1169,7 +1169,7 @@ module Qless (bjob.heartbeat + 11).should > Time.now.to_i expect { ajob.heartbeat - }.to raise_error(Qless::LuaScriptError, /handed out to another/) + }.to raise_error(Qless::LuaScriptError, /given out to another/) end it "removes jobs from original worker's list of jobs" do @@ -2166,7 +2166,7 @@ module Qless job.instance_variable_set(:@worker_name, 'foobar') expect { job.retry - }.to raise_error(Qless::LuaScriptError, /handed out to another/) + }.to raise_error(Qless::LuaScriptError, /given to another/) job.instance_variable_set(:@worker_name, Qless.worker_name) job.complete expect {
Fix specs failing due to error message changes.
diff --git a/heroku-api/src/main/java/com/heroku/api/Release.java b/heroku-api/src/main/java/com/heroku/api/Release.java index <HASH>..<HASH> 100644 --- a/heroku-api/src/main/java/com/heroku/api/Release.java +++ b/heroku-api/src/main/java/com/heroku/api/Release.java @@ -20,6 +20,7 @@ public class Release implements Serializable { String description; String created_at; List<String> addon_plan_names; + Slug slug; public Map<String, String> getUser() { return user; @@ -76,4 +77,12 @@ public class Release implements Serializable { private void setAddon_plan_names(List<String> addon_plan_names) { this.addon_plan_names = addon_plan_names; } + + public Slug getSlug() { + return slug; + } + + public void setSlug(Slug slug) { + this.slug = slug; + } }
Added slug to Release model
diff --git a/src/Injectors/user.php b/src/Injectors/user.php index <HASH>..<HASH> 100644 --- a/src/Injectors/user.php +++ b/src/Injectors/user.php @@ -9,5 +9,6 @@ return [ [ 'text' => __('laralum_notifications::general.create_notification'), 'url' => route('laralum::notifications.create'), + 'permission' => 'laralum::notifications.create', ], ];
Added permission to user.php injection
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ setup( license="New BSD", install_requires=["emoji", "grapheme", "requests"], classifiers=[ - "Development Status :: 3 - Beta", + "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License",
Beta isn't valid, revert `Classifier 'Development Status :: 3 - Beta' is not a valid classifier.`
diff --git a/src/org/zaproxy/zap/authentication/ManualAuthenticationMethodType.java b/src/org/zaproxy/zap/authentication/ManualAuthenticationMethodType.java index <HASH>..<HASH> 100644 --- a/src/org/zaproxy/zap/authentication/ManualAuthenticationMethodType.java +++ b/src/org/zaproxy/zap/authentication/ManualAuthenticationMethodType.java @@ -200,6 +200,9 @@ public class ManualAuthenticationMethodType extends AuthenticationMethodType { @Override public String encode(String parentStringSeparator) { + if (selectedSession == null) { + return ""; + } return Base64.encodeBase64String(selectedSession.getName().getBytes()); }
Fix NPE when saving manual authentication data Change ManualAuthenticationMethodType to skip session's encoding if none was set, preventing the NullPointerException. Fix #<I> - Error whilst using Api - ERROR ExtensionUserManagement - Unable to persist Users
diff --git a/tests/lib/Utf8Tools.spec.js b/tests/lib/Utf8Tools.spec.js index <HASH>..<HASH> 100644 --- a/tests/lib/Utf8Tools.spec.js +++ b/tests/lib/Utf8Tools.spec.js @@ -41,6 +41,11 @@ describe('Utf8Tools', function() { isValid: false, decoded: '48656c6c6f0020576f726c6421', }, + { + data: new Uint8Array(Nimiq.BufferUtils.fromBase64('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAAAAAAAAAAAASoAAAA=')), + isValid: false, + decoded: '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000012a000000', + }, ]; for (const vector of vectors) {
Add Philipp's exploit as test vector
diff --git a/app/models/manager_refresh/save_inventory.rb b/app/models/manager_refresh/save_inventory.rb index <HASH>..<HASH> 100644 --- a/app/models/manager_refresh/save_inventory.rb +++ b/app/models/manager_refresh/save_inventory.rb @@ -15,7 +15,10 @@ module ManagerRefresh end def save_collection(parent, key, dto_collection, hashes) - return if dto_collection.is_a? Array + unless dto_collection.is_a? ::DtoCollection + raise "A ManagerRefresh::SaveInventory needs a DtoCollection object, it got: #{dto_collection.inspect}" + end + return if dto_collection.saved? if dto_collection.saveable?(hashes)
Allow only DtoCollection in ManagerRefresh::Saveinventory Allow only DtoCollection in ManagerRefresh::Saveinventory (transferred from ManageIQ/manageiq@<I>c1a<I>fec<I>c6dfc<I>ed<I>fe<I>edcb<I>)
diff --git a/libkbfs/kbfs_ops_concur_test.go b/libkbfs/kbfs_ops_concur_test.go index <HASH>..<HASH> 100644 --- a/libkbfs/kbfs_ops_concur_test.go +++ b/libkbfs/kbfs_ops_concur_test.go @@ -716,8 +716,6 @@ func TestKBFSOpsConcurBlockSyncTruncate(t *testing.T) { // overwrites, plus one write that blocks until the dirty bcache has // room. This is a repro for KBFS-1846. func TestKBFSOpsTruncateAndOverwriteDeferredWithArchivedBlock(t *testing.T) { - t.Skip("Pending KBFS-1852") - config, _, ctx, cancel := kbfsOpsInitNoMocks(t, "test_user") defer kbfsTestShutdownNoMocks(t, config, ctx, cancel)
kbfs_ops_concur_test: with KBFS-<I> fixed, reenable test Issue: KBFS-<I>
diff --git a/lintly/parsers.py b/lintly/parsers.py index <HASH>..<HASH> 100644 --- a/lintly/parsers.py +++ b/lintly/parsers.py @@ -229,7 +229,7 @@ class CfnLintParser(BaseLintParser): violation = Violation(line=int(line_number), column=int(column), - code="`{}`".format(code), + code="{}".format(code), message=message) violations[path].append(violation)
Remove backticks from the code field.
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index <HASH>..<HASH> 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -614,9 +614,11 @@ module ActiveRecord # SCHEMA STATEMENTS ======================================== - def recreate_database(name) #:nodoc: + # Drops the database specified on the +name+ attribute + # and creates it again using the provided +options+. + def recreate_database(name, options = {}) #:nodoc: drop_database(name) - create_database(name) + create_database(name, options) end # Create a new PostgreSQL database. Options include <tt>:owner</tt>, <tt>:template</tt>,
accept option for recreate db for postgres (same as mysql now)
diff --git a/src/Site/Key.php b/src/Site/Key.php index <HASH>..<HASH> 100644 --- a/src/Site/Key.php +++ b/src/Site/Key.php @@ -16,7 +16,7 @@ namespace Zest\Site; -use Zest\Contracts\Site\key as KeyContract; +use Zest\Contracts\Site\Key as KeyContract; class Key implements keyContract {
Changes the interface statment to use (#<I>)
diff --git a/djcelery/loaders.py b/djcelery/loaders.py index <HASH>..<HASH> 100644 --- a/djcelery/loaders.py +++ b/djcelery/loaders.py @@ -21,7 +21,10 @@ class DjangoLoader(BaseLoader): return settings def on_task_init(self, task_id, task): + # the parent process may have established these, + # so need to close them. self.close_database() + self.close_cache() def close_database(self): from django.db import connection @@ -33,6 +36,13 @@ class DjangoLoader(BaseLoader): return connection.close() self._db_reuse += 1 + def close_cache(self): + # reset cache connection (if supported). + try: + cache.cache.close() + except AttributeError: + pass + def on_process_cleanup(self): """Does everything necessary for Django to work in a long-living, multiprocessing environment. @@ -42,11 +52,7 @@ class DjangoLoader(BaseLoader): # browse_thread/thread/78200863d0c07c6d/ self.close_database() - # ## Reset cache connection (if supported). - try: - cache.cache.close() - except AttributeError: - pass + self.close_cache() def on_worker_init(self): """Called when the worker starts.
Need to close cache connection at start of task, as it may be left over from the parent process. Thanks to DctrWatson and otherjacob.
diff --git a/spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb b/spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb index <HASH>..<HASH> 100644 --- a/spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb +++ b/spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb @@ -38,6 +38,13 @@ describe 'RailsAdmin Basic Bulk Action', type: :request do expect(response.response_code).to eq 404 expect(response.body).to match /0 players failed to be deleted/i end + + it 'returns 404 error for DELETE request without bulk_ids' do + expect(Player.count).to eq @players.length + delete(bulk_delete_path(bulk_action: 'bulk_delete', model_name: 'player', bulk_ids: "")) + expect(response.response_code).to eq 404 + expect(response.body).to match /0 players failed to be deleted/i + end end describe 'bulk_export' do
add an example to send the request which has empty bulk_ids
diff --git a/matchpy/matching/many_to_one.py b/matchpy/matching/many_to_one.py index <HASH>..<HASH> 100644 --- a/matchpy/matching/many_to_one.py +++ b/matchpy/matching/many_to_one.py @@ -299,7 +299,7 @@ class _MatchIter: self.constraints |= restore_constraints self.patterns |= restore_patterns self.substitution = substitution - self.subjects.append(subject) + self.subjects.appendleft(subject) def _match_regular_operation(self, transition: _Transition) -> Iterator[_State]: subject = self.subjects.popleft()
Fixed a bug in the ManyToOneMatcher.
diff --git a/src/main/java/com/cloudbees/jenkins/support/impl/AboutJenkins.java b/src/main/java/com/cloudbees/jenkins/support/impl/AboutJenkins.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/cloudbees/jenkins/support/impl/AboutJenkins.java +++ b/src/main/java/com/cloudbees/jenkins/support/impl/AboutJenkins.java @@ -23,6 +23,7 @@ import hudson.Util; import hudson.lifecycle.Lifecycle; import hudson.model.*; import hudson.remoting.Callable; +import hudson.remoting.Launcher; import hudson.remoting.VirtualChannel; import hudson.security.Permission; import hudson.util.IOUtils; @@ -803,6 +804,7 @@ public class AboutJenkins extends Component { .replaceAll("`", "&#96;") + "`"); out.println(" - Labels: " + getLabelString(Jenkins.getInstance())); out.println(" - Usage: `" + Jenkins.getInstance().getMode() + "`"); + out.println(" - Slave Version: " + Launcher.VERSION); out.print(new GetJavaInfo(" -", " +").call()); out.println(); for (Node node : Jenkins.getInstance().getNodes()) {
JENKINS-<I> - Added "Slave Version" using `Launcher.VERSION` to master node
diff --git a/fitsio/fitslib.py b/fitsio/fitslib.py index <HASH>..<HASH> 100644 --- a/fitsio/fitslib.py +++ b/fitsio/fitslib.py @@ -135,7 +135,6 @@ def write(filename, data, extname=None, units=None, compress=None, header=None, A list of strings representing units for each column. """ - fits = FITS(filename, 'rw', clobber=clobber) with FITS(filename, 'rw', clobber=clobber) as fits: if data.dtype.fields == None: fits.write_image(data, extname=extname, compress=compress, header=header) @@ -174,7 +173,6 @@ class FITS: filename = extract_filename(filename) self.filename = filename self.mode=mode - self.clobber=clobber if mode not in _int_modemap: raise ValueError("mode should be one of 'r','rw',READONLY,READWRITE") @@ -184,7 +182,7 @@ class FITS: create=0 if mode in [READWRITE,'rw']: - if self.clobber: + if clobber: create=1 if os.path.exists(filename): print 'Removing existing file' @@ -213,7 +211,6 @@ class FITS: self._FITS=None self.filename=None self.mode=None - self.clobber=None self.charmode=None self.intmode=None self.hdu_list=None
fixed bug where file was being opened twice
diff --git a/lib/application.js b/lib/application.js index <HASH>..<HASH> 100644 --- a/lib/application.js +++ b/lib/application.js @@ -44,9 +44,9 @@ framework.extend(Application.prototype, new function() { upload: 'incoming/' } - // Contains the various registered application storages for caching - this.storage = { - cache: null, + // Used to group the available application storages + this.cache = { + default: null, driver: null, response: null, session: null @@ -1141,6 +1141,30 @@ framework.extend(Application.prototype, new function() { .replace(/\/(_)?/g,'_').replace(/^__/, ''); this.views.partials[id] = func; } + + /** + Returns a new driver instance + + @param {string} driver + @param {object} config + @public + */ + + this.driver = function(driver, config) { + return new framework.drivers[driver](this, config || {}); + } + + /** + Returns a new storage instance + + @param {string} driver + @param {object} config + @public + */ + + this.storage = function(storage, config) { + return new framework.storage[storage](this, config || {}); + } /** Gets the static directories available in the application's public
Added Application::(driver|storage)
diff --git a/astropy_helpers/test_helpers.py b/astropy_helpers/test_helpers.py index <HASH>..<HASH> 100644 --- a/astropy_helpers/test_helpers.py +++ b/astropy_helpers/test_helpers.py @@ -137,7 +137,8 @@ class AstropyTest(Command, object): else: ignore_python_version = '3' coveragerc_content = coveragerc_content.replace( - "{ignore_python_version}", ignore_python_version) + "{ignore_python_version}", ignore_python_version).replace( + "{packagename}", self.package_name) tmp_coveragerc = os.path.join(tmp_dir, 'coveragerc') with open(tmp_coveragerc, 'wb') as tmp: tmp.write(coveragerc_content.encode('utf-8'))
Changes to test_helpers.py from astropy/astropy#<I>
diff --git a/route.go b/route.go index <HASH>..<HASH> 100644 --- a/route.go +++ b/route.go @@ -90,6 +90,13 @@ func (r Route) matchesAccept(mimeTypesWithQuality string) bool { // Return whether the mimeTypes match to what this Route can consume. func (r Route) matchesContentType(mimeTypes string) bool { + + // idempotent methods with empty content always match Content-Type + m := r.Method + if m == "GET" || m == "HEAD" || m == "OPTIONS" || m == "DELETE" { + return true + } + // check for both defaults if len(r.Consumes) == 0 && mimeTypes == MIME_OCTET { return true
fix for regression introduced in #<I>
diff --git a/lib/injectedlogger/delegator.rb b/lib/injectedlogger/delegator.rb index <HASH>..<HASH> 100644 --- a/lib/injectedlogger/delegator.rb +++ b/lib/injectedlogger/delegator.rb @@ -126,14 +126,25 @@ module InjectedLogger if prefix and not prefix.empty? prefix_s += " " + prefix end - klass.define_singleton_method lvl do |msg| - logger.send :log, "#{prefix_s} #{msg}" + klass.define_singleton_method lvl do |*msg, &blk| + if blk + logger.send :log, *msg do + str = blk.call + "#{prefix_s} #{str}" + end + else + logger.send :log, "#{prefix_s} #{msg.join ' '}" + end end else # assume two or more params, best effort with 1st being level if lvl_s = ruby_logger_severity(lvl) - klass.define_singleton_method lvl do |msg| - logger.send :log, lvl_s, msg + klass.define_singleton_method lvl do |*msg, &blk| + if blk + logger.send :log, lvl_s, *msg, &blk + else + logger.send :log, lvl_s, msg.join(' ') + end end end end
logger: add support for :log with blocks
diff --git a/parameters.py b/parameters.py index <HASH>..<HASH> 100644 --- a/parameters.py +++ b/parameters.py @@ -475,6 +475,7 @@ class CmdLineParser(ArgumentParser): except: raise Exception("No handler for command %s" % result.operation) + self.preops(result, error) retval = method(result.values[result.operation], error) return True, result, retval else: @@ -533,6 +534,10 @@ class CmdLineParser(ArgumentParser): else: print "Exit with errors" sys.exit(-1) + + # This function is exectued in the autocall_ops procedure. It is called prior to the call to the function that implements the operation + def preops(self, result, info): + pass # This function is executed if the self_service function is called with the ops parameter set to False and the commandline is properly parsed. # * It should return True in case that the function is properly executed. Otherwise it should return False. diff --git a/version.py b/version.py index <HASH>..<HASH> 100644 --- a/version.py +++ b/version.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # -VERSION="0.08" +VERSION="0.09" def get(): global VERSION
including a new call in the self service mechanism to address the global options
diff --git a/script/upload.py b/script/upload.py index <HASH>..<HASH> 100755 --- a/script/upload.py +++ b/script/upload.py @@ -108,6 +108,9 @@ def parse_args(): def get_atom_shell_build_version(): + if os.environ.has_key('CI'): + # In CI we just build as told. + return ATOM_SHELL_VERSION if PLATFORM == 'darwin': atom_shell = os.path.join(SOURCE_ROOT, 'out', 'R', '{0}.app'.format(PRODUCT_NAME), 'Contents',
Don't check build version in CI
diff --git a/src/Resolvers/ResolverBase.php b/src/Resolvers/ResolverBase.php index <HASH>..<HASH> 100644 --- a/src/Resolvers/ResolverBase.php +++ b/src/Resolvers/ResolverBase.php @@ -73,7 +73,7 @@ class ResolverBase { // can we do this easier? if (strpos($path, self::CHILDPATH_VARIABLE_OPEN) === false) { - return explode('/', $path); + return explode(self::CHILDPATH_PATH_SEPARATOR, $path); } // First detect all variables diff --git a/tests/PropertyResolverTest.php b/tests/PropertyResolverTest.php index <HASH>..<HASH> 100644 --- a/tests/PropertyResolverTest.php +++ b/tests/PropertyResolverTest.php @@ -22,6 +22,11 @@ class PropertyResolverTest extends PHPUnit_Framework_TestCase ); $this->assertEquals( + [ 'parameter', 'parameter2' ], + $propertyResolver->splitPathParameters('parameter.parameter2') + ); + + $this->assertEquals( [ 'parameter', '{variable}' ], $propertyResolver->splitPathParameters('parameter.{variable}') );
Fix the property resolver and add test to avoid making that mistake again.
diff --git a/lib/ddbcli/cli/options.rb b/lib/ddbcli/cli/options.rb index <HASH>..<HASH> 100644 --- a/lib/ddbcli/cli/options.rb +++ b/lib/ddbcli/cli/options.rb @@ -7,7 +7,7 @@ def parse_options options.access_key_id = ENV['AWS_ACCESS_KEY_ID'] options.secret_access_key = ENV['AWS_SECRET_ACCESS_KEY'] options.ddb_endpoint_or_region = - ENV['AWS_REGION'] || ENV['DDB_ENDPOINT'] || ENV['DDB_REGION'] || 'dynamodb.us-east-1.amazonaws.com' + ENV['AWS_REGION'] || ENV['AWS_DEFAULT_REGION'] || ENV['DDB_ENDPOINT'] || ENV['DDB_REGION'] || 'dynamodb.us-east-1.amazonaws.com' # default value options.timeout = 60
support the AWS_DEFAULT_REGION environment variable
diff --git a/tests/ArraysTest.php b/tests/ArraysTest.php index <HASH>..<HASH> 100644 --- a/tests/ArraysTest.php +++ b/tests/ArraysTest.php @@ -309,61 +309,5 @@ class ArraysTest extends PHPUnit_Framework_TestCase } } -/* -$(document).ready(function() { - - module("Arrays"); - - test("first", function() { - }); - - test("rest", function() { - }); - - test("initial", function() { - }); - - test("last", function() { - }); - - test("compact", function() { - }); - - test("flatten", function() { - }); - - test("without", function() { - }); - - test("uniq", function() { - }); - - test("intersection", function() { - }); - - test("union", function() { - }); - - test("difference", function() { - }); - - test('zip', function() { - }); - - test('object', function() { - }); - - test("indexOf", function() { - }); - - test("lastIndexOf", function() { - }); - - test("range", function() { - }); - -}); -*/ - // __END__ // vim: expandtab softtabstop=2 shiftwidth=2
Remove unnecessity code of test
diff --git a/src/org/mozilla/javascript/JavaMembers.java b/src/org/mozilla/javascript/JavaMembers.java index <HASH>..<HASH> 100644 --- a/src/org/mozilla/javascript/JavaMembers.java +++ b/src/org/mozilla/javascript/JavaMembers.java @@ -603,8 +603,9 @@ class JavaMembers Object v = ht.get(beanPropertyName); if (v != null) { // A private field shouldn't mask a public getter/setter - if (!includePrivate || + if (!includePrivate || !(v instanceof Member) || !Modifier.isPrivate(((Member)v).getModifiers())) + { continue; }
Fix propagated from <I>R2 release branch.
diff --git a/azurerm/internal/services/compute/validation.go b/azurerm/internal/services/compute/validation.go index <HASH>..<HASH> 100644 --- a/azurerm/internal/services/compute/validation.go +++ b/azurerm/internal/services/compute/validation.go @@ -168,9 +168,9 @@ func validateDiskSizeGB(v interface{}, _ string) (warnings []string, errors []er func validateManagedDiskSizeGB(v interface{}, _ string) (warnings []string, errors []error) { value := v.(int) - if value < 0 || value > 32767 { + if value < 0 || value > 65536 { errors = append(errors, fmt.Errorf( - "The `disk_size_gb` can only be between 0 and 32767")) + "The `disk_size_gb` can only be between 0 and 65536")) } return warnings, errors }
azurerm_managed_disk - increase the maximum disk_size_gb to <I> GB. (#<I>) Azure Ultra SSD Managed Disk (storage_account_type UltraSSD_LRS) supports more than <I> GB. This code fix this limitation, allowing the max of <I> for Ultra SSD. Fixes #<I>
diff --git a/templates/js/atk4_univ.js b/templates/js/atk4_univ.js index <HASH>..<HASH> 100644 --- a/templates/js/atk4_univ.js +++ b/templates/js/atk4_univ.js @@ -145,7 +145,6 @@ $.each({ }, reloadArgs: function(url,key,value){ var u=$.atk4.addArgument(url,key+'='+value); - console.log(url); this.jquery.atk4_load(u); }, reload: function(url,arg,fn){ @@ -480,6 +479,15 @@ numericField: function(){ if(t != this.value)this.value=t; }); }, +onKey: function(code,fx,modifier,modival){ + this.jquery.bind('keydown',function(e){ + if(e.which==code && (!modifier || e[modifier]==modival)){ + e.preventDefault(); + e.stopPropagation(); + return fx(); + } + }); +}, disableEnter: function(){ this.jquery.bind('keydown keypress',function (e) { if(e.which==13){
add onKey method for capturing certain keycode
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -51,7 +51,7 @@ function check(port, host) { return deferred.promise; } - if (!is.hostAddress(host)) { + if (is.nullOrUndefined(host)) { debug('set host address to default 127.0.0.1'); host = '127.0.0.1'; } @@ -123,7 +123,7 @@ function waitUntilFreeOnHost(port, host, retryTimeMs, timeOutMs) { return deferred.promise; } - if (!is.hostAddress(host)) { + if (!is.nullOrUndefined(host)) { host = '127.0.0.1'; debug('waitUntilUsedOnHost set host to default "127.0.0.1"'); } @@ -232,7 +232,7 @@ function waitUntilUsedOnHost(port, host, retryTimeMs, timeOutMs) { return deferred.promise; } - if (!is.hostAddress(host)) { + if (is.nullOrUndefined(host)) { host = '127.0.0.1'; debug('waitUntilUsedOnHost set host to default "127.0.0.1"'); }
Swapped is.hostAddress for is.nullOrUndefined.
diff --git a/src/semantic_version/__init__.py b/src/semantic_version/__init__.py index <HASH>..<HASH> 100644 --- a/src/semantic_version/__init__.py +++ b/src/semantic_version/__init__.py @@ -2,7 +2,7 @@ # Copyright (c) 2012 Raphaël Barrois -__version__ = '1.1.0-alpha' +__version__ = '1.1.0-beta' from .base import compare, match, Version, Spec, SpecList
Version bump. Features ready, doc to write.
diff --git a/archivex.go b/archivex.go index <HASH>..<HASH> 100644 --- a/archivex.go +++ b/archivex.go @@ -342,6 +342,10 @@ func (t *TarFile) Close() error { func getSubDir(dir string, rootDir string, includeCurrentFolder bool) (subDir string) { subDir = strings.Replace(dir, rootDir, "", 1) + // Remove leading slashes, since this is intentionally a subdirectory. + if len(subDir) > 0 && subDir[0] == os.PathSeparator { + subDir = subDir[1:] + } if includeCurrentFolder { parts := strings.Split(rootDir, string(os.PathSeparator))
When using AddAll with includeCurrentFolder=false, remove leading slashes from subdirectories within the archive.
diff --git a/blueprints/ember-token-auth/index.js b/blueprints/ember-token-auth/index.js index <HASH>..<HASH> 100644 --- a/blueprints/ember-token-auth/index.js +++ b/blueprints/ember-token-auth/index.js @@ -1,5 +1,7 @@ module.exports = { + normalizeEntityName: function() {}, + afterInstall: function() { return this.addBowerPackageToProject('ember-oauth2', '0.5.3'); } -; +}; diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -1,17 +1,15 @@ 'use strict'; -var path = require('path'); -var fs = require('fs'); - module.exports = { name: 'ember-token-auth', included: function(app) { this._super.included(app); + app.import(app.bowerDirectory + '/ember-oauth2/dist/ember-oauth2.amd.js', { exports: { 'ember-oauth2': ['default'] } }); } -} +};
blueprint ember-token-auth should install ember-oauth2
diff --git a/src/Model/Project.php b/src/Model/Project.php index <HASH>..<HASH> 100644 --- a/src/Model/Project.php +++ b/src/Model/Project.php @@ -135,6 +135,18 @@ class Project extends Resource } /** + * @inheritdoc + */ + public function operationAvailable($op) + { + if (!parent::operationAvailable($op)) { + $this->ensureFull(); + } + + return parent::operationAvailable($op); + } + + /** * Get a list of environments for the project. * * @param int $limit
Ensure project has full representation when checking operationAvailable()
diff --git a/core/lib/refinery/crud.rb b/core/lib/refinery/crud.rb index <HASH>..<HASH> 100644 --- a/core/lib/refinery/crud.rb +++ b/core/lib/refinery/crud.rb @@ -175,13 +175,15 @@ module Refinery # If we have already found a set then we don't need to again find_all_#{plural_name} if @#{plural_name}.nil? - per_page = if #{options[:per_page].present?.inspect} + @#{plural_name} = @#{plural_name}.paginate(:page => params[:page], :per_page => paginate_per_page) + end + + def paginate_per_page + if #{options[:per_page].present?.inspect} #{options[:per_page].inspect} elsif #{class_name}.methods.map(&:to_sym).include?(:per_page) #{class_name}.per_page end - - @#{plural_name} = @#{plural_name}.paginate(:page => params[:page], :per_page => per_page) end # If the controller is being accessed via an ajax request @@ -207,6 +209,7 @@ module Refinery protected :find_#{singular_name}, :find_all_#{plural_name}, :paginate_all_#{plural_name}, + :paginate_per_page, :render_partial_response?, :search_all_#{plural_name} )
Extracted paginate_per_page helper for crudify from complex logic.
diff --git a/lib/celluloid/logging/incident_reporter.rb b/lib/celluloid/logging/incident_reporter.rb index <HASH>..<HASH> 100644 --- a/lib/celluloid/logging/incident_reporter.rb +++ b/lib/celluloid/logging/incident_reporter.rb @@ -1,18 +1,29 @@ +require 'logger' module Celluloid # Subscribes to log incident topics to report on them. class IncidentReporter include Celluloid include Celluloid::Notifications + # get the time from the event + class Formatter < ::Logger::Formatter + def call(severity, time, progname, msg) + super(severity, msg.timestamp, progname, msg.message) + end + end + def initialize subscribe(/log\.incident/, :report) + @logger = ::Logger.new(STDERR) + @logger.formatter = Formatter.new end def report(topic, incident) + puts "INCIDENT" puts "====================" incident.events.each do |event| - puts event.message + @logger.add(event.severity, event, event.progname) end puts "====================" end
use a Logger to write incident events Includes a custom formatter that uses the event time instead of the time given by Logger, which is likely to be inaccurate as most events actually happened in the past. The actual format of the log output is the same as the default.
diff --git a/htmresearch/frameworks/pytorch/modules/k_winners.py b/htmresearch/frameworks/pytorch/modules/k_winners.py index <HASH>..<HASH> 100644 --- a/htmresearch/frameworks/pytorch/modules/k_winners.py +++ b/htmresearch/frameworks/pytorch/modules/k_winners.py @@ -32,6 +32,42 @@ from htmresearch.frameworks.pytorch.functions import k_winners, k_winners2d +def getEntropy(m): + """ + Function used to get the current and max entropies of KWinners modules. + + :param m: any module + + :return: (currentEntropy, maxEntropy) + """ + if isinstance(m, KWinnersBase): + return m.entropy(), m.maxEntropy() + else: + return 0.0, 0.0 + + +def getEntropies(m): + """ + Recursively get the current and max entropies from every child module + + :param m: any module + + :return: (currentEntropy, maxEntropy) + """ + entropy = 0.0 + max_entropy = 0.0 + for module in m.children(): + e, m = getEntropies(module) + entropy += e + max_entropy += m + + e, m = getEntropy(m) + entropy += e + max_entropy += m + + return entropy, max_entropy + + def updateBoostStrength(m): """ Function used to update KWinner modules boost strength after each epoch.
Added generic get entropy function
diff --git a/src/actions/general.js b/src/actions/general.js index <HASH>..<HASH> 100644 --- a/src/actions/general.js +++ b/src/actions/general.js @@ -56,6 +56,12 @@ export function getLicenseConfig() { ); } +export function getClientConfigAndLicense() { + return async (dispatch, getState) => { + await Promise.all([getLicenseConfig()(dispatch, getState), getClientConfig()(dispatch, getState)]); + }; +} + export function logClientError(message, level = 'ERROR') { return bindClientFunc( Client4.logClientError, @@ -101,13 +107,21 @@ export function setStoreFromLocalData(data) { }; } +export function setUrl(url) { + Client.setUrl(url); + Client4.setUrl(url); + return true; +} + export default { getPing, getClientConfig, getLicenseConfig, + getClientConfigAndLicense, logClientError, setAppState, setDeviceToken, setServerVersion, - setStoreFromLocalData + setStoreFromLocalData, + setUrl };
Add action to get both client and license config at the same time
diff --git a/Bool/Bool.php b/Bool/Bool.php index <HASH>..<HASH> 100644 --- a/Bool/Bool.php +++ b/Bool/Bool.php @@ -50,11 +50,13 @@ class Bool implements BuilderInterface */ public function addToBool(BuilderInterface $bool, $type = self::MUST) { - if (in_array($type, [ self::MUST, self::MUST_NOT, self::SHOULD ])) { - $this->container[$type][] = $bool; - } else { + $constants = (new \ReflectionObject($this))->getConstants(); + + if (!in_array($type, $constants)) { throw new \UnexpectedValueException(sprintf('The bool operator %s is not supported', $type)); } + + $this->container[$type][] = $bool; } /**
refactored Bool::addToBool method
diff --git a/module/image-set.js b/module/image-set.js index <HASH>..<HASH> 100644 --- a/module/image-set.js +++ b/module/image-set.js @@ -629,7 +629,8 @@ export class ImageSet { // Build the form data const formData = cls.behaviours.formData[this._behaviours.formData]( this, - file + file, + version ) // Set up the uploader diff --git a/module/utils/behaviours/defaults.js b/module/utils/behaviours/defaults.js index <HASH>..<HASH> 100644 --- a/module/utils/behaviours/defaults.js +++ b/module/utils/behaviours/defaults.js @@ -38,9 +38,14 @@ export function formData() { /** * Return the minimal FormData instance required to upload a file. */ - function _formData(inst, file) { + function _formData(inst, file, version) { const data = new FormData() data.append('file', file) + + if (version) { + data.append('version', version) + } + return data }
Default form data behaviour now includes version as a parameter for image sets
diff --git a/src/Native5/UI/ScriptPathResolver.php b/src/Native5/UI/ScriptPathResolver.php index <HASH>..<HASH> 100644 --- a/src/Native5/UI/ScriptPathResolver.php +++ b/src/Native5/UI/ScriptPathResolver.php @@ -75,12 +75,14 @@ class ScriptPathResolver $searchFolder = 'scripts'; } else if(preg_match('/.*\.css$/', $name)) { $searchFolder = 'styles'; + } else if(preg_match('/.*\.(?:jpg|jpeg|gif|png)$/', $name)) { + $searchFolder = 'images'; } else { $isUrl = true; $name = DIRECTORY_SEPARATOR.$app->getConfiguration()->getApplicationContext().DIRECTORY_SEPARATOR.$name; } - if($isUrl) { + if ($isUrl) { return $name; }
Fixed issue with Image Path Resolution in Client Library
diff --git a/salt/modules/status.py b/salt/modules/status.py index <HASH>..<HASH> 100644 --- a/salt/modules/status.py +++ b/salt/modules/status.py @@ -139,6 +139,8 @@ def uptime(): The uptime function was changed to return a dictionary of easy-to-read key/value pairs containing uptime information, instead of the output from a ``cmd.run`` call. + .. versionchanged:: carbon + Fall back to output of `uptime` when /proc/uptime is not available. CLI Example: @@ -160,6 +162,8 @@ def uptime(): raise CommandExecutionError('The boot_time kstat was not found.') utc_time = datetime.datetime.utcfromtimestamp(float(res['stdout'].split()[1].strip())) ut_ret['seconds'] = int((datetime.datetime.utcnow() - utc_time).total_seconds()) + elif salt.utils.which('uptime'): + return __salt__['cmd.run']('uptime') else: raise CommandExecutionError('This platform is not supported')
status.uptime - readded fallback to uptime binary, atleast we get something on the BSDs too now
diff --git a/percy/percy.test.js b/percy/percy.test.js index <HASH>..<HASH> 100644 --- a/percy/percy.test.js +++ b/percy/percy.test.js @@ -18,7 +18,10 @@ jest.setTimeout(600000) const PERCY_EXTRA_WAIT = 5000 const percySnapshotWithWait = async (page, name) => { await page.waitForTimeout(PERCY_EXTRA_WAIT) - await percySnapshot(page, name, { enableJavascript: true }) + await percySnapshot(page, name, { + enableJavascript: true, + percyCSS: '.link-button.pull-right: {display:none}' + }) } let browser
ci(percy): hide refresh button that won't let itself be standardized
diff --git a/packages/blueprint/lib/RouterBuilder.js b/packages/blueprint/lib/RouterBuilder.js index <HASH>..<HASH> 100644 --- a/packages/blueprint/lib/RouterBuilder.js +++ b/packages/blueprint/lib/RouterBuilder.js @@ -122,7 +122,7 @@ RouterBuilder.prototype.addSpecification = function (spec, currPath) { var result = controller.invoke (); var resultType = typeof result; - if (resultType === 'function') { + if (resultType === 'function' || Array.isArray (result)) { // Push the function onto the middleware stack. middleware.push (result); }
Added support for controller method returning arrays
diff --git a/exchange/bitswap/strategy/strategy.go b/exchange/bitswap/strategy/strategy.go index <HASH>..<HASH> 100644 --- a/exchange/bitswap/strategy/strategy.go +++ b/exchange/bitswap/strategy/strategy.go @@ -72,6 +72,8 @@ func (s *strategist) Seed(int64) { // TODO } +// MessageReceived performs book-keeping. Returns error if passed invalid +// arguments. func (s *strategist) MessageReceived(p peer.Peer, m bsmsg.BitSwapMessage) error { s.lock.Lock() defer s.lock.Unlock() @@ -91,7 +93,7 @@ func (s *strategist) MessageReceived(p peer.Peer, m bsmsg.BitSwapMessage) error // FIXME extract blocks.NumBytes(block) or block.NumBytes() method l.ReceivedBytes(len(block.Data)) } - return errors.New("TODO") + return nil } // TODO add contents of m.WantList() to my local wantlist? NB: could introduce
clarify MessageReceived contract License: MIT
diff --git a/src/Providers/AuthorizationServiceProvider.php b/src/Providers/AuthorizationServiceProvider.php index <HASH>..<HASH> 100644 --- a/src/Providers/AuthorizationServiceProvider.php +++ b/src/Providers/AuthorizationServiceProvider.php @@ -54,23 +54,23 @@ class AuthorizationServiceProvider extends ServiceProvider private function registerLogViewerPolicies(GateContract $gate) { // TODO: Complete the log-viewer policy implementations. - $gate->define('foundation::log-viewer.dashboard', function ($user) { + $gate->define('foundation.logviewer.dashboard', function ($user) { return true; }); - $gate->define('foundation::log-viewer.list', function ($user) { + $gate->define('foundation.logviewer.list', function ($user) { return true; }); - $gate->define('foundation::log-viewer.show', function ($user) { + $gate->define('foundation.logviewer.show', function ($user) { return true; }); - $gate->define('foundation::log-viewer.download', function ($user) { + $gate->define('foundation.logviewer.download', function ($user) { return true; }); - $gate->define('foundation::log-viewer.delete', function ($user) { + $gate->define('foundation.logviewer.delete', function ($user) { return true; }); }
Updating the LogViewer abilities to match with the permissions
diff --git a/lib/Skeleton/Core/Web/Media.php b/lib/Skeleton/Core/Web/Media.php index <HASH>..<HASH> 100644 --- a/lib/Skeleton/Core/Web/Media.php +++ b/lib/Skeleton/Core/Web/Media.php @@ -148,7 +148,7 @@ class Media { } unset($path_parts[0]); - $package_path = $package->asset_path . '/' . $filetype . '/' . $pathinfo['dirname'] . '/' . $pathinfo['basename']; + $package_path = $package->asset_path . '/' . $filetype . '/' . $pathinfo['basename']; $filepaths[] = $package_path; } }
Fix building skeleton package asset path
diff --git a/lib/Pagon/Middleware/Booster.php b/lib/Pagon/Middleware/Booster.php index <HASH>..<HASH> 100644 --- a/lib/Pagon/Middleware/Booster.php +++ b/lib/Pagon/Middleware/Booster.php @@ -12,8 +12,12 @@ class Booster extends Middleware { $app = $this->app; - // configure timezone - if (isset($app->timezone)) date_default_timezone_set($app->timezone); + // Set encoding + iconv_set_encoding("internal_encoding", $app->charset); + mb_internal_encoding($app->charset); + + // Configure timezone + date_default_timezone_set($app->timezone); // configure debug if ($app->enabled('debug')) $app->add(new Middleware\PrettyException());
Move encoding set to Booster
diff --git a/lib/jekyll-admin/server.rb b/lib/jekyll-admin/server.rb index <HASH>..<HASH> 100644 --- a/lib/jekyll-admin/server.rb +++ b/lib/jekyll-admin/server.rb @@ -52,14 +52,13 @@ module JekyllAdmin end def sanitized_path(path) - path = path.to_s.gsub(%r!\A#{Regexp.escape(JekyllAdmin.site.source)}!, "") + path = path_without_site_source(path) Jekyll.sanitized_path JekyllAdmin.site.source, path end # Returns the sanitized path relative to the site source def sanitized_relative_path(path) - path = sanitized_path(path) - path.sub(%r!\A#{Regexp.escape(JekyllAdmin.site.source)}!, "") + path_without_site_source sanitized_path(path) end def filename @@ -155,5 +154,9 @@ module JekyllAdmin return input if input.nil? || input.empty? || input.start_with?("/") "/#{input}" end + + def path_without_site_source(path) + path.to_s.gsub(%r!\A#{Regexp.escape(JekyllAdmin.site.source)}!, "") + end end end
DRY up removing the site source
diff --git a/LiipImagineBundle.php b/LiipImagineBundle.php index <HASH>..<HASH> 100644 --- a/LiipImagineBundle.php +++ b/LiipImagineBundle.php @@ -40,13 +40,13 @@ class LiipImagineBundle extends Bundle { parent::build($container); + $container->addCompilerPass(new NonFunctionalFilterExceptionPass()); $container->addCompilerPass(new DriverCompilerPass()); $container->addCompilerPass(new LoadersCompilerPass()); $container->addCompilerPass(new FiltersCompilerPass()); $container->addCompilerPass(new PostProcessorsCompilerPass()); $container->addCompilerPass(new ResolversCompilerPass()); $container->addCompilerPass(new MetadataReaderCompilerPass()); - $container->addCompilerPass(new NonFunctionalFilterExceptionPass()); if (class_exists(AddTopicMetaPass::class)) { $container->addCompilerPass(AddTopicMetaPass::create()
pr/<I>: Move 'NonFunctionalFilterExceptionPass' to be called first
diff --git a/server/src/auth/auth0.js b/server/src/auth/auth0.js index <HASH>..<HASH> 100644 --- a/server/src/auth/auth0.js +++ b/server/src/auth/auth0.js @@ -45,7 +45,7 @@ function auth0(horizon, raw_options) { https.request({ host, path: '/userinfo', headers: { Authorization: `Bearer ${access_token}` } }); - const extract_id = (user_info) => user_info && user_info.identities[0].user_id; + const extract_id = (user_info) => user_info && user_info.user_id; auth_utils.oauth2({
fixing user id extraction from auth0 info (#<I>)
diff --git a/core.js b/core.js index <HASH>..<HASH> 100644 --- a/core.js +++ b/core.js @@ -197,7 +197,7 @@ class Location extends EventEmitter { } // triggers navigation get href() { return this._url.href || ''; } - set href(href) { this._url = new url.URL(href, this._url.href); this.update(); } + set href(href) { this._url = new url.URL(href, _getBaseUrl(this._url.href)); this.update(); } get protocol() { return this._url.protocol || ''; } set protocol(protocol) { this._url.protocol = protocol; this.update(); } get host() { return this._url.host || ''; }
Make Location href setting respect the base url
diff --git a/src/actions/breakpoints/breakpointPositions.js b/src/actions/breakpoints/breakpointPositions.js index <HASH>..<HASH> 100644 --- a/src/actions/breakpoints/breakpointPositions.js +++ b/src/actions/breakpoints/breakpointPositions.js @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */ +// @flow + import { getSourceActors, getBreakpointPositionsForLine
Add flow type to breakpointPositions (#<I>)
diff --git a/src/session.js b/src/session.js index <HASH>..<HASH> 100644 --- a/src/session.js +++ b/src/session.js @@ -148,6 +148,13 @@ ghostdriver.Session = function(desiredCapabilities) { args.splice(0, 3); } + // Our callbacks assume that the only thing affecting the page state + // is the function we execute. Therefore we need to kill any + // pre-existing activity (such as part of the page being loaded in + // the background), otherwise it's events might interleave with the + // events from the current function. + this.stop(); + // Register event handlers // This logic bears some explaining. If we are loading a new page, // the loadStarted event will fire, then urlChanged, then loadFinished,
Stop the page before trying to load a new URL, otherwise our callbacks get confused.
diff --git a/class.simple_mail.php b/class.simple_mail.php index <HASH>..<HASH> 100755 --- a/class.simple_mail.php +++ b/class.simple_mail.php @@ -546,7 +546,7 @@ class SimpleMail public function formatHeader($email, $name = null) { $email = $this->filterEmail((string) $email); - if (empty(trim($name))) { + if (empty($name)) { return $email; } $name = $this->encodeUtf8($this->filterName((string) $name));
Fix issue with calling `trim` and expecting a return value in PHP < <I>
diff --git a/lib/create-clusters.js b/lib/create-clusters.js index <HASH>..<HASH> 100644 --- a/lib/create-clusters.js +++ b/lib/create-clusters.js @@ -8,6 +8,7 @@ function createClusters(selection, g) { svgClusters = selection.selectAll("g.cluster") .data(clusters, function(v) { return v; }); + svgClusters.selectAll("*").remove(); svgClusters.enter() .append("g") .attr("class", "cluster")
Remove contents of cluster on change Fixes #<I>
diff --git a/tools/java/src/com/twitter/bazel/checkstyle/JavaCheckstyle.java b/tools/java/src/com/twitter/bazel/checkstyle/JavaCheckstyle.java index <HASH>..<HASH> 100644 --- a/tools/java/src/com/twitter/bazel/checkstyle/JavaCheckstyle.java +++ b/tools/java/src/com/twitter/bazel/checkstyle/JavaCheckstyle.java @@ -95,7 +95,9 @@ public final class JavaCheckstyle { // Filter out files under heron/storm directory due to license issues Collection<String> sourceFiles = Collections2.filter(jInfo.getSourceFileList(), - Predicates.not(Predicates.containsPattern("heron/storm/src/java")) + Predicates.not(Predicates.or( + Predicates.containsPattern("heron/storm/src/java"), + Predicates.containsPattern("contrib/kafka-spout"))) ); return sourceFiles.toArray(new String[sourceFiles.size()]);
disable checkstyle for kafka-spout
diff --git a/lib/Array/prototype/common-left.js b/lib/Array/prototype/common-left.js index <HASH>..<HASH> 100644 --- a/lib/Array/prototype/common-left.js +++ b/lib/Array/prototype/common-left.js @@ -4,13 +4,11 @@ var every = Array.prototype.every , call = Function.prototype.call - , assertNotNull = require('../../assert-not-null') , toArray = require('../../Object/to-array') , sortMethod = call.bind(require('../../Object/get-compare-by')('length')); module.exports = function (list) { var lists, r, l; - assertNotNull(this); lists = [this].concat(toArray(arguments)).sort(sortMethod); l = r = lists[0].length >>> 0;
Input arguments are already validated by sortMethod