Permalink
Commits on May 23, 2017
  1. Apply contracts to each name for multi-attribute calls (#259)

    * Fix multi-attribute contracts
    * fix rubocop
    kyeah committed with May 23, 2017
Commits on Apr 24, 2017
  1. v0.16.0

    Aditya Bhargava committed Apr 24, 2017
Commits on Apr 20, 2017
  1. FIX: methods created with attr_* don't have a source_location. In tha…

    …t case just return the empty string.
    Aditya Bhargava committed Apr 20, 2017
  2. Add a `Contracts::Attrs` module containing attribute w/ contracts uti…

    …lities. (#255)
    
    * Add `Attrs` module containing attribute w/ contracts utilities.
    
    * Add documentation for new `Attrs` module.
    
    * Add tests for new `Attrs` module.
    frewsxcv committed with Apr 20, 2017
  3. Fix StrictHash contract for extra keys (#254)

    * Fix StrictHash contract for extra keys
    
    `Contracts::StrictHash` didn't complain about extra entries in a given
    hash. This was because of the missing assertion for keys. Specs hadn't
    caught this case because `age` key had a wrong type anyway.
    
    Compare keys for contract and a given hash and return false if they are
    equal.
    
    * Do not use a second lookup for the contract in StrictHash assertion
    
    `all?` iterator already provides contract for the `valid?` check. Use
    it instead of accessing `contract_hash` again.
    smt116 committed with Apr 20, 2017
  4. Drop support for Ruby 1.8. (#256)

    * Drop support for Ruby 1.8.
    
    As per the conversation in:
    
    #255
    
    * Address rubocop violation.
    
    * Mention 1.8 support drop in changelog.
    frewsxcv committed with Apr 20, 2017
Commits on Mar 29, 2017
Commits on Feb 27, 2017
  1. adding task to add tag for new versions

    Aditya Bhargava committed Feb 27, 2017
Commits on Feb 24, 2017
  1. version 0.15.0

    Aditya Bhargava committed Feb 24, 2017
  2. add to readme.md info about running `rspec`

    `rake spec` don't run required `ruby_version_specific` spec, therefore command actually running that is `rspec`.
    esse committed with Feb 24, 2017
  3. fixes issue #242 - contract's return value is now enforced with block…

    …s properly (#251)
    
    * fixes issue #242 - contract's return value is now enforced with blocks properly
    
    * more robust if condition
    
    * handle block with keyword arguments and change Gemfile syntax to work
    with travis properly
    esse committed with Feb 24, 2017
Commits on Dec 22, 2016
  1. make specs less noisy to read by using declarative expectations (#245)

    * make specs less noisy to read by using declarative expectations
    
    problem: 
    - specs are a bit hard to read
    
    solution: 
    - use `fails` / `passes` methods to indicate desired expectation 
    - specs become more declarative and descriptive
    mindreframer committed with Dec 22, 2016
Commits on May 17, 2016
  1. Merge pull request #237 from eval/patch-1

    Fix contracts used in AR-models
    waterlink committed May 17, 2016
  2. Fix contracts used in AR-models

    ActiveRecord::Base.inherited needs to be called in order for models to be setup correctly.
    
    Fixes #223
    eval committed May 17, 2016
Commits on Apr 27, 2016
  1. fix docs

    committed Apr 27, 2016
Commits on Apr 26, 2016
  1. version bump in changelog

    committed Apr 26, 2016
  2. version 0.14.0

    committed Apr 26, 2016
Commits on Apr 20, 2016
  1. Merge pull request #236 from cbrwizard/strict_hash

    StrictHash
    committed Apr 20, 2016
  2. StrictHash

    Adds a StrictHash builtin contract, which checks that the argument is
    a hash, and every key passed is present in the given contract.
    
    #235
    cbrwizard committed Apr 18, 2016
Commits on Mar 17, 2016
  1. Merge pull request #234 from dpad/master

    Fixed issue where KeywordArgs is not checked if it is a hash.
    committed Mar 17, 2016
  2. Fixed issue where KeywordArgs is not checked if it is a hash.

    This leads to issues when methods are overloaded, because when the
    KeywordArgs gets checked on a non-hash argument, it raises an exception
    rather than failing properly.
    dpad committed Mar 17, 2016
Commits on Mar 11, 2016
  1. Merge pull request #233 from chuckd/specify-license

    Specify license
    committed Mar 11, 2016
  2. Specify BSD license in gemspec

    chuckd committed Mar 11, 2016
  3. Add BSD LICENSE file

    This is as per the reference in the README to contracts being "BSD licensed".
    chuckd committed Mar 11, 2016
Commits on Mar 9, 2016
  1. Merge pull request #230 from egonSchiele/adit/209

    Fix for issue #209
    committed Mar 9, 2016
Commits on Mar 8, 2016
  1. Merge pull request #232 from egonSchiele/adit/fix_229

    issue #229: fix constant lookup when including a module that already includes Contracts
    committed Mar 8, 2016
  2. move these specs to ruby-specific files

    committed Mar 8, 2016
  3. issue #229: fix constant lookup when including a module that already …

    …includes Contracts
    committed Mar 8, 2016
  4. specs added

    committed Mar 8, 2016
Commits on Mar 7, 2016
  1. fix for bug 209: we need to check for optional args with KeywordArgs,…

    … the same way we do with Hash
    committed Mar 7, 2016