
[PATCH] Updated-dm-serializer-Manifest.txt
Reported by Martin Gamsjaeger (snusnu) | December 30th, 2008 @ 11:31 PM
Hey,
http://is.gd/cCs6 is missing an update to the Manifest.txt file, in order for the gem to properly install. Attached is a patch to fix this.
On a different note, I find the require statements inside lib/dm-serializer kind of strange? I'm somehow used to always require absolute paths (Pathname) although I would love not to have to! dm-serializer never uses Pathname and even requires 'dm-serializer/common' from files that are in the same directory as 'dm-serializer/common' itself. What is it that I'm missing?
Also, when doing a quick test in irb, it somehow seems to behave strange:
rb(main):001:0> DataMapper::Resource.respond_to? :to_csv
=> false
irb(main):002:0> DataMapper::Resource.respond_to? :to_json
=> true
irb(main):003:0> DataMapper::Resource.respond_to? :to_xml
=> false
irb(main):004:0> DataMapper::Resource.respond_to? :to_yaml
=> true
Comments and changes to this ticket
-
Xavier Shay December 31st, 2008 @ 01:31 PM
- State changed from unconfirmed to accepted
- Assigned user set to Xavier Shay
Thanks!
Manifest file: will fix
Pathnames: it uses $LOAD_PATH to determine where to load from (so assumes dm-serializer/lib is in the path). I am not sure which is best - do you have a strong argument for/against it?
Respond_to: you're calling respond_to on the class, not the object itself. The json and yaml gems add their method to Object, which is inherited to class, where as to_csv and to_xml do not. In other words, this is out of scope of dm-serializer.
>> require 'json' => true >> Class.respond_to?(:to_json) => true
-
Xavier Shay December 31st, 2008 @ 07:16 PM
- State changed from accepted to resolved
commit 779203e754f69eddd4c7f027cce8ee02ab4aa909
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »