various ruby-fs-stack musings

4 views
Skip to first unread message

rogerdpack

unread,
Aug 31, 2011, 8:01:11 PM8/31/11
to Ruby FS Stack
A few random thoughts...


my_pedigree = com.familytree_v2.pedigree 'KWZF-CFW'

#suggest: pedigree_instance.parent should raise perhaps?


Also should the person() call include things like "personas" by
default? Should it default to &{everything}=all?

There currently seems to be no way to look up personas:

$com.familytree_v2.persona "KW3B-FP5"
NoMethodError: undefined method `persona' for
#<FamilytreeV2::Communicator:0x4d43b58>
from (irb):27
from :0


I assume this is a feature request? As also there seems to be no way
to look up notes, feature request?

WRONG PLACE nonauthentication doesn't seem to be handled...

For feedback sake, if one forgets to authenticate, seemingly unrelated
errors are thrown...expected?

<pre>
$com.familytree_v2.pedigree :me
TypeError: can't convert nil into String
from C:/installs/Ruby187/lib/ruby/gems/1.8/gems/ruby-fs-
stack-0.5.3/lib/ruby-fs-stack/fs_communicator.rb:181:in `+'
from C:/installs/Ruby187/lib/ruby/gems/1.8/gems/ruby-fs-
stack-0.5.3/lib/ruby-fs-stack/fs_communicator.rb:181:in `add_session'
from C:/installs/Ruby187/lib/ruby/gems/1.8/gems/ruby-fs-
stack-0.5.3/lib/ruby-fs-stack/fs_communicator.rb:172:in
`set_extra_params'
from C:/installs/Ruby187/lib/ruby/gems/1.8/gems/ruby-fs-
stack-0.5.3/lib/ruby-fs-stack/fs_communicator.rb:73:in `get'
from C:/installs/Ruby187/lib/ruby/gems/1.8/gems/ruby-fs-
stack-0.5.3/lib/ruby-fs-stack/familytree/communicator.rb:275:in
`pedigree'
from (irb):17
from :0
</pre>


There that's all of them :)
Feedback welcome.
Thanks!
-roger-

Jimmy Z

unread,
Sep 1, 2011, 2:47:30 PM9/1/11
to Ruby FS Stack
> my_pedigree = com.familytree_v2.pedigree 'KWZF-CFW'
>
> #suggest: pedigree_instance.parent should raise perhaps?

I'm not sure what you mean. Can you explain a bit further?

> Also should the person() call include things like "personas" by
> default?  Should it default to &{everything}=all?

I'd like to keep the person() call mirroring the actual web service
call.

> There currently seems to be no way to look up personas

I haven't needed that call yet, so it hasn't been implemented. Can you
add that to the Github issue tracker? I'd be happy to add it.

> For feedback sake, if one forgets to authenticate, seemingly unrelated
> errors are thrown...expected?
>
> <pre>
>  $com.familytree_v2.pedigree :me
> TypeError: can't convert nil into String

Good catch. Another good issue for the issue tracker. I haven't hit
that yet, but I think it should definitely raise an exception.

What would you expect the exception to be? A
FsCommunicator::Unauthorized (like is returned on a 401)? or a new
exception like FsCommunicator::NoSession

I think that the Unauthorized exception may be good because it would
trigger the same type of action (authenticate). However, it could make
debugging a bit harder than using the more specific exception.
Thoughts?

--
Jimmy
Reply all
Reply to author
Forward
0 new messages