Commit Graph

21 Commits

Author SHA1 Message Date
Graham Paye bf822910fa
add google-style and refactor (#203) 2019-03-15 12:34:54 -07:00
Daniel Azuma f0b95e72f9
Support configuration of the connection object used to fetch tokens (#185) 2019-01-02 14:42:42 -08:00
Graham Paye f0b0c6f8e8
Add project_id instance variable (#167) 2018-10-24 09:23:37 -07:00
Graham Paye 7e42656b1c
make tests windows friendly (#164) 2018-10-10 18:23:50 -07:00
Graham Paye 5d42d3b4be
Warn when using cloud sdk credentials (#145)
* Issue warning when cloud sdk credentials are used.
2018-07-18 13:54:03 -07:00
nicholas shook 82a4f8520c added ruby 2.3 compatability
also:

* updated rubocop and applied styling
* made small test refactorings (using the expect block notation)
* made a small refactor to remove an unnecessary ``return credentials``
* bumped the version
2016-07-13 15:45:46 -07:00
Steven Bazyl b46a7dc82c Prep for 0.5 release, update unit tests to use webmock instead of Faraday stubs (due to fragility -- sensitive to internal changes made in signet) 2015-12-09 15:45:22 -08:00
Tim Emiola 19b32b47d8 Fixes styles issues before releasing
- also update .travis.yml to use new infrastructure
2015-08-06 12:50:23 -07:00
Tim Emiola 1463e5f5f9 Merge pull request #33 from mr-salty/add-system-default-creds-path
Add support for a system default credentials file.
2015-07-10 15:08:19 +02:00
Tim Emiola 4c057404e6 Merge pull request #35 from mr-salty/fix-env-var-test
Fix a failing test introduced in #28.
2015-07-10 14:01:40 +02:00
Todd Derr b31df0caaa Fix rubocop errors (long line wrapping). 2015-06-30 17:47:16 -04:00
Todd Derr f0de3295fc Fix some issues discovered by rubocop.
fix failures due to:
- misformatting of wrapped lines
- a superflous block (and temp dir creation) due to overzealous cut & paste.
2015-06-30 17:42:30 -04:00
Todd Derr 883fb14147 Fix a failing test introduced in #28.
The environment variables in the 'fails if env vars are set' test
were not actually being set because they used a nonexistent hash key
(which has the effect of unsetting the environment variable).
2015-06-29 17:01:19 -04:00
Todd Derr 60a079a41e Fix 'raise_error' WARNINGs.
rspec spews a warning when using raise_error without a specific error;
add "RuntimeError" to all of these occurrences.
2015-06-29 16:50:55 -04:00
Todd Derr 86de5fe13b Add support for a system default credentials file.
The path is:
  - windows: %ProgramData%\Google\Auth\application_default_credentials.json
  - other: /etc/google/auth/application_default_credentials.json
2015-06-29 16:35:45 -04:00
Herbert Siojo 5061fb5add Enables reading credentials from env vars.
- ServiceAccountCredentials, ServiceAccountJwtHeaderCredentials
and UserRefreshCredentials initializers now take keyword args
via options hash.

- In `credentials_loader.rb`, refactored env var checking into
private methods

- Updated tests & added new tests.

- Fixed existing test for #from_well_known_path 'fails if
the file is invalid', where `from_env` was called instead of
`from_well_known_path`.

- Fixed rubocop errors I introduced, but two existing ones remain.

- Added entry to changelog.

- Fixed rubocop errors from code containing parallel assignments

- Updated rubocop_todo.yml to ignore parallel assignments and
trailing underscore assignments.
2015-05-21 13:38:19 -07:00
Tim Emiola bd97c23d9f Make the scope optional 2015-03-17 16:46:55 -07:00
Tim Emiola 8f33ba8f4c Explicitly checks for user auth and fail if auth type is not known 2015-03-09 09:50:18 -07:00
Tim Emiola 4d4bcd46e8 Add support for loading either credentials type as determined by the loaded content 2015-03-06 16:58:57 -08:00
Tim Emiola df56f8af33 Refactoring: move the credentials load into its own class 2015-03-06 15:13:40 -08:00
Tim Emiola a5bb601fe3 Adds an implementation of Application Default Credentials
- supports two initial scenarios
  - 2LO with service accounts
  - Compute Engine

- performs all 3 'sniffs' for the service account credentials
  - from environment
  - from a well known file
  - from GCE
2015-02-12 16:59:08 -08:00