Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    antoinelyset
    @antoinelyset
    Thanks a lot anyway. I will do the Hash way I think. Data first, explicit, no magic.
    Aditya Bhargava
    @egonSchiele
    Ok! I think that will be the easiest
    callback after contract definition: let me wait till there's a case that really needs it
    antoinelyset
    @antoinelyset
    Yes, KISS, it is already really good and powerful.
    Aditya Bhargava
    @egonSchiele
    Thanks!
    Szymon Szeliga
    @Szeliga
    Hello, I'm trying to run the benchmarks but I'm getting require': cannot load such file -- contracts/core (LoadError)
    I'm running it like this contracts.ruby|master ⇒ ruby benchmarks/hash.rb
    I've cloned from master
    and btw great job on the library :) I'm doing an internal webinar about it tomorrow and wanted to include the benchmarks in it
    Aditya Bhargava
    @egonSchiele
    awesome @Szeliga !
    let me try running, one sec
    RUBYLIB=./lib ruby benchmarks/hash.rb
    try that^
    Szymon Szeliga
    @Szeliga
    works like a charm, thanks! :)
    Aditya Bhargava
    @egonSchiele
    cool :) The IO benchmark is a little more real-world
    Szymon Szeliga
    @Szeliga
    thanks for the tip ;)
    I can share the presentation after I finish it, but it's mostly a presentation of the library as a whole, and is heavily based on the getting started guide (great guide btw). If you are interested in posting it on wiki or something, I can send it to you, and you can evaluate if it's worth it. What do you think?
    Aditya Bhargava
    @egonSchiele
    That would be neat @Szeliga
    Szymon Szeliga
    @Szeliga
    I will post it on speakerdeck I think, and will provide the link here
    Aditya Bhargava
    @egonSchiele
    works for me
    Szymon Szeliga
    @Szeliga
    ok, I'm going back to running the benchmarks and polishing the slides, thanks for the help! :)
    Aditya Bhargava
    @egonSchiele
    ok, take care
    Gavin Sinclair
    @gsinclair
    @antoinelyset I have created an implementation of value objects that respects contracts. See if you like it: search "github gsrubylib". But it's wrapped up in my personal library at the moment. I need to extract it into a gem. But it would make sense to include a Struct implementation as well.
    You're welcome to do whatever you like with the code.
    Simon George
    @sfcgeorge
    @gsinclair oh that's kinda nice :)
    antoinelyset
    @antoinelyset
    @gsinclair Wow thank you. That's amazing. I'm gonna look at it right now. <3
    antoinelyset
    @antoinelyset
    @gsinclair This is really good. That would be cool as a gem. I may do it if I have some time.
    Szymon Szeliga
    @Szeliga
    I totally forgot about posting the presentation I did, sorry for that - https://github.com/Szeliga/webinar-contracts-31-07-2015 here is the reveal.js version, https://github.com/Szeliga/webinar-contracts-31-07-2015/blob/master/presentation.pdf and here is a pdf version
    Aditya Bhargava
    @egonSchiele
    Thanks szeliga!
    Gavin Sinclair
    @gsinclair
    @antoinelyset You're welcome; glad you like it. I won't have time to make it a gem for at least another six weeks, I'd say, so if the fancy takes you, please go right ahead.
    Gavin Sinclair
    @gsinclair
    @Szeliga Thanks for the pointer to the presentation. Always fun to read about Contracts! I think the EvenNumber example should check that the argument is Integer before using the % method. Otherwise you don't get a nice contract violation when you pass a String, for instance.
    Oleksii Fedorov
    @waterlink
    Just published this blog post about rspec-mocks + contracts.ruby + custom validators feature: http://waterlink.github.io/blog/2015/08/31/using-contracts-dot-ruby-with-rspec-part-2/
    Aditya Bhargava
    @egonSchiele
    nice, short and sweet
    Aditya Bhargava
    @egonSchiele
    hey @waterlink I like that you added a blackbelt label here: https://github.com/egonSchiele/contracts.ruby/issues/191#issuecomment-126202370
    what do you think of adding a bunnyslope label to easy tickets going forward?
    That way if someone wants to contribute to the project, they have an easy place to start
    Aditya Bhargava
    @egonSchiele
    Someone made an animation of the contributions to contracts.ruby
    PikachuEXE
    @PikachuEXE
    Nice video
    Seems quite active since 2015
    Gavin Sinclair
    @gsinclair
    If anyone is out there, I'd love an opinion about this: https://gist.github.com/gsinclair/39d848df1439ba86c02355a0376fa51f
    (TL;DR: Why am I getting a contract violation on argument 3 of 3 when there are only two arguments to the method?)
    PikachuEXE
    @PikachuEXE
    @gsinclair
    oops enter just send the message - -

    Contract Enumerable, Func[Any => Any] => None
    Maybe Func has bug?

    Try Contract Enumerable, Any => None first

    Olle Jonsson
    @olleolleolle
    Hello, friends of Contracts for Ruby! This is my first time here, and I just wanted to thank everyone involved for the creation and maintenance of this quite wonderful system.
    Olle Jonsson
    @olleolleolle
    @egonSchiele I wonder if you'd be interested in a PR about creating a RuboCop .rubocop-todo.yml to be included as a "get to 0 warnings and count down"
    Olle Jonsson
    @olleolleolle
    spec/ruby_version_specific/contracts_spec_1.9.rb (These complicate things a bit; RuboCop likes a code-base to match up to 1 TargetRubyVersion. I'll try to make it ignore these.)
    Olle Jonsson
    @olleolleolle
    As a way of saying the same thing, I made this as a PR.
    Olle Jonsson
    @olleolleolle
    This PR egonSchiele/contracts.ruby#271 simplifies the CI story by adding a Build Stage.
    Olle Jonsson
    @olleolleolle
    One open task now is to take the RuboCop step up to latest release. A mechanical step.