Sha256: 711c92871d06a6b813aea01492e7ddeca8345abbc1037c5b23517eac9dd4f032

Contents?: true

Size: 553 Bytes

Versions: 5

Compression:

Stored size: 553 Bytes

Contents

namespace :avro do
  desc 'build definitions'
  task :build do
    jar_file = File.expand_path("../../../src/avro-tools-1.7.7.jar", __FILE__)
    spec_dir = File.expand_path(".")
    Dir.glob(File.join(spec_dir, "/**/*.avdl")) do |file|
      puts file
      folder = File.expand_path(File.join(File.dirname(file), "../compiled"))
      FileUtils.mkdir_p(folder)
      new_file = File.join(folder, File.basename(file, ".avdl"))
      command = "java -jar #{jar_file} idl #{file} #{new_file}.avpr"
      puts command
      `#{command}`
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
service_contract-0.1.0 lib/service_contract/tasks.rb
service_contract-0.0.10 lib/service_contract/tasks.rb
service_contract-0.0.8 lib/service_contract/tasks.rb
service_contract-0.0.7 lib/service_contract/tasks.rb
service_contract-0.0.6 lib/service_contract/tasks.rb