Gentoo Archives: gentoo-dev

From: graaff@g.o
To: gentoo-dev@l.g.o
Cc: Hans de Graaff <graaff@g.o>
Subject: [gentoo-dev] [PATCH 1/3] ruby-fakegem.eclass: remove obsolete jruby support
Date: Sun, 21 Jul 2019 05:46:29
Message-Id: 20190721054555.4626-1-graaff@gentoo.org
1 From: Hans de Graaff <graaff@g.o>
2
3 Signed-off-by: Hans de Graaff <graaff@g.o>
4 ---
5 eclass/ruby-fakegem.eclass | 21 +++++----------------
6 1 file changed, 5 insertions(+), 16 deletions(-)
7
8 diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass
9 index e2c333a5e7f4..a6077a386b9d 100644
10 --- a/eclass/ruby-fakegem.eclass
11 +++ b/eclass/ruby-fakegem.eclass
12 @@ -1,4 +1,4 @@
13 -# Copyright 1999-2018 Gentoo Authors
14 +# Copyright 1999-2019 Gentoo Authors
15 # Distributed under the terms of the GNU General Public License v2
16
17 # @ECLASS: ruby-fakegem.eclass
18 @@ -39,7 +39,7 @@ RUBY_FAKEGEM_TASK_DOC="${RUBY_FAKEGEM_TASK_DOC-rdoc}"
19 # - rspec (calls ruby-ng_rspec, adds dev-ruby/rspec:2 to the dependencies)
20 # - rspec3 (calls ruby-ng_rspec, adds dev-ruby/rspec:3 to the dependencies)
21 # - cucumber (calls ruby-ng_cucumber, adds dev-util/cucumber to the
22 -# dependencies; does not work on JRuby).
23 +# dependencies)
24 # - none
25 RUBY_FAKEGEM_RECIPE_TEST="${RUBY_FAKEGEM_RECIPE_TEST-rake}"
26
27 @@ -159,10 +159,7 @@ case ${RUBY_FAKEGEM_RECIPE_TEST} in
28 ;;
29 cucumber)
30 IUSE+=" test"
31 - # Unfortunately as of August 2012, cucumber is not supported on
32 - # JRuby. We work it around here to avoid repeating the same
33 - # code over and over again.
34 - USE_RUBY="${USE_RUBY/jruby/}" ruby_add_bdepend "test? ( dev-util/cucumber )"
35 + ruby_add_bdepend "test? ( dev-util/cucumber )"
36 ;;
37 *)
38 RUBY_FAKEGEM_RECIPE_TEST="none"
39 @@ -266,14 +263,7 @@ ruby_fakegem_gemspec_gemspec() {
40 # the metadata distributed by the gem itself. This is similar to how
41 # rubygems creates an installation from a .gem file.
42 ruby_fakegem_metadata_gemspec() {
43 - case ${RUBY} in
44 - *jruby)
45 - ${RUBY} -r yaml -e "puts Gem::Specification.from_yaml(File::open('$1').read).to_ruby" > $2
46 - ;;
47 - *)
48 - ${RUBY} -r yaml -e "puts Gem::Specification.from_yaml(File::open('$1', :encoding => 'UTF-8').read).to_ruby" > $2
49 - ;;
50 - esac
51 + ${RUBY} -r yaml -e "puts Gem::Specification.from_yaml(File::open('$1', :encoding => 'UTF-8').read).to_ruby" > $2
52 }
53
54 # @FUNCTION: ruby_fakegem_genspec
55 @@ -332,8 +322,7 @@ ruby_fakegem_binwrapper() {
56 # one or multiple implementations; if we're installing for a
57 # *single* implementation, no need to use “/usr/bin/env ruby”
58 # in the shebang, and we can actually avoid errors when
59 - # calling the script by default (see for instance the
60 - # JRuby-specific commands).
61 + # calling the script by default.
62 local rubycmd=
63 for implementation in $(_ruby_get_all_impls); do
64 # ignore non-enabled implementations
65 --
66 2.21.0

Replies