Package Details: ruby-stud 0.0.23-1

Git Clone URL: https://aur.archlinux.org/ruby-stud.git (read-only, click to copy)
Package Base: ruby-stud
Description: small reusable bits of code
Upstream URL: https://rubygems.org/gems/stud
Licenses: Apache
Submitter: jtgoguen
Maintainer: None
Last Packager: ljmf00
Votes: 5
Popularity: 0.45
First Submitted: 2017-03-02 22:41 (UTC)
Last Updated: 2020-08-28 15:20 (UTC)

Dependencies (4)

Sources (1)

Latest Comments

lquidfire commented on 2024-10-20 14:26 (UTC) (edited on 2024-10-20 14:30 (UTC) by lquidfire)

You can use the following patch:

$ cat Patch01-temprorary_spec.rb.patch 
--- src/ruby-stud-0.0.23/spec/stud/temporary_spec.rb    2017-07-21 20:26:17.000000000 +0200
+++ src/ruby-stud-0.0.23/spec/stud/temporary_spec.rb.new        2024-10-20 16:19:52.481376624 +0200
@@ -41,7 +41,7 @@
       it "should clean up after the block closes" do
         path = ""
         file { |fd| path = fd.path }
-        reject { File }.exists?(path)
+        reject { File }.exist?(path)
       end
     end # with a block
   end # #file

Use it by adding the following to the PKGBUILD prepare section:

  cd "$srcdir"
  patch -p1 -i Patch01-temprorary_spec.rb.patch

PatoPan commented on 2024-08-29 00:39 (UTC) (edited on 2024-08-29 00:55 (UTC) by PatoPan)

made a temporary fork https://github.com/pato-pan/ruby-stud

It's not a replacement since I don't know anything about Ruby and the creator is still online.

PatoPan commented on 2024-08-28 23:45 (UTC)

"Class does not respond to the 'exists?' method" is the reason for this error, and I found this that suggests an update to ruby 3.2 broke the package https://github.com/oneclick/rubyinstaller2/issues/331 it uses something that was removed because it was deprecated.

This is probably an issue with the original package rather than the packagebuild. You can easily fix this by editing ./paru/clone/ruby-stud/src/ruby-stud-0.0.23/spec/stud/temporary_spec.rb just so in line 44 it says exist instead.

It's as simple as replacing exists with exist.

using Ruby 3.1 should also fix the issue

micwoj92 commented on 2024-08-24 23:48 (UTC)

Check fails

==> Starting check()...
.................Failed (Expected ["item!"], but got nil). Sleeping for 0.02
Failed (Expected ["item!"], but got nil). Sleeping for 0.04
Failed (Expected ["item!"], but got nil). Sleeping for 0.08
Failed (Expected ["item!"], but got nil). Sleeping for 0.16
Failed (Expected ["item!"], but got nil). Sleeping for 0.32
Failed (Expected ["item!"], but got nil). Sleeping for 0.64
............................F............

Failures:

  1) Stud::Temporary#file with a block should clean up after the block closes
     Failure/Error: reject { File }.exists?(path)

     Insist::Failure:
       Class does not respond to the 'exists?' method
     # ./spec/stud/temporary_spec.rb:44:in `block (4 levels) in <top (required)>'

Finished in 30.05 seconds (files took 0.07119 seconds to load)
58 examples, 1 failure

Failed examples:

rspec ./spec/stud/temporary_spec.rb:41 # Stud::Temporary#file with a block should clean up after the block closes

==> ERROR: A failure occurred in check().
    Aborting...