Skip to content

Latest commit

 

History

History
108 lines (78 loc) · 8.27 KB

CHANGELOG.markdown

File metadata and controls

108 lines (78 loc) · 8.27 KB

v0.16.0 - 2017-04-24

v0.15.0 - 2017-02-24

v0.14.0 - 2016-04-26

  • Enhancement: Add StrictHash contract - Fyodor #236
  • Bugfix: dont fail if something other than a hash is passed to a KeywordArgs - Dan Padilha #234
  • LICENSE ADDED: Simplified BSD (same as what is specified in the readme) - Charles Dale #233
  • Bugfix: fix constant looking when including a module that includes contracts (requires removing the check to see if contracts is already included) - Aditya Bhargava #232
  • Bugfix for err case when KeywordArgs and Proc are used together - Aditya Bhargava #230
  • Enhancement: Add DescendantOf contract - Miguel Palhas #227

v0.13.0 - 2016-01-25

v0.12.0 - 2015-09-15

  • Feature: add Regexp validator - Gert Goet #196
  • Docs: bootstrap cucumber/aruba/relish setup - Oleksii Fedorov #195
  • Bugfix: allow to extend module, that has Contracts or Contracts::Core included without harming current module/class Contracts functionality, see: #176 - Oleksii Fedorov #198
  • Enhancement: add include Contracts::Builtin to allow users to use builtin contracts without Contracts:: prefix together with include Contracts::Core - PikachuEXE #199

v0.11.0 - 2015-07-30

v0.10.1 - 2015-07-16

  • Enhancement: make @pattern_match instance variable not render ruby warning. Required to use new aruba versions in rspec tests - Dennis Günnewig #179

v0.10 - 2015-07-07

v0.9 - 2015-04-24

  • MAJOR fix in pattern-matching: If the return contract for a pattern-matched function fails, it should NOT try the next pattern-match function. Pattern-matching is only for params, not return values.

  • raise an error if multiple defns have the same contract for pattern matching.

  • New syntax for functions with no input params (the old style still works) Old way:

    Contract nil => 1
    def one

    New way:

    Contract 1
    def one
    
  • Prettier HashOf contract can now be written like this: HashOf[Num => String]

  • Add SetOf contract

  • various small fixes

v0.8 - 2015-04-03

  • code refactored (very slight loss of performance, big increase in readability)
  • fail when defining a contract on a module without include Contracts::Modules
  • fixed several bugs in argument parsing, functions with complex params get contracts applied correctly now.
  • added rubocop to ci.
  • if a contract is set on a protected method, it should not become public.
  • fixed pattern matching when the multiple definitions of functions have different arities.
  • couple of new built-in contracts: Nat, Eq.
  • changed Invariant to invariant: invariant(:day) { 1 <= day && day <= 31 }
  • prettier error messages (Contracts::Num is now just Num, for example)
  • support for yard-contracts