Skip to content

Commit

Permalink
Add gogrid idiosyncracies with reloading data
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Carlson authored and geemus committed Jan 26, 2011
1 parent d94e1d5 commit 5d5c87d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fog.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
15 changes: 14 additions & 1 deletion lib/fog/compute/models/go_grid/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,20 @@ def image
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
Expand Down

0 comments on commit 5d5c87d

Please sign in to comment.