Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
krico committed Apr 15, 2015
1 parent 509ffbf commit bea7ca8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
37 changes: 19 additions & 18 deletions schedule/schedule-appengine/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ var argv = require('yargs').argv,
karma = require('gulp-karma'),
gulpif = require('gulp-if'),
templateCache = require('gulp-angular-templatecache'),
plumber = require('gulp-plumber'),
paths = require('./paths.json');
plumber = require('gulp-plumber');

var xml2json = require('xml-to-json');

Expand All @@ -52,7 +51,9 @@ function mavenVersion() {

var pomVersion = mavenVersion();
gutil.log('Project version: ' + gutil.colors.cyan(pomVersion));
paths.build = paths.build.replace('@VERSION@', pomVersion);
var paths = require('./paths.json');
var target = paths.buildTemplate.replace('@VERSION@', pomVersion);

gulp.task('clean', clean);
gulp.task('sym', ['build'], sym);
gulp.task('bower-install', bowerInstall);
Expand Down Expand Up @@ -98,12 +99,12 @@ function rebuild() {


function clean(cb) {
del([paths.build, paths.symBuild], cb);
del([target, paths.symBuild], cb);
}

function sym(cb) {
return gulp
.src(paths.build)
.src(target)
.pipe(symlink(paths.symBuild, {force: true, relative: true}));
}

Expand All @@ -128,12 +129,12 @@ function clientTpl(cb) {
footer: '})(angular);'
}))
.pipe(sourcemaps.init())
.pipe(gulp.dest(paths.build + '/js'))
.pipe(gulp.dest(target + '/js'))
.pipe(ngAnnotate())
.pipe(uglify())
.pipe(rename({extname: '.min.js'}))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest(paths.build + '/js'));
.pipe(gulp.dest(target + '/js'));
}


Expand All @@ -155,12 +156,12 @@ function clientJs(cb) {
.pipe(replace('@VERSION@', versionInfo.version))
.pipe(plumber())
.pipe(concat('jasify.js'))
.pipe(gulp.dest(paths.build + '/js'))
.pipe(gulp.dest(target + '/js'))
.pipe(ngAnnotate())
.pipe(uglify())
.pipe(rename({extname: '.min.js'}))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest(paths.build + '/js'));
.pipe(gulp.dest(target + '/js'));
}

function clientDependenciesJsFun(key) {
Expand All @@ -173,12 +174,12 @@ function clientDependenciesJsFun(key) {
.pipe(sourcemaps.init())
.pipe(plumber())
.pipe(concat('dep-' + key + '.js'))
.pipe(gulp.dest(paths.build + '/js'))
.pipe(gulp.dest(target + '/js'))
.pipe(ngAnnotate())
.pipe(uglify())
.pipe(rename({extname: '.min.js'}))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest(paths.build + '/js'));
.pipe(gulp.dest(target + '/js'));
};
}

Expand All @@ -204,11 +205,11 @@ function clientCss(cb) {
]
}))
.pipe(concat('jasify.css'))
.pipe(gulp.dest(paths.build + '/css'))
.pipe(gulp.dest(target + '/css'))
.pipe(minifyCSS())
.pipe(rename({extname: '.min.css'}))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest(paths.build + '/css'));
.pipe(gulp.dest(target + '/css'));
}

function clientDependenciesCssFun(key) {
Expand All @@ -222,27 +223,27 @@ function clientDependenciesCssFun(key) {
return function (cb) {

gulp.src(fonts)
.pipe(gulp.dest(paths.build + '/fonts'));
.pipe(gulp.dest(target + '/fonts'));

return gulp.src(src)
.pipe(concat('dep-' + key + '.css'))
.pipe(gulp.dest(paths.build + '/css'))
.pipe(gulp.dest(target + '/css'))
.pipe(minifyCSS())
.pipe(rename({extname: '.min.css'}))
.pipe(gulp.dest(paths.build + '/css'));
.pipe(gulp.dest(target + '/css'));
};
}


function html(cb) {
return gulp.src(paths.html)
.pipe(htmlmin({collapseWhitespace: true, minifyJS: true}))
.pipe(gulp.dest(paths.build + '/../'))
.pipe(gulp.dest(target + '/../'))
}

function staticHtml(cb) {
return gulp.src(paths.staticHtml)
.pipe(gulp.dest(paths.build + '/../'))
.pipe(gulp.dest(target + '/../'))
}


Expand Down
2 changes: 1 addition & 1 deletion schedule/schedule-appengine/paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
]
}
},
"build": "target/schedule-appengine-@VERSION@/build",
"buildTemplate": "target/schedule-appengine-@VERSION@/build",
"bower": "target/bower_components",
"symBuild": "src/main/html/build"
}
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ public void testParseHumanReadableWithRandomDepth() throws Exception {
Key parsedKey = KeyUtil.parseHumanReadableString(encoded);
assertNotNull(parsedKey);
assertEquals(key, parsedKey);
// System.out.println(encoded + " " + key);
}
}

Expand Down Expand Up @@ -183,7 +182,6 @@ public void testNonNumericKeyRandomDepth() throws Exception {
Key parsedKey = KeyUtil.parseHumanReadableString(encoded);
assertNotNull(parsedKey);
assertEquals(key, parsedKey);
System.out.println(encoded + "\n\t" + key);
}
}

Expand Down

0 comments on commit bea7ca8

Please sign in to comment.