Skip to content

Update tutorial builtin contract list #170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

gsinclair
Copy link
Contributor

There are three commits in this pull request. One to add Eq and Func. One to arrange the list into groups. One to make a few changes to wording and examples.

This addresses the documentation deficiency identified in #168.

gsinclair added a commit to gsinclair/contracts.ruby that referenced this pull request Jul 3, 2015
E.g. RangeOf[Nat] or RangeOf[String] or ...

Includes tests but not TUTORIAL.md as that is under potential change
from pull request egonSchiele#170.
* [`KeywordArgs`](http://www.rubydoc.info/gems/contracts/Contracts/KeywordArgs) – checks that the argument is an options hash, and all required keyword arguments are present, and all values pass their respective contracts, e.g. `KeywordArgs[:number => Num, :description => Optional[String]]`
* [`Optional`](http://www.rubydoc.info/gems/contracts/Contracts/Optional) – checks that the keyword argument is either not present or pass the given contract, can not be used outside of `KeywordArgs` contract, e.g. `Optional[Num]`

* Validators
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe Duck typing ? WDYT?

@alex-fedorov
Copy link
Collaborator

Looks good

@gsinclair
Copy link
Contributor Author

"Duck typing" sounds quite reasonable.

@waterlink
Copy link
Collaborator

This PR needs to be rebased against master (last merge to master has fixed issue on travis)

@gsinclair
Copy link
Contributor Author

OK. Can you give me advice on how to do this? I'm fine with rebasing within a branch, but I'm not sure how to rebase an existing branch onto master. I've googled and there's information, so that's no problem, but wouldn't I then need to push --force the branch? And isn't that a sin in a public repository?

@nixpulvis
Copy link
Contributor

Force pushing a public branch is generally not a good idea, but only if other people are using it. So in this case you could rebase this branch against master and force push it because it's not a publicly used branch.

@gsinclair
Copy link
Contributor Author

Cool, thanks.

On Sat, Jul 4, 2015 at 12:34 PM, Nathan Lilienthal
notifications@github.com wrote:

Force pushing a public branch is generally not a good idea, but only if other people are using it. So in this case you could rebase this branch against master and force push it because it's not a publicly used branch.

Reply to this email directly or view it on GitHub:
#170 (comment)

@egonSchiele
Copy link
Owner

Thanks for these PRs @gsinclair! Just waiting for the rebase before I merge this.

@gsinclair
Copy link
Contributor Author

OK, I hope I've done it right. Can you check?

@waterlink
Copy link
Collaborator

@gsinclair Doesn't look like you have successfully rebased against upstream master, or probably something else, that conflicts with this change, was merged in between.

Just in case, my usual rebase procedure: https://gist.github.com/waterlink/ee7600e499d2ca8c596f

@gsinclair gsinclair force-pushed the update_tutorial_contract_list branch from 087d1c0 to 58620a3 Compare July 7, 2015 02:25
@gsinclair
Copy link
Contributor Author

Thanks for your procedure; it was helpful.

I've followed it, resolved conflicts, and force pushed my topic branch again. Should be OK now, I'd say.

Note: my branch has five commits; please feel free to squash them into one before merging. I'd happily do that for you, but it's not my call.

@waterlink
Copy link
Collaborator

@gsinclair Thanks

waterlink added a commit that referenced this pull request Jul 7, 2015
@waterlink waterlink merged commit ce6e0a9 into egonSchiele:master Jul 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants