Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow rdoc to run without gem #340

Merged
merged 1 commit into from Dec 20, 2015
Merged

Allow rdoc to run without gem #340

merged 1 commit into from Dec 20, 2015

Conversation

luizluca
Copy link
Contributor

rdoc can live without gem (as it uses "require xxx" after
the "gem xxx"). However, when using "gem xxx" directly,
it generates a NameError exception when gem is not defined.
This happens when ruby is called with "--disable-gems" while
trying to use rdoc bundled with ruby source.

Signed-off-by: Luiz Angelo Daros de Luca luizluca@gmail.com

I'm the current ruby maintainer for OpenWRT. As routers are very resource restricted,
it is interesting to split every software into small pieces, with minimum dependencies
between them. This patch allows a user to use "require 'rdoc'" even without gems installed.

rdoc can live without gem (as it uses "require xxx" after
the "gem xxx"). However, when using "gem xxx" directly,
it generates a NameError exception when gem is not defined.
This happens when ruby is called with "--disable-gems" while
trying to use rdoc bundled with ruby source.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
@luizluca
Copy link
Contributor Author

BTW, the "rescue" code is a copy of what bin/rdoc already does

luizluca referenced this pull request in luizluca/openwrt-packages Jan 16, 2015
For ruby changes since 2.1.x:

 https://github.com/ruby/ruby/blob/v2_2_0/NEWS

Relevant changes for OpenWRT:

* all patches for ruby-core where merged upstream and
  they are not needed anymore (only rdoc patch remains)
 - PR for the rdoc github project was added to the patch header
   (https://github.com/rdoc/rdoc/pull/340)
* new package ruby-powerassert for introduced new bundled gem power_assert
* new package ruby-unicodenormalize for Unicode normalization files
* removed ruby-dl as DL was removed after being deprecated
* ruby-{minitest,testunit} where removed from ruby library. Now they
  are bundled gems
* test and sample files where removed from gems in order to save resources
  and reduce pkgs dependencies
* script ruby_find_pkgsdeps was updated to match upstream changes

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
@zzak
Copy link
Member

zzak commented Mar 30, 2015

Will this work on 1.8 still?

@drbrain
Copy link
Member

drbrain commented Mar 31, 2015

It's probably time to update RDoc to only run on Ruby 2.something or newer.

@zzak
Copy link
Member

zzak commented Apr 8, 2015

@drbrain Sounds good, we can make it required ruby version for next feature release!

zzak pushed a commit that referenced this pull request Dec 20, 2015
Allow rdoc to run without gem
@zzak zzak merged commit e682367 into ruby:master Dec 20, 2015
hsbt referenced this pull request in ruby/ruby Dec 22, 2015
sonnyyu referenced this pull request in superadmin88/designated-driver-packages Feb 5, 2016
For ruby changes since 2.1.x:

 https://github.com/ruby/ruby/blob/v2_2_0/NEWS

Relevant changes for OpenWRT:

* all patches for ruby-core where merged upstream and
  they are not needed anymore (only rdoc patch remains)
 - PR for the rdoc github project was added to the patch header
   (https://github.com/rdoc/rdoc/pull/340)
* new package ruby-powerassert for introduced new bundled gem power_assert
* new package ruby-unicodenormalize for Unicode normalization files
* removed ruby-dl as DL was removed after being deprecated
* ruby-{minitest,testunit} where removed from ruby library. Now they
  are bundled gems
* test and sample files where removed from gems in order to save resources
  and reduce pkgs dependencies
* script ruby_find_pkgsdeps was updated to match upstream changes

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
mrkn referenced this pull request in mrkn/ruby Apr 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants