Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 207473 - Review Request: ruby-activerecord - Implements the ActiveRecord pattern for ORM
Summary: Review Request: ruby-activerecord - Implements the ActiveRecord pattern for ORM
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jason Tibbitts
QA Contact: Fedora Package Reviews List
URL:
Whiteboard:
Depends On: 207472
Blocks: FE-ACCEPT
TreeView+ depends on / blocked
 
Reported: 2006-09-21 11:01 UTC by David Lutterkort
Modified: 2013-04-30 23:40 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-12-14 23:48:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Lutterkort 2006-09-21 11:01:39 UTC
Spec URL: http://people.redhat.com/dlutter/yum/spec/ruby-activerecord.spec
SRPM URL: http://people.redhat.com/dlutter/yum/SRPMS/ruby-activerecord-1.14.2-1.src.rpm
Description: 
Implements the ActiveRecord pattern (Fowler, PoEAA) for ORM. It ties
database tables and classes together for business objects, like Customer or
Subscription, that can find, save, and destroy themselves without resorting
to manual SQL.

Comment 1 David Lutterkort 2006-09-21 11:04:07 UTC
rpmlint says:
E: ruby-activerecord script-without-shellbang
/usr/share/doc/ruby-activerecord-1.14.2/README

because it gets confused by the first line of the README. Should b ignorable.

Comment 2 Ville Skyttä 2006-09-21 15:58:20 UTC
(In reply to comment #1)
> rpmlint says:
> E: ruby-activerecord script-without-shellbang
> /usr/share/doc/ruby-activerecord-1.14.2/README
> 
> because it gets confused by the first line of the README.

No it doesen't, README is installed executable...



Comment 3 Kostas Georgiou 2006-09-25 09:53:26 UTC
Is active_support really required? I don't see anything in the code that uses it.

Comment 4 David Lutterkort 2006-09-26 17:55:19 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > rpmlint says:
> > E: ruby-activerecord script-without-shellbang
> > /usr/share/doc/ruby-activerecord-1.14.2/README
> > 
> > because it gets confused by the first line of the README.
> 
> No it doesen't, README is installed executable...

Ouch .. how embarrassing. Fixed now

Spec URL: http://people.redhat.com/dlutter/yum/spec/ruby-activerecord.spec
SRPM URL:
http://people.redhat.com/dlutter/yum/SRPMS/ruby-activerecord-1.14.2-2.src.rpm



Comment 5 David Lutterkort 2006-09-26 18:05:45 UTC
(In reply to comment #3)
> Is active_support really required? I don't see anything in the code that uses it.

Yes, it is .. $sitelibdir/active_record.rb requires it and gets grumpy if it's
not there. Since active_support modifies some of the core classes, users of
active_record can (and should) expect those additional methods to be there, no
matter how active_record was installed (tarball, gem, or rpm)


Comment 7 Jason Tibbitts 2006-11-13 06:15:59 UTC
I noted the presence of a nice test suite, and realized that it should actually
be possible to run at least some of it because sqlite doesn't need a configured
database server.  So I set out to get the test suite to run with:

%check
cd test
ruby -I "connections/native_sqlite3" base_test.rb

In order to get this to work, it's necessary to add some BRs:
  ruby(active_support), ruby(sqlite3), ruby-irb
The first two are pretty obvious, but the third was not.  It looks like the
ruby-activesupport package needs a runtime dependency on ruby-irb.

In any case, the test suite unfortunately fails:

Using native SQLite3
SQLite3 database not found at
/builddir/build/BUILD/activerecord-1.14.4/test/fixtures/fixture_database.sqlite3.
Rebuilding it.
Executing 'sqlite3
/builddir/build/BUILD/activerecord-1.14.4/test/fixtures/fixture_database.sqlite3
"create table a (a integer); drop table a;"'
SQLite3 database not found at
/builddir/build/BUILD/activerecord-1.14.4/test/fixtures/fixture_database_2.sqlite3.
Rebuilding it.
Executing 'sqlite3
/builddir/build/BUILD/activerecord-1.14.4/test/fixtures/fixture_database_2.sqlite3
"create table a (a integer); drop table a;"'
-- create_table(:taggings, {:force=>true})
   -> 0.0158s
-- create_table(:tags, {:force=>true})
   -> 0.0160s
-- create_table(:categorizations, {:force=>true})
   -> 0.0158s
-- add_column(:posts, :taggings_count, :integer, {:default=>0})
   -> 0.0182s
-- add_column(:authors, :author_address_id, :integer)
   -> 0.0162s
-- create_table(:author_addresses, {:force=>true})
   -> 0.0173s
-- create_table(:author_favorites, {:force=>true})
   -> 0.0240s
Loaded suite base_test
Started
.......................................................................................................F.............
Finished in 0.519048 seconds.

  1) Failure:
test_to_xml_including_multiple_associations(BasicsTest) [base_test.rb:1248]:
<false> is not true.

117 tests, 297 assertions, 1 failures, 0 errors

It would be good to figure out what's going wrong here just in case there is an
actual problem with the code on this platform.

Review:
* source files match upstream:
   ce66299a7fe99fdaf2c9747e850560b6  activerecord-1.14.4.tgz
* package meets naming and packaging guidelines.
* specfile is properly named, is cleanly written and uses macros consistently.
* dist tag is present.
* build root is correct.
* license field matches the actual license.
* license is open source-compatible.  License text not included upstream.
* latest version is being packaged.
* BuildRequires are proper.
* %clean is present.
* package builds in mock (development, x86_64).
* package installs properly
* rpmlint is silent.
* final provides and requires are sane:
   ruby(active_record) = 1.14.4
   ruby-activerecord = 1.14.4-1.fc7
  =
   ruby(abi) = 1.8
   ruby(active_support)
? Not sure about %check.
* owns the directories it creates.
* doesn't own any directories it shouldn't.
* no duplicates in %files.
* file permissions are appropriate.
* no scriptlets present.
* code, not content.
* documentation is small, so no -docs subpackage is necessary.
* %docs are not necessary for the proper functioning of the package.

Comment 8 Jason Tibbitts 2006-11-13 06:19:08 UTC
Ah, it turns out this is a bug in the test:
http://dev.rubyonrails.org/ticket/5268

I suggest just applying that patch and enabling the tests, unless you have some
compelling reason why we shouldn't try to run them.

Comment 9 David Lutterkort 2006-11-16 16:13:06 UTC
I enabled the tests (and added the necessary BR's) I had to make the test
running conditional so that the specfile works for RHEL4 too (RHEL4 doesn't have
sqlite3)

Spec URL: http://people.redhat.com/dlutter/yum/spec/ruby-activerecord.spec
SRPM URL:
http://people.redhat.com/dlutter/yum/SRPMS/ruby-activerecord-1.14.4-2.src.rpm

Comment 10 David Lutterkort 2006-11-16 16:13:44 UTC
I enabled the tests (and added the necessary BR's) I had to make the test
running conditional so that the specfile works for RHEL4 too (RHEL4 doesn't have
sqlite3)

Spec URL: http://people.redhat.com/dlutter/yum/spec/ruby-activerecord.spec
SRPM URL:
http://people.redhat.com/dlutter/yum/SRPMS/ruby-activerecord-1.14.4-2.src.rpm


Comment 11 Jason Tibbitts 2006-12-13 06:02:17 UTC
My apologies; somehow this slipped past me.

Still builds fine on rawhide, tests are run and all pass:
   Finished in 0.657058 seconds.
   117 tests, 298 assertions, 0 failures, 0 errors
1.14.4 is still current.
Everything else looks good.
Already did the review, and everything these still applies except that %check
has been added.

APPROVED

Comment 12 David Lutterkort 2006-12-14 23:48:23 UTC
Imported and successfully built as plague job 23782


Note You need to log in before you can comment on or make changes to this bug.