From: "vo.x (Vit Ondruch)" Date: 2012-10-24T20:22:24+09:00 Subject: [ruby-dev:46257] [ruby-trunk - Feature #6875] Make test/unit default gem Issue #6875 has been updated by vo.x (Vit Ondruch). kou (Kouhei Sutou) wrote: > # https://bugs.ruby-lang.org/issues/6875 から投稿しようとす > # るとInternal Server Errorになるのでメールで送ります。 > # これでもRedmineに登録されるんですよね。 > > I'm the test-unit gem maintainer and working on default gem for RubyGems library. > I want to make Ruby users (especially test-unit gem users) life easier. Thank you. I appreciate your effort. > > Could you please enlighten what this issue solves? > > OK. I'll describe it. > > Here is a problem that I want to solve by this issue: > > test_xxx.rb: > > require "test/unit" > > class TestXXX < Test::Unit::TestCase > def test_xxx > assert_equal(3, 1 + 2) > end > end > > test_xxx_with_explicit_gem_test-unit.rb: > > gem "test-unit" > require "./test_xxx" > > Current: > > % ruby test_xxx.rb # -> uses test/unit in StdLib > % gem install test-unit > % ruby test_xxx.rb # -> still uses test/unit in StdLib > % ruby test_xxx_with_explicit_gem_test-unit.rb # -> uses test-unit gem > > > Expected: > > % ruby test_xxx.rb # -> uses test/unit in StdLib (same) > % gem install test-unit > % ruby test_xxx.rb # -> still uses test/unit in StdLib (different) > % ruby test_xxx_with_explicit_gem_test-unit.rb # -> uses test-unit gem (same) Sorry, I am not sure I understand this example. I expect that current is Ruby 1.9.3 and expected is Ruby 2.0, but what is the difference? > > Adding .gemspec is not enough to create valid gem. > > It is right. There are still some tasks to implement default gem feature. > > > 1) The /usr/bin stub allow to load specified version of gem, e.g. calling $ testrb _2.5.2_ should call the latest version of test-unit but your stub does not do so > > It is right. But it doesn't cause the problem in testrb case. Because test-unit gem dropped testrb to avoid conflicting testrb that is installed by Ruby. > > (It is not needed soon. I will implement the feature later.) Good to know. Thank you. > > 2) The gem usually contains code. It does not depend on some code lying somewhere in the StdLib > > It is right. (.gemspec for test/unit StdLib doesn't have any problems for it, doesn't it?) StdLib doesn't, but I cannot package such gem, because it is not gem. > > 3) The gem could be usually found on rubygems.org. While there is test-unit available on rubygems.org, it is definitely different test-unit then the one shipped with Ruby. > > It is right. (.gemspec for test/unit StdLib doesn't have any problems for it, doesn't it?) It is not problem for StdLib, but how should I package something I don't have source for? > > Could you please stop confusing Ruby users and stop to make life harder to us, packagers? > > I don't want to confusing Ruby users and make life harder to packages. If they have problems, I want to resolve them. Thank you. I appreciate your effort. > > I'd really love to be able to break StdLib into independent rubygems > > The "rubygems" means that gem packages on RubyGems.org not RubyGems library itself, doesn't it? > If it is true, the change doesn't depend on additional gem packages. No I really mean that StdLib should consist from real gems. Since we need them for packaging and easy updates. > > can be packaged separately and updated separately, but this is not the way. > > You can do both of them. > You just put test-unit.gemspec to Ruby's package. It doesn't add any additional dependencies. > RubyGems library does all other works. (It is work in progress. https://github.com/rubygems/rubygems/pull/377 ) > > Again, I want to implement default gem feature *without* bothering packagers. > I don't know packagers' tasks well. Could you please tell me your problems? I'll resolve them. > > Thanks. Thank you for your effort. I'll try to elaborate a bit. In Fedora, we unbundled every gem from StdLib, i.e. the rake is not anymore part of StdLib. There is no reason to have it in StdLib, since we need only one version of Rake on system. That is the purpose of RPM and YUM, to manage your packages. It allows easy updates when new rake version is available as well as it prevents multiple copies around the system. No for your 'gem', since there is no test-unit, just some test-unit shim, there is no way how to extract it from StdLib. We are already providing in Fedora full featured rubygem-test-unit, but how it is supposed the original part of StdLib? For the rest, see my feedback in your pull request and thank you for pointing it out, since I am obviously highly interested in possible output. ---------------------------------------- Feature #6875: Make test/unit default gem https://bugs.ruby-lang.org/issues/6875#change-31469 Author: kou (Kouhei Sutou) Status: Closed Priority: Normal Assignee: sorah (Shota Fukumori) Category: lib Target version: 2.0.0 test/unitをdefault gemにするパッチです。 http://bugs.ruby-lang.org/projects/ruby/wiki/StdlibGem に従ってバージョンは2.0.0.0にしています。 私はtest-unitというgemを作っています。test-unit gemがインストールされるとバンドルされているtest/unitよりも優先してtest-unit gemの方が使われると嬉しいのでこのパッチを書きました。 -- http://bugs.ruby-lang.org/