Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderdean committed Jun 24, 2014
2 parents b0d5ff1 + 88997cd commit c1290b9
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Version 1.0.2 (2014-06-24)
--------------------------
Added guard to prevent document size field from being set as "NaNxNaN" (#220)
Fixed Grunt publish tasks to build sp.js as well as upload it to S3 (#224)
Added cache control to Grunt upload for full semantic version (#225)

Version 1.0.1 (2014-04-09)
--------------------------
Fixed lodash.js to work in the presence of AMD modules (#165)
Expand Down
14 changes: 12 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ module.exports = function(grunt) {
gzip: true
},
not_pinned: {
options: {
headers: {
'Cache-Control': 'max-age=315360000'
}
},
upload: [
{
src: 'dist/sp.js',
Expand All @@ -163,6 +168,11 @@ module.exports = function(grunt) {
]
},
pinned: {
options: {
headers: {
'Cache-Control': 'max-age=3600'
}
},
upload: [
{
src: 'dist/sp.js',
Expand Down Expand Up @@ -198,8 +208,8 @@ module.exports = function(grunt) {
});

grunt.registerTask('default', 'Build lodash, Browserify, add banner, and minify', ['lodash', 'browserify', 'concat', 'min']);
grunt.registerTask('publish', 'Upload to S3 and invalidate Cloudfront (full semantic version only)', ['upload_setup', 'concat', 'min', 's3:not_pinned', 'invalidate_cloudfront:not_pinned']);
grunt.registerTask('publish-pinned', 'Upload to S3 and invalidate Cloudfront (full semantic version and semantic major version)', ['upload_setup', 'concat', 'min', 's3', 'invalidate_cloudfront']);
grunt.registerTask('publish', 'Upload to S3 and invalidate Cloudfront (full semantic version only)', ['upload_setup', 'lodash', 'browserify', 'concat', 'min', 's3:not_pinned', 'invalidate_cloudfront:not_pinned']);
grunt.registerTask('publish-pinned', 'Upload to S3 and invalidate Cloudfront (full semantic version and semantic major version)', ['upload_setup', 'lodash', 'browserify', 'concat', 'min', 's3', 'invalidate_cloudfront']);
grunt.registerTask('travis', 'Intern tests for Travis CI', ['lodash','intern']);

}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "snowplow-tracker",
"version": "1.0.1",
"version": "1.0.2",
"devDependencies": {
"grunt": "~0.4.2",
"intern": "~1.4.0",
Expand Down
2 changes: 1 addition & 1 deletion src/js/lib/detectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
var de = documentAlias.documentElement; // Alias
var w = Math.max(de.clientWidth, de.offsetWidth, de.scrollWidth);
var h = Math.max(de.clientHeight, de.offsetHeight, de.scrollHeight);
return w + 'x' + h;
return isNaN(w) || isNaN(h) ? '' : w + 'x' + h;
}

/*
Expand Down
2 changes: 1 addition & 1 deletion src/js/snowplow.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
windowAlias = window,

/* Tracker identifier with version */
version = 'js-1.0.0', // Update banner.js too
version = 'js-1.0.2', // Update banner.js too

/* Contains three variables that are shared with tracker.js and must be passed by reference */
mutSnowplowState = {
Expand Down

0 comments on commit c1290b9

Please sign in to comment.