Skip to content

Commit

Permalink
Merge pull request #56 from LevelbossMike/fix-windows-build
Browse files Browse the repository at this point in the history
Remove remaining `path.join` for win-compatibility
  • Loading branch information
LevelbossMike committed Feb 21, 2016
2 parents 7e08c3b + 510e05b commit 5013149
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* jshint node: true */
'use strict';
var path = require('path');
var DeployPluginBase = require('ember-cli-deploy-plugin');
var S3 = require('./lib/s3');
var joinUriSegments = require('./lib/util/join-uri-segments');

module.exports = {
name: 'ember-cli-deploy-s3-index',
Expand Down Expand Up @@ -43,7 +43,7 @@ module.exports = {
var filePattern = this.readConfig('filePattern');
var gzippedFiles = this.readConfig('gzippedFiles');
var allowOverwrite = this.readConfig('allowOverwrite');
var filePath = path.join(distDir, filePattern);
var filePath = joinUriSegments(distDir, filePattern);

var options = {
bucket: bucket,
Expand Down
17 changes: 7 additions & 10 deletions lib/s3.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/* jshint node: true */
'use strict';

var AWS = require('aws-sdk');
var CoreObject = require('core-object');
var Promise = require('ember-cli/lib/ext/promise');
var fs = require('fs');
var readFile = Promise.denodeify(fs.readFile);
var mime = require('mime-types');
var AWS = require('aws-sdk');
var CoreObject = require('core-object');
var Promise = require('ember-cli/lib/ext/promise');
var fs = require('fs');
var readFile = Promise.denodeify(fs.readFile);
var mime = require('mime-types');
var joinUriSegments = require('./util/join-uri-segments');

function headObject(client, params) {
return new Promise(function(resolve, reject) {
Expand All @@ -24,10 +25,6 @@ function headObject(client, params) {
});
}

function joinUriSegments(prefix, uri) {
return prefix === '' ? uri : [prefix, uri].join('/');
}

module.exports = CoreObject.extend({
init: function(options) {
var plugin = options.plugin;
Expand Down
7 changes: 7 additions & 0 deletions lib/util/join-uri-segments.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* jshint node: true */
'use strict';
function joinUriSegments(prefix, uri) {
return prefix === '' ? uri : [prefix, uri].join('/');
}

module.exports = joinUriSegments;

0 comments on commit 5013149

Please sign in to comment.