From 49519b81a6e375be8e97e698cf87967a7c767236 Mon Sep 17 00:00:00 2001 From: "R. Tyler Croy" Date: Sat, 5 Jul 2014 14:55:17 -0700 Subject: [PATCH] Add support for compiling protobufs and running tests --- Rakefile | 5 +++++ lib/.gitkeep | 0 tasks/protobuf.rake | 5 +++++ tasks/spec.rake | 6 ++++++ 4 files changed, 16 insertions(+) create mode 100644 Rakefile create mode 100644 lib/.gitkeep create mode 100644 tasks/protobuf.rake create mode 100644 tasks/spec.rake diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..1f99d88 --- /dev/null +++ b/Rakefile @@ -0,0 +1,5 @@ + +# Load all our tasks from the tasks directory +Dir[File.expand_path(File.dirname(__FILE__) + '/tasks/*.rake')].each do |f| + load f +end diff --git a/lib/.gitkeep b/lib/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tasks/protobuf.rake b/tasks/protobuf.rake new file mode 100644 index 0000000..334bd51 --- /dev/null +++ b/tasks/protobuf.rake @@ -0,0 +1,5 @@ +namespace :protobuf do + task :compile do + sh 'protoc --ruby_out=lib -I proto ./proto/*.proto' + end +end diff --git a/tasks/spec.rake b/tasks/spec.rake new file mode 100644 index 0000000..09e37d9 --- /dev/null +++ b/tasks/spec.rake @@ -0,0 +1,6 @@ +require 'rspec/core/rake_task' + +RSpec::Core::RakeTask.new(:spec) do |t| +end + +task :default => ['protobuf:compile', 'spec']