avro 1.7.5 → 1.7.6

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -23,7 +23,7 @@ Echoe.new('avro', VERSION) do |p|
23
23
  p.summary = "Apache Avro for Ruby"
24
24
  p.description = "Avro is a data serialization and RPC format"
25
25
  p.url = "http://hadoop.apache.org/avro/"
26
- p.runtime_dependencies = %w[yajl-ruby]
26
+ p.runtime_dependencies = %w[multi-json]
27
27
  end
28
28
 
29
29
  t = Rake::TestTask.new(:interop)
data/avro.gemspec CHANGED
@@ -2,17 +2,17 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "avro"
5
- s.version = "1.7.5"
5
+ s.version = "1.7.6"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Apache Software Foundation"]
9
- s.date = "2013-08-19"
9
+ s.date = "2014-01-10"
10
10
  s.description = "Avro is a data serialization and RPC format"
11
11
  s.email = "avro-dev@hadoop.apache.org"
12
12
  s.extra_rdoc_files = ["CHANGELOG", "lib/avro.rb", "lib/avro/collect_hash.rb", "lib/avro/data_file.rb", "lib/avro/io.rb", "lib/avro/ipc.rb", "lib/avro/protocol.rb", "lib/avro/schema.rb"]
13
13
  s.files = ["CHANGELOG", "Manifest", "Rakefile", "avro.gemspec", "interop/test_interop.rb", "lib/avro.rb", "lib/avro/collect_hash.rb", "lib/avro/data_file.rb", "lib/avro/io.rb", "lib/avro/ipc.rb", "lib/avro/protocol.rb", "lib/avro/schema.rb", "test/random_data.rb", "test/sample_ipc_client.rb", "test/sample_ipc_http_client.rb", "test/sample_ipc_http_server.rb", "test/sample_ipc_server.rb", "test/test_datafile.rb", "test/test_help.rb", "test/test_io.rb", "test/test_protocol.rb", "test/test_socket_transport.rb", "test/tool.rb", "test/test_schema.rb"]
14
14
  s.homepage = "http://hadoop.apache.org/avro/"
15
- s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Avro"]
15
+ s.rdoc_options = ["--line-numbers", "--title", "Avro"]
16
16
  s.require_paths = ["lib"]
17
17
  s.rubyforge_project = "avro"
18
18
  s.rubygems_version = "1.8.15"
@@ -23,11 +23,11 @@ Gem::Specification.new do |s|
23
23
  s.specification_version = 3
24
24
 
25
25
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
26
- s.add_runtime_dependency(%q<yajl-ruby>, [">= 0"])
26
+ s.add_runtime_dependency(%q<multi-json>, [">= 0"])
27
27
  else
28
- s.add_dependency(%q<yajl-ruby>, [">= 0"])
28
+ s.add_dependency(%q<multi-json>, [">= 0"])
29
29
  end
30
30
  else
31
- s.add_dependency(%q<yajl-ruby>, [">= 0"])
31
+ s.add_dependency(%q<multi-json>, [">= 0"])
32
32
  end
33
33
  end
data/lib/avro.rb CHANGED
@@ -5,16 +5,16 @@
5
5
  # to you under the Apache License, Version 2.0 (the
6
6
  # "License"); you may not use this file except in compliance
7
7
  # with the License. You may obtain a copy of the License at
8
- #
8
+ #
9
9
  # http://www.apache.org/licenses/LICENSE-2.0
10
- #
10
+ #
11
11
  # Unless required by applicable law or agreed to in writing, software
12
12
  # distributed under the License is distributed on an "AS IS" BASIS,
13
13
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
16
 
17
- require 'yajl'
17
+ require 'multi_json'
18
18
  require 'set'
19
19
  require 'digest/md5'
20
20
  require 'net/http'
@@ -22,7 +22,7 @@ module Avro
22
22
  MAGIC = "Obj" + [VERSION].pack('c')
23
23
  MAGIC_SIZE = MAGIC.size
24
24
  SYNC_SIZE = 16
25
- SYNC_INTERVAL = 1000 * SYNC_SIZE
25
+ SYNC_INTERVAL = 4000 * SYNC_SIZE
26
26
  META_SCHEMA = Schema.parse('{"type": "map", "values": "bytes"}')
27
27
  VALID_ENCODINGS = ['binary'] # not used yet
28
28
 
data/lib/avro/protocol.rb CHANGED
@@ -5,9 +5,9 @@
5
5
  # to you under the Apache License, Version 2.0 (the
6
6
  # "License"); you may not use this file except in compliance
7
7
  # with the License. You may obtain a copy of the License at
8
- #
8
+ #
9
9
  # http://www.apache.org/licenses/LICENSE-2.0
10
- #
10
+ #
11
11
  # Unless required by applicable law or agreed to in writing, software
12
12
  # distributed under the License is distributed on an "AS IS" BASIS,
13
13
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,7 +22,7 @@ module Avro
22
22
 
23
23
  attr_reader :name, :namespace, :types, :messages, :md5
24
24
  def self.parse(protocol_string)
25
- json_data = Yajl.load(protocol_string)
25
+ json_data = MultiJson.load(protocol_string)
26
26
 
27
27
  if json_data.is_a? Hash
28
28
  name = json_data['protocol']
@@ -58,7 +58,7 @@ module Avro
58
58
  end
59
59
 
60
60
  def to_s
61
- Yajl.dump to_avro
61
+ MultiJson.dump to_avro
62
62
  end
63
63
 
64
64
  def ==(other)
data/lib/avro/schema.rb CHANGED
@@ -5,9 +5,9 @@
5
5
  # to you under the Apache License, Version 2.0 (the
6
6
  # "License"); you may not use this file except in compliance
7
7
  # with the License. You may obtain a copy of the License at
8
- #
8
+ #
9
9
  # http://www.apache.org/licenses/LICENSE-2.0
10
- #
10
+ #
11
11
  # Unless required by applicable law or agreed to in writing, software
12
12
  # distributed under the License is distributed on an "AS IS" BASIS,
13
13
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -33,7 +33,7 @@ module Avro
33
33
  LONG_MAX_VALUE = (1 << 63) - 1
34
34
 
35
35
  def self.parse(json_string)
36
- real_parse(Yajl.load(json_string), {})
36
+ real_parse(MultiJson.load(json_string), {})
37
37
  end
38
38
 
39
39
  # Build Avro Schema from data parsed out of JSON string.
@@ -165,7 +165,7 @@ module Avro
165
165
  end
166
166
 
167
167
  def to_s
168
- Yajl.dump to_avro
168
+ MultiJson.dump to_avro
169
169
  end
170
170
 
171
171
  class NamedSchema < Schema
@@ -108,9 +108,9 @@ JSON
108
108
  end
109
109
 
110
110
  %w[fixed enum record error array map union].each do |s|
111
- reader = Yajl.load(writer_schema)
111
+ reader = MultiJson.load(writer_schema)
112
112
  reader['fields'] = reader['fields'].reject{|f| f['type']['type'] == s}
113
- Avro::DataFile.open('data.avr', 'r', Yajl.dump(reader)) do |dr|
113
+ Avro::DataFile.open('data.avr', 'r', MultiJson.dump(reader)) do |dr|
114
114
  dr.each_with_index do |obj, i|
115
115
  reader['fields'].each do |field|
116
116
  assert_equal data[i][field['name']], obj[field['name']]
data/test/test_io.rb CHANGED
@@ -308,8 +308,8 @@ EOS
308
308
 
309
309
  # test that the round-trip didn't mess up anything
310
310
  # NB: I don't think we should do this. Why enforce ordering?
311
- assert_equal(Yajl.load(str),
312
- Yajl.load(parsed_string))
311
+ assert_equal(MultiJson.load(str),
312
+ MultiJson.load(parsed_string))
313
313
 
314
314
  # test __eq__
315
315
  assert_equal(schema, Avro::Schema.parse(str))
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avro
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 7
9
- - 5
10
- version: 1.7.5
9
+ - 6
10
+ version: 1.7.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Apache Software Foundation
@@ -15,12 +15,10 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-08-19 00:00:00 Z
18
+ date: 2014-01-10 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
- name: yajl-ruby
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
21
+ version_requirements: &id001 !ruby/object:Gem::Requirement
24
22
  none: false
25
23
  requirements:
26
24
  - - ">="
@@ -29,8 +27,10 @@ dependencies:
29
27
  segments:
30
28
  - 0
31
29
  version: "0"
30
+ name: multi-json
31
+ prerelease: false
32
32
  type: :runtime
33
- version_requirements: *id001
33
+ requirement: *id001
34
34
  description: Avro is a data serialization and RPC format
35
35
  email: avro-dev@hadoop.apache.org
36
36
  executables: []
@@ -77,7 +77,6 @@ licenses: []
77
77
  post_install_message:
78
78
  rdoc_options:
79
79
  - --line-numbers
80
- - --inline-source
81
80
  - --title
82
81
  - Avro
83
82
  require_paths: