-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaces google-gax 2.0 in order to avoid dependency conflicts.
- Loading branch information
Showing
139 changed files
with
8,918 additions
and
2,055 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.DS_STORE | ||
.bundle/ | ||
/.yardoc | ||
/Gemfile.lock | ||
/_yardoc/ | ||
/doc/ | ||
/pkg/ | ||
/spec/reports/ | ||
/tmp/ | ||
*.bundle | ||
*.so | ||
*.o | ||
*.a | ||
mkmf.log | ||
vendor | ||
*~ | ||
.idea | ||
*.iml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
inherit_gem: | ||
google-style: google-style.yml | ||
|
||
AllCops: | ||
Exclude: | ||
- "gapic-common.gemspec" | ||
- "test/**/*" | ||
|
||
Metrics/ClassLength: | ||
Exclude: | ||
- "lib/google/gapic/configuration.rb" | ||
- "lib/google/gapic/configuration/schema.rb" | ||
|
||
Metrics/AbcSize: | ||
Exclude: | ||
- "lib/google/gapic/config.rb" | ||
Metrics/CyclomaticComplexity: | ||
Exclude: | ||
- "lib/google/gapic/config.rb" | ||
Metrics/MethodLength: | ||
Exclude: | ||
- "lib/google/gapic/config.rb" | ||
Metrics/PerceivedComplexity: | ||
Exclude: | ||
- "lib/google/gapic/config.rb" | ||
- "lib/google/gapic/grpc/stub.rb" | ||
|
||
Style/Documentation: | ||
Exclude: | ||
- "lib/google/gapic/api_call.rb" | ||
- "lib/google/gapic/configuration/deferred_value.rb" | ||
- "lib/google/gapic/configuration/schema.rb" | ||
- "lib/google/gapic/errors.rb" | ||
- "lib/google/gapic/grpc/status_details.rb" | ||
Style/GuardClause: | ||
Exclude: | ||
- "lib/google/gapic/grpc/stub.rb" | ||
Style/CaseEquality: | ||
Exclude: | ||
- "lib/google/gapic/configuration.rb" | ||
- "lib/google/gapic/configuration/derived.rb" | ||
- "lib/google/gapic/configuration/schema.rb" | ||
- "lib/google/gapic/config.rb" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
language: ruby | ||
rvm: | ||
- 2.6 | ||
- 2.5 | ||
- 2.4 | ||
- 2.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Release History | ||
|
||
### 2.0.0 / Upcoming... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Contributor Code of Conduct | ||
|
||
As contributors and maintainers of this project, | ||
and in the interest of fostering an open and welcoming community, | ||
we pledge to respect all people who contribute through reporting issues, | ||
posting feature requests, updating documentation, | ||
submitting pull requests or patches, and other activities. | ||
|
||
We are committed to making participation in this project | ||
a harassment-free experience for everyone, | ||
regardless of level of experience, gender, gender identity and expression, | ||
sexual orientation, disability, personal appearance, | ||
body size, race, ethnicity, age, religion, or nationality. | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery | ||
* Personal attacks | ||
* Trolling or insulting/derogatory comments | ||
* Public or private harassment | ||
* Publishing other's private information, | ||
such as physical or electronic | ||
addresses, without explicit permission | ||
* Other unethical or unprofessional conduct. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or reject | ||
comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct. | ||
By adopting this Code of Conduct, | ||
project maintainers commit themselves to fairly and consistently | ||
applying these principles to every aspect of managing this project. | ||
Project maintainers who do not follow or enforce the Code of Conduct | ||
may be permanently removed from the project team. | ||
|
||
This code of conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior | ||
may be reported by opening an issue | ||
or contacting one or more of the project maintainers. | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, | ||
available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# How to Contribute | ||
|
||
We'd love to accept your patches and contributions to this project. There are | ||
just a few small guidelines you need to follow. | ||
|
||
## Contributor License Agreement | ||
|
||
Contributions to this project must be accompanied by a Contributor License | ||
Agreement. You (or your employer) retain the copyright to your contribution; | ||
this simply gives us permission to use and redistribute your contributions as | ||
part of the project. Head over to <https://cla.developers.google.com/> to see | ||
your current agreements on file or to sign a new one. | ||
|
||
You generally only need to submit a CLA once, so if you've already submitted one | ||
(even if it was for a different project), you probably don't need to do it | ||
again. | ||
|
||
## Code reviews | ||
|
||
All submissions, including submissions by project members, require review. We | ||
use GitHub pull requests for this purpose. Consult | ||
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more | ||
information on using pull requests. | ||
|
||
## Community Guidelines | ||
|
||
This project follows [Google's Open Source Community | ||
Guidelines](https://opensource.google.com/conduct/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source "https://rubygems.org" | ||
|
||
# Specify your gem's dependencies in gapic-common.gemspec | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Copyright 2019 Google LLC | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
https://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Google API Extensions for Ruby | ||
================================ | ||
|
||
Generated API Client common code (gapic-common) is a set of modules which aids | ||
the development of APIs for clients and servers based on [gRPC][] and Google API | ||
conventions. | ||
|
||
Application code will rarely need to use most of the classes within this library | ||
directly, but code generated automatically from the API definition files in | ||
[Google APIs][] can use services such as page streaming to provide a more | ||
convenient and idiomatic API surface to callers. | ||
|
||
[gRPC]: http://grpc.io | ||
[Google APIs]: https://github.com/googleapis/googleapis/ | ||
|
||
## Supported Ruby Versions | ||
|
||
This library is supported on Ruby 2.3+. | ||
|
||
Google provides official support for Ruby versions that are actively supported | ||
by Ruby Core—that is, Ruby versions that are either in normal maintenance or in | ||
security maintenance, and not end of life. Currently, this means Ruby 2.3 and | ||
later. Older versions of Ruby _may_ still work, but are unsupported and not | ||
recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details | ||
about the Ruby support schedule. | ||
|
||
## Contributing | ||
|
||
Contributions to this library are always welcome and highly encouraged. | ||
|
||
See the [CONTRIBUTING](CONTRIBUTING.md) documentation for more information on how to get started. | ||
|
||
## Versioning | ||
|
||
This library is currently a **preview** with no guarantees of stability or support. Please get | ||
involved and let us know if you find it useful and we'll work towards a stable version. | ||
|
||
## Disclaimer | ||
|
||
This is not an official Google product. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Releasing gapic-common | ||
|
||
The Google Ruby GAX project uses [semantic versioning](http://semver.org). Replace the `<prev_version>` and `<version>` placeholders shown in the examples below with the appropriate numbers, e.g. `0.1.0` and `0.2.0`. | ||
|
||
After all [pull requests](https://github.com/googleapis/gax-ruby/pulls) for a release have been merged and all [Travis builds](https://travis-ci.org/googleapis/gax-ruby) are green, you may create a release as follows: | ||
|
||
1. If you haven't already, switch to the master branch, ensure that you have no changes, and pull from origin. | ||
|
||
```sh | ||
$ git checkout master | ||
$ git status | ||
$ git pull <remote> master --rebase | ||
``` | ||
|
||
1. Build the gem locally. (Depending on your environment, you may need to `bundle exec` to rake commands; this will be shown.) | ||
|
||
```sh | ||
$ bundle exec rake build | ||
``` | ||
|
||
1. Install the gem locally. | ||
|
||
```sh | ||
$ bundle exec rake install | ||
``` | ||
|
||
1. Using IRB (not `rake console`!), manually test the gem that you installed in the previous step. | ||
|
||
1. Update the `CHANGELOG.md`. Write bullet-point lists of the major and minor changes. You can also add examples, fixes, thank yous, and anything else helpful or relevant. See google-cloud-node [v0.18.0](https://github.com/GoogleCloudPlatform/google-cloud-node/releases/tag/v0.18.0) for an example with all the bells and whistles. | ||
|
||
1. Edit `lib/google/gapic/version.rb` file, changing the value of `VERSION` to your new version number. This repo requires a PR for all changes so doing this in a branch is best. | ||
|
||
1. Run the tests, one last time. | ||
|
||
```sh | ||
$ bundle update | ||
$ bundle exec rake spec | ||
``` | ||
|
||
1. Commit your changes. Copy and paste the significant points from your `CHANGELOG.md` edit as the description in your commit message. | ||
|
||
```sh | ||
$ git commit -am "Release gapic-common <version> ..." | ||
``` | ||
|
||
1. Tag the version after all changes have been merged. | ||
|
||
```sh | ||
$ git tag gapic-common/v<version> | ||
``` | ||
|
||
1. Push the tag. | ||
|
||
```sh | ||
$ git push <remote> gapic-common/v<version> | ||
``` | ||
|
||
1. Wait until the [Travis build](https://travis-ci.org/googleapis/gax-ruby) has passed for the tag. | ||
|
||
1. Push the gem to [RubyGems.org](https://rubygems.org/gems/google-cloud). | ||
|
||
```sh | ||
$ gem push gapic-common-<version>.gem | ||
``` | ||
|
||
1. On the [gax-ruby releases page](https://github.com/googleapis/gax-ruby/releases), click [Draft a new release](https://github.com/googleapis/gax-ruby/releases/new). Complete the form. Include the bullet-point lists of the major and minor changes from the gem's `CHANGELOG.md`. You can also add examples, fixes, thank yous, and anything else helpful or relevant. | ||
1. Click `Publish release`. | ||
1. Wait until the last tag build job has successfully completed on Travis. Then push your commits to the master branch. This will trigger another [Travis](https://travis-ci.org/googleapis/gax-ruby) build on master branch. | ||
```sh | ||
$ git push <remote> master | ||
``` | ||
High fives all around! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Copyright 2019 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
require "bundler/gem_tasks" | ||
require "rake/testtask" | ||
require "rubocop/rake_task" | ||
|
||
RuboCop::RakeTask.new # Configuration is in .rubocop.yml | ||
Rake::TestTask.new :test do |t| | ||
t.libs << "test" | ||
t.libs << "lib" | ||
t.test_files = FileList["test/**/*_test.rb"] | ||
end | ||
|
||
desc "Run the CI build" | ||
task :ci do | ||
puts "\ngapic-common rubocop\n" | ||
Rake::Task[:rubocop].invoke | ||
puts "\ngapic-common test\n" | ||
Rake::Task[:test].invoke | ||
end | ||
|
||
task default: :ci | ||
|
||
task :gen do | ||
# no-op | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# -*- ruby -*- | ||
# encoding: utf-8 | ||
|
||
$LOAD_PATH.push File.expand_path("lib", __dir__) | ||
require "google/gapic/common/version" | ||
|
||
Gem::Specification.new do |gem| | ||
gem.name = "gapic-common" | ||
gem.version = Google::Gapic::Common::VERSION | ||
gem.authors = ["Google API Authors"] | ||
gem.email = "[email protected]" | ||
gem.homepage = "https://github.com/googleapis/gapic-generator-ruby" | ||
gem.summary = "Aids the development of APIs for clients and servers based" | ||
gem.summary += " on GRPC and Google APIs conventions" | ||
gem.description = "Generated API Client common code" | ||
gem.files = %w[Rakefile README.md] | ||
gem.files += Dir.glob "lib/**/*" | ||
gem.files += Dir.glob "spec/**/*" | ||
gem.require_paths = %w[lib] | ||
gem.platform = Gem::Platform::RUBY | ||
gem.license = "Apache-2.0" | ||
|
||
gem.required_ruby_version = ">= 2.3.0" | ||
|
||
gem.add_dependency "google-protobuf", "~> 3.2" | ||
gem.add_dependency "googleapis-common-protos", ">= 1.3.9", "< 2.0" | ||
gem.add_dependency "googleapis-common-protos-types", ">= 1.0.4", "< 2.0" | ||
gem.add_dependency "googleauth", ">= 0.6.2", "< 0.10.0" | ||
gem.add_dependency "grpc", ">= 1.7.2", "< 2.0" | ||
|
||
gem.add_development_dependency "google-style", "~> 0.3" | ||
gem.add_development_dependency "minitest", "~> 5.10" | ||
gem.add_development_dependency "minitest-autotest", "~> 1.0" | ||
gem.add_development_dependency "minitest-focus", "~> 1.1" | ||
gem.add_development_dependency "minitest-rg", "~> 5.2" | ||
gem.add_development_dependency "rake", ">= 10.0" | ||
end |
Oops, something went wrong.