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 +7 -4
- data/lib/attached/storage/rackspace.rb +5 -5
- data/lib/attached/version.rb +1 -1
- metadata +2 -2
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.
|
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.
|
61
|
-
directory ||= connection.directories.create(self.permissions.merge(:key => self.
|
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.
|
75
|
-
directory ||= connection.directories.create(self.permissions.merge(:key => self.
|
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
|
data/lib/attached/version.rb
CHANGED