fog 0.0.88 → 0.0.89

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,8 +7,8 @@ Gem::Specification.new do |s|
7
7
  ## If your rubyforge_project name is different, then edit it and comment out
8
8
  ## the sub! line in the Rakefile
9
9
  s.name = 'fog'
10
- s.version = '0.0.88'
11
- s.date = '2010-05-03'
10
+ s.version = '0.0.89'
11
+ s.date = '2010-05-04'
12
12
  s.rubyforge_project = 'fog'
13
13
 
14
14
  ## Make sure your summary is short. The description may be as long
data/lib/fog.rb CHANGED
@@ -34,7 +34,7 @@ require 'fog/terremark'
34
34
  module Fog
35
35
 
36
36
  unless const_defined?(:VERSION)
37
- VERSION = '0.0.88'
37
+ VERSION = '0.0.89'
38
38
  end
39
39
 
40
40
  module Mock
@@ -8,8 +8,9 @@ module Fog
8
8
  class Directory < Fog::Model
9
9
  extend Fog::Deprecation
10
10
  deprecate(:name, :key)
11
+ deprecate(:name=, :key=)
11
12
 
12
- identity :key, ['Name', 'name', :name]
13
+ identity :key, ['Name', 'name']
13
14
 
14
15
  attribute :creation_date, 'CreationDate'
15
16
 
@@ -19,7 +19,7 @@ module Fog
19
19
  'Action' => 'ModifyImageAttribute',
20
20
  'Attribute' => attribute,
21
21
  'ImageId' => image_id,
22
- 'OperationType' => operation,
22
+ 'OperationType' => operation_type,
23
23
  :parser => Fog::Parsers::AWS::EC2::Basic.new
24
24
  }.merge!(params))
25
25
  end
@@ -28,7 +28,7 @@ module Fog
28
28
 
29
29
  class Mock
30
30
 
31
- def modify_image_attributes(image_id, user_id, options = {})
31
+ def modify_image_attributes(image_id, attribute, operation_type, options = {})
32
32
  raise MockNotImplemented.new("Contributions welcome!")
33
33
  end
34
34
 
@@ -8,7 +8,7 @@ module Fog
8
8
  warning = "[yellow][WARN] #{self} => ##{older} is deprecated, use ##{newer} instead[/]"
9
9
  warning << " [light_black](" << location << ")[/] "
10
10
  Formatador.display_line(warning)
11
- #{newer}(*args)
11
+ send(:#{newer}, *args)
12
12
  end
13
13
  EOS
14
14
  end
@@ -24,14 +24,14 @@ module Fog
24
24
  data = Dir.entries(connection.local_root).select do |entry|
25
25
  entry[0...1] != '.' && ::File.directory?(connection.path_to(entry))
26
26
  end.map do |entry|
27
- {:name => entry}
27
+ {:key => entry}
28
28
  end
29
29
  load(data)
30
30
  end
31
31
 
32
- def get(name)
33
- if ::File.directory?(connection.path_to(name))
34
- new(:name => name)
32
+ def get(key)
33
+ if ::File.directory?(connection.path_to(key))
34
+ new(:key => key)
35
35
  else
36
36
  nil
37
37
  end
@@ -5,11 +5,14 @@ module Fog
5
5
  module Local
6
6
 
7
7
  class Directory < Fog::Model
8
+ extend Fog::Deprecation
9
+ deprecate(:name, :key)
10
+ deprecate(:name=, :key=)
8
11
 
9
- identity :name
12
+ identity :key
10
13
 
11
14
  def destroy
12
- requires :name
15
+ requires :key
13
16
 
14
17
  if ::File.directory?(path)
15
18
  Dir.rmdir(path)
@@ -29,7 +32,7 @@ module Fog
29
32
  end
30
33
 
31
34
  def save
32
- requires :name
35
+ requires :key
33
36
 
34
37
  Dir.mkdir(path)
35
38
  true
@@ -38,7 +41,7 @@ module Fog
38
41
  private
39
42
 
40
43
  def path
41
- connection.path_to(name)
44
+ connection.path_to(key)
42
45
  end
43
46
 
44
47
  end
@@ -49,7 +49,7 @@ module Fog
49
49
  end
50
50
 
51
51
  def path
52
- connection.path_to(::File.join(directory.name, key))
52
+ connection.path_to(::File.join(directory.key, key))
53
53
  end
54
54
 
55
55
  end
@@ -9,8 +9,8 @@ module Fog
9
9
  model Fog::Local::File
10
10
 
11
11
  def all
12
- if directory.collection.get(directory.name)
13
- data = Dir.entries(connection.path_to(directory.name)).select do |key|
12
+ if directory.collection.get(directory.key)
13
+ data = Dir.entries(connection.path_to(directory.key)).select do |key|
14
14
  key[0...1] != '.' && !::File.directory?(connection.path_to(key))
15
15
  end.map do |key|
16
16
  path = file_path(key)
@@ -66,7 +66,7 @@ module Fog
66
66
  end
67
67
 
68
68
  def file_path(key)
69
- connection.path_to(::File.join(directory.name, key))
69
+ connection.path_to(::File.join(directory.key, key))
70
70
  end
71
71
 
72
72
  end
@@ -8,8 +8,9 @@ module Fog
8
8
  class Directory < Fog::Model
9
9
  extend Fog::Deprecation
10
10
  deprecate(:name, :key)
11
+ deprecate(:name=, :key=)
11
12
 
12
- identity :key, ['name', :name]
13
+ identity :key, ['name']
13
14
 
14
15
  attribute :bytes
15
16
  attribute :count
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 88
9
- version: 0.0.88
8
+ - 89
9
+ version: 0.0.89
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-05-03 00:00:00 -07:00
17
+ date: 2010-05-04 00:00:00 -07:00
18
18
  default_executable: fog
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency