On 05/25/2011 01:18 PM, Chris Lalancette wrote:
On 05/26/11 - 02:23:03AM, Justin Clift wrote:
> On 26/05/2011, at 12:20 AM, Francesco Vollero wrote:
>> On Wed, May 25, 2011 at 08:40:29AM -0400, Chris Lalancette wrote:
>>> On 05/25/11 - 01:02:04PM, Francesco Vollero wrote:
>>>> On Wed, May 25, 2011 at 04:01:34PM +1000, Justin Clift wrote:
> <snip>
>>>>>> -export
DELTACLOUD_MOCK_STORAGE=/usr/lib/ruby/gems/1.8/gems/deltacloud-<%= name
%>-0.2.0/lib/deltacloud/drivers/mock/data/
>>>>>> +export
DELTACLOUD_MOCK_STORAGE=/usr/lib/ruby/gems/1.8/gems/deltacloud-<%= name
%>-0.3.0/lib/deltacloud/drivers/mock/data/
>>>>>
>>>>> Pretty sure mfojtik mentioned a variable at some point, which can be
used
>>>>> instead of the hard-coded ruby 1.8 gem path. Just thinking it might
be
>>>>> worth doing that, to add a bit of flexibility (ie testing with Ruby
1.9,
>>>>> etc)
>>>
>>> So the way we do it in all of the RPMs is:
>>>
>>> ruby -rubygems -e 'puts Gem::dir'
>>>
>>> We should probably do something similar here.
>>
>> Yes Chris,
>>
>> [fvollero@fermat ~]$ ruby -rubygems -e 'puts Gem::dir'
>> /usr/lib/ruby/gems/1.8
>> [fvollero@fermat ~]$ gem env gemdir
>> /usr/lib/ruby/gems/1.8
>> [fvollero@fermat ~]$
>>
>> they return the identical result.
Hrm, can't we just create a symlink to the
.../deltacloud/drivers/mock/data/ directory in the deltacloud-core rpm
and then just refer to that symlink here?
The rpm spec should already have the gem path and this way we could
simply change it there, independently of this init script.
>
> Cool. Looks workable. Should we Redmine issue for this, to change
> all occurrences across our source for this or something, then be on
> the lookout in patch reviewing too?
Yeah, that is probably a good idea. Care to open it for us?
Thanks,
Correct me if I'm wrong but I don't believe we have any hard coded
references to any ruby library paths in the project. In general its not
a good practice, and if there are, I agree they should be removed.
-Mo