GitXplorerGitXplorer
j

fog-external

public
2 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
aabe0aff59600abb52827fe9268674bbd6cb51c3

fix spec concerning #head

jjonasschneider committed 13 years ago
Unverified
76ae8e17b9169f18f40873a1c2e2e0e833517466

bump

jjonasschneider committed 13 years ago
Unverified
f51522b3fdca14d9be60478c1002014bfb0c89da

fix nil responses for get_file

jjonasschneider committed 13 years ago
Unverified
034e839a5f872fd42003bc263b409b450d62718f

bump version

jjonasschneider committed 13 years ago
Unverified
ec3b01d5d6c5c26ad9023222357c2827e4ece6ff

work bertrpc stuff into main libs

jjonasschneider committed 13 years ago
Unverified
1985f219bc8d24f3c31d930c695e38fc616565ad

put pidfile into /tmp

jjonasschneider committed 13 years ago

README

The README file for this repository.

Fog-External

With fog-external, you can use arbitrary Ruby objects as backend for Fog::Storage. This can mean a custom-written local-storage backend, or, without any more configuration, a BERT-RPC (or any other RPC implementation) remote call.

Installation

gem install fog-external

Usage

require 'fog/external/storage'

storage = Fog::Storage.new({
  :provider   => 'External',
  :delegate   => BERTRPC::Service.new('localhost', 9999).call.fog
})

You can then use storage just like any other Fog::Storage object, see the Fog docs for what's possible.. The API is compatible to the one of Fog::Local.

The delegate must respond to a number of backend methods. The delegate in the above-example uses BERT-RPC to call a server on localhost:9999, using the fog module name. See examples/example.rb for a complete example including a Ernie-powered BERT-RPC backend.

Copyright

(The MIT License)

Copyright © 2011 Jonas Schneider

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.