From: Roger Pack on
Rein Henrichs wrote:
> On 2010-06-22 11:38:09 -0700, Roger Pack said:
>
>> , note that File.open("../VERSION") fails since
>>> it tries to check in the parent of the dir where user currently is
>>> running the app from.
>>
>> File.open(File.dirname(__FILE__) + "/../VERSION")
>
> Roger, you shouldn't depend on files outside of the lib/ dir when
> bundling your library as a gem. This was a problem for Rack for a while
> as some tools will move the lib dir out and break your relative path.

Good point. For bundling sake I'd therefore suggest moving the file
VERSION into your lib dir. Though, in reality, it's probably the tools
that should bundle the whole gem not just its lib dir...at least if they
want to be totally gem compatible.
-r
--
Posted via http://www.ruby-forum.com/.

From: Roger Pack on
R.. Kumar wrote:
> Roger Pack wrote:
>
> Roger,
>
> How do you post an announcement [ANN] to rubyforge.org and this forum.
> Do you use post_news of rubyforge command ?

I've never posted an announcement to rubyforge.org
Anybody?
-r
--
Posted via http://www.ruby-forum.com/.

From: Tom Copeland on

On Jun 23, 2010, at 10:13 AM, Roger Pack wrote:

> R.. Kumar wrote:
>> Roger Pack wrote:
>>
>> Roger,
>>
>> How do you post an announcement [ANN] to rubyforge.org and this forum.
>> Do you use post_news of rubyforge command ?
>
> I've never posted an announcement to rubyforge.org
> Anybody?

Yup, the rubyforge gem has a option for that:

$ rubyforge --help | grep post_news
post_news(group_id, summary, details)
rubyforge post_news codeforpeople.com "new release" "this release is great!"
rubyforge post_news 1024 traits "new release" "this release is great!"

Yours,

Tom


From: Intransition on


On Jun 23, 10:12 am, Roger Pack <rogerpack2...(a)gmail.com> wrote:
> Rein Henrichs wrote:
> > On 2010-06-22 11:38:09 -0700, Roger Pack said:
>
> >> , note that File.open("../VERSION") fails since
> >>> it tries to check in the parent of the dir where user currently is
> >>> running the app from.
>
> >> File.open(File.dirname(__FILE__) + "/../VERSION")
>
> > Roger, you shouldn't depend on files outside of the lib/ dir when
> > bundling your library as a gem. This was a problem for Rack for a while
> > as some tools will move the lib dir out and break your relative path.
>
> Good point. For bundling sake I'd therefore suggest moving the file
> VERSION into your lib dir.  Though, in reality, it's probably the tools
> that should bundle the whole gem not just its lib dir...at least if they
> want to be totally gem compatible.

Easy solution:

cd lib/foo
ln -s ../../VERSION version.yml

Or .txt as the case may be.


From: Gabriel Horner on
Roger Pack wrote:
> VERSION into your lib dir. Though, in reality, it's probably the tools
> that should bundle the whole gem not just its lib dir...at least if they
> want to be totally gem compatible.

Disagree for two reasons. First, keeping VERSION out of lib/ breaks
library namespacing conventions i.e. lib/name.rb and lib/name/.
Versioning is part of library so why should it be different?
Second, this goes against the emerging ruby packaging standard (RPS),
http://chneukirchen.github.com/rps/. RPS clearly calls for all library
code to reside in lib/. As a community, I think we should embrace this
emerging spec seeing it is the only serious attempt at standardizing
ruby packages.

Gabriel
--
Posted via http://www.ruby-forum.com/.

First  |  Prev  |  Next  |  Last
Pages: 1 2 3
Prev: XMPP client with Ruby
Next: ruby bounties update