Fix lint errors, other cleanups

- ensure that lint check gets run when prior to running unittests
- fixes a description of the default rake command
- adds a dependency on Faraday, a HTTP/REST client
pull/340/head
Tim Emiola 10 years ago
parent 3306139df0
commit 36066537cf
  1. 10
      src/ruby/Rakefile
  2. 1
      src/ruby/bin/interop/interop_client.rb
  3. 1
      src/ruby/grpc.gemspec
  4. 4
      src/ruby/spec/channel_spec.rb

@ -35,18 +35,20 @@ namespace :spec do
t.pattern = spec_files
t.rspec_opts = "--tag #{suite[:tag]}" if suite[:tag]
t.rspec_opts = suite[:tags].map{ |t| "--tag #{t}" }.join(' ') if suite[:tags]
if suite[:tags]
t.rspec_opts = suite[:tags].map { |x| "--tag #{x}" }.join(' ')
end
end
end
end
end
desc 'Run compiles the extension, runs all the tests'
desc 'Compiles the extension then runs all the tests'
task :all
task default: :all
task 'spec:suite:wrapper' => :compile
task 'spec:suite:wrapper' => [:compile, :rubocop]
task 'spec:suite:idiomatic' => 'spec:suite:wrapper'
task 'spec:suite:bidi' => 'spec:suite:wrapper'
task 'spec:suite:server' => 'spec:suite:wrapper'
task :all => ['spec:suite:idiomatic', 'spec:suite:bidi', 'spec:suite:server']
task all: ['spec:suite:idiomatic', 'spec:suite:bidi', 'spec:suite:server']

@ -79,7 +79,6 @@ end
RX_CERT = /-----BEGIN CERTIFICATE-----\n.*?-----END CERTIFICATE-----\n/m
# creates a Credentials from the production certificates.
def prod_creds
cert_text = load_prod_cert

@ -20,6 +20,7 @@ Gem::Specification.new do |s|
s.require_paths = ['lib']
s.platform = Gem::Platform::RUBY
s.add_dependency 'faraday', '~> 0.9'
s.add_dependency 'google-protobuf', '~> 3.0.0alpha.1.1'
s.add_dependency 'logging', '~> 1.8'
s.add_dependency 'minitest', '~> 5.4' # reqd for interop tests

@ -29,8 +29,6 @@
require 'grpc'
FAKE_HOST='localhost:0'
def load_test_certs
test_root = File.join(File.dirname(__FILE__), 'testdata')
files = ['ca.pem', 'server1.key', 'server1.pem']
@ -38,6 +36,8 @@ def load_test_certs
end
describe GRPC::Core::Channel do
FAKE_HOST = 'localhost:0'
def create_test_cert
GRPC::Core::Credentials.new(load_test_certs[0])
end

Loading…
Cancel
Save