RubyGems 1.8.4
drbrain |
RubyGems is a package management framework for Ruby.
This gem is an update for the RubyGems software. You must have an installation of RubyGems before this update can be applied.
See Gem for information on RubyGems (or `ri Gem`)
To upgrade to the latest RubyGems, run:
$ gem update --system # you might need to be an administrator or root
See UPGRADING.rdoc for more details and alternative instructions.
If you don’t have RubyGems installed, your can still do it manually:
-
Download from: rubygems.org/pages/download
-
Unpack into a directory and cd there
-
Install with: ruby setup.rb # you may need admin/root privilege
For more details and other options, see:
ruby setup.rb --help
Changes:
1.8.4 / 2011-05-25
-
1 minor enhancement:
-
Removed default_executable deprecations from Specification.
-
Doc Challenge Update 2
drbrain |
Here's an update on the Ruby 1.9.3 Documentation Challenge. Since the last week's update Ruby's documentation coverage has grown to 61.35%. Perhaps we should move our goal to 75% since we've done so well?
Thanks to the following contributors for improving Ruby's documentation coverage:
RubyGems 1.8.3
drbrain |
RubyGems is a package management framework for Ruby.
This gem is an update for the RubyGems software. You must have an installation of RubyGems before this update can be applied.
See Gem for information on RubyGems (or `ri Gem`)
To upgrade to the latest RubyGems, run:
$ gem update --system # you might need to be an administrator or root
See UPGRADING.rdoc for more details and alternative instructions.
If you don’t have RubyGems installed, your can still do it manually:
-
Download from: rubygems.org/pages/download
-
Unpack into a directory and cd there
-
Install with: ruby setup.rb # you may need admin/root privilege
For more details and other options, see:
ruby setup.rb --help
1.8.3 / 2011-05-19
-
4 bug fixes:
-
Fix independent testing of test_gem_package_tar_output. Ruby Bug #4686 by Shota Fukumori
-
Fix test failures for systems with separate ruby versions. Ruby Bug #3808 by Jeremy Evans
-
Fixed some bad calls left behind after rolling out some refactorings.
-
Syck has a parse error on (good) times output from Psych. (dazuma, et al)
-
RubyGems Deprecations
drbrain |
I've been maintaining RubyGems a long, long time now. I believe my first release was 0.9.5 back at the end of 2007, four and a half years! In that time I've looked at pretty much every line of RubyGems. I know the history and intent behind most of the classes that exist in RubyGems and what purposes they served. (For more on that history watch my RubyConf 2010 presentation, History of RDoc and RubyGems.)
One thing I haven't done enough of in RubyGems is cleanup of the little things that make RubyGems easy to use as a library. While I've done some work to make it easier to use as a library I've ignored too many of the little things that make a polished library. Over the past several releases Ryan Davis has been driving these small cleanups to make RubyGems easier to use and maintain.
There are many things that are clumsy to do in RubyGems 1.7 and earlier due to poor encapsulation that are now clean, simple and intuitive in RubyGems 1.8.
Given a Gem::Specification, how do you activate it?
# RubyGems 1.8
spec.activate
# RubyGems 1.7 and older
Gem.activate spec.name, spec.version
Given a Gem::Specification, how do you determine various directories for files in the gem?
# RubyGems 1.8
spec.ri_dir
spec.cache_dir
spec.bin_dir
# etc.
# RubyGems 1.7 and older
File.join spec.installation_path, 'doc', 'ri'
File.join spec.installation_path, 'cache'
File.join spec.installation_path, 'gems', spec.full_name, 'bin'
How do you list the name of every gem you have installed?
# RubyGems 1.8
Gem::Specification.all_names
# RubyGems 1.7 and older
Gem.source_index.map { |_, s| s.full_name }
... and so on. While these look like trivial examples, the work underlying these changes is large. Also, note that for each of these examples the Ruby 1.7 and older code still works, but it will complain.
Deprecations
Gem::SourceIndex has been deprecated because it has no real purpose anymore. Back in the olden days before RubyGems 1.2 Gem::SourceIndex was used to determine which gems you could install (I cover this my RubyConf 2010 talk above). It got pressed into service as a local repository of gems as well, but since RubyGems 1.2 it's really become just a wrapper around a Hash.
Instead of keeping around the baggage of an ancient, mostly-useless Hash wrapper we've moved the important functionality into Gem::Specification as class methods. Now Gem::Specification behaves as an Enumerable container.
Gem::GemPathSearcher was used to figure out which files belonged to which gems so require 'rake' would activate the rake gem. Unfortunately its implementation was so complicated I could barely understand it let alone improve it.
Instead of keep around a complex, incomprehensible class we moved the functionality into Gem::Specification as well.
# RubyGems 1.8
spec = Gem::Specification.find_by_path 'rake'
# RubyGems 1.7 and older
spec = Gem.searcher.find 'rake'
Gem::Specification#default_executable has been deprecated as it was intended to be used for a feature that never was implemented. The idea behind it was a command like gem exec rake that would invoke the proper version of rake through RubyGems. Since this was never implemented we've deprecated the attribute.
In all, RubyGems releases since 1.4 have focused on cleaning up much of the historic cruft left behind after years of releases. We've properly encapsulated much of the functionality so it's implemented in a sensible place. Most of the deprecations we have made can be fixed by a single line change or running a single command.
Deprecation Warnings
I learned from the removal of #version_requirements that people will ignore deprecation warnings if you only output them once. When RubyGems 1.5 was released with the removal #version_requirements people were confused about why their Rails applications broke.
A single warning that prints every time you start your rails app and says Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010
can be swept under the rug, so for this release we decided to print warnings every time you use deprecated functionality.
Since we knew that users would need to update their gemspecs we provided the following instructions:
After installing RubyGems 1.8.0 you will see deprecations when loading your exsting gems. Run `gem pristine --all --no-extensions` to regenerate your gem specifications safely.
Currently RubyGems does not save the build arguments used to build gems with extensions. You will need to run `gem pristine gem_with_extension -- --build-arg` to regenerate a gem with an extension where it requires special build arguments.
These instructions were printed when you ran gem update --system and running the command would immediately solve the problem. They were also duplicated in my blog posts for the RubyGems 1.8.0, 1.8.1 and 1.8.2 (which also fixed a bug in gem pristine for some rvm users).
If you upgraded from RubyGems 1.7 to RubyGems 1.8.1 you may have missed the note about running gem pristine. We've changed our install process to print release notes from the version you're upgrading from to the version you're upgrading to.
The remaining deprecations should be rarely encountered as the deprecated functionality is rarely used outside RubyGems.
PS: If you write a library that interacts with RubyGems beyond require you should be on the RubyGems-developers mailing list.
Doc Challenge Update
drbrain |
Here's an update on the Ruby 1.9.3 Documentation Challenge. Since Monday, Ruby's documentation coverage has grown to 59.02%. Thanks to the following contributors for improving Ruby's documentation coverage:
- Vincent Batts
- #4695
- #4690
- #4677
- #4664
- #4690
- Simon Chiang
- #4694
- Justin Collins
- #4693
- Sebastian Martinez
- #4688
- #4687
- Mark Turner
- #4691
- #4671
- Darragh Curran
- #4684
- Jason Dew
- #4667
- Sergio Gil Pérez de la Manga
- #4678
- Pete Higgins
- #4665
- RDoc issue #34
- Steve Klabnik
- #4663
It seems my goal of 60% was pessimistic as coverage has grown 5% in only a week. There's still plenty of time to help and you can find all the resources you need to get started on the Documentation Challenge post.
Here's the report from ruby trunk r31570:
Files: 728 Classes: 1299 ( 700 undocumented) Modules: 296 ( 163 undocumented) Constants: 1295 ( 914 undocumented) Attributes: 1025 ( 479 undocumented) Methods: 10108 (3491 undocumented) Total: 14023 (5747 undocumented) 59.02% documented
Here's Monday's report:
Files: 511 Classes: 1036 ( 624 undocumented) Modules: 228 ( 136 undocumented) Constants: 1335 (1134 undocumented) Attributes: 738 ( 381 undocumented) Methods: 8098 (2960 undocumented) Total: 11435 (5235 undocumented) 54.22% documented
I also removed lib/.document which artificially restricted the files RDoc was allowed to parse which added 331 classes and modules.
RDoc 3.6
drbrain |
RDoc produces HTML and command-line documentation for Ruby projects. RDoc includes the rdoc and ri tools for generating and displaying online documentation.
See RDoc for a description of RDoc’s markup and basic use.
Changes:
3.6 / 2011-05-13
-
Major Enhancements
-
Interactive ri is now the default when no names are given.
-
-
Minor Enhancements
-
RDoc::RDoc#generate was added to allow multiple generators to be used with a set of parsed file info.
-
RDoc::Options#finish can be called multiple times now.
-
ri -i only shows one level of namespace when completing class names.
-
Added ri --list for explicit listing. ri -l F G will list all classes or modules starting with F or G
-
-
Bug fixes
-
Remove windows-specific test for test_check_files, it is too hard to do. Ruby commit r30811 by Usaku Nakamura.
-
Remove unnecessary (and wrong) platform-dependent hacks. Ruby commit r30829 by Usaku Nakamura.
-
Completing via Array#[ in ri -i no longer crashes. Ruby Bug #3167
-
Completing IO::o in ri -i now returns results. Ruby Bug #3167
-
RDoc::Parser::C ignores prototypes better. Pull Request #34 by Pete Higgins.
-
private_class_method and public_class_method are now parsed correctly for inherited methods. Issue #16 by gitsucks.
-
The doc directive now forces documentation even when the method is marked private or protected.
-
RubyGems 1.8.2
drbrain |
RubyGems is a package management framework for Ruby.
This gem is an update for the RubyGems software. You must have an installation of RubyGems before this update can be applied.
See Gem for information on RubyGems (or ri Gem)
To upgrade to the latest RubyGems, run:
$ gem update --system # you might need to be an administrator or root
See UPGRADING.rdoc for more details and alternative instructions.
If you don’t have RubyGems installed, your can still do it manually:
-
Download from: rubygems.org/pages/download
-
Unpack into a directory and cd there
-
Install with: ruby setup.rb # you may need admin/root privilege
For more details and other options, see:
ruby setup.rb --help
Changes:
1.8.2 / 2011-05-11
After installing RubyGems 1.8 or newer you will see deprecations when loading your exsting gems. Run gem pristine --all --no-extensions to regenerate your gem specifications safely.
Currently RubyGems does not save the build arguments used to build gems with extensions. You will need to run gem pristine gem_with_extension -- --build-arg to regenerate a gem with an extension where it requires special build arguments.
-
2 minor enhancements:
-
Moved #outdated from OutdatedCommand to Specification (for Isolate).
-
Print out a warning about missing executables.
-
-
3 bug fixes:
-
Added missing requires to fix various upgrade issues.
-
gem pristine respects multiple gem repositories.
-
setup.rb now execs with --disable-gems when possible
-
Ruby 1.9.3 Documentation Challenge
drbrain |
Yugui announced a draft Ruby 1.9.3 release plan today with a feature freeze of end of May and a release target of end of July or early August.
I've seen many complaints in the form of "X lacks documentation" and have responded by writing it. First was an improvement of Net::HTTP along with Mathew Murphy and Yui NARUSE, next up was OpenSSL which received its first-ever toplevel documentation and today I committed toplevel documentation to WEBrick.
Both OpenSSL and WEBrick have some further documentation to flesh out the basic examples to help get you going but they need more work.
With revision 31499 of trunk RDoc reports that just under half of ruby has not even a single character of comments with over half of the classes and modules missing documentation:
Files: 511 Classes: 1036 ( 624 undocumented) Modules: 228 ( 136 undocumented) Constants: 1335 (1134 undocumented) Attributes: 738 ( 381 undocumented) Methods: 8098 (2960 undocumented) Total: 11435 (5235 undocumented) 54.22% documented
What can we do in the last month or so before the feature freeze to make this release the most-documented ever? To hit 60% documentation we only need to document another 1626 items.
To do my part, if you assign documentation patches to me on the Ruby 1.9 tracker on redmine I will commit them. I'll also keep writing documentation to fill in the gaps.
If you need help figuring out what to document you can look at the ruby documentation coverage report which updates hourly. You can run the full report yourself using make rdoc-coverage or run a partial report by installing the latest rdoc and running, for example, rdoc --encoding=UTF-8 -C lib/webrick* for coverage of all of WEBrick.
To keep us from stepping on each other's toes you can check this Pivotal Tracker set up by Cory Monty.
If you don't know how to contribute documentation to ruby Steve Klabnik has an excellent tutorial on contributing documentation to ruby. Note that if you send a pull request to github I can't quickly commit your change as I don't have the proper access.
RubyGems 1.8.1
drbrain |
RubyGems is a package management framework for Ruby.
This gem is an update for the RubyGems software. You must have an installation of RubyGems before this update can be applied.
See Gem for information on RubyGems (or ri Gem)
To upgrade to the latest RubyGems, run:
$ gem update --system # you might need to be an administrator or root
See UPGRADING.rdoc for more details and alternative instructions.
If you don’t have RubyGems installed, your can still do it manually:
-
Download from: rubygems.org/pages/download
-
Unpack into a directory and cd there
-
Install with: ruby setup.rb # you may need admin/root privilege
For more details and other options, see:
ruby setup.rb --help
1.8.1 / 2011-05-05
After installing RubyGems 1.8.1 you will see deprecations when loading your exsting gems. Run gem pristine --all --no-extensions to regenerate your gem specifications safely.
Currently RubyGems does not save the build arguments used to build gems with extensions. You will need to run gem pristine gem_with_extension -- --build-arg to regenerate a gem with an extension where it requires special build arguments.
-
1 minor enhancement:
-
Added Gem::Requirement#specific? and Gem::Dependency#specific?
-
-
4 bug fixes:
-
Typo on Indexer rendered it useless on Windows
-
gem dep can fetch remote dependencies for non-latest gems again.
-
gem uninstall with multiple versions no longer crashes with ArgumentError
-
Always use binary mode for File.open to keep Windows happy
-
RubyGems 1.8.0
drbrain |
rubygems-update version 1.8.0 has been released!
RubyGems is a package management framework for Ruby.
This gem is an update for the RubyGems software. You must have an installation of RubyGems before this update can be applied.
See Gem for information on RubyGems (or ri Gem)
To upgrade to the latest RubyGems, run:
$ gem update --system # you might need to be an administrator or root
See UPGRADING.rdoc for more details and alternative instructions.
If you don’t have RubyGems installed, your can still do it manually:
-
Download from: rubygems.org/pages/download
-
Unpack into a directory and cd there
-
Install with: ruby setup.rb # you may need admin/root privilege
For more details and other options, see:
ruby setup.rb --help
1.8.0 / 2011-04-34
This release focused on properly encapsulating functionality. Most of this work focused on moving functionality out of Gem::SourceIndex and Gem::GemPathSearcher into Gem::Specification where it belongs.
After installing RubyGems 1.8.0 you will see deprecations when loading your exsting gems. Run gem pristine --all --no-extensions to regenerate your gem specifications safely.
Currently RubyGems does not save the build arguments used to build gems with extensions. You will need to run gem pristine gem_with_extension -- --build-arg to regenerate a gem with an extension where it requires special build arguments.
See also: RubyGems 1.8 is Coming-
24(+) Deprecations (WOOT!):
-
DependencyList.from_source_index deprecated the source_index argument.
-
Deprecated Dependency.new(/regex/).
-
Deprecated Gem.searcher.
-
Deprecated Gem.source_index and Gem.available?
-
Deprecated Gem: activate_dep, activate_spec, activate, report_activate_error, and required_location.
-
Deprecated Gem::all_partials
-
Deprecated Gem::cache_dir
-
Deprecated Gem::cache_gem
-
Deprecated Gem::default_system_source_cache_dir
-
Deprecated Gem::default_user_source_cache_dir
-
Deprecated Platform#empty?
-
Deprecated Specification.cache_gem
-
Deprecated Specification.installation_path
-
Deprecated Specification.loaded, loaded?, and loaded=
-
Deprecated all of Gem::SourceIndex.
-
Deprecated all of Gem::GemPathSearcher.
-
Deprecated Gem::Specification#default_executable.
-
-
2 major enhancements:
-
Gem::SourceIndex functionality has been moved to Gem::Specification. Gem::SourceIndex is completely disconnected from Gem::Specification
-
Refactored GemPathSearcher entirely out. RIPMF
-
-
41 minor enhancements:
-
Added CommandManager#unregister_command
-
Added Dependency#matching_specs + to_specs.
-
Added Dependency#to_spec
-
Added Gem.pre_reset_hook/s and post_reset_hook/s.
-
Added GemCommand.reset to reinitialize the singleton
-
Added Specification#activate.
-
Added Specification#activated, activated=, and activated?
-
Added Specification#base_dir.
-
Added Specification#bin_dir and bin_file.
-
Added Specification#cache_dir and cache_file. Aliased cache_gem.
-
Added Specification#doc_dir and ri_dir.
-
Added Specification#find(name_or_dep, *requirements).
-
Added Specification#gem_dir and gems_dir.
-
Added Specification#spec_dir and spec_file.
-
Added Specification.add_spec, add_specs, and remove_spec.
-
Added Specification.all=. If you use this, we will light you on fire.
-
Added Specification.all_names.
-
Added Specification.dirs and dirs=. dirs= resets.
-
Added Specification.find_all_by_name(name, *reqs)
-
Added Specification.latest_specs. SO TINY!
-
Added TestCase#all_spec_names to help clean up tests
-
Added TestCase#assert_path_exists and refute_path_exists. Will move to minitest.
-
Gem.sources no longer tries to load sources gem. Only uses default_sources.
-
Installer no longer accepts a source_index option.
-
More low-level integration.
-
Removed Gem::FileOperations since it is a dummy class
-
Removed a comment because I am dumb
-
Removed pkgs/sources/lib/sources.rb
-
Revamped indexer to mostly not use SourceIndex (legacy index requires it).
-
Rewrote our last functional test suite to be happy and fast
-
RubyGems is now under the Ruby License or the MIT license
-
Specification#== now only checks name, version, and platform.
-
Specification#authors= now forcefully flattens contents (bad rspec! no cookie!)
-
Specification#eql? checks all fields.
-
Specification#installation_path no longer raises if it hasn’t been activated.
-
Specification#validate now ensures that authors is not empty.
-
TestCase.util_setup_spec_fetcher no longer returns a SourceIndex.
-
Uninstaller no longer passes around SourceIndex instances
-
Warn on loading bad spec array values (ntlm-http gem has nil in its cert chain)
-
gem pristine now accepts --no-executables to skip restoring gems with extensions.
-
gem pristine can now restore multiple gems.
-
-
6 bug fixes:
-
DependencyInstaller passed around a source_index instance but used Gem.source_index.
-
Fixed Platform#== and #hash so instances may be used as hash keys.
-
Fixed broken Specification#original_platform. It should never be nil.
-
Gem::Text#format_text now strips trailing whitespace
-
Normalize LOAD_PATH with File.expand_path
-
gem build errors should exit 1.
-
gem pristine can now restore non-latest gems where the cached gem was removed.
-

