You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by rs...@apache.org on 2020/07/09 12:39:22 UTC

[avro] branch master updated: AVRO-2382: Fix VERSION constant for Ruby gem (#928)

This is an automated email from the ASF dual-hosted git repository.

rskraba pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/master by this push:
     new dc2afc5  AVRO-2382: Fix VERSION constant for Ruby gem (#928)
dc2afc5 is described below

commit dc2afc5d3bedefa0fa1dfe611adfaedd67418a51
Author: Tim Perkins <tj...@users.noreply.github.com>
AuthorDate: Thu Jul 9 08:39:13 2020 -0400

    AVRO-2382: Fix VERSION constant for Ruby gem (#928)
---
 lang/ruby/.gitignore  | 1 +
 lang/ruby/Manifest    | 1 +
 lang/ruby/Rakefile    | 1 +
 lang/ruby/lib/avro.rb | 2 +-
 4 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/lang/ruby/.gitignore b/lang/ruby/.gitignore
index 7a61fe1..10e8df6 100644
--- a/lang/ruby/.gitignore
+++ b/lang/ruby/.gitignore
@@ -1,3 +1,4 @@
+lib/avro/VERSION.txt
 tmp
 data.avr
 Gemfile.lock
diff --git a/lang/ruby/Manifest b/lang/ruby/Manifest
index 9fc48c2..6ce4435 100644
--- a/lang/ruby/Manifest
+++ b/lang/ruby/Manifest
@@ -6,6 +6,7 @@ Rakefile
 avro.gemspec
 interop/test_interop.rb
 lib/avro.rb
+lib/avro/VERSION.txt
 lib/avro/data_file.rb
 lib/avro/io.rb
 lib/avro/ipc.rb
diff --git a/lang/ruby/Rakefile b/lang/ruby/Rakefile
index c165b48..6652be9 100644
--- a/lang/ruby/Rakefile
+++ b/lang/ruby/Rakefile
@@ -17,6 +17,7 @@
 require 'rubygems'
 require 'echoe'
 VERSION = File.open('../../share/VERSION.txt').read.sub('-SNAPSHOT', '.pre1').chomp
+File.write("lib/avro/VERSION.txt", VERSION)
 Echoe.new('avro', VERSION) do |p|
   p.author = "Apache Software Foundation"
   p.email = "dev@avro.apache.org"
diff --git a/lang/ruby/lib/avro.rb b/lang/ruby/lib/avro.rb
index b9c44ec..16738ac 100644
--- a/lang/ruby/lib/avro.rb
+++ b/lang/ruby/lib/avro.rb
@@ -22,7 +22,7 @@ require 'stringio'
 require 'zlib'
 
 module Avro
-  VERSION = "FIXME"
+  VERSION = File.read("#{__dir__}/avro/VERSION.txt").freeze
 
   class AvroError < StandardError; end