attached 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -98,12 +98,15 @@ View:
98
98
 
99
99
  === Aliases
100
100
 
101
+ # app/initializer/attached.rb
102
+ Attached::Attachment.options[:alias] = http://c0378198.cdn2.cloudfiles.rackspacecloud.com
103
+
101
104
  # app/initializer/attached.rb
102
105
  Attached::Attachment.options[:aliases] = %w(
103
- d1kf5um3mxa8kv.cloudfront.net
104
- d3d5wf186mp1rv.cloudfront.net
105
- d2wmfkw6rydl1g.cloudfront.net
106
- d1gqpdc40l7s16.cloudfront.net
106
+ http://d1kf5um3mxa8kv.cloudfront.net/
107
+ http://d3d5wf186mp1rv.cloudfront.net/
108
+ http://d2wmfkw6rydl1g.cloudfront.net/
109
+ http://d1gqpdc40l7s16.cloudfront.net/
107
110
  )
108
111
 
109
112
  == Copyright
@@ -36,7 +36,7 @@ module Attached
36
36
  end
37
37
 
38
38
 
39
- # Access the host (e.g. bucket.s3.amazonaws.com) for a storage service.
39
+ # Access the host (e.g. https://storage.clouddrive.com/container) for a storage service.
40
40
  #
41
41
  # Usage:
42
42
  #
@@ -57,8 +57,8 @@ module Attached
57
57
  def save(file, path)
58
58
  file = File.open(file.path)
59
59
 
60
- directory = connection.directories.get(self.bucket)
61
- directory ||= connection.directories.create(self.permissions.merge(:key => self.bucket))
60
+ directory = connection.directories.get(self.container)
61
+ directory ||= connection.directories.create(self.permissions.merge(:key => self.container))
62
62
 
63
63
  directory.files.create(self.permissions.merge(:body => file, :key => path))
64
64
  end
@@ -71,8 +71,8 @@ module Attached
71
71
  # * path - The path to destroy.
72
72
 
73
73
  def destroy(path)
74
- directory = connection.directories.get(self.bucket)
75
- directory ||= connection.directories.create(self.permissions.merge(:key => self.bucket))
74
+ directory = connection.directories.get(self.container)
75
+ directory ||= connection.directories.create(self.permissions.merge(:key => self.container))
76
76
 
77
77
  file = directory.files.get(path)
78
78
  file.destroy if file
@@ -1,3 +1,3 @@
1
1
  module Attached
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 3
9
- version: 0.2.3
8
+ - 4
9
+ version: 0.2.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Kevin Sylvestre