[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7772":3},{"id":4,"name":5,"fullName":6,"owner":5,"repo":5,"description":7,"homepage":8,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":15,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":16,"rankGlobal":9,"rankLanguage":9,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":9,"pushedAt":9,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":15,"starSnapshotCount":15,"syncStatus":25,"lastSyncTime":26,"discoverSource":27},7772,"fog","fog\u002Ffog","The Ruby cloud services library.","http:\u002F\u002Ffog.github.io",null,"Ruby",4298,1451,102,7,0,31.49,"MIT License",false,"master",true,[],"2026-06-12 02:01:44","![fog](http:\u002F\u002Fgeemus.s3.amazonaws.com\u002Ffog.png)\n\nfog is the Ruby cloud services library, top to bottom:\n\n* Collections provide a simplified interface, making clouds easier to work with and switch between.\n* Requests allow power users to get the most out of the features of each individual cloud.\n* Mocks make testing and integrating a breeze.\n\n[![Build Status](https:\u002F\u002Fgithub.com\u002Ffog\u002Ffog\u002Factions\u002Fworkflows\u002Fruby.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Ffog\u002Ffog\u002Factions\u002Fworkflows\u002Fruby.yml)\n[![Code Climate](https:\u002F\u002Fcodeclimate.com\u002Fgithub\u002Ffog\u002Ffog\u002Fbadges\u002Fgpa.svg)](https:\u002F\u002Fcodeclimate.com\u002Fgithub\u002Ffog\u002Ffog)\n[![Gem Version](https:\u002F\u002Fbadge.fury.io\u002Frb\u002Ffog.svg)](http:\u002F\u002Fbadge.fury.io\u002Frb\u002Ffog)\n[![SemVer](https:\u002F\u002Fapi.dependabot.com\u002Fbadges\u002Fcompatibility_score?dependency-name=fog&package-manager=bundler&version-scheme=semver)](https:\u002F\u002Fdependabot.com\u002Fcompatibility-score.html?dependency-name=fog&package-manager=bundler&version-scheme=semver)\n\n## Dependency Notice\n\nCurrently all fog providers are getting separated into metagems to lower the\nload time and dependency count.\n\nIf there's a metagem available for your cloud provider, e.g. `fog-aws`,\nyou should be using it instead of requiring the full fog collection to avoid\nunnecessary dependencies.\n\n'fog' should be required explicitly only if the provider you use doesn't yet\nhave a metagem available.\n\n## Getting Started\n\nThe easiest way to learn fog is to install the gem and use the interactive console.\nHere is an example of wading through server creation for Amazon Elastic Compute Cloud:\n\n```\n$ sudo gem install fog\n[...]\n\n$ fog\n\n  Welcome to fog interactive!\n  :default provides [...]\n\n>> server = Compute[:aws].servers.create\nArgumentError: image_id is required for this operation\n\n>> server = Compute[:aws].servers.create(:image_id => 'ami-5ee70037')\n\u003CFog::AWS::EC2::Server [...]>\n\n>> server.destroy # cleanup after yourself or regret it, trust me\ntrue\n```\n\n## Ruby version\n\nFog requires Ruby `2.0.0` or later.\n\nRuby `1.8` and `1.9` support was dropped in `fog-v2.0.0` as a backwards incompatible\nchange. Please use the later fog `1.x` versions if you require `1.8.7` or `1.9.x` support.\n\n## Collections\n\nA high level interface to each cloud is provided through collections, such as `images` and `servers`.\nYou can see a list of available collections by calling `collections` on the connection object.\nYou can try it out using the `fog` command:\n\n    >> Compute[:aws].collections\n    [:addresses, :directories, ..., :volumes, :zones]\n\nSome collections are available across multiple providers:\n\n* compute providers have `flavors`, `images` and `servers`\n* dns providers have `zones` and `records`\n* storage providers have `directories` and `files`\n\nCollections share basic CRUD type operations, such as:\n\n* `all` - fetch every object of that type from the provider.\n* `create` - initialize a new record locally and a remote resource with the provider.\n* `get` - fetch a single object by its identity from the provider.\n* `new` - initialize a new record locally, but do not create a remote resource with the provider.\n\nAs an example, we'll try initializing and persisting a Rackspace Cloud server:\n\n```ruby\nrequire 'fog'\n\ncompute = Fog::Compute.new(\n  :provider           => 'Rackspace',\n  :rackspace_api_key  => key,\n  :rackspace_username => username\n)\n\n# boot a gentoo server (flavor 1 = 256, image 3 = gentoo 2008.0)\nserver = compute.servers.create(:flavor_id => 1, :image_id => 3, :name => 'my_server')\nserver.wait_for { ready? } # give server time to boot\n\n# DO STUFF\n\nserver.destroy # cleanup after yourself or regret it, trust me\n```\n\n## Models\n\nMany of the collection methods return individual objects, which also provide common methods:\n\n* `destroy` - will destroy the persisted object from the provider\n* `save` - persist the object to the provider\n* `wait_for` - takes a block and waits for either the block to return true for the object or for a timeout (defaults to 10 minutes)\n\n## Mocks\n\nAs you might imagine, testing code using Fog can be slow and expensive, constantly turning on and shutting down instances.\nMocking allows skipping this overhead by providing an in memory representation of resources as you make requests.\nEnabling mocking is easy to use: before you run other commands, simply run:\n\n```ruby\nFog.mock!\n```\n\nThen proceed as usual, if you run into unimplemented mocks, fog will raise an error and as always contributions are welcome!\n\n## Requests\n\nRequests allow you to dive deeper when the models just can't cut it.\nYou can see a list of available requests by calling `#requests` on the connection object.\n\nFor instance, ec2 provides methods related to reserved instances that don't have any models (yet). Here is how you can lookup your reserved instances:\n\n    $ fog\n    >> Compute[:aws].describe_reserved_instances\n    #\u003CExcon::Response [...]>\n\nIt will return an [excon](http:\u002F\u002Fgithub.com\u002Fgeemus\u002Fexcon) response, which has `body`, `headers` and `status`. Both return nice hashes.\n\n## Go forth and conquer\n\nPlay around and use the console to explore or check out [fog.github.io](http:\u002F\u002Ffog.github.io) and the [provider documentation](http:\u002F\u002Ffog.github.io\u002Fabout\u002Fprovider_documentation.html)\nfor more details and examples. Once you are ready to start scripting fog, here is a quick hint on how to make connections without the command line thing to help you.\n\n```ruby\n# create a compute connection\ncompute = Fog::Compute.new(:provider => 'AWS', :aws_access_key_id => ACCESS_KEY_ID, :aws_secret_access_key => SECRET_ACCESS_KEY)\n# compute operations go here\n\n# create a storage connection\nstorage = Fog::Storage.new(:provider => 'AWS', :aws_access_key_id => ACCESS_KEY_ID, :aws_secret_access_key => SECRET_ACCESS_KEY)\n# storage operations go here\n```\n\ngeemus says: \"That should give you everything you need to get started, but let me know if there is anything I can do to help!\"\n\n## Versioning\n\nFog library aims to adhere to [Semantic Versioning 2.0.0][semver], although it does not\naddress challenges of multi-provider libraries. Semantic versioning is only guaranteed for\nthe common API, not any provider-specific extensions.  You may also need to update your\nconfiguration from time to time (even between Fog releases) as providers update or deprecate\nservices.\n\nHowever, we still aim for forwards compatibility within Fog major versions.  As a result of this policy, you can (and\nshould) specify a dependency on this gem using the [Pessimistic Version\nConstraint][pvc] with two digits of precision. For example:\n\n```ruby\nspec.add_dependency 'fog', '~> 1.0'\n```\n\nThis means your project is compatible with Fog 1.0 up until 2.0.  You can also set a higher minimum version:\n\n```ruby\nspec.add_dependency 'fog', '~> 1.16'\n```\n\n[semver]: http:\u002F\u002Fsemver.org\u002F\n[pvc]: http:\u002F\u002Fguides.rubygems.org\u002Fpatterns\u002F\n\n## Getting Help\n\n* [General Documentation](http:\u002F\u002Ffog.github.io).\n* [Provider Specific Documentation](http:\u002F\u002Ffog.github.io\u002Fabout\u002Fprovider_documentation.html).\n* Ask specific questions on [Stack Overflow](http:\u002F\u002Fstackoverflow.com\u002Fquestions\u002Ftagged\u002Ffog)\n* Report bugs and discuss potential features in [Github issues](https:\u002F\u002Fgithub.com\u002Ffog\u002Ffog\u002Fissues).\n\n## Contributing\n\nPlease refer to [CONTRIBUTING.md](https:\u002F\u002Fgithub.com\u002Ffog\u002Ffog\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md).\n\n## License\n\nPlease refer to [LICENSE.md](https:\u002F\u002Fgithub.com\u002Ffog\u002Ffog\u002Fblob\u002Fmaster\u002FLICENSE.md).\n","fog 是一个 Ruby 语言编写的云服务库，旨在简化与不同云服务商的交互。它通过集合提供了一个简化的接口，使得用户可以更轻松地在不同的云之间切换；同时，请求功能允许高级用户充分利用每个云服务的独特特性；模拟功能则让测试和集成变得简单快捷。该项目适合需要跨多个云平台进行操作或希望降低云服务集成复杂性的开发者使用。此外，fog 已经将各个云服务提供商拆分为独立的 metagems，以减少加载时间和依赖项数量，进一步优化了性能。",2,"2026-06-11 03:14:18","top_language"]