Skip to content

Releases: denisdefreyne/cri

2.15.12

09 Jun 19:39
2.15.12
e2bef99
Compare
Choose a tag to compare

Changes:

  • Dropped support for Ruby 2.5

2.15.11

31 Dec 09:34
2.15.11
a220ae1
Compare
Choose a tag to compare

Fixes:

  • Added support for Ruby 3.0 (#111)

Changes:

  • Dropped support for Ruby 2.3 and 2.4 (#112)

2.15.10

21 Jan 07:42
2.15.10
cc1941a
Compare
Choose a tag to compare

Fixes:

  • Fixed warnings appearing in Ruby 2.7 (9a3d810)

2.15.9

14 Jun 19:07
2.15.9
2f17267
Compare
Choose a tag to compare

Fixes:

  • Fixed bug which could cause options from one command appear in other commands (#101, #102)

2.15.8

14 Jun 18:00
2.15.8
eb698d7
Compare
Choose a tag to compare

Fixes:

  • Don’t explicitly set default values for options (#99)

This release reverts a backwards-incompatible change introduced in 2.15.7.

To illustrate this, compare the behavior of the following command in recent versions of Cri:

option :f, :force, 'use force', argument: :forbidden

run do |opts, args, cmd|
  puts "Options = #{opts.inspect}"
  puts "Force? #{opts[:force]}"
  puts "Option given? #{opts.key?(:force)}"
end

In Cri 2.15.6, the default is not set in the options hash, so the value is nil and #key? returns false:

% ./run
Options = {}
Force? nil
Option given? false

This behavior was inconsistent with what was documented: flag options were (and still are) documented to default to false rather than nil.

In Cri 2.15.7, the default value is false, and explicitly set in the options hash (#key? returns true):

% ./run
Options = {:force=>false}
Force? false
Option given? true

This change made it impossible to detect options that were not explicitly specified, because the behavior of #key? also changed.

In Cri 2.15.8, the default value is also false (as in 2.15.7), but not explicitly set in the options hash (#key? returns false, as in 2.15.6):

% ./run
Options = {}
Force? false
Option given? false

This backwards-incompatible change was not intentional. To fix issue #94, a change in behavior was needed, but this change also affected other, previously-undefined behavior. The new behavior in 2.15.8 should fix the bug fixed in 2.15.7 (#94, #96), without causing the problems introduced in that version.

2.15.7

30 May 09:34
2.15.7
54cf3c2
Compare
Choose a tag to compare

Fixes:

  • Options with a forbidden argument now default to false, rather than nil (#94, #96)

2.15.6

19 May 09:19
2.15.6
e9770e8
Compare
Choose a tag to compare

Fixes:

  • Fixed problem with help header not being shown if the summary is missing (#93)

2.15.5

29 Apr 21:58
2.15.5
4e4abaf
Compare
Choose a tag to compare

Fixes:

  • Restored compatibility with Ruby 2.3. (#91)

2.15.4

29 Apr 06:35
2.15.4
5f66f5c
Compare
Choose a tag to compare

Fixes:

  • Removed dependency on colored, which restores functionality to gems that colored breaks (e.g. awesome_print) (#89, #90)

2.15.3

19 Jan 08:44
2.15.3
54d819e
Compare
Choose a tag to compare

Fixes:

  • Made ArgumentList#each callable without a block, in which case it returns an Enumerator (mimicking Array) (#87, #88)