Custom library, but no zipped

0 views
Skip to first unread message

Hannes Horneber

unread,
Jan 7, 2009, 3:09:38 PM1/7/09
to ProjectSprouts
Hi there (again),

I am trying to create a library for the mate framework (http://
mate.asfusion.com/)
and although it seems quite simple (it is a real short rakefile) I
can't get the problem
solved that mate isn't distributed as a zip-file. You can download it
directly as a swc-file
and so I am stuck trying to finde the right paramters for the
RemoteFileTarget:

<Snip>

- !ruby/object:Sprout::RemoteFileTarget
platform: universal
url: http://mate-framework.googlecode.com/files/Mate_08_5.swc

<Snip END>

Testing this gem nothing happens... my project depends on it and it is
looked after when I am trying to run my project, but the library isn't
copied
into the lib_dir... perhaps someone may give me a hint (again)?

Thanks in advance.

Cheers,
Hannes

Hannes Horneber

unread,
Jan 9, 2009, 5:42:35 AM1/9/09
to ProjectSprouts
Hello again,

so I looked into this a bit further and found in the source at github
(http://github.com/lukebayes/project-sprouts/tree/
011416d7a2bab35a732170b579c4cfdbd6913920/sprout/lib/sprout/
remote_file_target.rb)
that the folder "archive" is always created and expected.

I tried to get this working by copying the downloaded swc into this
folder using
the post-installation function (or however it is called, I am very new
to ruby, rails, ...).
But it seems that this doesn't exist anymore.

So I am quite stuck again. For now I only workaround by zipping the
libraries
an uploading it to our server. But I really don't now if the guys of
the mate framework
would appreciate this.

Perhaps there is another, nicer workaround to this?

Cheers,
Hannes

Luke Bayes

unread,
Jan 9, 2009, 1:27:15 PM1/9/09
to project...@googlegroups.com
Hey Hannes,

Thanks for posting these questions, they're definitely helping us
improve Sprouts!

Try setting your 'installed_path' property in the sprout.spec to '../
foo.swc', and the archive_path to empty string. (where foo.swc is the
name of your swc file)

I haven't tested this idea, but glancing at the source, it might just
do it.


Thanks,


Luke Bayes

Hannes Horneber

unread,
Jan 9, 2009, 2:42:19 PM1/9/09
to ProjectSprouts
Perfect. That did the trick. Thank you so much.
I will test this a bit further and then will upload a few library gems
to
rubyforge.

The only thing left is the case, if there is URL which doesn't contain
the filename at the end... I think that is what you call a Rails URL
in
the comments in remote_file_target.rb ...

Perhaps it would be good to introduce a "filename" attribute.
If given there is no need to split and shift the url string, else
the function file_name does what it does ;-)

Cheers,
Hannes

Luke Bayes

unread,
Jan 9, 2009, 3:07:25 PM1/9/09
to project...@googlegroups.com
I'm glad that worked for you.

If you'd like to add support for railsey URLs, I'd be glad to pull it
into trunk!


Thanks,

Luke
Reply all
Reply to author
Forward
0 new messages