sekikn opened a new pull request #1330: URL: https://github.com/apache/avro/pull/1330
Make sure you have checked _all_ steps below. ### Jira - [x] My PR addresses the following [Avro Jira](https://issues.apache.org/jira/browse/AVRO/) issues and references them in the PR title. For example, "AVRO-1234: My Avro PR" - https://issues.apache.org/jira/browse/AVRO-3203 - In case you are adding a dependency, check if the license complies with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x). ### Tests - [x] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason: I didn't add a unit test since it's a fix for the build process. Instead, I confirmed the build succeeded, ``` $ ./build.sh docker sekikn@420693eeb575:~/avro$ cd lang/ruby sekikn@420693eeb575:~/avro/lang/ruby$ ./build.sh clean dist ... Successfully built RubyGem Name: avro Version: 1.11.0.pre1 File: avro-1.11.0.pre1.gem ``` ... and the basic read/write functionality worked. ``` sekikn@420693eeb575:~/avro/lang/ruby$ cd sekikn@420693eeb575:~$ export GEM_HOME=/tmp/gem sekikn@420693eeb575:~$ gem install multi_json avro/dist/ruby/avro-1.11.0.pre1.gem Fetching multi_json-1.15.0.gem Successfully installed multi_json-1.15.0 Parsing documentation for multi_json-1.15.0 Installing ri documentation for multi_json-1.15.0 Done installing documentation for multi_json after 0 seconds Successfully installed avro-1.11.0.pre1 Parsing documentation for avro-1.11.0.pre1 Installing ri documentation for avro-1.11.0.pre1 Done installing documentation for avro after 0 seconds 2 gems installed sekikn@420693eeb575:~$ irb --noecho irb(main):001:0> require 'avro' irb(main):002:0> avro_file = '/tmp/user.avro' irb(main):003:0> schema = File.read('/home/sekikn/avro/doc/examples/user.avsc') irb(main):004:0> data = [{ "name" => "Alyssa", "favorite_number" => 256 }, { "name" => "Ben", "favorite_number" => 7, "favorite_color" => "red" }] irb(main):005:1* Avro::DataFile.open(avro_file, 'w', schema) do |dw| irb(main):006:1* data.each { |d| dw << d } irb(main):007:0> end irb(main):008:1* Avro::DataFile.open(avro_file, 'r') do |dr| irb(main):009:1* dr.each { |d| puts d } irb(main):010:0> end {"name"=>"Alyssa", "favorite_number"=>256, "favorite_color"=>nil} {"name"=>"Ben", "favorite_number"=>7, "favorite_color"=>"red"} ``` ### Commits - [x] My commits all reference Jira issues in their subject lines. In addition, my commits follow the guidelines from "[How to write a good git commit message](https://chris.beams.io/posts/git-commit/)": 1. Subject is separated from body by a blank line 1. Subject is limited to 50 characters (not including Jira issue reference) 1. Subject does not end with a period 1. Subject uses the imperative mood ("add", not "adding") 1. Body wraps at 72 characters 1. Body explains "what" and "why", not "how" ### Documentation - [x] In case of new functionality, my PR adds documentation that describes how to use it. - All the public functions and the classes in the PR contain Javadoc that explain what it does -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
