Giter Club home page Giter Club logo

rocket-amf's People

Contributors

warhammerkid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rocket-amf's Issues

NameError: uninitialized constant RocketAMF::Pure::AMF3Serializer::StringIO

Hi,

I get this error:
NameError: uninitialized constant RocketAMF::Pure::AMF3Serializer::StringIO
from /Users/usr/.rvm/gems/ruby-1.9.2-p180@def/gems/RocketAMF-0.2.1/lib/rocketamf/pure/serializer.rb:164:in serialize' from /Users/usr/.rvm/gems/ruby-1.9.2-p180@def/gems/RocketAMF-0.2.1/lib/rocketamf.rb:109:inserialize'
from (irb#1):6

when I do:
require 'rocketamf'
hash = {:apple => "Apfel", :red => "Rot", :eyes => "Augen"}
RocketAMF.serialize(hash, 3)

It seems I had to do:
require 'stringio'

HTH.

undefined method `gcd'

I've got the following message when trying to serialize an ActiveRecord object.

NoMethodError Exception: undefined method `gcd' for -3.291294892032e+26:Float

Backtrace.

Requests with multiple messages fail when using the C deserializer

When doing a single HTTP request which calls multiple services/actions (i.e. the Body of the request has multiple flex.messaging.messages.RemotingMessage items) and calling

RocketAMF::Envelope.new.populate_from_stream(request.raw_post)

I get the error:

reading 24948 bytes is beyond end of source: 2719 (pos), 6440 (size)

This is when using the C deserializer.

Unexpected behaviour of format.amf with :include

Hi,
I have following models:

class C1 < ActiveRecord::Base
  has_many :c2s, :include =>> :c3s
end
class C2 < ActiveRecord::Base
    belongs_to :c1       
    has_many :c3s
end
class C3 < ActiveRecord::Base
    belongs_to :c2
end

In my Controller I am doing the following:

......
@c1s = C1.find(:all, :include => [:c2s] )

logger.debug "**********: #{@c1s[0].c2s[0].c3s}"

respond_with(@c1s) do |format|
        format.amf { render :amf => @c1s.to_amf(:include => [:c2s] ) }
end
....

In my Logfile I can find the correct Output from the logger, but the respond_with block is sending back all c1s with the nested c2s - but NO c3s.
I tried a lot, but had no reasonable result. Is there something wrong with the deserialization - or is there another way getting back all three levels of objects ?

Thanks and Regards
Chris

Pure::AMF3Serializer requires 'stringio'

Without native extension, running simple example in README will fail with error: lib/rocketamf/pure/serializer.rb:164:in 'serialize': uninitialized constant RocketAMF::Pure::AMF3Serializer::StringIO (NameError)

This can be fixed by doing: require 'stringio' in the host application, but should probably be added to files which need it.

What about deseralized classes that implements IExternalizable interface in flash?

What about deseralized classes that implements IExternalizable interface in flash?

I.e. i got from Flash, class that implement IExternalizable, and have its own readExternal / writeExternal methods.

In pre-"[de]serializers using C" i just added obj.prepare(source, self) if obj.respond_to?(:prepare) to deserializer.rb @ line near 379 (inside if traits[:externalizable] block)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.