Skip to content

Latest commit

 

History

History
96 lines (77 loc) · 7.42 KB

CHANGELOG.markdown

File metadata and controls

96 lines (77 loc) · 7.42 KB

v0.15.0

  • Breaking Change: compatibility shifted to > Ruby 2.1
  • Refactoring: CallWith module is now more comprehensible
  • Enhancement: Badges: Codeclimate / Code coverage
  • Enhancement: more Rubocop cops enabled
  • Enhancement: extract Contract class to contracts/contract.rb
  • Enhancement: extract FailureCallback module to contracts/contract/failure_callback.rb
  • Enhancement: better ErrorFormatter for KeywordArgs contract
  • Enhancement: many loops / conditional branches / old comments are improved / simplified
  • Enhancement: rename Contracts::Args -> C::SplatArgs for clearer intention (with deprecation warning)
  • Enhancement: remove Cucumber tests, because they are slow and inflexible
  • Enhancement: Rspec helper cleanup
  • Enhancement: Rspec tests with much less noise / no warnings
  • Code Diff: git diff 8889f13..03e9c56
  • https://github.com/ddd-ruby/contracts.ruby/compare/8889f13...03e9c56

v0.14.0

  • 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

v0.12.0

  • 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

v0.10.1

  • 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

v0.9

  • 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

  • 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