The main maintainers for the Google sections are @icco, @Temikus and @plribeiro3000. Please send pull requests to them.
As of v1.0.0, fog-google includes google-api-client as a dependency, there is no need to include it separately anymore.
Fog-google is currently supported on Ruby 2.3+ See supported ruby versions for more info.
See MIGRATING.md for migration between major versions.
There are two ways to access Google Cloud Storage. The old S3 API and the new JSON API.
Fog::Storage::Google will automatically direct you to the appropriate API based on the credentials you provide it.
- The XML API is almost identical to S3. Use Google's interoperability keys to access it.
- The new JSON API is faster and uses auth similarly to the rest of the Google Cloud APIs using a service account private key.
Google Compute Engine is a Virtual Machine hosting service. Currently it is built on version v1 of the GCE API.
As of 2017-12-15, we are still working on making Fog for Google Compute engine (
Fog::Compute::Google) feature complete. If you are using Fog to interact with GCE, please keep Fog up to date and file issues for any anomalies you see or features you would like.
Fog implements v1beta4 of the Google Cloud SQL Admin API. As of 2017-11-06, Cloud SQL is mostly feature-complete. Please file issues for any anomalies you see or features you would like as we finish adding remaining features.
Fog implements v3 of the Google Cloud Monitoring API. As of 2017-10-05, we believe Fog for Google Cloud Monitoring is feature complete for metric-related resources and are working on supporting groups.
We are always looking for people to improve our code and test coverage, so please file issues for any anomalies you see or features you would like.
Note: You must have a version of google-api-client > 0.8.5 to use the Pub/Sub API; previous versions will not work.
Fog mostly implements v1 of the Google Cloud Pub/Sub API; however some less common API methods are missing. Pull requests for additions would be greatly appreciated.
Add the following two lines to your application's
And then execute:
Or install it yourself as:
$ gem install fog-google
Integration tests can be kicked off via following rake tasks. Important note: As those tests are running against real API's YOU WILL BE BILLED.
rake test # Run all integration tests rake test:parallel # Run all integration tests in parallel rake test:compute # Run Compute API tests rake test:monitoring # Run Monitoring API tests rake test:pubsub # Run PubSub API tests rake test:sql # Run SQL API tests rake test:storage # Run Storage API tests
Since some resources can be expensive to test, we have a self-hosted CI server.
Due to security considerations a repo maintainer needs to add the label
integrate to kick off the CI.
Follow the instructions to generate a private key. A sample credentials file can be found in
.fog.example in this directory:
cat .fog.example >> ~/.fog # appends the sample configuration vim ~/.fog # edit file with yout config
SSH-ing into instances
If you want to be able to bootstrap SSH-able instances, (using
servers.bootstrap,) be sure you have a key in
Once you've specified your credentials, you should be good to go!
$ bundle exec pry  pry(main)> require 'fog/google' => true  pry(main)> connection = Fog::Compute::Google.new  pry(main)> connection.servers => [ <Fog::Compute::Google::Server name="xxxxxxx", kind="compute#instance",
Supported Ruby Versions
Fog-google is currently supported on Ruby 2.3+.
In general we support (and run our CI) for Ruby versions that are actively supported by Ruby Core - that is, Ruby versions that are not end of life. 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.md in this repository.