Merge pull request #6 from tbetbetbe/ruby-auth-add-top-level-docs
Adds top-level documentation and testing metadata
This commit is contained in:
commit
83cd8d5581
|
@ -0,0 +1,18 @@
|
||||||
|
language: ruby
|
||||||
|
rvm:
|
||||||
|
- 2.2
|
||||||
|
- 2.0.0
|
||||||
|
- 2.1
|
||||||
|
- 1.9.3
|
||||||
|
- rbx-2
|
||||||
|
- jruby
|
||||||
|
script: "bundle exec rake spec:all"
|
||||||
|
before_install:
|
||||||
|
- sudo apt-get update
|
||||||
|
- sudo apt-get install idn
|
||||||
|
notifications:
|
||||||
|
email:
|
||||||
|
recipients:
|
||||||
|
- temiola@google.com
|
||||||
|
on_success: change
|
||||||
|
on_failure: change
|
|
@ -0,0 +1,32 @@
|
||||||
|
# How to become a contributor and submit your own code
|
||||||
|
|
||||||
|
## Contributor License Agreements
|
||||||
|
|
||||||
|
We'd love to accept your sample apps and patches! Before we can take them, we
|
||||||
|
have to jump a couple of legal hurdles.
|
||||||
|
|
||||||
|
Please fill out either the individual or corporate Contributor License Agreement
|
||||||
|
(CLA).
|
||||||
|
|
||||||
|
* If you are an individual writing original source code and you're sure you
|
||||||
|
own the intellectual property, then you'll need to sign an [individual CLA]
|
||||||
|
(http://code.google.com/legal/individual-cla-v1.0.html).
|
||||||
|
* If you work for a company that wants to allow you to contribute your work,
|
||||||
|
then you'll need to sign a [corporate CLA]
|
||||||
|
(http://code.google.com/legal/corporate-cla-v1.0.html).
|
||||||
|
|
||||||
|
Follow either of the two links above to access the appropriate CLA and
|
||||||
|
instructions for how to sign and return it. Once we receive it, we'll be able to
|
||||||
|
accept your pull requests.
|
||||||
|
|
||||||
|
## Contributing A Patch
|
||||||
|
|
||||||
|
1. Submit an issue describing your proposed change to the repo in question.
|
||||||
|
1. The repo owner will respond to your issue promptly.
|
||||||
|
1. If your proposed change is accepted, and you haven't already done so, sign a
|
||||||
|
Contributor License Agreement (see details above).
|
||||||
|
1. Fork the desired repo, develop and test your code changes.
|
||||||
|
1. Ensure that your code is clear and comprehensible.
|
||||||
|
1. Ensure that your code has an appropriate set of unit tests which all pass.
|
||||||
|
1. Submit a pull request.
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
Apache License
|
|
||||||
|
Apache License
|
||||||
Version 2.0, January 2004
|
Version 2.0, January 2004
|
||||||
http://www.apache.org/licenses/
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
@ -178,7 +179,7 @@ Apache License
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
To apply the Apache License to your work, attach the following
|
||||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
replaced with your own identifying information. (Don't include
|
replaced with your own identifying information. (Don't include
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
comment syntax for the file format. We also recommend that a
|
comment syntax for the file format. We also recommend that a
|
||||||
|
@ -186,7 +187,7 @@ Apache License
|
||||||
same "printed page" as the copyright notice for easier
|
same "printed page" as the copyright notice for easier
|
||||||
identification within third-party archives.
|
identification within third-party archives.
|
||||||
|
|
||||||
Copyright {yyyy} {name of copyright owner}
|
Copyright 2015 Google Inc.
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
@ -199,4 +200,3 @@ Apache License
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
92
README.md
92
README.md
|
@ -1,2 +1,90 @@
|
||||||
oauth2client-ruby
|
# Google Auth Library for Ruby
|
||||||
=================
|
|
||||||
|
<dl>
|
||||||
|
<dt>Homepage</dt><dd><a href="http://www.github.com/google/google-auth-library-ruby">http://www.github.com/google/google-auth-library-ruby</a></dd>
|
||||||
|
<dt>Authors</dt><dd><a href="mailto:temiola@google.com">Tim Emiola</a></dd>
|
||||||
|
<dt>Copyright</dt><dd>Copyright © 2015 Google, Inc.</dd>
|
||||||
|
<dt>License</dt><dd>Apache 2.0</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
[![Build Status](https://secure.travis-ci.org/google/google-auth-library-ruby.png)](http://travis-ci.org/google/google-auth-library-ruby)
|
||||||
|
[![Dependency Status](https://gemnasium.com/google/google-auth-library-ruby.png)](https://gemnasium.com/google/google-auth-library-ruby)
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
This Google's officially supported ruby client library for using OAuth 2.0
|
||||||
|
authorization and authentication with Google APIs.
|
||||||
|
|
||||||
|
## Alpha
|
||||||
|
|
||||||
|
This library is in Alpha. We will make an effort to support the library, but
|
||||||
|
we reserve the right to make incompatible changes when necessary.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Be sure `https://rubygems.org/` is in your gem sources.
|
||||||
|
|
||||||
|
For normal client usage, this is sufficient:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ gem install google-auth-library
|
||||||
|
```
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
require 'googleauth'
|
||||||
|
|
||||||
|
# Get the environment configured authorization
|
||||||
|
scope = 'https://www.googleapis.com/auth/userinfo.profile'
|
||||||
|
authorization = Google::Auth.get_application_default(scope)
|
||||||
|
|
||||||
|
# Add the the access token obtained using the authorization to a hash, e.g
|
||||||
|
# headers.
|
||||||
|
some_headers = {}
|
||||||
|
authorization.apply(some_headers)
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## Application Default Credentials
|
||||||
|
|
||||||
|
This library provides an implementation of
|
||||||
|
[application default credentials][application default credentials] for Ruby.
|
||||||
|
|
||||||
|
The Application Default Credentials provide a simple way to get authorization
|
||||||
|
credentials for use in calling Google APIs.
|
||||||
|
|
||||||
|
They are best suited for cases when the call needs to have the same identity
|
||||||
|
and authorization level for the application independent of the user. This is
|
||||||
|
the recommended approach to authorize calls to Cloud APIs, particularly when
|
||||||
|
you're building an application that uses Google Compute Engine.
|
||||||
|
|
||||||
|
## What about auth in google-apis-ruby-client?
|
||||||
|
|
||||||
|
The goal is for all auth done by
|
||||||
|
[google-apis-ruby-client][google-apis-ruby-client] to be performed by this
|
||||||
|
library. I.e, eventually google-apis-ruby-client will just take a dependency
|
||||||
|
on this library. This update is a work in progress, but should be completed
|
||||||
|
by Q2 2015.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
This library is licensed under Apache 2.0. Full license text is
|
||||||
|
available in [COPYING][copying].
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
See [CONTRIBUTING][contributing].
|
||||||
|
|
||||||
|
## Support
|
||||||
|
|
||||||
|
Please
|
||||||
|
[report bugs at the project on Github](https://github.com/google/google-auth-library-ruby/issues). Don't
|
||||||
|
hesitate to
|
||||||
|
[ask questions](http://stackoverflow.com/questions/tagged/google-auth-library-ruby)
|
||||||
|
about the client or APIs on [StackOverflow](http://stackoverflow.com).
|
||||||
|
|
||||||
|
[google-apis-ruby-client]: (https://github.com/google/google-api-ruby-client)
|
||||||
|
[application default credentials]: (https://developers.google.com/accounts/docs/application-default-credentials)
|
||||||
|
[contributing]: https://github.com/google/google-auth-library-ruby/tree/master/CONTRIBUTING.md
|
||||||
|
[copying]: https://github.com/google/google-auth-library-ruby/tree/master/COPYING
|
||||||
|
|
Loading…
Reference in New Issue