Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Feature/compress image #22

Merged
merged 9 commits into from
Apr 21, 2016
Merged

Conversation

dariuszor
Copy link
Contributor

@dariuszor dariuszor commented Apr 19, 2016

WIP @panshul007, could you have a look?

@coveralls
Copy link

Coverage Status

Coverage increased (+3.0%) to 65.587% when pulling 4d4e653 on dariuszor:feature/compress_image into 7ca38a8 on sphereio:master.

.use(plugin)
.run (err) ->
if err
resolve 'Cannot compress file: %s', err

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you resolve on error? Why not reject? Same below.

Copy link
Contributor Author

@dariuszor dariuszor Apr 19, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will change it to reject with the same message, and use Cannot compress file: as a constance.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not use same error description / constant. It would be useful to know what caused an error. So here i would maybe write Cannot compress file: %s but below Cannot get stats for source: %s

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But personally i always try to use word Error on error. It allows easier searching through log files for potential issues.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coveralls
Copy link

Coverage Status

Coverage increased (+22.8%) to 85.425% when pulling c0301cf on dariuszor:feature/compress_image into 7ca38a8 on sphereio:master.

@dariuszor
Copy link
Contributor Author

@butenkor I've updated according to your comments. Please check.

@@ -26,11 +26,11 @@ class Compress
.use(plugin)
.run (err) ->
if err
resolve 'Cannot compress file: %s', err
reject 'error while compressing file: ' + err

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please always start sentence with upper case. Search for most tools is case insensitive

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@butenkor
Copy link

Looks good. Just check my last two comments and you are good to merge.

@butenkor
Copy link

👍 for coverage increase by 23% :)

@coveralls
Copy link

Coverage Status

Coverage increased (+22.8%) to 85.425% when pulling f670311 on dariuszor:feature/compress_image into 7ca38a8 on sphereio:master.

@butenkor
Copy link

👍

@pgbytes pgbytes merged commit 2f227a4 into sphereio:master Apr 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants