Commit Graph

18 Commits

Author SHA1 Message Date
igorpeshansky 23f9b5071f Treat empty credentials environment variables as unset. (#205) 2019-03-27 10:55:08 -07:00
Graham Paye bf822910fa
add google-style and refactor (#203) 2019-03-15 12:34:54 -07:00
Graham Paye 0d25f3a10f
prepare for autorelease (#199) 2019-02-27 08:06:41 -08:00
Graham Paye d765472f35
switch gcloud command to IO.popen from backticks (#194) 2019-02-21 14:38:34 -08:00
Daniel Azuma f0b95e72f9
Support configuration of the connection object used to fetch tokens (#185) 2019-01-02 14:42:42 -08:00
Mike Moore dc8b127549
Remove warning while looking up project_id (#184) 2018-12-27 16:09:51 -07:00
Graham Paye 0d2becbdcd
make load_gcloud_project_id module function (#170) 2018-10-26 12:17:12 -07:00
Graham Paye f0b0c6f8e8
Add project_id instance variable (#167) 2018-10-24 09:23:37 -07:00
Daniel Azuma d1ba5e95a7
Fix sdk credentials warning (#148) 2018-08-02 09:11:52 -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
Vijay Subramani ec7e118248 Update credentials_loader.rb 2015-12-31 15:48:39 -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
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 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