scotttam-RocketAMF 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +45 -0
- data/Rakefile +54 -0
- data/lib/rocketamf.rb +128 -0
- data/lib/rocketamf/class_mapping.rb +231 -0
- data/lib/rocketamf/constants.rb +46 -0
- data/lib/rocketamf/pure.rb +28 -0
- data/lib/rocketamf/pure/deserializer.rb +419 -0
- data/lib/rocketamf/pure/io_helpers.rb +94 -0
- data/lib/rocketamf/pure/remoting.rb +134 -0
- data/lib/rocketamf/pure/serializer.rb +433 -0
- data/lib/rocketamf/remoting.rb +144 -0
- data/lib/rocketamf/values/array_collection.rb +13 -0
- data/lib/rocketamf/values/messages.rb +133 -0
- data/lib/rocketamf/values/typed_hash.rb +13 -0
- data/spec/amf/class_mapping_spec.rb +150 -0
- data/spec/amf/deserializer_spec.rb +367 -0
- data/spec/amf/remoting_spec.rb +132 -0
- data/spec/amf/serializer_spec.rb +384 -0
- data/spec/amf/values/array_collection_spec.rb +19 -0
- data/spec/amf/values/messages_spec.rb +31 -0
- data/spec/fixtures/objects/amf0-boolean.bin +1 -0
- data/spec/fixtures/objects/amf0-complexEncodedStringArray.bin +0 -0
- data/spec/fixtures/objects/amf0-date.bin +0 -0
- data/spec/fixtures/objects/amf0-ecma-ordinal-array.bin +0 -0
- data/spec/fixtures/objects/amf0-hash.bin +0 -0
- data/spec/fixtures/objects/amf0-null.bin +1 -0
- data/spec/fixtures/objects/amf0-number.bin +0 -0
- data/spec/fixtures/objects/amf0-object.bin +0 -0
- data/spec/fixtures/objects/amf0-ref-test.bin +0 -0
- data/spec/fixtures/objects/amf0-strict-array.bin +0 -0
- data/spec/fixtures/objects/amf0-string.bin +0 -0
- data/spec/fixtures/objects/amf0-typed-object.bin +0 -0
- data/spec/fixtures/objects/amf0-undefined.bin +1 -0
- data/spec/fixtures/objects/amf0-untyped-object.bin +0 -0
- data/spec/fixtures/objects/amf0-xmlDoc.bin +0 -0
- data/spec/fixtures/objects/amf3-0.bin +0 -0
- data/spec/fixtures/objects/amf3-arrayCollection.bin +2 -0
- data/spec/fixtures/objects/amf3-arrayRef.bin +1 -0
- data/spec/fixtures/objects/amf3-bigNum.bin +0 -0
- data/spec/fixtures/objects/amf3-byteArray.bin +0 -0
- data/spec/fixtures/objects/amf3-byteArrayRef.bin +1 -0
- data/spec/fixtures/objects/amf3-complexEncodedStringArray.bin +1 -0
- data/spec/fixtures/objects/amf3-date.bin +0 -0
- data/spec/fixtures/objects/amf3-datesRef.bin +0 -0
- data/spec/fixtures/objects/amf3-dictionary.bin +0 -0
- data/spec/fixtures/objects/amf3-dynObject.bin +2 -0
- data/spec/fixtures/objects/amf3-emptyArray.bin +1 -0
- data/spec/fixtures/objects/amf3-emptyArrayRef.bin +1 -0
- data/spec/fixtures/objects/amf3-emptyDictionary.bin +0 -0
- data/spec/fixtures/objects/amf3-emptyStringRef.bin +1 -0
- data/spec/fixtures/objects/amf3-encodedStringRef.bin +0 -0
- data/spec/fixtures/objects/amf3-false.bin +1 -0
- data/spec/fixtures/objects/amf3-float.bin +0 -0
- data/spec/fixtures/objects/amf3-graphMember.bin +0 -0
- data/spec/fixtures/objects/amf3-hash.bin +2 -0
- data/spec/fixtures/objects/amf3-largeMax.bin +0 -0
- data/spec/fixtures/objects/amf3-largeMin.bin +0 -0
- data/spec/fixtures/objects/amf3-max.bin +1 -0
- data/spec/fixtures/objects/amf3-min.bin +0 -0
- data/spec/fixtures/objects/amf3-mixedArray.bin +11 -0
- data/spec/fixtures/objects/amf3-null.bin +1 -0
- data/spec/fixtures/objects/amf3-objRef.bin +0 -0
- data/spec/fixtures/objects/amf3-primArray.bin +1 -0
- data/spec/fixtures/objects/amf3-string.bin +1 -0
- data/spec/fixtures/objects/amf3-stringRef.bin +0 -0
- data/spec/fixtures/objects/amf3-symbol.bin +1 -0
- data/spec/fixtures/objects/amf3-traitRef.bin +3 -0
- data/spec/fixtures/objects/amf3-true.bin +1 -0
- data/spec/fixtures/objects/amf3-typedObject.bin +2 -0
- data/spec/fixtures/objects/amf3-xml.bin +1 -0
- data/spec/fixtures/objects/amf3-xmlDoc.bin +1 -0
- data/spec/fixtures/objects/amf3-xmlRef.bin +1 -0
- data/spec/fixtures/request/acknowledge-response.bin +0 -0
- data/spec/fixtures/request/amf0-error-response.bin +0 -0
- data/spec/fixtures/request/commandMessage.bin +0 -0
- data/spec/fixtures/request/remotingMessage.bin +0 -0
- data/spec/fixtures/request/simple-response.bin +0 -0
- data/spec/fixtures/request/unsupportedCommandMessage.bin +0 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +31 -0
- metadata +153 -0
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
abc
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
ASDF
|
@@ -0,0 +1 @@
|
|
1
|
+
Shift テストUTF テスト
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
����
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
String . String
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
foo
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
K<parent><child prop="test"/></parent>
|
@@ -0,0 +1 @@
|
|
1
|
+
M<parent><child prop="test" /></parent>
|
@@ -0,0 +1 @@
|
|
1
|
+
K<parent><child prop="test"/></parent>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/spec/spec.opts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--colour
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
begin
|
2
|
+
require 'spec'
|
3
|
+
rescue LoadError
|
4
|
+
require 'rubygems'
|
5
|
+
gem 'rspec'
|
6
|
+
require 'spec'
|
7
|
+
end
|
8
|
+
require 'spec/autorun'
|
9
|
+
|
10
|
+
$:.unshift(File.dirname(__FILE__) + '/../lib')
|
11
|
+
require 'rocketamf'
|
12
|
+
|
13
|
+
def request_fixture(binary_path)
|
14
|
+
data = File.open(File.dirname(__FILE__) + '/fixtures/request/' + binary_path).read
|
15
|
+
data.force_encoding("ASCII-8BIT") if data.respond_to?(:force_encoding)
|
16
|
+
data
|
17
|
+
end
|
18
|
+
|
19
|
+
def object_fixture(binary_path)
|
20
|
+
data = File.open(File.dirname(__FILE__) + '/fixtures/objects/' + binary_path).read
|
21
|
+
data.force_encoding("ASCII-8BIT") if data.respond_to?(:force_encoding)
|
22
|
+
data
|
23
|
+
end
|
24
|
+
|
25
|
+
def create_envelope(binary_path)
|
26
|
+
RocketAMF::Envelope.new.populate_from_stream(StringIO.new(request_fixture(binary_path)))
|
27
|
+
end
|
28
|
+
|
29
|
+
# Helper classes
|
30
|
+
class RubyClass; attr_accessor :baz, :foo; end;
|
31
|
+
class OtherClass; attr_accessor :bar, :foo; end;
|
metadata
ADDED
@@ -0,0 +1,153 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: scotttam-RocketAMF
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 2
|
8
|
+
- 2
|
9
|
+
version: 0.2.2
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Jacob Henry
|
13
|
+
- Stephen Augenstein
|
14
|
+
- Joc O'Connor
|
15
|
+
- Scott Tamosunas
|
16
|
+
autorequire:
|
17
|
+
bindir: bin
|
18
|
+
cert_chain: []
|
19
|
+
|
20
|
+
date: 2010-09-17 00:00:00 -04:00
|
21
|
+
default_executable:
|
22
|
+
dependencies: []
|
23
|
+
|
24
|
+
description:
|
25
|
+
email: perl.programmer@gmail.com
|
26
|
+
executables: []
|
27
|
+
|
28
|
+
extensions: []
|
29
|
+
|
30
|
+
extra_rdoc_files:
|
31
|
+
- README.rdoc
|
32
|
+
files:
|
33
|
+
- README.rdoc
|
34
|
+
- Rakefile
|
35
|
+
- lib/rocketamf/class_mapping.rb
|
36
|
+
- lib/rocketamf/constants.rb
|
37
|
+
- lib/rocketamf/pure/deserializer.rb
|
38
|
+
- lib/rocketamf/pure/io_helpers.rb
|
39
|
+
- lib/rocketamf/pure/remoting.rb
|
40
|
+
- lib/rocketamf/pure/serializer.rb
|
41
|
+
- lib/rocketamf/pure.rb
|
42
|
+
- lib/rocketamf/remoting.rb
|
43
|
+
- lib/rocketamf/values/array_collection.rb
|
44
|
+
- lib/rocketamf/values/messages.rb
|
45
|
+
- lib/rocketamf/values/typed_hash.rb
|
46
|
+
- lib/rocketamf.rb
|
47
|
+
- spec/amf/class_mapping_spec.rb
|
48
|
+
- spec/amf/deserializer_spec.rb
|
49
|
+
- spec/amf/remoting_spec.rb
|
50
|
+
- spec/amf/serializer_spec.rb
|
51
|
+
- spec/amf/values/array_collection_spec.rb
|
52
|
+
- spec/amf/values/messages_spec.rb
|
53
|
+
- spec/spec_helper.rb
|
54
|
+
- spec/fixtures/objects/amf0-boolean.bin
|
55
|
+
- spec/fixtures/objects/amf0-complexEncodedStringArray.bin
|
56
|
+
- spec/fixtures/objects/amf0-date.bin
|
57
|
+
- spec/fixtures/objects/amf0-ecma-ordinal-array.bin
|
58
|
+
- spec/fixtures/objects/amf0-hash.bin
|
59
|
+
- spec/fixtures/objects/amf0-null.bin
|
60
|
+
- spec/fixtures/objects/amf0-number.bin
|
61
|
+
- spec/fixtures/objects/amf0-object.bin
|
62
|
+
- spec/fixtures/objects/amf0-ref-test.bin
|
63
|
+
- spec/fixtures/objects/amf0-strict-array.bin
|
64
|
+
- spec/fixtures/objects/amf0-string.bin
|
65
|
+
- spec/fixtures/objects/amf0-typed-object.bin
|
66
|
+
- spec/fixtures/objects/amf0-undefined.bin
|
67
|
+
- spec/fixtures/objects/amf0-untyped-object.bin
|
68
|
+
- spec/fixtures/objects/amf0-xmlDoc.bin
|
69
|
+
- spec/fixtures/objects/amf3-0.bin
|
70
|
+
- spec/fixtures/objects/amf3-arrayCollection.bin
|
71
|
+
- spec/fixtures/objects/amf3-arrayRef.bin
|
72
|
+
- spec/fixtures/objects/amf3-bigNum.bin
|
73
|
+
- spec/fixtures/objects/amf3-byteArray.bin
|
74
|
+
- spec/fixtures/objects/amf3-byteArrayRef.bin
|
75
|
+
- spec/fixtures/objects/amf3-complexEncodedStringArray.bin
|
76
|
+
- spec/fixtures/objects/amf3-date.bin
|
77
|
+
- spec/fixtures/objects/amf3-datesRef.bin
|
78
|
+
- spec/fixtures/objects/amf3-dictionary.bin
|
79
|
+
- spec/fixtures/objects/amf3-dynObject.bin
|
80
|
+
- spec/fixtures/objects/amf3-emptyArray.bin
|
81
|
+
- spec/fixtures/objects/amf3-emptyArrayRef.bin
|
82
|
+
- spec/fixtures/objects/amf3-emptyDictionary.bin
|
83
|
+
- spec/fixtures/objects/amf3-emptyStringRef.bin
|
84
|
+
- spec/fixtures/objects/amf3-encodedStringRef.bin
|
85
|
+
- spec/fixtures/objects/amf3-false.bin
|
86
|
+
- spec/fixtures/objects/amf3-float.bin
|
87
|
+
- spec/fixtures/objects/amf3-graphMember.bin
|
88
|
+
- spec/fixtures/objects/amf3-hash.bin
|
89
|
+
- spec/fixtures/objects/amf3-largeMax.bin
|
90
|
+
- spec/fixtures/objects/amf3-largeMin.bin
|
91
|
+
- spec/fixtures/objects/amf3-max.bin
|
92
|
+
- spec/fixtures/objects/amf3-min.bin
|
93
|
+
- spec/fixtures/objects/amf3-mixedArray.bin
|
94
|
+
- spec/fixtures/objects/amf3-null.bin
|
95
|
+
- spec/fixtures/objects/amf3-objRef.bin
|
96
|
+
- spec/fixtures/objects/amf3-primArray.bin
|
97
|
+
- spec/fixtures/objects/amf3-string.bin
|
98
|
+
- spec/fixtures/objects/amf3-stringRef.bin
|
99
|
+
- spec/fixtures/objects/amf3-symbol.bin
|
100
|
+
- spec/fixtures/objects/amf3-traitRef.bin
|
101
|
+
- spec/fixtures/objects/amf3-true.bin
|
102
|
+
- spec/fixtures/objects/amf3-typedObject.bin
|
103
|
+
- spec/fixtures/objects/amf3-xml.bin
|
104
|
+
- spec/fixtures/objects/amf3-xmlDoc.bin
|
105
|
+
- spec/fixtures/objects/amf3-xmlRef.bin
|
106
|
+
- spec/fixtures/request/acknowledge-response.bin
|
107
|
+
- spec/fixtures/request/amf0-error-response.bin
|
108
|
+
- spec/fixtures/request/commandMessage.bin
|
109
|
+
- spec/fixtures/request/remotingMessage.bin
|
110
|
+
- spec/fixtures/request/simple-response.bin
|
111
|
+
- spec/fixtures/request/unsupportedCommandMessage.bin
|
112
|
+
- spec/spec.opts
|
113
|
+
has_rdoc: true
|
114
|
+
homepage: http://github.com/scotttam/rocket-amf
|
115
|
+
licenses: []
|
116
|
+
|
117
|
+
post_install_message:
|
118
|
+
rdoc_options:
|
119
|
+
- --line-numbers
|
120
|
+
- --main
|
121
|
+
- README.rdoc
|
122
|
+
require_paths:
|
123
|
+
- lib
|
124
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
125
|
+
none: false
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
segments:
|
130
|
+
- 0
|
131
|
+
version: "0"
|
132
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
|
+
none: false
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
segments:
|
138
|
+
- 0
|
139
|
+
version: "0"
|
140
|
+
requirements: []
|
141
|
+
|
142
|
+
rubyforge_project:
|
143
|
+
rubygems_version: 1.3.7
|
144
|
+
signing_key:
|
145
|
+
specification_version: 3
|
146
|
+
summary: Fast AMF serializer/deserializer with remoting request/response wrappers to simplify integration
|
147
|
+
test_files:
|
148
|
+
- spec/amf/class_mapping_spec.rb
|
149
|
+
- spec/amf/deserializer_spec.rb
|
150
|
+
- spec/amf/remoting_spec.rb
|
151
|
+
- spec/amf/serializer_spec.rb
|
152
|
+
- spec/amf/values/array_collection_spec.rb
|
153
|
+
- spec/amf/values/messages_spec.rb
|