From 18307f191128d2504a60f0dd0c6bc7277eadaa98 Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Tue, 24 Feb 2015 18:09:39 -0800 Subject: [PATCH] Adds top-level documentation and testing metadata --- .rspec | 2 + .travis.yml | 18 +++++++++ CONTRIBUTING.md | 32 ++++++++++++++++ LICENSE => COPYING | 8 ++-- README.md | 92 +++++++++++++++++++++++++++++++++++++++++++++- 5 files changed, 146 insertions(+), 6 deletions(-) create mode 100644 .rspec create mode 100644 .travis.yml create mode 100644 CONTRIBUTING.md rename LICENSE => COPYING (99%) diff --git a/.rspec b/.rspec new file mode 100644 index 0000000..7438fbe --- /dev/null +++ b/.rspec @@ -0,0 +1,2 @@ +--colour +--format documentation diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..f2607c5 --- /dev/null +++ b/.travis.yml @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..1e65911 --- /dev/null +++ b/CONTRIBUTING.md @@ -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. + diff --git a/LICENSE b/COPYING similarity index 99% rename from LICENSE rename to COPYING index e06d208..b5d5055 100644 --- a/LICENSE +++ b/COPYING @@ -1,4 +1,5 @@ -Apache License + + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -178,7 +179,7 @@ Apache License APPENDIX: How to apply the Apache License to your work. 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 the brackets!) The text should be enclosed in the appropriate 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 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"); 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. See the License for the specific language governing permissions and limitations under the License. - diff --git a/README.md b/README.md index 5430e76..95dc4f9 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,90 @@ -oauth2client-ruby -================= +# Google Auth Library for Ruby + +
+
Homepage
http://www.github.com/google/google-auth-library-ruby
+
Authors
Tim Emiola
+
Copyright
Copyright © 2015 Google, Inc.
+
License
Apache 2.0
+
+ +[![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