fog 0.0.62 → 0.0.63

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 0
4
- :patch: 62
4
+ :patch: 63
5
5
  :build:
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{fog}
8
- s.version = "0.0.62"
8
+ s.version = "0.0.63"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["geemus (Wesley Beary)"]
12
- s.date = %q{2010-03-30}
12
+ s.date = %q{2010-03-31}
13
13
  s.default_executable = %q{fog}
14
14
  s.description = %q{brings clouds to you}
15
15
  s.email = %q{geemus@gmail.com}
@@ -6,7 +6,7 @@ module Fog
6
6
 
7
7
  class Server < Fog::Model
8
8
 
9
- identity :id, 'instanceId'
9
+ identity :id, 'instanceId'
10
10
 
11
11
  attribute :architecture
12
12
  attribute :ami_launch_index, 'amiLaunchIndex'
@@ -18,8 +18,8 @@ module Fog
18
18
  attribute :storage_class, 'StorageClass'
19
19
 
20
20
  def body
21
- @body ||= if last_modified
22
- collection.get(identity).body
21
+ @body ||= if last_modified && (file = collection.get(identity))
22
+ file.body
23
23
  else
24
24
  ''
25
25
  end
@@ -16,6 +16,13 @@ module Fog
16
16
  model Fog::AWS::S3::File
17
17
 
18
18
  def all(options = {})
19
+ options = {
20
+ 'delimiter' => @delimiter,
21
+ 'marker' => @marker,
22
+ 'max-keys' => @max_keys,
23
+ 'prefix' => @prefix
24
+ }.merge!(options)
25
+ options = options.reject {|key,value| value.nil? || value.to_s.empty?}
19
26
  merge_attributes(options)
20
27
  parent = directory.collection.get(
21
28
  directory.name,
@@ -33,13 +40,6 @@ module Fog
33
40
  end
34
41
 
35
42
  def get(key, options = {}, &block)
36
- options = {
37
- 'delimiter' => @delimiter,
38
- 'marker' => @marker,
39
- 'max-keys' => @max_keys,
40
- 'prefix' => @prefix
41
- }.merge!(options)
42
- options = options.reject {|key,value| value.nil? || value.to_s.empty?}
43
43
  data = connection.get_object(directory.name, key, options, &block)
44
44
  file_data = {
45
45
  :body => data.body,
@@ -74,14 +74,14 @@ module Fog
74
74
  instance_set.each do |instance|
75
75
  case instance['instanceState']['name']
76
76
  when 'pending'
77
- if Time.now - instance['launchTime'] > 2
78
- instance['instanceState'] = { :code => 16, :name => 'running' }
77
+ if Time.now - instance['launchTime'] > 1
78
+ instance['instanceState'] = { 'code' => 16, 'name' => 'running' }
79
79
  end
80
80
  when 'rebooting'
81
- instance['instanceState'] = { :code => 16, :name => 'running' }
81
+ instance['instanceState'] = { 'code' => 16, 'name' => 'running' }
82
82
  when 'shutting-down'
83
83
  if Time.now - @data[:deleted_at][instance['instanceId']] > 2
84
- instance['instanceState'] = { :code => 16, :name => 'terminating' }
84
+ instance['instanceState'] = { 'code' => 16, 'name' => 'terminating' }
85
85
  end
86
86
  when 'terminating'
87
87
  if Time.now - @data[:deleted_at][instance['instanceId']] > 4
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 62
9
- version: 0.0.62
8
+ - 63
9
+ version: 0.0.63
10
10
  platform: ruby
11
11
  authors:
12
12
  - geemus (Wesley Beary)
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-30 00:00:00 -07:00
17
+ date: 2010-03-31 00:00:00 -07:00
18
18
  default_executable: fog
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency