Skip to content

Commit

Permalink
Merge branch 'release/4.1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirk Lüth authored and Dirk Lüth committed Jan 30, 2017
2 parents ec54a89 + a5d2df9 commit c015d5f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
25 changes: 19 additions & 6 deletions extras/handler/legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,43 @@
});

function resolve() {
var self = this,
deferred = self.deferred,
probe = settings[self.path] && settings[self.path].probe,
var self = this,
dfd = self.dfd,
probe = settings[self.path] && settings[self.path].probe,
result;

handlerModule.process(self);

if(probe && (result = probe())) {
provide(function() { return result; });
} else {
deferred.reject(new Failure('error probing', self.path));
dfd.reject(new Failure('error probing', self.path));
}
}

function HandlerLegacy() {}

HandlerLegacy.prototype = {
onPreProcess: function(dependency) {
onPreRequest: function(dependency) {
var dependencies = settings[dependency.path] && settings[dependency.path].dependencies;

handlerModule.onPreRequest(dependency);

if(dependencies) {
dependency.enqueue = demand.apply(null, dependencies);
}
},
onPreProcess: function(dependency) {
var dependencies;

if(!dependency.enqueue) {
dependencies = settings[dependency.path] && settings[dependency.path].dependencies;

if(dependencies) {
dependency.enqueue = demand.apply(null, dependencies);
}
}
},
process: function(dependency) {
var boundResolve = resolve.bind(dependency);

Expand All @@ -44,7 +57,7 @@
.then(
boundResolve,
function() {
dependency.deferred.reject(new Failure('error resolving', dependency.path, arguments));
dependency.dfd.reject(new Failure('error resolving', dependency.path, arguments));
}
)
}
Expand Down
2 changes: 1 addition & 1 deletion extras/plugin/sri.js
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@

if(options = isEnabled(dependency.path)) {
if(hash(options.type, dependency.source) !== options.hash) {
dependency.deferred.reject(new Failure('error resolving (sri)', dependency.id));
dependency.dfd.reject(new Failure('error resolving (sri)', dependency.id));
}
}
});
Expand Down
7 changes: 4 additions & 3 deletions gulp/tasks/bump.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var gulp = require('gulp'),
plugins = require('gulp-load-plugins')(),
config = require('../config'),
shared = require('../shared'),
id = 'bump',
task = config.tasks[id];

Expand All @@ -9,20 +10,20 @@ module.exports = gulp;
gulp.task(id + ':patch', function() {
return gulp.src(task.watch)
.pipe(plugins.bump({ type: 'patch' }))
.pipe(plugins.chmod(0o644))
.pipe(plugins.chmod(shared.rights))
.pipe(gulp.dest('./'));
});

gulp.task(id + ':minor', function() {
return gulp.src(task.watch)
.pipe(plugins.bump({ type: 'minor' }))
.pipe(plugins.chmod(0o644))
.pipe(plugins.chmod(shared.rights))
.pipe(gulp.dest('./'));
});

gulp.task(id + ':major', function() {
return gulp.src(task.watch)
.pipe(plugins.bump({ type: 'major' }))
.pipe(plugins.chmod(0o644))
.pipe(plugins.chmod(shared.rights))
.pipe(gulp.dest('./'));
});

0 comments on commit c015d5f

Please sign in to comment.