diff options
author | 2016-01-15 08:53:15 -0800 | |
---|---|---|
committer | 2016-01-15 08:53:15 -0800 | |
commit | 8053d2feb6532f6d2c11ae588e05cdc19120e817 (patch) | |
tree | eea0ea64e2cff0ebd99cde54220f13c236970c0a /templates | |
parent | 54099aa46f63238275dd626390176d72eecc947a (diff) | |
parent | d50a4ee2c257ddfadccb9d252e2b61d6ff544d96 (diff) |
Merge remote-tracking branch 'upstream/master' into sync_async_mix
Diffstat (limited to 'templates')
-rw-r--r-- | templates/grpc.gemspec.template | 58 | ||||
-rw-r--r-- | templates/package.json.template | 74 |
2 files changed, 132 insertions, 0 deletions
diff --git a/templates/grpc.gemspec.template b/templates/grpc.gemspec.template new file mode 100644 index 0000000000..fdf87ee13f --- /dev/null +++ b/templates/grpc.gemspec.template @@ -0,0 +1,58 @@ +%YAML 1.2 +--- | + # -*- ruby -*- + # encoding: utf-8 + $LOAD_PATH.push File.expand_path('../src/ruby/lib', __FILE__) + require 'grpc/version' + + Gem::Specification.new do |s| + s.name = 'grpc' + s.version = GRPC::VERSION + s.authors = ['gRPC Authors'] + s.email = 'temiola@google.com' + s.homepage = 'https://github.com/google/grpc/tree/master/src/ruby' + s.summary = 'GRPC system in Ruby' + s.description = 'Send RPCs from Ruby using GRPC' + s.license = 'BSD-3-Clause' + + s.required_ruby_version = '>= 2.0.0' + s.requirements << 'libgrpc ~> 0.11.0 needs to be installed' + + s.files = %w( Rakefile Makefile ) + s.files += %w( etc/roots.pem ) + 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('include/grpc/**/*') + s.test_files = Dir.glob('src/ruby/spec/**/*') + s.bindir = 'src/ruby/bin' + ${'%'}w(math noproto).each do |b| + s.executables += ["#{b}_client.rb", "#{b}_server.rb"] + end + s.executables += %w(grpc_ruby_interop_client grpc_ruby_interop_server) + s.require_paths = %w( src/ruby/bin src/ruby/lib src/ruby/pb ) + s.platform = Gem::Platform::RUBY + + s.add_dependency 'google-protobuf', '~> 3.0.0alpha.1.1' + s.add_dependency 'googleauth', '~> 0.5.1' + + s.add_development_dependency 'bundler', '~> 1.9' + s.add_development_dependency 'logging', '~> 2.0' + s.add_development_dependency 'simplecov', '~> 0.9' + s.add_development_dependency 'rake', '~> 10.4' + s.add_development_dependency 'rake-compiler', '~> 0.9' + s.add_development_dependency 'rspec', '~> 3.2' + s.add_development_dependency 'rubocop', '~> 0.30.0' + s.add_development_dependency 'signet', '~>0.7.0' + + s.extensions = %w(src/ruby/ext/grpc/extconf.rb) + + % for lib in libs: + % if lib.name in ('gpr', 'grpc'): + % for file in lib.public_headers + lib.headers + lib.src: + s.files += %w( ${file} ) + % endfor + % endif + % endfor + end diff --git a/templates/package.json.template b/templates/package.json.template new file mode 100644 index 0000000000..ec6827ef76 --- /dev/null +++ b/templates/package.json.template @@ -0,0 +1,74 @@ +%YAML 1.2 +--- | + { + "name": "grpc", + "version": "0.12.0", + "author": "Google Inc.", + "description": "gRPC Library for Node", + "homepage": "http://www.grpc.io/", + "repository": { + "type": "git", + "url": "https://github.com/grpc/grpc.git" + }, + "bugs": "https://github.com/grpc/grpc/issues", + "contributors": [ + { + "name": "Michael Lumish", + "email": "mlumish@google.com" + } + ], + "directories": { + "lib": "src/node/src" + }, + "scripts": { + "lint": "node ./node_modules/jshint/bin/jshint src/node/src src/node/test src/node/interop src/node/index.js", + "test": "./node_modules/.bin/mocha src/node/test && npm run-script lint", + "gen_docs": "./node_modules/.bin/jsdoc -c src/node/jsdoc_conf.json", + "coverage": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha src/node/test" + }, + "dependencies": { + "bindings": "^1.2.0", + "lodash": "^3.9.3", + "nan": "^2.0.0", + "protobufjs": "^4.0.0" + }, + "devDependencies": { + "async": "^1.5.0", + "google-auth-library": "^0.9.2", + "istanbul": "^0.3.21", + "jsdoc": "^3.3.2", + "jshint": "^2.5.0", + "minimist": "^1.1.0", + "mocha": "^2.3.4", + "mocha-jenkins-reporter": "^0.1.9", + "mustache": "^2.0.0", + "poisson-process": "^0.2.1" + }, + "engines": { + "node": ">=0.10.13" + }, + "files": [ + "LICENSE", + "src/node/README.md", + "src/node/health_check", + "src/proto", + "etc", + % for module in node_modules: + % for file in module.headers + module.src + module.js: + "${file}", + % endfor + % for dep in module.transitive_deps: + % for lib in libs: + % if lib.name == dep: + % for file in lib.get('public_headers', []) + lib.headers + lib.src: + "${file}", + % endfor + % endif + % endfor + % endfor + % endfor + "binding.gyp" + ], + "main": "src/node/index.js", + "license": "BSD-3-Clause" + } |