ApprovalTests.Ruby icon indicating copy to clipboard operation
ApprovalTests.Ruby copied to clipboard

Update readme

Open markijbema opened this issue 11 years ago • 10 comments

I was browsing around the code and am amazed at the amount of functionality which I didn't see from the readme. I think it would be really worthwhile to update the readme with the functionality at least, even if it isn't very well written/with lots of examples for now. I really think this is a great gem, and it apparantly is even better than I thought :)

markijbema avatar Dec 12 '13 20:12 markijbema

I think you're right that the README could use more examples.

Could some of the test-cases be a basis for the examples?

kytrinyx avatar Dec 13 '13 00:12 kytrinyx

Yes, I think that would work pretty well :) Also the CLI should be documented (I was totally surprised that that existed ;) ).

markijbema avatar Dec 13 '13 05:12 markijbema

Yes, good call!

kytrinyx avatar Dec 13 '13 13:12 kytrinyx

Wondered about this today, but any reason for not following -i/-f semantics? I'd say -i should do -ask true, -f should do -ask false, and the default is up to you.

markijbema avatar Feb 19 '14 18:02 markijbema

Is that --interactive and --force? How is --force the same as "don't ask, do nothing"?

kytrinyx avatar Feb 19 '14 18:02 kytrinyx

Ah sorry, I didn't read the updated readme yet. You're right of course. In that case --force is the option I'm missing ;)

markijbema avatar Feb 19 '14 19:02 markijbema

Actually, now I think about it, 'verify --ask false' is a strange name for 'diff'. When you call verify with ask I'd say you're not really verifying. What about

  • approvals diff == approvals verify --ask false
  • approvals verify == approvals verify --ask true
  • approvals verify -f == echo -e "y\ny\ny\n" | approvals verify --ask true

I might be missing something though, because I only use the default verifyer, and not the vimdiff, but I expect this would work the same in that case right?

(on a sidenote, any reason you use -a in your vim-mapping? That's the default, right?)

markijbema avatar Feb 19 '14 19:02 markijbema

Actually, now I think about it, 'verify --ask false' is a strange name for 'diff'.

Yeah that's fair, but I don't like the syntax:

$ approvals diff --diff vimdiff

I agree that if we have an approvals diff that never asks, it makes sense to have approvals verify that always asks.

As for the third suggestion, I can imagine a use case where you would want to automatically accept the new output.

(on a sidenote, any reason you use -a in your vim-mapping? That's the default, right?)

I think what I originally intended was a flag that is true if present, false if absent. Looking at it again, I totally screwed that up.

kytrinyx avatar Feb 19 '14 20:02 kytrinyx

approvals view?

markijbema avatar Feb 19 '14 21:02 markijbema

Oooh, I like that!

kytrinyx avatar Feb 19 '14 21:02 kytrinyx