[Bug 651898] Review Request: rubygem-activemodel - A toolkit for building modeling frameworks

bugzilla at redhat.com bugzilla at redhat.com
Wed Jan 26 21:46:07 UTC 2011


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


https://bugzilla.redhat.com/show_bug.cgi?id=651898

Mohammed Morsi <mmorsi at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |668820, 668822
               Flag|fedora-review?              |fedora-review+

--- Comment #5 from Mohammed Morsi <mmorsi at redhat.com> 2011-01-26 16:46:06 EST ---
(In reply to comment #4)
> I am taking over this package (right Jozef?).
> 
> So here is updated package:
> 
> Spec URL: http://people.redhat.com/vondruch/rubygem-activemodel.spec
> SRPM URL:
> http://people.redhat.com/vondruch/rubygem-activemodel-3.0.3-1.fc14.src.rpm
> 
<snip>
> 
> I do not provide the Koji build due to missing activesupport dependency.
> However if approved, I can already prepare the repository.

I tried to build in a F14 x86_64 mock environment w/ the activesupport 3.0.3
rpm and its dependencies installed but failed. I get to the point the tests are
run, which then fail with

/home/mmorsi/rpmbuild/BUILDROOT/rubygem-activemodel-3.0.3-1.fc14.x86_64/usr/lib/ruby/gems/1.8/gems/activemodel-3.0.3/lib/active_model.rb:26:in
`require': no such file to load -- active_support (LoadError)
 from
/home/mmorsi/rpmbuild/BUILDROOT/rubygem-activemodel-3.0.3-1.fc14.x86_64/usr/lib/ruby/gems/1.8/gems/activemodel-3.0.3/lib/active_model.rb:26


There is a runtime dependency for bundler, the thing is I don't see a Gemfile
nor any other bundler specific code, so I'm wondering if this was a mistake. If
so it looks like activemodel-3.0.3/lib/active_model.rb will have to be patched
to require 'rubygems' instead of trying to load active_support via a hard coded
relative path. To start off I believe these changes are needed

$  diff rpmbuild/SPECS/rubygem-activemodel.spec.orig
rpmbuild/SPECS/rubygem-activemodel.spec
18a19
> Patch0: activemodel-require-rubygems.patch
25a27,28
> BuildRequires: rubygem(i18n) => 0.4.2
> BuildRequires: rubygem(builder)
44a48,54
> %setup -q -c -T
> mkdir -p .%{gemdir}
> gem install --local --install-dir .%{gemdir} \
>             --force -V --rdoc %{SOURCE0}
> 
> pushd .%{geminstdir}
> %patch0 -p0
50,51c60
< gem install --local --install-dir %{buildroot}%{gemdir} \
<             --force --rdoc %{SOURCE0}
---
> cp -a .%{gemdir}/* %{buildroot}%{gemdir}


$ cat rpmbuild/SOURCES/activemodel-require-rubygems.patch 
--- lib/active_model.rb.orig 2011-01-26 16:27:30.353187058 -0500
+++ lib/active_model.rb 2011-01-26 16:27:39.500187210 -0500
@@ -21,8 +21,9 @@
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #++

-activesupport_path = File.expand_path('../../../activesupport/lib', __FILE__)
-$:.unshift(activesupport_path) if File.directory?(activesupport_path) &&
!$:.include?(activesupport_path)
+#activesupport_path = File.expand_path('../../../activesupport/lib', __FILE__)
+#$:.unshift(activesupport_path) if File.directory?(activesupport_path) &&
!$:.include?(activesupport_path)
+require 'rubygems'
 require 'active_support'
 require 'active_model/version'

The things is even with this patchset applied the test suite doesn't pass, and
results in alot of errors, such as

"NoMethodError: undefined method `expects' for ..."
"NoMethodError: undefined local variable or method `stub' for ..."

I didn't extensively debug, my guess is one of the required testing frameworks
isn't being loaded / included properly.

To test this you will need activesupport 3.0.3, and for that you will need
rubygem rdoc and memcache-client. You can build these rpms from the srpms
submitted to Fedora. Also I would really appreciate a review for either or both
of these to assist this process (added as blockers).

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the package-review mailing list