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

add option to skip conflicts when uploading #413

Merged
merged 1 commit into from
Aug 28, 2014

Conversation

Floby
Copy link

@Floby Floby commented Aug 28, 2014

The option --skip or -s for kanso upload makes the command
ignore document update conflicts and report them as "skipped"
While still treating this as success (errlevel 0)

The reason for this modification is to allow for automating our
deployment which ensure the presence of a few documents but
still allows them to be modified later by the application

I could not find how to write or even run tests, so I'm expecting some pointers for that so I can add proper testing to this.

The option --skip or -s for `kanso upload` makes the command
ignore document update conflicts and report them as "skipped"
While still treating this as success (errlevel 0)

The reason for this modification is to allow for automating our
deployment which ensure the presence of a few documents but
still allows them to be modified later by the application
@mandric
Copy link
Member

mandric commented Aug 28, 2014

Hey @Floby have a look at the test directory. I also updated package.json so you can run npm test.

@Floby
Copy link
Author

Floby commented Aug 28, 2014

Yes, I found that afterwars after looking at the travis config file.

Tests are green, however I couldn't find any test on the upload command. Should I go and write some or is that OK ?

@mandric
Copy link
Member

mandric commented Aug 28, 2014

More tests are usually good. It's up to you, I will go ahead and merge though.

@Floby
Copy link
Author

Floby commented Aug 28, 2014

I must say I probably don't know enough about the codebase to efficiently write tests for the whole upload command.

If you merge this, could you please bump a patch version and publish it :) ?

mandric added a commit that referenced this pull request Aug 28, 2014
add option to skip conflicts when uploading.
@mandric mandric merged commit 6744c3c into kanso:master Aug 28, 2014
@mandric
Copy link
Member

mandric commented Aug 28, 2014

Done, pushed 0.3.3 to npm.

@Floby
Copy link
Author

Floby commented Aug 28, 2014

thanks a lot !

On 28 August 2014 16:57, Milan Andric notifications@github.com wrote:

Done, pushed 0.3.3 to npm.


Reply to this email directly or view it on GitHub
#413 (comment).

@jbuiss0n
Copy link

You should us the '--skip' parameter somewhere no ? :)

@Floby
Copy link
Author

Floby commented Aug 28, 2014

Yeah indeed.
This is embarassing. I forgot to not skip conflicts when the option is not set :)
For good measure I added some tests on that part of the code that I refactored for testability.
It's in the same branch.

@Floby
Copy link
Author

Floby commented Aug 28, 2014

Should I make another pull request ?

@Floby
Copy link
Author

Floby commented Aug 28, 2014

Well, I'm gonna push something even better later on, so let's wait a bit :D
Le 28 août 2014 17:22, "jbuiss0n" notifications@github.com a écrit :

You should us the '--skip' parameter somewhere no ? :)


Reply to this email directly or view it on GitHub
#413 (comment).

@mandric
Copy link
Member

mandric commented Aug 28, 2014

No worries, I'm also getting up to speed. ;-)

mandric pushed a commit that referenced this pull request Aug 28, 2014
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.

3 participants