icss-activesupport-4 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +7 -0
  2. data/.document +5 -0
  3. data/.rspec +3 -0
  4. data/.watchr +52 -0
  5. data/CHANGELOG.md +38 -0
  6. data/Gemfile +22 -0
  7. data/LICENSE.textile +20 -0
  8. data/README.md +298 -0
  9. data/Rakefile +39 -0
  10. data/TODO.md +44 -0
  11. data/VERSION +1 -0
  12. data/examples/avro_examples/BulkData.avpr +21 -0
  13. data/examples/avro_examples/complicated.icss.yaml +159 -0
  14. data/examples/avro_examples/interop.avsc +32 -0
  15. data/examples/avro_examples/mail.avpr +20 -0
  16. data/examples/avro_examples/namespace.avpr +28 -0
  17. data/examples/avro_examples/org/apache/avro/ipc/HandshakeRequest.avsc +11 -0
  18. data/examples/avro_examples/org/apache/avro/ipc/HandshakeResponse.avsc +15 -0
  19. data/examples/avro_examples/org/apache/avro/ipc/trace/avroTrace.avdl +64 -0
  20. data/examples/avro_examples/org/apache/avro/ipc/trace/avroTrace.avpr +82 -0
  21. data/examples/avro_examples/org/apache/avro/mapred/tether/InputProtocol.avpr +59 -0
  22. data/examples/avro_examples/org/apache/avro/mapred/tether/OutputProtocol.avpr +75 -0
  23. data/examples/avro_examples/simple.avpr +70 -0
  24. data/examples/avro_examples/weather.avsc +9 -0
  25. data/examples/bnc.icss.yaml +70 -0
  26. data/examples/chronic.icss.yaml +115 -0
  27. data/examples/license.icss.yaml +7 -0
  28. data/examples/source1.icss.yaml +4 -0
  29. data/examples/source2.icss.yaml +4 -0
  30. data/examples/test_icss.yaml +67 -0
  31. data/icss.gemspec +168 -0
  32. data/icss_specification.textile +393 -0
  33. data/lib/icss.rb +53 -0
  34. data/lib/icss/core_types.rb +20 -0
  35. data/lib/icss/error.rb +4 -0
  36. data/lib/icss/init.rb +3 -0
  37. data/lib/icss/message.rb +133 -0
  38. data/lib/icss/message/message_sample.rb +144 -0
  39. data/lib/icss/protocol.rb +199 -0
  40. data/lib/icss/protocol/code_asset.rb +18 -0
  41. data/lib/icss/protocol/data_asset.rb +23 -0
  42. data/lib/icss/protocol/license.rb +41 -0
  43. data/lib/icss/protocol/source.rb +37 -0
  44. data/lib/icss/protocol/target.rb +68 -0
  45. data/lib/icss/receiver_model.rb +24 -0
  46. data/lib/icss/receiver_model/active_model_shim.rb +36 -0
  47. data/lib/icss/receiver_model/acts_as_catalog.rb +174 -0
  48. data/lib/icss/receiver_model/acts_as_hash.rb +177 -0
  49. data/lib/icss/receiver_model/acts_as_loadable.rb +47 -0
  50. data/lib/icss/receiver_model/acts_as_tuple.rb +100 -0
  51. data/lib/icss/receiver_model/locale/en.yml +27 -0
  52. data/lib/icss/receiver_model/to_geo_json.rb +19 -0
  53. data/lib/icss/receiver_model/tree_merge.rb +34 -0
  54. data/lib/icss/receiver_model/validations.rb +31 -0
  55. data/lib/icss/serialization.rb +51 -0
  56. data/lib/icss/serialization/zaml.rb +442 -0
  57. data/lib/icss/type.rb +168 -0
  58. data/lib/icss/type/base_type.rb +0 -0
  59. data/lib/icss/type/named_type.rb +185 -0
  60. data/lib/icss/type/record_field.rb +77 -0
  61. data/lib/icss/type/record_model.rb +49 -0
  62. data/lib/icss/type/record_schema.rb +54 -0
  63. data/lib/icss/type/record_type.rb +325 -0
  64. data/lib/icss/type/simple_types.rb +71 -0
  65. data/lib/icss/type/structured_schema.rb +288 -0
  66. data/lib/icss/type/type_factory.rb +144 -0
  67. data/lib/icss/type/union_schema.rb +41 -0
  68. data/lib/icss/view_helper.rb +65 -0
  69. data/notes/named_array.md +32 -0
  70. data/notes/on_include_vs_extend_etc.rb +176 -0
  71. data/notes/technical_details.md +278 -0
  72. data/spec/core_types_spec.rb +119 -0
  73. data/spec/fixtures/zaml_complex_hash.yaml +35 -0
  74. data/spec/icss_spec.rb +90 -0
  75. data/spec/message/message_sample_spec.rb +4 -0
  76. data/spec/message_spec.rb +139 -0
  77. data/spec/protocol/license_spec.rb +67 -0
  78. data/spec/protocol/protocol_catalog_spec.rb +48 -0
  79. data/spec/protocol/protocol_validations_spec.rb +176 -0
  80. data/spec/protocol/source_spec.rb +65 -0
  81. data/spec/protocol_spec.rb +170 -0
  82. data/spec/receiver_model_spec.rb +115 -0
  83. data/spec/serialization/zaml_spec.rb +82 -0
  84. data/spec/serialization/zaml_test.rb +473 -0
  85. data/spec/serialization_spec.rb +63 -0
  86. data/spec/spec_helper.rb +39 -0
  87. data/spec/support/icss_test_helper.rb +67 -0
  88. data/spec/support/load_example_protocols.rb +17 -0
  89. data/spec/type/base_type_spec.rb +0 -0
  90. data/spec/type/named_type_spec.rb +75 -0
  91. data/spec/type/record_field_spec.rb +44 -0
  92. data/spec/type/record_model_spec.rb +206 -0
  93. data/spec/type/record_schema_spec.rb +161 -0
  94. data/spec/type/record_type_spec.rb +155 -0
  95. data/spec/type/simple_types_spec.rb +121 -0
  96. data/spec/type/structured_schema_spec.rb +300 -0
  97. data/spec/type/type_catalog_spec.rb +44 -0
  98. data/spec/type/type_factory_spec.rb +93 -0
  99. data/spec/type/union_schema_spec.rb +0 -0
  100. data/spec/type_spec.rb +63 -0
  101. metadata +304 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 831c3bf554456a2075e061ea3fb803cb04b5d3f4
4
+ data.tar.gz: cfefd952f5d5294346cdbf099a3d44befa275d45
5
+ SHA512:
6
+ metadata.gz: 0aa9b080a7d61b3a25df32ee8b899e4696c798f60e1fed56c1d602ccc2295efdf70469174b40dbde7f1c153104f8225192fca346729f04404be6da889315ff6d
7
+ data.tar.gz: 7e96375397b3edde133d70e6986f6e7aaa3ebef1cf646e2fd88b3a11c24fb96a64ec07dbc6ff30d2c6513ba1ceb9ae9f7a6c5c861bedaeb17ad72631cf4eb3f4
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --color
2
+ --format documentation
3
+ --drb
data/.watchr ADDED
@@ -0,0 +1,52 @@
1
+ # -*- ruby -*-
2
+
3
+ # def run_spec(pattern, subdir = '')
4
+ # subdir << '/' unless subdir == '' || subdir =~ %r{./$}
5
+ # if !(files = Dir["spec/#{subdir}**/*#{pattern}*_spec.rb"]).empty?
6
+ # rspec(files)
7
+ # end
8
+ # end
9
+
10
+ def run_with_ruby(file)
11
+ unless File.exist?(file) then puts "#{file} does not exist" ; return ; end
12
+ puts "Running #{file}"
13
+ system "ruby", file
14
+ puts
15
+ end
16
+
17
+ def run_spec(file)
18
+ unless File.exist?(file)
19
+ puts "#{file} does not exist"
20
+ return
21
+ end
22
+
23
+ puts "Running #{file}"
24
+ # system "bundle exec rspec #{file}"
25
+ system "rspec #{file}"
26
+ puts
27
+ end
28
+
29
+ watch("spec/.*/.*_spec\.rb") do |match|
30
+ run_spec match[0]
31
+ end
32
+
33
+ watch("spec/.*_spec\.rb") do |match|
34
+ run_spec match[0]
35
+ end
36
+
37
+ watch("lib/icss.rb") do |match|
38
+ run_spec %{spec/icss_spec.rb}
39
+ end
40
+
41
+ watch("lib/icss/(.*)\.rb") do |match|
42
+ if match.string =~ /zaml/
43
+ run_with_ruby %{spec/#{match[1]}_test.rb}
44
+ run_spec %{spec/#{match[1]}_spec.rb}
45
+ else
46
+ run_spec %{spec/#{match[1]}_spec.rb}
47
+ end
48
+ end
49
+
50
+ watch("spec/.*_test\.rb") do |match|
51
+ run_with_ruby match[0]
52
+ end
data/CHANGELOG.md ADDED
@@ -0,0 +1,38 @@
1
+
2
+ ## v0.2.0 mid-Aug 2011
3
+
4
+ Major rethunk.
5
+
6
+ * Type behavior is provided by
7
+ *
8
+
9
+ TODO:
10
+
11
+ * move Targets into troop (?)
12
+
13
+
14
+ #### CatalogTarget becomes small
15
+
16
+ Become protocol attributes:
17
+ * `name` -- protocol `name` (ie. the `protocol` field)
18
+ * `license` -- protocol `license`
19
+ * `title` -- alias for protocol's name
20
+ * `description` -- protocol `doc`
21
+ * `tags` -- protocol `keywords`
22
+
23
+ These stay:
24
+ * `owner`, `price`, `messages`, `packages`
25
+
26
+ These move from protocol to CatalogTarget:
27
+ * update_frequency
28
+ * namespace
29
+
30
+ ## v0.1.0 June 7 2011
31
+
32
+ * New receiver from gorillib
33
+
34
+ ## v0.0.3 May 22 2011
35
+
36
+ * used gorillib, got rid of active_support, extlib HOORAY
37
+ * moved Receiver to gorillib.
38
+ * *breaking change*. Gorillib changed the signature of receive() to be @receive(*constructor_args, hsh)@ (formerly, the hsh was first).
data/Gemfile ADDED
@@ -0,0 +1,22 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem 'json'
4
+ gem 'activemodel', "~> 4.0"
5
+ gem 'addressable', "~> 2.2"
6
+
7
+ gem 'configliere', "~> 0.4.8"
8
+ gem 'gorillib', "~> 0.1.7"
9
+
10
+ group :development do
11
+ gem 'bundler', "~> 1"
12
+ gem 'jeweler', "~> 1.6.4"
13
+ gem 'yard', "~> 0.6.0"
14
+ gem 'rspec', "~> 2.5.0"
15
+ gem 'simplecov', ">= 0"
16
+ gem 'awesome_print', "~> 0.4.0"
17
+ end
18
+
19
+ group :test do
20
+ gem 'spork', "~> 0.9.0.rc9"
21
+ gem 'watchr'
22
+ end
data/LICENSE.textile ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Philip (flip) Kromer for Infochimps
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,298 @@
1
+ # The Infochimps Stupid Schema (ICSS)
2
+
3
+ An ICSS file is a *complete*, *expressive* description of a collection of related data and all associated assets. It is based on the [Avro Protocol](http://avro.apache.org/docs/current/index.html) specification, with some necessary extensions
4
+
5
+
6
+ ___________________________________________________________________________
7
+ <a name="model" >
8
+
9
+ ## Icss::ReceiverModel -- a pragmatic, flexible framework for active structured data
10
+
11
+ ### (or: How to Be Object-Oriented in a JSON World)
12
+
13
+ Hooray:
14
+
15
+ ```ruby
16
+ class Thing
17
+ include Icss::ReceiverModel
18
+ field :name, String
19
+ field :description, String
20
+ end
21
+
22
+ class GeoCoordinates
23
+ include Icss::ReceiverModel
24
+ field :longitude, Float, :validates => { :numericality => { :>= => -180, :<= => 180 } }
25
+ field :latitude, Float, :validates => { :numericality => { :>= => -90, :<= => 90 } }
26
+ def coordinates
27
+ [ longitude, latitude ]
28
+ end
29
+ end
30
+
31
+ class Place < Thing
32
+ field :geo, GeoCoordinates
33
+ end
34
+
35
+ class MenuItem < Thing
36
+ field :price, Float, :required => true
37
+ end
38
+
39
+ class TacoTrailer < Place
40
+ field :menu, Array, :items => MenuItem
41
+ field :founding_date, Time
42
+ end
43
+
44
+ torchys = Restaurant.receive({
45
+ :name => "Torchy's Taco's",
46
+ :menu => [
47
+ { :name => "Dirty Sanchez", :price => "6.95" },
48
+ { :name => "Fried Avocado", :price => "7.35" }
49
+ ],
50
+ :founding_date => '2006-08-01T00:00:00Z',
51
+ :geo => { :longitude => 30.295, :latitude => -97.745 },
52
+ })
53
+ # #<TacoTrailer:0x00000101d539f8 @name="Torchy's Taco's",
54
+ # @geo=#<GeoCoordinates:0x00000101d53318 @latitude=-97.745, @longitude=30.295>,
55
+ # @menu=[ #<MenuItem:0x00000101d51180 @name="Dirty Sanchez", @price=6.95>,
56
+ # #<MenuItem:0x00000101d4d468 @name="Fried Avocado", @price=7.35> ]
57
+ # @founding_date=2006-08-01 00:00:00 UTC >
58
+
59
+ torchys.geo.coordinates
60
+ # [ 30.295, -97.745 ]
61
+
62
+ torchys.to_hash
63
+ # { :name => "Torchy's Taco's",
64
+ # :geo => { :longitude => 30.295, :latitude => -97.745 },
65
+ # :menu => [
66
+ # { :name => "Dirty Sanchez", :price => 3.50 },
67
+ # { :name => "Fried Avocado", :price => 2.95 } ],
68
+ # :founding_date => '2006-08-01T00:00:00Z',
69
+ # }
70
+
71
+
72
+ ```
73
+
74
+ ### declaring fields
75
+
76
+ Declaring a field constructs the following. Taking
77
+
78
+ ```ruby
79
+ field :foo, Array, :items => :int
80
+ ```
81
+
82
+ * accessors -- `#foo` and `foo=` getter/setters. These are completely regular accessors: no type checking/conversion/magic happens when the object is in regular use.
83
+ * receiver -- a `receive_foo` method that provides lightweight type coercion
84
+ * field schema -- a `RecordField` object describing the field, available through the `.fields` class method. You can send this schema over the wire (in JSON or whatever) and use it to recapitulate the type elsewhere.
85
+ * hashlike access -- retrieve a value with `object[:foo]`, or set it with `object[:foo] = 7`.
86
+
87
+ Optionally, you can decorate with
88
+
89
+ * rcvr_remaining -- a catchall field for anything `receive!`d that wasn't predicted by the schema.
90
+ * validations -- the full set of ActiveModel validations
91
+ * after_receive hooks -- including default value
92
+
93
+ ### Predictable magic
94
+
95
+ Magic *only* happens in the neighborhood of `receive` methods.
96
+ * The initializer, getter/setter, and so forth are non-magical.
97
+ * Validation is only done on request, and type conversion when `receive_foo` is invoked.
98
+ * Hashlike access is only for defined fields
99
+
100
+ ### receive methods
101
+
102
+ You can make a new ojbect using `Smurf.receive({...})`, which is exactly equivalent to calling each of `obj = Smurf.new ; obj.receive!({...}) ; obj` in turn.
103
+
104
+ ### Hashlike
105
+
106
+ * `.keys` returns a list of the *fields with set values*, in the same order as the class `.field_names`
107
+
108
+ ### validations
109
+
110
+ Add ActiveModel validations with the `:validates` option to `.field`, or directly using `.validates`:
111
+
112
+ ```ruby
113
+ class Icss::Handy
114
+ include Icss::ReceiverModel
115
+ field :rangey, Integer, :validates => { :inclusion => { :in => 0..9 }}
116
+ field :patternish, String
117
+ field :mandatory, Integer, :required => true
118
+ validates :patternish, :format => { :with => /eat$/ }
119
+ end
120
+ good_smurf = Icss::Handy.receive(:rangey => 5, :patternish => 'smurfberry crunch is fun to eat', :mandatory => 1)
121
+ bad_smurf = Icss::Handy.receive(:rangey => 3, :patternish => 'smurfnuggets!')
122
+ good_smurf.valid? # true
123
+ bad_smurf.valid? # false
124
+ bad_smurf.errors # { :mandatory => ["can't be blank"], :patternish => ["is invalid"] }
125
+ ```
126
+
127
+ As shown, you can also say `:required => true` as a shorthand for `:validates => { :presence => true }`. A summary of the other `:validates` directives:
128
+
129
+ ```ruby
130
+ :presence => true
131
+ :uniqueness => true
132
+ :numericality => true # also :==, :>, :>=, :<, :<=, :odd?, :even?, :equal_to, :less_than, etc
133
+ :length => { :< => 7 } # also :==, :>=, :<=, :is, :minimum, :maximum
134
+ :format => { :with => /.*/ }
135
+ :inclusion => { :in => [1,2,3] }
136
+ :exclusion => { :in => [1,2,3] }
137
+ ```
138
+
139
+ ### rcvr_remaining
140
+
141
+ `rcvr_remaining` creates a Hash field to catch all attributes send to `receive!` that don't match any receiver fields. This is surprisingly useful.
142
+
143
+ Note that you can feed `rcvr_remaining` a `:values` option if you want type coercion on the extra params.
144
+
145
+ ### rcvr_alias
146
+
147
+ `rcvr_alias` will redirect an attribute to a different receiver:
148
+
149
+ ```ruby
150
+ class Wheel
151
+ include Icss::ReceiverModel
152
+ field :name, String
153
+ field :center_height, Float
154
+ rcvr_alias :centre_height, :center_height
155
+ end
156
+ foo = Wheel.receive(:name => 'tyre', :centre_height => 18.2)
157
+ foo.center_height # 18.2
158
+ foo.respond_to?(:centre_height) # false
159
+ ```
160
+
161
+ Notes:
162
+
163
+ * It does not make any other methods, only a `receive_(fake)` that calls the `receive_(target)` method.
164
+ * It makes no special provisions for both attributes being received.
165
+
166
+ ### after_receive
167
+
168
+ `after_receive(:hook_name){ ... }` creates a named hook, executed at the end of `receive!` (and similar actions). Some examples:
169
+
170
+ ```ruby
171
+ after_receive(:warnings) do |hsh|
172
+ warn "Validation failed for field #{self}: #{errors.inspect}" if respond_to?(:errors) && (not valid?)
173
+ end
174
+ after_receive(:generate_id) do |hsh|
175
+ if !attr_set?(:md5id) then self.md5id = Digest::MD5.hex_digest(name) ; end
176
+ end
177
+ ```
178
+
179
+ Notes:
180
+ * Make sure your `after_receive` blocks are _idempotent_ -- that is, that re-running the block has no effect. Lots of things are allowed to trigger `run_after_receivers`.
181
+
182
+ ### field :default => val
183
+
184
+ You can use the `:default` option to `field` (or call `.set_field_default` directly) to specify a default value when the field is empty after a `receive!`.
185
+
186
+ ```ruby
187
+ class Icss::Smurf
188
+ field :tool, Symbol, :default => :smurfwrench
189
+ field :weapon, Symbol, :default => :smurfthrower
190
+ end
191
+
192
+ # default set for missing attributes
193
+ handy_smurf = Icss::Smurf.receive( :tool => :pipesmurf )
194
+ handy_smurf.weapon # :smurfthrower
195
+
196
+ # if an attribute is set-but-nil no default is applied
197
+ handy_smurf = Icss::Smurf.receive( :tool => :smurfwrench, :weapon => nil )
198
+ handy_smurf.weapon # nil
199
+
200
+ # you can also use a block; it is `instance_eval`ed for the value to set.
201
+ Icss::Smurf.field(:food, Symbol, :default =>
202
+ lambda{ (weapon.to_s =~ /^smurf/) ? :smurfed_cheese : :grilled_smurf }
203
+ brainy_smurf = Icss::Smurf.receive( :weapon => :smurfapult )
204
+ hefty_smurf = Icss::Smurf.receive( :weapon => :gatling_smurf )
205
+ brainy_smurf.food # :smurfed_cheese
206
+ hefty_smurf.food # :grilled_smurf
207
+ ```
208
+
209
+ Note:
210
+ * If a value is explicitly `nil`, the default is not applied.
211
+ * You may specify a block (as shown); the attribute is set to the result of `instance_eval`ing the block.
212
+ * Defaults do *not* applied at initialization -- only when `run_after_receivers` is triggered. (so, the `receive` operation is complete).
213
+ * The run order will be dependable on ruby >= 1.9 but not on 1.8.x.
214
+
215
+
216
+
217
+ ___________________________________________________________________________
218
+ <a name="avro" >
219
+ ## Avro Protocol, Message, RecordType and Field
220
+
221
+
222
+ avro kind ruby json example schema example
223
+ --------- --------- ------------ ------- --------- --------------
224
+ null base NilClass null nil 'null'
225
+ boolean base Boolean boolean true 'boolean'
226
+ int base Integer integer 1 'int'
227
+ long base Long integer 1 'long'
228
+ float base Float number 1.1 'float'
229
+ double base Double number 1.1 'double'
230
+ bytes base Binary string "\u00FF" 'bytes'
231
+ string base String string "foo" 'string'
232
+ time base Time string "2011-01-02T03:04:05Z" 'time'
233
+ symbol base Symbol string :belongs_to 'symbol'
234
+
235
+ array structured (ArrayOfXXX) array [1,2] { 'type': 'array', 'items': 'int' }
236
+ map structured (HashOfXXX) object { "a": 1 } { 'type': 'map', 'values': 'int' }
237
+
238
+ enum named (EnumType) string "heads" { 'type': 'enum', 'name': 'result', 'symbols': ['heads','tails'] }
239
+ fixed named (FixedType) string "\xBD\xF3)Q" { 'type': 'fixed', 'name': 'crc32', 'length': 4 }
240
+ record named (RecordType) object {"a": 1} { 'type': 'record', 'name': 'bob', 'fields':[...] }
241
+ error named (ErrorType) object {"err":halp! fire!"} { 'type': 'record', 'name': 'db_on_fire, 'fields':[...] }
242
+
243
+ union union <UnionType> object [ 'long', { 'type': 'array', 'items': 'int' } ]
244
+
245
+ st.regexp simple St::Regexp string "^hel*o newman" 'regexp'
246
+ st.url simple St::Url string "http://..." 'url'
247
+ mu.epoch_time simple Mu::EpochTime string 1312507492 'epoch_time'
248
+
249
+
250
+
251
+ #### Base (int, float, string, ...)
252
+
253
+ A `:base` type in an Icss file
254
+
255
+ Class `.receive` method is just `new` (where appropriate) with the appropriate conversion. Receiving `nil` returns `nil` without error.
256
+
257
+ Note that some of the base types are *not* present in the Avro spec.
258
+
259
+ __________________________________________________________________________
260
+ __________________________________________________________________________
261
+ __________________________________________________________________________
262
+
263
+ ___________________________________________________________________________
264
+ <a name="protocol" >
265
+ ## Icss::Protocol specifics
266
+
267
+ ### Assets
268
+
269
+ Assets may include
270
+ * data assets (including their location and schema)
271
+ * code for api calls (messages) based on the the described records (including their call signature and schema)
272
+ * other referenced schema
273
+
274
+ See [icss_specification.textile](icss/blob/master/icss_specification.textile) for more.
275
+
276
+ ___________________________________________________________________________
277
+ <a name="colophon" >
278
+ ## Colophon
279
+
280
+ ### Credits
281
+
282
+ Huge thanks to Doug Cutting and the rest of the Avro maintainers.
283
+
284
+ ### Contributing to icss
285
+
286
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
287
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
288
+ * Fork the project
289
+ * Start a feature/bugfix branch
290
+ * Commit and push until you are happy with your contribution
291
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
292
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
293
+
294
+ ### Copyright
295
+
296
+ Copyright (c) 2011 Philip (flip) Kromer for Infochimps. See LICENSE.txt for
297
+ further details.
298
+