lemon 0.9.2 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6bc4b46bb63cecf471821a2b8997ba3f2d976917775f90eb28eab9b017051a8b
4
- data.tar.gz: b55cc5338d2ed16736d51cc15e60458dd8ecca01aab1af0f9b8c6160ca6e2bef
3
+ metadata.gz: 57ce6da63fc64e109b277714ec13e83ce8e5da35bc0f0c3352ad911bd9a4dab6
4
+ data.tar.gz: 14b39be1d69fdf300000c11bdc8563dc96845a6d826e61835e49791807e5acec
5
5
  SHA512:
6
- metadata.gz: 49acc3b4d7778393804c67097e96f96ff7461d86dc44768d6c599982d66a03e54ae006fdd108065219fcb0ffc50d874c44336870753688b48552330577e24fc0
7
- data.tar.gz: aa0ab93ed5a3e4b6357793745f6e530ba09db52ad3ffa8034ab785577f5371807b7ef79e5495ef0829dd14b7f15f11122b1f1f87237d97e1ee4ec167dd898f3d
6
+ metadata.gz: a2b1c8ad6a4b851128e5f86337a2053ee9ea78789b22ea84df5a77fca0491e83b9d8c4c3fd34e862dd1654466dc83583d487ec17e09a53243dc2c70baf5fd0c9
7
+ data.tar.gz: 7d9cea50548f36c64e477e020076974bce9825139ed12fcdb0dc02ef6641cee87ea40eaf7960ad5b2ec2f54c6557b4e0795ff0144e0d364a77cf2ef3b7dcdb6d
data/HISTORY.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # RELEASE HISTORY
2
2
 
3
+ ## 0.9.4 / 2026-11-29
4
+
5
+ Bug fix release. `lemons test` works again.
6
+
7
+ Changes:
8
+
9
+ * Fix `lemons test`, which failed with "undefined method 'cli' for class
10
+ Test::Runner". It now runs Rubytest's own command line.
11
+ * Require Rubytest 0.10 or later, which has the TAP formats built in.
12
+ * Use the built-in TAP format in the README example.
13
+
14
+ ## 0.9.3 / 2026-04-01
15
+
16
+ Bug fix release. Fixes Ruby 3+ compatibility issues in test method dispatch.
17
+
18
+ Changes:
19
+
20
+ * Fix keyword argument handling in method test wrapper (Ruby 3+ kwargs split).
21
+ * Separate NameError from general errors in method aliasing for clearer messages.
22
+ * Include original error message in "not tested" error reports.
23
+ * Remove Ruby 1.8/1.9 compatibility guards.
24
+
25
+
3
26
  ## 0.9.2 / 2026-03-31
4
27
 
5
28
  Maintenance release. Modernized project tooling and cleaned up documentation.
data/README.md CHANGED
@@ -77,7 +77,7 @@ Lemon utilizes the RubyTest universal test harness to run tests, the `lemons tes
77
77
 
78
78
  Normal output is typically a _dot progression_. Other output types can be specified by the `--format` or `-f` option.
79
79
 
80
- $ rubytest -r lemon -f tapy test/cases/name_case.rb
80
+ $ rubytest -r lemon -f tap test/cases/name_case.rb
81
81
 
82
82
  See [RubyTest](https://github.com/rubyworks/rubytest) for more information.
83
83
 
data/lib/lemon/cli.rb CHANGED
@@ -1,4 +1,3 @@
1
- #require 'lemon/cli/runner'
2
1
  require 'lemon/cli/generate'
3
2
  require 'lemon/cli/scaffold'
4
3
  require 'lemon/cli/coverage'
@@ -11,10 +10,6 @@ module Lemon
11
10
  module CLI
12
11
  end
13
12
 
14
- #--
15
- # TODO: Use Lemon::CLI::Runner and have it delegate to RubyTest ?
16
- #++
17
-
18
13
  # Command line interface takes the first argument off `argv` to determine
19
14
  # the subcommand: `test`, `cov` or `gen`. If `test`, then Lemon delegates
20
15
  # control to Ruby Test.
@@ -24,9 +19,8 @@ module Lemon
24
19
  case cmd
25
20
  when 't', 'test', 'run'
26
21
  require 'lemon'
27
- require 'rubytest'
28
- Test::Runner.cli(*ARGV)
29
- #Lemon::CLI::Test.new.run(argv)
22
+ require 'rubytest/cli'
23
+ Test::CLI.run(argv)
30
24
  when 'g', 'gen', 'generate', 'generator'
31
25
  Lemon::CLI::Generate.run(argv)
32
26
  when 's', 'sca', 'scaffold'
@@ -1,7 +1,2 @@
1
- if RUBY_VERSION > '1.9'
2
- require_relative 'core_ext/kernel'
3
- require_relative 'core_ext/module'
4
- else
5
- require 'lemon/core_ext/kernel'
6
- require 'lemon/core_ext/module'
7
- end
1
+ require_relative 'core_ext/kernel'
2
+ require_relative 'core_ext/module'
@@ -83,14 +83,18 @@ module Lemon
83
83
  begin
84
84
  target_class.class_eval do
85
85
  alias_method "_lemon_#{target}", target
86
- define_method(target) do |*a,&b|
86
+ define_method(target) do |*a, **kw, &b|
87
87
  test.tested = true
88
- __send__("_lemon_#{target}",*a,&b)
88
+ __send__("_lemon_#{target}", *a, **kw, &b)
89
89
  end
90
90
  end
91
+ rescue NameError
92
+ Kernel.eval <<-END, test.to_proc.binding
93
+ raise NameError, "#{target} is not defined"
94
+ END
91
95
  rescue => error
92
96
  Kernel.eval <<-END, test.to_proc.binding
93
- raise #{error.class}, "#{target} not tested"
97
+ raise #{error.class}, "#{target} not tested (#{error.message})"
94
98
  END
95
99
  end
96
100
 
@@ -111,11 +115,7 @@ module Lemon
111
115
  #
112
116
  #
113
117
  def raise_pending(procedure)
114
- if RUBY_VERSION < '1.9'
115
- Kernel.eval %[raise NotImplementedError, "#{target} not tested"], procedure
116
- else
117
- Kernel.eval %[raise NotImplementedError, "#{target} not tested"], procedure.binding
118
- end
118
+ Kernel.eval %[raise NotImplementedError, "#{target} not tested"], procedure.binding
119
119
  end
120
120
 
121
121
  #
@@ -1,8 +1,4 @@
1
- if RUBY_VERSION < '1.9'
2
- require 'lemon/ignore_callers'
3
- else
4
- require_relative 'ignore_callers'
5
- end
1
+ require_relative 'ignore_callers'
6
2
 
7
3
  module Lemon
8
4
 
@@ -13,4 +9,3 @@ module Lemon
13
9
  end
14
10
 
15
11
  end
16
-
data/lib/lemon.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Lemon
2
- VERSION = '0.9.2'
2
+ VERSION = '0.9.4'
3
3
  end
4
4
 
5
5
  # Ruby Test standard location for test objects.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lemon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Sawyer
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: '0.8'
18
+ version: '0.10'
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
- version: '0.8'
25
+ version: '0.10'
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: ae
28
28
  requirement: !ruby/object:Gem::Requirement