mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Add gogrid idiosyncracies with reloading data
This commit is contained in:
parent
d94e1d5481
commit
5d5c87d1ed
2 changed files with 15 additions and 2 deletions
|
@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|||
## If your rubyforge_project name is different, then edit it and comment out
|
||||
## the sub! line in the Rakefile
|
||||
s.name = 'phpfog-fog'
|
||||
s.version = '0.4.1.2'
|
||||
s.version = '0.4.1.3'
|
||||
s.date = '2011-01-21'
|
||||
s.rubyforge_project = 'fog'
|
||||
|
||||
|
|
|
@ -34,7 +34,20 @@ module Fog
|
|||
end
|
||||
|
||||
def ready?
|
||||
@state == 'On'
|
||||
@state && @state["name"] == 'On'
|
||||
end
|
||||
|
||||
def reload
|
||||
requires :name
|
||||
begin
|
||||
if data = collection.get(name)
|
||||
new_attributes = data.attributes
|
||||
merge_attributes(new_attributes)
|
||||
self
|
||||
end
|
||||
rescue Excon::Errors::BadRequest
|
||||
false
|
||||
end
|
||||
end
|
||||
|
||||
def save
|
||||
|
|
Loading…
Add table
Reference in a new issue