dev-qt/qttest: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / eclass / ruby-fakegem.eclass
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 # @ECLASS: ruby-fakegem.eclass
5 # @MAINTAINER:
6 # Ruby herd <ruby@gentoo.org>
7 # @AUTHOR:
8 # Author: Diego E. Pettenò <flameeyes@gentoo.org>
9 # Author: Alex Legler <a3li@gentoo.org>
10 # Author: Hans de Graaff <graaff@gentoo.org>
11 # @SUPPORTED_EAPIS: 4 5 6 7
12 # @BLURB: An eclass for installing Ruby packages to behave like RubyGems.
13 # @DESCRIPTION:
14 # This eclass allows to install arbitrary Ruby libraries (including Gems),
15 # providing integration into the RubyGems system even for "regular" packages.
16
17 inherit ruby-ng
18
19 # @ECLASS-VARIABLE: RUBY_FAKEGEM_NAME
20 # @DESCRIPTION:
21 # Sets the Gem name for the generated fake gemspec.
22 # This variable MUST be set before inheriting the eclass.
23 RUBY_FAKEGEM_NAME="${RUBY_FAKEGEM_NAME:-${PN}}"
24
25 # @ECLASS-VARIABLE: RUBY_FAKEGEM_VERSION
26 # @DESCRIPTION:
27 # Sets the Gem version for the generated fake gemspec.
28 # This variable MUST be set before inheriting the eclass.
29 RUBY_FAKEGEM_VERSION="${RUBY_FAKEGEM_VERSION:-${PV/_pre/.pre}}"
30
31 # @ECLASS-VARIABLE: RUBY_FAKEGEM_TASK_DOC
32 # @DESCRIPTION:
33 # Specify the rake(1) task to run to generate documentation.
34 RUBY_FAKEGEM_TASK_DOC="${RUBY_FAKEGEM_TASK_DOC-rdoc}"
35
36 # @ECLASS-VARIABLE: RUBY_FAKEGEM_RECIPE_TEST
37 # @DESCRIPTION:
38 # Specify one of the default testing function for ruby-fakegem:
39 #  - rake (default; see also RUBY_FAKEGEM_TASK_TEST)
40 #  - rspec (calls ruby-ng_rspec, adds dev-ruby/rspec:2 to the dependencies)
41 #  - rspec3 (calls ruby-ng_rspec, adds dev-ruby/rspec:3 to the dependencies)
42 #  - cucumber (calls ruby-ng_cucumber, adds dev-util/cucumber to the
43 #    dependencies)
44 #  - none
45 RUBY_FAKEGEM_RECIPE_TEST="${RUBY_FAKEGEM_RECIPE_TEST-rake}"
46
47 # @ECLASS-VARIABLE: RUBY_FAKEGEM_TASK_TEST
48 # @DESCRIPTION:
49 # Specify the rake(1) task used for executing tests. Only valid
50 # if RUBY_FAKEGEM_RECIPE_TEST is set to "rake" (the default).
51 RUBY_FAKEGEM_TASK_TEST="${RUBY_FAKEGEM_TASK_TEST-test}"
52
53 # @ECLASS-VARIABLE: RUBY_FAKEGEM_RECIPE_DOC
54 # @DESCRIPTION:
55 # Specify one of the default API doc building function for ruby-fakegem:
56 #  - rake (default; see also RUBY_FAKEGEM_TASK_DOC)
57 #  - rdoc (calls `rdoc-2`, adds dev-ruby/rdoc to the dependencies);
58 #  - yard (calls `yard`, adds dev-ruby/yard to the dependencies);
59 #  - none
60 case ${EAPI} in
61         4|5|6)
62                 RUBY_FAKEGEM_RECIPE_DOC="${RUBY_FAKEGEM_RECIPE_DOC-rake}"
63                 ;;
64         *)
65                 RUBY_FAKEGEM_RECIPE_DOC="${RUBY_FAKEGEM_RECIPE_DOC-rdoc}"
66                 ;;
67 esac
68
69 # @ECLASS-VARIABLE: RUBY_FAKEGEM_DOCDIR
70 # @DEFAULT_UNSET
71 # @DESCRIPTION:
72 # Specify the directory under which the documentation is built;
73 # if empty no documentation will be installed automatically.
74 # Note: if RUBY_FAKEGEM_RECIPE_DOC is set to `rdoc`, this variable is
75 # hardwired to `doc`.
76
77 # @ECLASS-VARIABLE: RUBY_FAKEGEM_EXTRADOC
78 # @DEFAULT_UNSET
79 # @DESCRIPTION:
80 # Extra documentation to install (readme, changelogs, …).
81
82 # @ECLASS-VARIABLE: RUBY_FAKEGEM_DOC_SOURCES
83 # @DESCRIPTION:
84 # Allow settings defined sources to scan for documentation.
85 # This only applies if RUBY_FAKEGEM_DOC_TASK is set to `rdoc`.
86 RUBY_FAKEGEM_DOC_SOURCES="${RUBY_FAKEGEM_DOC_SOURCES-lib}"
87
88 # @ECLASS-VARIABLE: RUBY_FAKEGEM_BINWRAP
89 # @DESCRIPTION:
90 # Binaries to wrap around (relative to the RUBY_FAKEGEM_BINDIR directory)
91 RUBY_FAKEGEM_BINWRAP="${RUBY_FAKEGEM_BINWRAP-*}"
92
93 # @ECLASS-VARIABLE: RUBY_FAKEGEM_BINDIR
94 # @DESCRIPTION:
95 # Path that contains binaries to be binwrapped. Equivalent to the
96 # gemspec bindir option.
97 RUBY_FAKEGEM_BINDIR="${RUBY_FAKEGEM_BINDIR-bin}"
98
99 # @ECLASS-VARIABLE: RUBY_FAKEGEM_REQUIRE_PATHS
100 # @DEFAULT_UNSET
101 # @DESCRIPTION:
102 # Extra require paths (beside lib) to add to the specification
103
104 # @ECLASS-VARIABLE: RUBY_FAKEGEM_GEMSPEC
105 # @DEFAULT_UNSET
106 # @DESCRIPTION:
107 # Filename of .gemspec file to install instead of generating a generic one.
108
109 # @ECLASS-VARIABLE: RUBY_FAKEGEM_EXTRAINSTALL
110 # @DEFAULT_UNSET
111 # @DESCRIPTION:
112 # List of files and directories relative to the top directory that also
113 # get installed. Some gems provide extra files such as version information,
114 # Rails generators, or data that needs to be installed as well.
115
116 case "${EAPI:-0}" in
117         0|1|2|3)
118                 die "Unsupported EAPI=${EAPI} (too old) for ruby-fakegem.eclass" ;;
119         4|5|6|7)
120                 ;;
121         *)
122                 die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
123                 ;;
124 esac
125
126
127 RUBY_FAKEGEM_SUFFIX="${RUBY_FAKEGEM_SUFFIX:-}"
128
129
130 [[ ${RUBY_FAKEGEM_TASK_DOC} == "" ]] && RUBY_FAKEGEM_RECIPE_DOC="none"
131
132 case ${RUBY_FAKEGEM_RECIPE_DOC} in
133         rake)
134                 IUSE+=" doc"
135                 ruby_add_bdepend "doc? ( dev-ruby/rake )"
136                 RUBY_FAKEGEM_DOCDIR="doc"
137                 ;;
138         rdoc)
139                 IUSE+=" doc"
140                 ruby_add_bdepend "doc? ( dev-ruby/rdoc )"
141                 RUBY_FAKEGEM_DOCDIR="doc"
142                 ;;
143         yard)
144                 IUSE+="doc"
145                 ruby_add_bdepend "doc? ( dev-ruby/yard )"
146                 RUBY_FAKEGEM_DOCDIR="doc"
147                 ;;
148         none)
149                 [[ -n ${RUBY_FAKEGEM_DOCDIR} ]] && IUSE+=" doc"
150                 ;;
151 esac
152
153 [[ ${RUBY_FAKEGEM_TASK_TEST} == "" ]] && RUBY_FAKEGEM_RECIPE_TEST="none"
154
155 case ${RUBY_FAKEGEM_RECIPE_TEST} in
156         rake)
157                 IUSE+=" test"
158                 RESTRICT+=" !test? ( test )"
159                 ruby_add_bdepend "test? ( dev-ruby/rake )"
160                 ;;
161         rspec)
162                 IUSE+=" test"
163                 RESTRICT+=" !test? ( test )"
164                 # Also require a new enough rspec-core version that installs the
165                 # rspec-2 wrapper.
166                 ruby_add_bdepend "test? ( dev-ruby/rspec:2 >=dev-ruby/rspec-core-2.14.8-r2 )"
167                 ;;
168         rspec3)
169                 IUSE+=" test"
170                 RESTRICT+=" !test? ( test )"
171                 ruby_add_bdepend "test? ( dev-ruby/rspec:3 )"
172                 ;;
173         cucumber)
174                 IUSE+=" test"
175                 RESTRICT+=" !test? ( test )"
176                 ruby_add_bdepend "test? ( dev-util/cucumber )"
177                 ;;
178         *)
179                 RUBY_FAKEGEM_RECIPE_TEST="none"
180                 ;;
181 esac
182
183 SRC_URI="https://rubygems.org/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}${RUBY_FAKEGEM_SUFFIX:+-${RUBY_FAKEGEM_SUFFIX}}.gem"
184
185 ruby_add_bdepend virtual/rubygems
186 ruby_add_rdepend virtual/rubygems
187 case ${EAPI} in
188         4|5|6)
189                 ;;
190         *)
191                 ruby_add_depend virtual/rubygems
192                 ;;
193 esac
194
195 # @FUNCTION: ruby_fakegem_gemsdir
196 # @RETURN: Returns the gem data directory
197 # @DESCRIPTION:
198 # This function returns the gems data directory for the ruby
199 # implementation in question.
200 ruby_fakegem_gemsdir() {
201         local _gemsitedir=$(ruby_rbconfig_value 'sitelibdir')
202         _gemsitedir=${_gemsitedir//site_ruby/gems}
203         _gemsitedir=${_gemsitedir#${EPREFIX}}
204
205         [[ -z ${_gemsitedir} ]] && {
206                 eerror "Unable to find the gems dir"
207                 die "Unable to find the gems dir"
208         }
209
210         echo "${_gemsitedir}"
211 }
212
213 # @FUNCTION: ruby_fakegem_doins
214 # @USAGE: <file> [file...]
215 # @DESCRIPTION:
216 # Installs the specified file(s) into the gems directory.
217 ruby_fakegem_doins() {
218         (
219                 insinto $(ruby_fakegem_gemsdir)/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}
220                 doins "$@"
221         ) || die "failed $0 $@"
222 }
223
224 # @FUNCTION: ruby_fakegem_newins
225 # @USAGE: <file> <newname>
226 # @DESCRIPTION:
227 # Installs the specified file into the gems directory using the provided filename.
228 ruby_fakegem_newins() {
229         (
230                 # Since newins does not accept full paths but just basenames
231                 # for the target file, we want to extend it here.
232                 local newdirname=/$(dirname "$2")
233                 [[ ${newdirname} == "/." ]] && newdirname=
234
235                 local newbasename=$(basename "$2")
236
237                 insinto $(ruby_fakegem_gemsdir)/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}${newdirname}
238                 newins "$1" ${newbasename}
239         ) || die "failed $0 $@"
240 }
241
242 # @FUNCTION: ruby_fakegem_install_gemspec
243 # @DESCRIPTION:
244 # Install a .gemspec file for this package. Either use the file indicated
245 # by the RUBY_FAKEGEM_GEMSPEC variable, or generate one using
246 # ruby_fakegem_genspec.
247 ruby_fakegem_install_gemspec() {
248         local gemspec="${T}"/${RUBY_FAKEGEM_NAME}-${_ruby_implementation}
249
250         (
251                 if [[ ${RUBY_FAKEGEM_GEMSPEC} != "" ]]; then
252                         ruby_fakegem_gemspec_gemspec ${RUBY_FAKEGEM_GEMSPEC} ${gemspec}
253                 else
254                         local metadata="${WORKDIR}"/${_ruby_implementation}/metadata
255
256                         if [[ -e ${metadata} ]]; then
257                                 ruby_fakegem_metadata_gemspec ${metadata} ${gemspec}
258                         else
259                                 ruby_fakegem_genspec ${gemspec}
260                         fi
261                 fi
262         ) || die "Unable to generate gemspec file."
263
264         insinto $(ruby_fakegem_gemsdir)/specifications
265         newins ${gemspec} ${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}.gemspec || die "Unable to install gemspec file."
266 }
267
268 # @FUNCTION: ruby_fakegem_gemspec_gemspec
269 # @USAGE: <gemspec-input> <gemspec-output>
270 # @DESCRIPTION:
271 # Generates an installable version of the specification indicated by
272 # RUBY_FAKEGEM_GEMSPEC. This file is eval'ed to produce a final specification
273 # in a way similar to packaging the gemspec file.
274 ruby_fakegem_gemspec_gemspec() {
275         ${RUBY} -e "puts eval(File::open('$1').read).to_ruby" > $2
276 }
277
278 # @FUNCTION: ruby_fakegem_metadata_gemspec
279 # @USAGE: <gemspec-metadata> <gemspec-output>
280 # @DESCRIPTION:
281 # Generates an installable version of the specification indicated by
282 # the metadata distributed by the gem itself. This is similar to how
283 # rubygems creates an installation from a .gem file.
284 ruby_fakegem_metadata_gemspec() {
285         ${RUBY} -r yaml -e "puts Gem::Specification.from_yaml(File::open('$1', :encoding => 'UTF-8').read).to_ruby" > $2
286 }
287
288 # @FUNCTION: ruby_fakegem_genspec
289 # @USAGE: <output-gemspec>
290 # @DESCRIPTION:
291 # Generates a gemspec for the package and places it into the "specifications"
292 # directory of RubyGems.
293 # If the metadata normally distributed with a gem is present then that is
294 # used to generate the gemspec file.
295 #
296 # As a fallback we can generate our own version.
297 # In the gemspec, the following values are set: name, version, summary,
298 # homepage, and require_paths=["lib"].
299 # See RUBY_FAKEGEM_NAME and RUBY_FAKEGEM_VERSION for setting name and version.
300 # See RUBY_FAKEGEM_REQUIRE_PATHS for setting extra require paths.
301 ruby_fakegem_genspec() {
302         case ${EAPI} in
303                 4|5|6) ;;
304                 *)
305                         eqawarn "Generating generic fallback gemspec *without* dependencies"
306                         eqawarn "This will only work when there are no runtime dependencies"
307                         eqawarn "Set RUBY_FAKEGEM_GEMSPEC to generate a proper specifications file"
308                         ;;
309         esac
310
311         local required_paths="'lib'"
312         for path in ${RUBY_FAKEGEM_REQUIRE_PATHS}; do
313                 required_paths="${required_paths}, '${path}'"
314         done
315
316         # We use the _ruby_implementation variable to avoid having stray
317         # copies with different implementations; while for now we're using
318         # the same exact content, we might have differences in the future,
319         # so better taking this into consideration.
320         local quoted_description=${DESCRIPTION//\"/\\\"}
321         cat - > $1 <<EOF
322 # generated by ruby-fakegem.eclass
323 Gem::Specification.new do |s|
324   s.name = "${RUBY_FAKEGEM_NAME}"
325   s.version = "${RUBY_FAKEGEM_VERSION}"
326   s.summary = "${quoted_description}"
327   s.homepage = "${HOMEPAGE}"
328   s.require_paths = [${required_paths}]
329 end
330 EOF
331 }
332
333 # @FUNCTION: ruby_fakegem_binwrapper
334 # @USAGE: <command> [path] [content]
335 # @DESCRIPTION:
336 # Creates a new binary wrapper for a command installed by the RubyGem.
337 # path defaults to /usr/bin/$command content is optional and can be used
338 # to inject additional ruby code into the wrapper. This may be useful to
339 # e.g. force a specific version using the gem command.
340 ruby_fakegem_binwrapper() {
341         (
342                 local gembinary=$1
343                 local newbinary=${2:-/usr/bin/$gembinary}
344                 local content=$3
345                 local relativegembinary=${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}/${RUBY_FAKEGEM_BINDIR}/${gembinary}
346                 local binpath=$(dirname $newbinary)
347                 [[ ${binpath} = . ]] && binpath=/usr/bin
348
349                 # Try to find out whether the package is going to install for
350                 # one or multiple implementations; if we're installing for a
351                 # *single* implementation, no need to use “/usr/bin/env ruby”
352                 # in the shebang, and we can actually avoid errors when
353                 # calling the script by default.
354                 local rubycmd=
355                 for implementation in $(_ruby_get_all_impls); do
356                         # ignore non-enabled implementations
357                         use ruby_targets_${implementation} || continue
358                         if [ -z $rubycmd ]; then
359                                 # if no other implementation was set before, set it.
360                                 rubycmd="$(ruby_implementation_command ${implementation})"
361                         else
362                                 # if another implementation already arrived, then make
363                                 # it generic and break out of the loop. This ensures
364                                 # that we do at most two iterations.
365                                 rubycmd="/usr/bin/env ruby"
366                                 break
367                         fi
368                 done
369
370                 cat - > "${T}"/gembin-wrapper-${gembinary} <<EOF
371 #!${rubycmd}
372 # This is a simplified version of the RubyGems wrapper
373 #
374 # Generated by ruby-fakegem.eclass
375
376 require 'rubygems'
377
378 ${content}
379 load Gem::default_path[-1] + "/gems/${relativegembinary}"
380
381 EOF
382
383                 exeinto ${binpath:-/usr/bin}
384                 newexe "${T}"/gembin-wrapper-${gembinary} $(basename $newbinary)
385         ) || die "Unable to create fakegem wrapper"
386 }
387
388 # @FUNCTION: all_fakegem_compile
389 # @DESCRIPTION:
390 # Build documentation for the package if indicated by the doc USE flag
391 # and if there is a documetation task defined.
392 all_fakegem_compile() {
393         if [[ -n ${RUBY_FAKEGEM_DOCDIR} ]] && use doc; then
394                 case ${RUBY_FAKEGEM_RECIPE_DOC} in
395                         rake)
396                                 rake ${RUBY_FAKEGEM_TASK_DOC} || die "failed to (re)build documentation"
397                                 ;;
398                         rdoc)
399                                 rdoc ${RUBY_FAKEGEM_DOC_SOURCES} || die "failed to (re)build documentation"
400                                 rm -f doc/js/*.gz || die "failed to remove duplicated compressed javascript files"
401                                 ;;
402                         yard)
403                                 yard doc ${RUBY_FAKEGEM_DOC_SOURCES} || die "failed to (re)build documentation"
404                                 ;;
405                 esac
406         fi
407 }
408
409 # @FUNCTION: all_ruby_unpack
410 # @DESCRIPTION:
411 # Unpack the source archive, including support for unpacking gems.
412 all_ruby_unpack() {
413         # Special support for extracting .gem files; the file need to be
414         # extracted twice and the mtime from the archive _has_ to be
415         # ignored (it's always set to epoch 0).
416         for archive in ${A}; do
417                 case "${archive}" in
418                         *.gem)
419                                 # Make sure that we're not running unpack for more than
420                                 # one .gem file, since we won't support that at all.
421                                 [[ -d "${S}" ]] && die "Unable to unpack ${archive}, ${S} exists"
422
423                                 ebegin "Unpacking .gem file..."
424                                 tar -mxf "${DISTDIR}"/${archive} || die
425                                 eend $?
426
427                                 ebegin "Uncompressing metadata"
428                                 gunzip metadata.gz || die
429                                 eend $?
430
431                                 mkdir "${S}"
432                                 pushd "${S}" &>/dev/null || die
433
434                                 ebegin "Unpacking data.tar.gz"
435                                 tar -mxf "${my_WORKDIR}"/data.tar.gz || die
436                                 eend $?
437
438                                 popd &>/dev/null || die
439                                 ;;
440                         *.patch.bz2)
441                                 # We apply the patches with RUBY_PATCHES directly from DISTDIR,
442                                 # as the WORKDIR variable changes value between the global-scope
443                                 # and the time all_ruby_unpack/_prepare are called. Since we can
444                                 # simply decompress them when applying, this is much easier to
445                                 # deal with for us.
446                                 einfo "Keeping ${archive} as-is"
447                                 ;;
448                         *)
449                                 unpack ${archive}
450                                 ;;
451                 esac
452         done
453 }
454
455 # @FUNCTION: all_ruby_compile
456 # @DESCRIPTION:
457 # Compile the package.
458 all_ruby_compile() {
459         all_fakegem_compile
460 }
461
462 # @FUNCTION: each_fakegem_test
463 # @DESCRIPTION:
464 # Run tests for the package for each ruby target if the test task is defined.
465 each_fakegem_test() {
466         case ${RUBY_FAKEGEM_RECIPE_TEST} in
467                 rake)
468                         ${RUBY} -S rake ${RUBY_FAKEGEM_TASK_TEST} || die "tests failed"
469                         ;;
470                 rspec)
471                         RSPEC_VERSION=2 ruby-ng_rspec
472                         ;;
473                 rspec3)
474                         RSPEC_VERSION=3 ruby-ng_rspec
475                         ;;
476                 cucumber)
477                         ruby-ng_cucumber
478                         ;;
479                 none)
480                         ewarn "each_fakegem_test called, but \${RUBY_FAKEGEM_RECIPE_TEST} is 'none'"
481                         ;;
482         esac
483 }
484
485 if [[ ${RUBY_FAKEGEM_RECIPE_TEST} != none ]]; then
486                 # @FUNCTION: each_ruby_test
487                 # @DESCRIPTION:
488                 # Run the tests for this package.
489                 each_ruby_test() {
490                         each_fakegem_test
491                 }
492 fi
493
494 # @FUNCTION: each_fakegem_install
495 # @DESCRIPTION:
496 # Install the package for each ruby target.
497 each_fakegem_install() {
498         ruby_fakegem_install_gemspec
499
500         local _gemlibdirs="${RUBY_FAKEGEM_EXTRAINSTALL}"
501         for directory in "${RUBY_FAKEGEM_BINDIR}" lib; do
502                 [[ -d ${directory} ]] && _gemlibdirs="${_gemlibdirs} ${directory}"
503         done
504
505         [[ -n ${_gemlibdirs} ]] && \
506                 ruby_fakegem_doins -r ${_gemlibdirs}
507 }
508
509 # @FUNCTION: each_ruby_install
510 # @DESCRIPTION:
511 # Install the package for each target.
512 each_ruby_install() {
513         each_fakegem_install
514 }
515
516 # @FUNCTION: all_fakegem_install
517 # @DESCRIPTION:
518 # Install files common to all ruby targets.
519 all_fakegem_install() {
520         if [[ -n ${RUBY_FAKEGEM_DOCDIR} ]] && use doc; then
521                 for dir in ${RUBY_FAKEGEM_DOCDIR}; do
522                         [[ -d ${dir} ]] || continue
523
524                         pushd ${dir} &>/dev/null || die
525                         dodoc -r * || die "failed to install documentation"
526                         popd &>/dev/null || die
527                 done
528         fi
529
530         if [[ -n ${RUBY_FAKEGEM_EXTRADOC} ]]; then
531                 dodoc ${RUBY_FAKEGEM_EXTRADOC} || die "failed to install further documentation"
532         fi
533
534         # binary wrappers; we assume that all the implementations get the
535         # same binaries, or something is wrong anyway, so...
536         if [[ -n ${RUBY_FAKEGEM_BINWRAP} ]]; then
537                 local bindir=$(find "${D}" -type d -path "*/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}/${RUBY_FAKEGEM_BINDIR}" -print -quit)
538
539                 if [[ -d "${bindir}" ]]; then
540                         pushd "${bindir}" &>/dev/null || die
541                         for binary in ${RUBY_FAKEGEM_BINWRAP}; do
542                                 ruby_fakegem_binwrapper "${binary}"
543                         done
544                         popd &>/dev/null || die
545                 fi
546         fi
547 }
548
549 # @FUNCTION: all_ruby_install
550 # @DESCRIPTION:
551 # Install files common to all ruby targets.
552 all_ruby_install() {
553         all_fakegem_install
554 }