Removing vendor dirs from rubygems

Troy Dawson tdawson at redhat.com
Thu Aug 1 13:46:54 UTC 2013


Hi,
What is the best way to remove the vendor directories from rubygems?
Is there a macro for it?

The problem I keep having is that the vendor directory is in the gem. 
And this is what we need to have in the %prep section
-----
%prep
gem unpack %{SOURCE0}
%setup -q -D -T -n  %{gem_name}-%{version}
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%patch0 -p1
-----

The problem is that the gemspec get's built with the vendor directory. 
So, no matter where I put the "rm -rf vendor/" I have to have either a 
complicated sed on the gemspec, or a major patch, that has to be updated 
each time I update the version of the gem.

Is there an easier way?  Is there a macro I am missing?
Is there a non-complicated sed command that works?

Troy


More information about the ruby-sig mailing list