Common and Client is mixed up
Reported by Guilherme Silveira | April 15th, 2010 @ 04:00 PM | in v0.8
Restfulie::Common and Restfulie::Client dependencies are mixed up. Currently, Representation is in the Common package but if your client code, therefore if your Representation requires accessing Client, it is too early to do that, obliying you to replicate code among Common and Client. i.e.:
module Restfulie::Common::Representation
class Link
def initialize(options = {})
@options = options
end
def href
@options["href"]
end
def rel
@options["rel"]
end
end
::Hash.instance_eval {
include Restfulie::Client::HTTP::LinkShortcut
}
# Implements the interface for marshal Xml media type requests (application/xml) class XmlD
cattr_reader :media_type_name
@@media_type_name = 'application/xml'
cattr_reader :headers
@@headers = {
:post => { 'Content-Type' => media_type_name }
}
def unmarshal(string)
Hash.from_xml(string)
end
def marshal(string, rel)
string
end
end
end
Comments and changes to this ticket
-
Guilherme Silveira April 28th, 2010 @ 01:10 PM
- Milestone changed from v0.7.1 to v0.8
-
Guilherme Silveira May 25th, 2010 @ 06:55 PM
- State changed from new to resolved
- Assigned user set to Guilherme Silveira
seems like resolved
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 »