cloudfiles 1.4.14 → 1.4.15

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ ================================================================================
2
+ 1.4.15 (2011/03/09)
3
+ ================================================================================
4
+ o Added CDN SSL URL stuff
5
+
1
6
  ================================================================================
2
7
  1.4.14 (2011/02/24)
3
8
  ================================================================================
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.14
1
+ 1.4.15
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cloudfiles}
8
- s.version = "1.4.14"
8
+ s.version = "1.4.15"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["H. Wade Minter", "Rackspace Hosting"]
12
- s.date = %q{2011-03-04}
12
+ s.date = %q{2011-03-10}
13
13
  s.description = %q{A Ruby version of the Rackspace Cloud Files API.}
14
14
  s.email = %q{minter@lunenburg.org}
15
15
  s.extra_rdoc_files = [
@@ -64,6 +64,7 @@ module CloudFiles
64
64
  :cdn_enabled => cdn_enabled,
65
65
  :cdn_ttl => cdn_enabled ? response["x-ttl"].to_i : nil,
66
66
  :cdn_url => cdn_enabled ? response["x-cdn-uri"] : nil,
67
+ :cdn_ssl_url => cdn_enabled ? response["x-cdn-ssl-uri"] : nil,
67
68
  :user_agent_acl => response["x-user-agent-acl"],
68
69
  :referrer_acl => response["x-referrer-acl"],
69
70
  :cdn_log => (cdn_enabled and response["x-log-retention"] == "True") ? true : false
@@ -101,11 +102,16 @@ module CloudFiles
101
102
  self.cdn_metadata[:cdn_ttl]
102
103
  end
103
104
 
104
- # CDN container URL (if container if public)
105
+ # CDN container URL (if container is public)
105
106
  def cdn_url
106
107
  self.cdn_metadata[:cdn_url]
107
108
  end
108
109
 
110
+ # CDN SSL container URL (if container is public)
111
+ def cdn_ssl_url
112
+ self.cdn_metadata[:cdn_ssl_url]
113
+ end
114
+
109
115
  # The container ACL on the User Agent
110
116
  def user_agent_acl
111
117
  self.cdn_metadata[:user_agent_acl]
@@ -283,6 +283,18 @@ module CloudFiles
283
283
  def public_url
284
284
  self.container.public? ? self.container.cdn_url + "/#{CloudFiles.escape @name, '/'}" : nil
285
285
  end
286
+
287
+ # If the parent container is public (CDN-enabled), returns the SSL CDN URL to this object. Otherwise, return nil
288
+ #
289
+ # public_object.public_ssl_url
290
+ # => "https://c61.ssl.cf0.rackcdn.com/myfile.jpg"
291
+ #
292
+ # private_object.public_ssl_url
293
+ # => nil
294
+ def public_ssl_url
295
+ self.container.public? ? self.container.cdn_ssl_url + "/#{CloudFiles.escape @name, '/'}" : nil
296
+ end
297
+
286
298
 
287
299
  # Copy this object to a new location (optionally in a new container)
288
300
  #
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudfiles
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 4
9
- - 14
10
- version: 1.4.14
9
+ - 15
10
+ version: 1.4.15
11
11
  platform: ruby
12
12
  authors:
13
13
  - H. Wade Minter
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-03-04 00:00:00 -05:00
19
+ date: 2011-03-10 00:00:00 -05:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency