jussi-kalliokoski / gulp-awspublish-router

A router for defining file-specific rules with gulp-awspublish
29 stars 7 forks source link

Normalizing S3 paths for Windows #6

Closed doingweb closed 9 years ago

doingweb commented 9 years ago

This mirrors the fix made in pgherveou/gulp-awspublish#36 for initFile(), and prevents files from being uploaded to the bucket root with backslashes throughout the filename instead of into their proper folders. Since this plugin goes in the pipeline before gulp-awspublish, the other fix is bypassed and we need to take care of it here.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 9e2dd01fe9f9b7ea4d5488bc953b714ce4839c1e on doingweb:windows-paths into ce865ef69c12f9735cca2eb1ab2cd5c3c6a13c7e on jussi-kalliokoski:master.

brettstack commented 9 years ago

So awesome. I only just started using AWS S3 today to try out hosting my app's front end. It's like you guys knew I was coming. Thanks. ;) +1

jussi-kalliokoski commented 9 years ago

Looks great! :+1: If you could fix the minor nitpick I had, I'll be happy to merge!

doingweb commented 9 years ago

(build failed after my first update)

Ah yes, those paths in the test were explicitly Windows paths, so running them elsewhere won't work if we're using path.sep. I'm thinking the best solution is to just define the test as a normalization of the paths, and make sure they get run under both environments.

Unfortunately, TravisCI doesn't currently support running builds under Windows, but it looks like it's in the pipeline: travis-ci/travis-ci#216.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 90388264a919ec309a677d10dca64c4cc5c865ad on doingweb:windows-paths into 44145c747fb36267192cf4004c0243af7c450dc1 on jussi-kalliokoski:master.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 1d8a071541b23043749326aacec67c87246fc7f1 on doingweb:windows-paths into 44145c747fb36267192cf4004c0243af7c450dc1 on jussi-kalliokoski:master.

jussi-kalliokoski commented 9 years ago

:star:

I'm thinking the best solution is to just define the test as a normalization of the paths, and make sure they get run under both environments.

Yeah, I think the current test suite would cover the normalization if we could just run them on a Windows machine as well.

Oh, one more thing. I didn't notice on the first look because I've usually made this automatic, but double quotes please. ;) I should add JSCS to this project as well so that people don't have to think about it.

doingweb commented 9 years ago

Whoops! How silly, I noticed that convention when I was writing the test body, but forgot it everywhere else. Pushing :D

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling e54d92f0e32a73f6766688246cbd956da1c3e96c on doingweb:windows-paths into 44145c747fb36267192cf4004c0243af7c450dc1 on jussi-kalliokoski:master.

jussi-kalliokoski commented 9 years ago

TYVM! :+1:

jussi-kalliokoski commented 9 years ago

Released v0.1.1 on npm.