OK, I put my laziness aside and tried a few things.
Pulling master from git and downloading the pre-built dependencies I
followed the quick instruction for building Shoes on Mac OS X.
Building breaks off with the following:
private method `specification_version=' called for
#<Gem::Specification:0x5445d4>
It's in the Rakefile (ln 117) where the gemspecs for the required ruby
libs are processed, which is an eval of the gemspecs in the req directory.
(bare with me, I am a bit explicit because it also helps me get an
overview of how things are done)
Now, the use-deps script modifies the environment so that the ruby used
is the one in the deps/ dir.
The gem library used in my prebuilt package is v1.1.1 with a
GemSpecification version of 1.
In the gemspecs there is the following line of code:
if s.respond_to? :specification_version then
whereupon the code decides to use specification_version= within the if.
GemSpecification v1 responds to :specification but :specification= is
private.
Changing the if line to
if s.public_methods.include?("specification_version=")
lets me built with no problems.
I've attached my patch against master.
Cheers,
V.-
--
http://www.braveworld.net/riva
>From 169c9c44cc1e5c8b391f80b5533706299fd07719 Mon Sep 17 00:00:00 2001
From: Vassilis Rizopoulos <[EMAIL PROTECTED]>
Date: Fri, 14 Nov 2008 16:58:09 +0100
Subject: [PATCH] checking if Gem::Specification#specification_version= is public
updated the gemspecs to fix an issue with gem specifications of version 1 where
specification_version= is not public. The code was checking if the object
responds to specification, not specification=
---
req/hpricot/gemspec | 2 +-
req/json/gemspec | 2 +-
req/sqlite3/gemspec | 4 +++-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/req/hpricot/gemspec b/req/hpricot/gemspec
index 4b85df1..9130854 100644
--- a/req/hpricot/gemspec
+++ b/req/hpricot/gemspec
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
s.rubygems_version = %q{1.3.0}
s.summary = %q{a swift, liberal HTML parser with a fantastic library}
- if s.respond_to? :specification_version then
+ if s.public_methods.include?("specification_version=") then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 2
diff --git a/req/json/gemspec b/req/json/gemspec
index 7768269..5292e85 100644
--- a/req/json/gemspec
+++ b/req/json/gemspec
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
s.summary = %q{A JSON implementation as a Ruby extension}
s.test_files = ["tests/runner.rb"]
- if s.respond_to? :specification_version then
+ if s.public_methods.include?("specification_version=") then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 2
diff --git a/req/sqlite3/gemspec b/req/sqlite3/gemspec
index 81b07a0..4351c67 100644
--- a/req/sqlite3/gemspec
+++ b/req/sqlite3/gemspec
@@ -20,8 +20,10 @@ Gem::Specification.new do |s|
s.summary = %q{SQLite3/Ruby is a module to allow Ruby scripts to interface
with a SQLite3 database.}
s.test_files = ["test/tests.rb"]
- if s.respond_to? :specification_version then
+ if s.public_methods.include?("specification_version=") then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
+ p current_version
+ p s.public_methods.sort
s.specification_version = 2
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
--
1.6.0.2