amfora 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{amfora}
8
- s.version = "0.0.1"
8
+ s.version = "0.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dima Berastau", "Tony Hillerson", "Stephen Augenstein"]
@@ -14,27 +14,26 @@ module AMF
14
14
  else
15
15
  raise AMF::AMFError, "unsupported serializer version #{@options[:amf_version]}"
16
16
  end
17
-
17
+
18
18
  serializer = serializer_class.new({:serializable_names => serializable_names, :options => @options})
19
19
 
20
20
  serializer.serialize(@record) do |s|
21
21
  add_includes do |association, records, opts|
22
- s.stream << add_associations(association, records, opts, s)
22
+ add_associations(association, records, opts, s)
23
23
  end
24
24
  yield serializer if block_given?
25
25
  end
26
26
  end
27
27
 
28
28
  def add_associations(association, records, opts, serializer)
29
- result = serializer.write_utf8_vr(association.to_s)
29
+ serializer.write_utf8_vr(association.to_s)
30
30
  if records.is_a?(Enumerable)
31
- result << records.each { |record| record.to_amf(opts) }.join("")
31
+ serializer.stream << records.each { |record| record.to_amf(opts) }.join("")
32
32
  else
33
33
  if record = @record.send(association)
34
- result << record.to_amf(opts)
34
+ serializer.stream << record.to_amf(opts)
35
35
  end
36
36
  end
37
- result
38
37
  end
39
38
  end
40
39
  end
@@ -4,7 +4,6 @@ module AMF
4
4
  # <tt>flex.messaging.messages.AbstractMessage</tt>
5
5
  class AbstractMessage
6
6
  attr_accessor :client_id
7
- attr_accessor :destination
8
7
  attr_accessor :message_id
9
8
  attr_accessor :timestamp
10
9
  attr_accessor :time_to_live
@@ -14,7 +13,7 @@ module AMF
14
13
  def to_amf(options = {})
15
14
  options[:amf_version] ||= 3
16
15
  options[:serializable_names] = (self.public_methods - Object.new.public_methods).delete_if { |elm| elm =~ /to_amf|body|.*=/ }
17
-
16
+
18
17
  AMF.serialize(self, options) do |s|
19
18
  if body
20
19
  s.write_utf8_vr("body")
@@ -46,7 +45,6 @@ module AMF
46
45
 
47
46
  def initialize
48
47
  @client_id = rand_uuid
49
- @destination = nil
50
48
  @message_id = rand_uuid
51
49
  @timestamp = Time.new.to_i*100
52
50
  @time_to_live = 0
@@ -86,7 +84,6 @@ module AMF
86
84
  class AcknowledgeMessage < AsyncMessage
87
85
  def initialize(message = nil)
88
86
  @client_id = rand_uuid
89
- @destination = nil
90
87
  @message_id = rand_uuid
91
88
  @timestamp = Time.new.to_i*100
92
89
  @time_to_live = 0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amfora
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dima Berastau