Sha256: beac1d3c458c5c602975529f6e588bfe7d872159619627cef05a1fe9f527c318

Contents?: true

Size: 999 Bytes

Versions: 3

Compression:

Stored size: 999 Bytes

Contents

# frozen_string_literal: true

require 'bundler'
Bundler::GemHelper.install_tasks

require 'rake/testtask'

namespace :test do
  Rake::TestTask.new(:unit) do |t|
    t.libs.push('lib', 'test')
    t.test_files = FileList['test/**/test_*.rb']
    t.verbose = true
    t.warning = true
  end
end

namespace :generate do
  desc 'Generates golden file for testing'
  task :golden do
    sh '\
cat ./test/proto/addressbook | \
protoc \
  --encode=tutorial.AddressBook \
  --proto_path=./test/proto/ \
  ./test/proto/addressbook.proto \
  > ./test/proto/addressbook.bin'
  end

  desc 'Generates Ruby Protobuf classes'
  task :proto do
    sh 'protoc --proto_path=./test/proto --ruby_out=./test/proto ./test/proto/addressbook.proto   '
  end
end

namespace :lint do
  desc 'Linting'
  task :check do
    sh 'rubocop'
  end

  desc 'Auto correcting lint errors'
  task :fix do
    sh 'rubocop --auto-correct'
  end
end

desc 'Listing all tasks'
task :help do
  sh 'rake --tasks'
end

task default: [:help]

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fluent-plugin-formatter-protobuf-0.0.3 Rakefile
fluent-plugin-formatter-protobuf-0.0.2 Rakefile
fluent-plugin-formatter-protobuf-0.0.1 Rakefile