diff --git a/examples/ruby/pubsub/.gitignore b/examples/ruby/pubsub/.gitignore new file mode 100644 index 00000000000..62fcb4fa943 --- /dev/null +++ b/examples/ruby/pubsub/.gitignore @@ -0,0 +1,15 @@ +/.bundle/ +/.yardoc +/Gemfile.lock +/_yardoc/ +/coverage/ +/doc/ +/pkg/ +/spec/reports/ +/tmp/ +*.bundle +*.so +*.o +*.a +mkmf.log +vendor diff --git a/examples/ruby/pubsub/Gemfile b/examples/ruby/pubsub/Gemfile new file mode 100644 index 00000000000..4ee8ffe3d60 --- /dev/null +++ b/examples/ruby/pubsub/Gemfile @@ -0,0 +1,4 @@ +source 'https://rubygems.org/' + +gem 'grpc', '~> 1.0' +gem 'googleauth', '>= 0.5.1', '< 0.7' diff --git a/src/ruby/bin/apis/google/protobuf/empty.rb b/examples/ruby/pubsub/google/protobuf/empty.rb similarity index 100% rename from src/ruby/bin/apis/google/protobuf/empty.rb rename to examples/ruby/pubsub/google/protobuf/empty.rb diff --git a/src/ruby/bin/apis/pubsub_demo.rb b/examples/ruby/pubsub/pubsub_demo.rb similarity index 100% rename from src/ruby/bin/apis/pubsub_demo.rb rename to examples/ruby/pubsub/pubsub_demo.rb diff --git a/src/ruby/bin/apis/tech/pubsub/proto/pubsub.rb b/examples/ruby/pubsub/tech/pubsub/proto/pubsub.rb similarity index 100% rename from src/ruby/bin/apis/tech/pubsub/proto/pubsub.rb rename to examples/ruby/pubsub/tech/pubsub/proto/pubsub.rb diff --git a/src/ruby/bin/apis/tech/pubsub/proto/pubsub_services.rb b/examples/ruby/pubsub/tech/pubsub/proto/pubsub_services.rb similarity index 100% rename from src/ruby/bin/apis/tech/pubsub/proto/pubsub_services.rb rename to examples/ruby/pubsub/tech/pubsub/proto/pubsub_services.rb diff --git a/grpc.gemspec b/grpc.gemspec index 1e4722d6350..5ab37136835 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -20,7 +20,9 @@ Gem::Specification.new do |s| s.files += Dir.glob('src/ruby/bin/**/*') s.files += Dir.glob('src/ruby/ext/**/*') s.files += Dir.glob('src/ruby/lib/**/*') - s.files += Dir.glob('src/ruby/pb/**/*') + s.files += Dir.glob('src/ruby/pb/**/*').reject do |f| + f.match(%r{^src/ruby/pb/test}) + end s.files += Dir.glob('include/grpc/**/*') s.test_files = Dir.glob('src/ruby/spec/**/*') s.bindir = 'src/ruby/bin' @@ -28,7 +30,6 @@ Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.add_dependency 'google-protobuf', '~> 3.1' - s.add_dependency 'googleauth', '>= 0.5.1', '< 0.7' s.add_dependency 'googleapis-common-protos-types', '~> 1.0.0' s.add_development_dependency 'bundler', '~> 1.9' @@ -41,6 +42,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'rspec', '~> 3.6' s.add_development_dependency 'rubocop', '~> 0.49.1' s.add_development_dependency 'signet', '~> 0.7.0' + s.add_development_dependency 'googleauth', '>= 0.5.1', '< 0.7' s.extensions = %w(src/ruby/ext/grpc/extconf.rb) diff --git a/templates/grpc.gemspec.template b/templates/grpc.gemspec.template index fb54de1c8e2..842035b664f 100644 --- a/templates/grpc.gemspec.template +++ b/templates/grpc.gemspec.template @@ -22,7 +22,9 @@ s.files += Dir.glob('src/ruby/bin/**/*') s.files += Dir.glob('src/ruby/ext/**/*') s.files += Dir.glob('src/ruby/lib/**/*') - s.files += Dir.glob('src/ruby/pb/**/*') + s.files += Dir.glob('src/ruby/pb/**/*').reject do |f| + f.match(%r{^src/ruby/pb/test}) + end s.files += Dir.glob('include/grpc/**/*') s.test_files = Dir.glob('src/ruby/spec/**/*') s.bindir = 'src/ruby/bin' @@ -30,7 +32,6 @@ s.platform = Gem::Platform::RUBY s.add_dependency 'google-protobuf', '~> 3.1' - s.add_dependency 'googleauth', '>= 0.5.1', '< 0.7' s.add_dependency 'googleapis-common-protos-types', '~> 1.0.0' s.add_development_dependency 'bundler', '~> 1.9' @@ -43,6 +44,7 @@ s.add_development_dependency 'rspec', '~> 3.6' s.add_development_dependency 'rubocop', '~> 0.49.1' s.add_development_dependency 'signet', '~> 0.7.0' + s.add_development_dependency 'googleauth', '>= 0.5.1', '< 0.7' s.extensions = %w(src/ruby/ext/grpc/extconf.rb)