fog 0.0.34 → 0.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.34
1
+ 0.0.35
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{fog}
8
- s.version = "0.0.34"
8
+ s.version = "0.0.35"
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)"]
@@ -7,7 +7,6 @@ module Fog
7
7
  identity :name, 'Name'
8
8
 
9
9
  attribute :creation_date, 'CreationDate'
10
- attribute :owner
11
10
 
12
11
  def destroy
13
12
  requires :name
@@ -16,11 +16,7 @@ module Fog
16
16
  data['Buckets'].each do |bucket|
17
17
  buckets << Fog::AWS::S3::Bucket.new({
18
18
  :collection => buckets,
19
- :connection => connection,
20
- :owner => {
21
- :display_name => owner['DisplayName'],
22
- :id => owner['ID']
23
- }
19
+ :connection => connection
24
20
  }.merge!(bucket))
25
21
  end
26
22
  buckets
@@ -47,11 +43,7 @@ module Fog
47
43
  bucket.objects << Fog::AWS::S3::Object.new({
48
44
  :bucket => bucket,
49
45
  :connection => connection,
50
- :collection => bucket.objects,
51
- :owner => {
52
- :display_name => owner['DisplayName'],
53
- :id => owner['ID']
54
- }
46
+ :collection => bucket.objects
55
47
  }.merge!(object))
56
48
  end
57
49
  bucket
@@ -11,7 +11,7 @@ module Fog
11
11
  attribute :content_type, 'Content-Type'
12
12
  attribute :etag, ['Etag', 'ETag']
13
13
  attribute :last_modified, ['Last-Modified', 'LastModified']
14
- attribute :owner
14
+ attribute :owner, 'Owner'
15
15
  attribute :size, 'Size'
16
16
  attribute :storage_class, 'StorageClass'
17
17
 
@@ -42,6 +42,15 @@ module Fog
42
42
  true
43
43
  end
44
44
 
45
+ def owner=(new_owner)
46
+ if new_owner
47
+ @owner = {
48
+ :display_name => new_owner['DisplayName'],
49
+ :id => new_owner['ID']
50
+ }
51
+ end
52
+ end
53
+
45
54
  def save(options = {})
46
55
  requires :body, :bucket, :key
47
56
  data = connection.put_object(bucket.name, @key, @body, options)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.34
4
+ version: 0.0.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - geemus (Wesley Beary)