Re: [ruby-81] Directory transclusion fantasy

From: Jacob R.
Sent on: Friday, July 24, 2009 11:53 PM
The standard way to do this would be to have your shared plugins
checked into their own subversion or git repository.  It probably
makes the most sense to use whatever source control management tool
that all of your projects are in.  If they're not in SCM (svn or git),
they should be.  I'm just getting up to speed with git, so maybe
someone with more git experience can chime in here, but with
subversion, you could do the following in each of the projects:

svn propedit svn:externals vendor/plugins
(EDITOR opens)
/path/to/your/svn/re­po (if local) or svn://remote.com/rep­o or
svn+ssh://remote.com­/repo or https://remote.com...­

Then, whenever you commit a change to the shared repo and svn up in
the shared directory, your external will update as well.  Check out
http://svnbook.re...­ for
details on svn:externals.

If you don't always want to propagate plugin changes across different
apps (say, for example, it takes a little bit to integrate interface
changes into one app and you aren't ready to do that), check out
piston http://piston.rub...­ -- I've used this on a large
project and it worked fine.  There's also braid
http://github.com...­, but I haven't used that
yet.

Pretty much anything SCM-based is going to be better than something
like a link of any sort when you start thinking about deploying your
apps to different servers.  Capistrano is going to want to svn co or
git clone on the remote server and be done with it, so it pays to get
used to keeping everything synced up through SCM.

Hope that helps!

--
Jacob Rothstein
Stormweight Systems, Inc.

(510)[masked]
http://www.stormw...­
http://twitter.co...­




On Fri, Jul 24, 2009 at 9:28 PM, Jimmy<[address removed]> wrote:
> try ln
>
> man ln for details
>
> Jimmy
>
> On Fri, Jul 24, 2009 at 10:08 PM, Loqi<[address removed]> wrote:
>> At the meetup, I mentioned a problem I'm having, but I don't think I
>> explained it very well. I'm sure there's a simple, standard solution that
>> everyone is using, but I don't know it.
>>
>> What I'd like to do is to somehow transclude the content of one directory
>> with everything inside it into another directory somewhere else on the
>> filesystem. If it were legal to have a hard link of a directory in Unix,
>> that would be an ideal solution.
>>
>> What I'd like to have is something like this:
>>
>> plugins_written_by_m­e
>> ?my_plugin
>> ? ?a bunch of files and directories ?<-- I want to edit at will
>>
>> my_rails_project
>> ?vendor
>> ? ?plugins
>> ? ? ?my_plugin
>> ? ? ? ?a bunch of files and directories ?<-- I want to edit at will
>>
>> my_other_rails_proje­ct
>> ?vendor
>> ? ?plugins
>> ? ? ?my_plugin
>> ? ? ? ?a bunch of files and directories ?<-- I want to edit at will
>>
>> If I could somehow make each Rails project's plugins directory have a
>> hardlink to the plugin working directory, then I could freely edit anything
>> anywhere, anytime. And since there's only one copy, nothing ever gets out of
>> sync. Furthermore, if I copy any such project across the network, it would
>> just grab the current copy of everything, not an empty link. In short, it
>> should look just like three separate copies that always stay identical.
>>
>> I don't think this is possible, so I'd like the best approximation for Mac
>> OSX. The best I could do is make three copies of the plugin, and cut my own
>> edit privilege from two of them as a reminder to edit only the master copy,
>> but this is quite cumbersome. Some of my big data files that change often
>> are hardinked from multiple places. I could painstakingly hardlink all the
>> non-directory files in the plugin, but that seems insane too.
>>
>> Any ideas?
>>
>>
>>
>> --
>> Please Note: If you hit "REPLY", your message will be sent to everyone on
>> this mailing list ([address removed])
>> http://ruby.meetu...­
>> This message was sent by Loqi ([address removed]) from The East Bay Ruby
>> Meetup Group.
>> To learn more about Loqi, visit his/her member profile:
>> http://ruby.meetu...­
>> To unsubscribe or to update your mailing list settings, click here:
>> http://www.meetup...­
>> Meetup Support: [address removed]
>> 632 Broadway, New York, NY 10012 USA
>>
>>
>
>
>
> --
> Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
> http://ruby.meetu...­
> This message was sent by Jimmy ([address removed]) from The East Bay Ruby Meetup Group.
> To learn more about Jimmy, visit his/her member profile: http://ruby.meetu...­
> To unsubscribe or to update your mailing list settings, click here: http://www.meetup...­
> Meetup Support: [address removed]
> 632 Broadway, New York, NY 10012 USA
>
>

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy