[Ogden] some reconciliation /confession

0 views
Skip to first unread message

* William

unread,
Feb 10, 2009, 10:06:42 AM2/10/09
to lass...@yahoo.se, ogden-de...@rubyforge.org, Trans
I have included patches I needed to make per Trans's comments.

There were two changes from he git master ...

  • Annotations is replaced by anise (ann_attrib.rb)
    • ## require "facets/annotations"  #wm:01  
    • require "anise"               #wm:01

    • class Module
        include Anise   # <--- need this  #wm:02

  • Facets in (lib/og/main.rb)
    • ## require "facets/style"        #wm:01
         require "english"             #wm:01

    • ## require "facets/annotations"  #wm:01
         require "anise"               #wm:01
This is where we get separate results.  I'm using facets 2.5.0 .. there appear to have been many structural changes.

Trans, can you alidate these two changes I used and set us on the right path?

I would prefer if you push to git.  Because I'm not sure if these mods were a work-around or the correct action.

Lars, I missed the step that needs a change to load--path.  That could be me, I'm using netbeans and I just add a lib search path -I ... switch
  • 3) Modified the demo.rb file to include the the new lib
    $LOAD_PATH << File.expand_path('../lib')
I'm sorry now that I didn't send this to the list.  I wanted to keep the chat down, since it looked like I was breaking something.

:-)   At least is is below 30ºC now, and it is sane to 'work' when life lets me.

Take care,

   Will

2009/2/7 Lars Olsson <lass...@yahoo.se>
Hi,

sorry for not getting back to you sooner, but real life got in the
way...I've tried reproducing your results, but I don't seem to get the
same errors...I still get errors though  ;)

This is my results so far:
1) Cloned the git repository

2) Tried to find out which version of Facets that worked...I tried every
version from 1.4.5 (the version that Og uses) to 2.5.0. The *only* ones
that worked for me was 2.4.1, 2.4.2 and 2.4.3...so I settled for 2.4.3.

3) Modified the demo.rb file to include the the new lib
$LOAD_PATH << File.expand_path('../lib')

4) Changed a 'prop' call to a 'property' call on line 57 in run.rb

5) Ran it with 'ruby -rubygems run.rb' with the following results:




---------- Forwarded message ----------
From: * William <william....@gmail.com>
Date: 2009/1/15
Subject: one step forward ...
To: Trans <tran...@gmail.com>


Hi again.

Your suggestions worked fine.  I'm attaching the two changed files.
  • main.rb
  • ann_attr.rb
Now I am befuddled -- I have what looks like perfectly "ok" ruby code and it appears to NOT work.  What about this simple table structure ...

require 'og'

           ##==    Tables    ==##

class  User
  attr_accessor   :login,             String
  property        :password,          String
  property        :first_name,        String
  property        :last_name,         String
 
  many_to_many :projects
 
  has_many     :tickets
  has_many     :created_tickets,   Ticket
  has_many     :comments 
 
end   #User        ________


But my friend ruby says that
  • "... 'property': String is not a symbol (TypeError)"
  • "... `attr_accessor': String is not a symbol (TypeError)

Despite some perfectly "good" ok code that once worked and ann_attr.rb has the alias:

  alias_method :property, :attr_accessor

I can't seem to figure out where attr_accessor is declared. 

Anyway the ogden/demo/run.rb fails with the same problem.

I can run diff on the og gem and ogden if you can give me a couple of ideas where to look for attr_accessor's declaration.

It is used in too many places to find it easily ;-)

Thanks in advance,

                             w.


2009/1/12 Trans <tran...@gmail.com>
On Sun, Jan 11, 2009 at 11:30 AM, * William <william....@gmail.com> wrote:
>
> Hi Trans :-)
>
> I have set-up OGDEN with NetBeans.  Have you used it for Ruby?  It might be better if  get myself integrated with a tool that matches what ever you are using.
>
> The ogden classes fall over on changes to facets so far.  It doesn't like
>
>      facets/                 Moved to:
>          style ................  English
>          annotations (2) ......  Anise
>
> I vaguely recall where there were changes to this.  It is too late for me to find these tonight (you will not believe the problems I've had with my PC's DVD drive...)

Are you using the git repo? I.e. Can I check out the current repo and
give you a hand? I probably can fix the above issues fairly quickly.
But if not then

 gem install anise
 gem install english

Then where ever 'facets/annotations' was included replace with

 require 'anise'

Then in the Og enchant module/class you'll need to put

 include Anise

I think that will do it, or pretty close to that.

As for english styles. You should check out, I think it is,
orm-styles.rb , no  that's not it, something like that though, and in
that file you want into include the English style libs that Og needs.

I'll look into it a little more so I can give you more detailed info.
And like I said if you are pushing your changes via Git, then I can
help you out directly.

P.S. I recommend making changes in a branch if you feel you are still
learning your way around Og, just in case things thingst messed up bas
somehow. That happened to me once with Og :-(

T.


aloha,
        \_w_/
          [ask about marketing your technology]
main.rb
ann_attr.rb

Trans

unread,
Feb 10, 2009, 3:07:52 PM2/10/09
to ogden-de...@rubyforge.org

On Feb 10, 10:06 am, "* William" <william.full.m...@gmail.com> wrote:
> I have included patches I needed to make per Trans's comments.
>
> There were two changes from he git master ...
>

>    - Annotations is replaced by anise (ann_attrib.rb)
>       - ## require "facets/annotations"  #wm:01
>       - require "anise"               #wm:01
>
>       - class Module


>         include Anise   # <--- need this  #wm:02
>

>       - Facets in (lib/og/main.rb)
>       - ## require "facets/style"        #wm:01
>          require "english"             #wm:01
>
>       - ## require "facets/annotations"  #wm:01


>          require "anise"               #wm:01
>
> This is where we get separate results.  I'm using facets 2.5.0 .. there
> appear to have been many structural changes.
>
> Trans, can you alidate these two changes I used and set us on the right
> path?

Those look right. There may be some work to do to mesh English with
what Og is used to, though it should entail only some minor
adjustments.

I'll try it myself here in a bit.

T.
_______________________________________________
Ogden-developers mailing list
Ogden-de...@rubyforge.org
http://rubyforge.org/mailman/listinfo/ogden-developers

Trans

unread,
Feb 10, 2009, 5:59:33 PM2/10/09
to ogden-de...@rubyforge.org
What I had to do:

I made one modification to Anise that will help with Ogden. I'll
release that soon.

'include Anise' at the top level. Not in Module. I did this in main.rb
and utils/ann_attr.rb. Eg:

require "anise"
include Anise

Eventually this should only be include in enchanted classes, but we'll
get to that later.

I had to add to main.rb:

class String
# Removes the module part from a modularized expression.
def demodulize
to_s.gsub(/^.*::/, '')
end
end

b/c English doesn't have this method.

Then wherever #style is used in the code replace with the proper
method. Eg.

klass.to_s.style(:demodulize) => klass.to_s.demodulize

If I can get commit rights back I'll push these changes.

chris

unread,
Feb 10, 2009, 5:29:55 PM2/10/09
to ogden-de...@rubyforge.org
Found the same thing in Nitro.  Looks exactly what I did as well.

-Chris

Lars Olsson

unread,
Feb 11, 2009, 2:17:14 AM2/11/09
to ogden-de...@rubyforge.org
Hi,

I'm feeling a bit confused about what git repository we´re talking about here. So, can you please answer the following questions?

a) Are you talking about the Git repository on Rubyforge(git://rubyforge.org/ogden.git)? Or is there another repository that is used for development?

b) Which version of Facets are you aiming to use with Ogden? Facets seems to be very volatile, perhaps it's appropriate to specify a version (or versions) of Facets that is supposed to work with Ogden?

/lasso

--- Den tis 2009-02-10 skrev Trans <tran...@gmail.com>:


__________________________________________________________
Går det långsamt? Skaffa dig en snabbare bredbandsuppkoppling.
Sök och jämför priser hos Kelkoo.
http://www.kelkoo.se/c-100015813-bredband.html?partnerId=96914325

Trans

unread,
Feb 11, 2009, 10:08:53 AM2/11/09
to ogden-de...@rubyforge.org

On Feb 11, 2:17 am, Lars Olsson <lasso3...@yahoo.se> wrote:
> Hi,
>
> I'm feeling a bit confused about what git repository we´re talking about here. So, can you please answer the following questions?
>
> a) Are you talking about the Git repository on Rubyforge(git://rubyforge.org/ogden.git)? Or is there another repository that is used for development?

Yes. That repository. If you would like me to setup a GitHub mirror, I
can do that too.

> b) Which version of Facets are you aiming to use with Ogden? Facets seems to be very volatile, perhaps it's appropriate to specify a version (or versions) of Facets that is supposed to work with Ogden?

I am using the latest version 2.5.1, actually 2.5.2 which will be
released soon. It's not a volatile as it might seem. Ogden has been
dormant so it hasn't been updated since before 2.4.0, except for a
little bit of the work that I've done. 2.4 was a BIG release for
Facets and saw a few libraries move to separate projects, eg. Anise
and English --the originals of which have been deprecated as of 2.5.

As soon as I can get commit privs back, I will do everything that is
needed to get Og working with the latest Facets. No problem there.

Chris Scheper, can you add me as either a Senior Developer or an Admin
to the rubyforge project. Thanks!

T.

* William

unread,
Feb 12, 2009, 9:48:22 AM2/12/09
to ogden-de...@rubyforge.org
Hi groovers !!

Trans, I agree with Lars here -- we need to set development against a {known profile} ... Not just Facets, other dependent modules as well. 

This can be a very relaxed thing to do.  For example even with this wee test.  I'm use a local copy of the og-0.41.0, and any other overrides, with an Include switch, like this ::

  *  -Iw:\sandbox\og-0.41.0\lib;
  *    w:\sandbox\lib\ruby;

Which overrides the gem path, etc.

I use the path for other things (like ... w:\sandbox\lib\python and so and such).

That idea may not work where people are working with different modules and versions.

Is there a simple way to "choose" specific versions of gem units?  I think it may be a (*)project itself, if it doesn't exist.  (I completely admit to gem internals ignorance).

Here's a thought -- Let me know if we have that.

   -- In top-level modules, I can do something like
       ... require config.rb

It will automgaically pick up the local or include path config file.

... It might have to happen in the GEM-s module to only require the versions of modules in the config file

What do ya think?.

I am merely functional with Ruby (and good with  DRY), in another life I'm an excellent with release management and configuration management. ;-)

w.

aloha,
        \_w_/
          http://mbimarketing.wordpress.com/

          [ask about marketing your technology]


2009/2/12 Trans <tran...@gmail.com>


On Feb 11, 2:17 am, Lars Olsson <lasso3...@yahoo.se> wrote:

> I'm feeling a bit confused about what git repository we´re talking about here. So, can you please answer the following questions?
>
> a) Are you talking about the Git repository on Rubyforge(git://rubyforge.org/ogden.git)? Or

Yes. That repository. If you would like me to setup a GitHub mirror, I
> b) Which version of Facets are you aiming to use with Ogden? Facets seems to be very
I am using the latest version 2.5.1, actually 2.5.2 which will be
_______________________________________________

Trans

unread,
Feb 14, 2009, 12:54:49 PM2/14/09
to ogden-de...@rubyforge.org

On Feb 12, 9:48 am, "* William" <william.full.m...@gmail.com> wrote:
> Hi groovers !!
>
> Trans, I agree with Lars here -- we need to set development against a {known
> profile} ... Not just Facets, other dependent modules as well.
>
> This can be a very relaxed thing to do. For example even with this wee
> test. I'm use a local copy of the og-0.41.0, and any other overrides, with
> an Include switch, like this ::
>
> * -Iw:\sandbox\og-0.41.0\lib;
> * w:\sandbox\lib\ruby;
>
> Which overrides the gem path, etc.
>
> I use the path for other things (like ... w:\sandbox\lib\python and so and
> such).
>
> That idea may not work where people are working with different modules and
> versions.
>
> Is there a simple way to "choose" specific versions of gem units? I think
> it may be a (*)project itself, if it doesn't exist. (I completely admit to
> gem internals ignorance).
>
> Here's a thought -- Let me know if we have that.
>
> -- In top-level modules, I can do something like
> ... require config.rb
>
> It will automgaically pick up the local or include path config file.

Where do you see this file being located?

> ... It might have to happen in the GEM-s module to only require the versions
> of modules in the config file
>
> What do ya think?.
>
> I am merely functional with Ruby (and good with DRY), in another life I'm
> an excellent with release management and configuration management. ;-)

I think it's a good idea. I will work that into my changes. Mainly
it's a matter of using the gem command with a version parameter.

As for 0.41, anyone who wants to can go back and do the same, but I'm
hoping we can just push forward and get a new release out the works as
good or better than 0.41 soon. Now that some interest has picked up.

Reply all
Reply to author
Forward
0 new messages