asset_sync 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
data/README.md
CHANGED
@@ -184,6 +184,10 @@ Or add to a traditional unix system
|
|
184
184
|
* **rackspace\_username**: your Rackspace username
|
185
185
|
* **rackspace\_api\_key**: your Rackspace API Key.
|
186
186
|
|
187
|
+
#### Rackspace Optional
|
188
|
+
|
189
|
+
* **rackspace\_auth\_url**: Rackspace auth URL, for Rackspace London use: lon.auth.api.rackspacecloud.com
|
190
|
+
|
187
191
|
## Amazon S3 Multiple Region Support
|
188
192
|
|
189
193
|
If you are using anything other than the US buckets with S3 then you'll want to set the **region**. For example with an EU bucket you could set the following with YAML.
|
data/asset_sync.gemspec
CHANGED
@@ -6,7 +6,7 @@ require "asset_sync/version"
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "asset_sync"
|
8
8
|
s.version = AssetSync::VERSION
|
9
|
-
s.date = "2011-
|
9
|
+
s.date = "2011-12-06"
|
10
10
|
s.platform = Gem::Platform::RUBY
|
11
11
|
s.authors = ["Simon Hamilton", "David Rice", "Phil McClure"]
|
12
12
|
s.email = ["shamilton@rumblelabs.com", "me@davidjrice.co.uk", "pmcclure@rumblelabs.com"]
|
data/lib/asset_sync/config.rb
CHANGED
@@ -19,7 +19,7 @@ module AssetSync
|
|
19
19
|
attr_accessor :aws_access_key_id, :aws_secret_access_key
|
20
20
|
|
21
21
|
# Rackspace
|
22
|
-
attr_accessor :rackspace_username, :rackspace_api_key
|
22
|
+
attr_accessor :rackspace_username, :rackspace_api_key, :rackspace_auth_url
|
23
23
|
|
24
24
|
validates :existing_remote_files, :inclusion => { :in => %w(keep delete) }
|
25
25
|
|
@@ -84,6 +84,7 @@ module AssetSync
|
|
84
84
|
self.aws_access_key_id = yml["aws_access_key_id"]
|
85
85
|
self.aws_secret_access_key = yml["aws_secret_access_key"]
|
86
86
|
self.rackspace_username = yml["rackspace_username"]
|
87
|
+
self.rackspace_auth_url = yml["rackspace_auth_url"] if yml.has_key?("rackspace_auth_url")
|
87
88
|
self.rackspace_api_key = yml["rackspace_api_key"]
|
88
89
|
self.existing_remote_files = yml["existing_remote_files"] if yml.has_key?("existing_remote_files")
|
89
90
|
self.gzip_compression = yml["gzip_compression"] if yml.has_key?("gzip_compression")
|
@@ -116,6 +117,9 @@ module AssetSync
|
|
116
117
|
:rackspace_username => rackspace_username,
|
117
118
|
:rackspace_api_key => rackspace_api_key
|
118
119
|
})
|
120
|
+
|
121
|
+
options.merge!({ :rackspace_auth_url => rackspace_auth_url }) if rackspace_auth_url
|
122
|
+
|
119
123
|
else
|
120
124
|
raise ArgumentError, "AssetSync Unknown provider: #{fog_provider} only AWS and Rackspace are supported currently."
|
121
125
|
end
|
data/lib/asset_sync/version.rb
CHANGED
@@ -7,6 +7,9 @@ AssetSync.configure do |config|
|
|
7
7
|
config.fog_provider = 'Rackspace'
|
8
8
|
config.rackspace_username = ENV['RACKSPACE_USERNAME']
|
9
9
|
config.rackspace_api_key = ENV['RACKSPACE_API_KEY']
|
10
|
+
|
11
|
+
# if you need to change rackspace_auth_url (e.g. if you need to use Rackspace London)
|
12
|
+
# config.rackspace_auth_url = "lon.auth.api.rackspacecloud.com"
|
10
13
|
<%- end -%>
|
11
14
|
config.fog_directory = ENV['FOG_DIRECTORY']
|
12
15
|
|
@@ -7,6 +7,8 @@ defaults: &defaults
|
|
7
7
|
fog_provider: 'Rackspace'
|
8
8
|
rackspace_username: "<%= rackspace_username %>"
|
9
9
|
rackspace_api_key: "<%= rackspace_api_key %>"
|
10
|
+
# if you need to change rackspace_auth_url (e.g. if you need to use Rackspace London)
|
11
|
+
# rackspace_auth_url: "lon.auth.api.rackspacecloud.com"
|
10
12
|
<%- end -%>
|
11
13
|
fog_directory: "<%= app_name %>-assets"
|
12
14
|
# You may need to specify what region your storage bucket is in
|
data/spec/rackspace_spec.rb
CHANGED
@@ -16,7 +16,7 @@ describe AssetSync, 'using Rackspace with initializer' do
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
it "should configure provider as
|
19
|
+
it "should configure provider as Rackspace" do
|
20
20
|
AssetSync.config.fog_provider.should == 'Rackspace'
|
21
21
|
AssetSync.config.should be_rackspace
|
22
22
|
end
|
@@ -45,6 +45,14 @@ describe AssetSync, 'using Rackspace with initializer' do
|
|
45
45
|
AssetSync.config.existing_remote_files.should == "keep"
|
46
46
|
end
|
47
47
|
|
48
|
+
it "should configure existing_remote_files" do
|
49
|
+
AssetSync.config.existing_remote_files.should == "keep"
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should default rackspace_auth_url to false" do
|
53
|
+
AssetSync.config.rackspace_auth_url.should be_false
|
54
|
+
end
|
55
|
+
|
48
56
|
end
|
49
57
|
|
50
58
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: asset_sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.2.
|
5
|
+
version: 0.2.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Simon Hamilton
|
@@ -12,7 +12,7 @@ autorequire:
|
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
14
|
|
15
|
-
date: 2011-
|
15
|
+
date: 2011-12-06 00:00:00 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: fog
|