asset_sync 0.2.9 → 0.2.10
Sign up to get free protection for your applications and to get access to all the features.
- data/asset_sync.gemspec +1 -1
- data/lib/asset_sync/asset_sync.rb +7 -1
- data/lib/asset_sync/config.rb +8 -2
- data/lib/asset_sync/version.rb +1 -1
- data/lib/tasks/asset_sync.rake +1 -0
- data/spec/asset_sync_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -0
- metadata +65 -69
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 = "2012-
|
9
|
+
s.date = "2012-02-16"
|
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"]
|
@@ -22,13 +22,19 @@ module AssetSync
|
|
22
22
|
|
23
23
|
def sync
|
24
24
|
if config.fail_silently?
|
25
|
-
|
25
|
+
self.log config.errors.full_messages.join(', ') unless config && config.valid?
|
26
26
|
else
|
27
27
|
raise Config::Invalid.new(config.errors.full_messages.join(', ')) unless config && config.valid?
|
28
28
|
end
|
29
29
|
self.storage.sync if config && config.valid?
|
30
30
|
end
|
31
31
|
|
32
|
+
private
|
33
|
+
|
34
|
+
def log(msg)
|
35
|
+
STDERR.puts msg
|
36
|
+
end
|
37
|
+
|
32
38
|
end
|
33
39
|
|
34
40
|
end
|
data/lib/asset_sync/config.rb
CHANGED
@@ -41,8 +41,9 @@ module AssetSync
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def manifest_path
|
44
|
-
|
45
|
-
|
44
|
+
directory =
|
45
|
+
Rails.application.config.assets.manifest || default_manifest_directory
|
46
|
+
"#{directory}/manifest.yml"
|
46
47
|
end
|
47
48
|
|
48
49
|
def gzip?
|
@@ -133,5 +134,10 @@ module AssetSync
|
|
133
134
|
return options
|
134
135
|
end
|
135
136
|
|
137
|
+
private
|
138
|
+
|
139
|
+
def default_manifest_directory
|
140
|
+
File.join(Rails.root, 'public', assets_prefix)
|
141
|
+
end
|
136
142
|
end
|
137
143
|
end
|
data/lib/asset_sync/version.rb
CHANGED
data/lib/tasks/asset_sync.rake
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# Rails 3.2 compatibility
|
2
2
|
if Rails.application.config.assets.digest
|
3
3
|
Rake::Task["assets:precompile:nondigest"].enhance do
|
4
|
+
Rake::Task["assets:environment"].invoke if Rake::Task.task_defined?("assets:environment")
|
4
5
|
AssetSync.sync
|
5
6
|
end
|
6
7
|
# Rails 3.1.x compatibility
|
data/spec/asset_sync_spec.rb
CHANGED
@@ -138,7 +138,7 @@ describe AssetSync do
|
|
138
138
|
end
|
139
139
|
|
140
140
|
it "config.manifest_path should default to public/assets.." do
|
141
|
-
Rails.application.config.assets.manifest = "/var/assets
|
141
|
+
Rails.application.config.assets.manifest = "/var/assets"
|
142
142
|
AssetSync.config.manifest_path.should == "/var/assets/manifest.yml"
|
143
143
|
end
|
144
144
|
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,86 +1,83 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: asset_sync
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.10
|
4
5
|
prerelease:
|
5
|
-
version: 0.2.9
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Simon Hamilton
|
9
9
|
- David Rice
|
10
10
|
- Phil McClure
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
- !ruby/object:Gem::Dependency
|
14
|
+
date: 2012-02-16 00:00:00.000000000Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
18
17
|
name: fog
|
19
|
-
|
20
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
18
|
+
requirement: &70301574351660 !ruby/object:Gem::Requirement
|
21
19
|
none: false
|
22
|
-
requirements:
|
23
|
-
- -
|
24
|
-
- !ruby/object:Gem::Version
|
25
|
-
version:
|
20
|
+
requirements:
|
21
|
+
- - ! '>='
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: '0'
|
26
24
|
type: :runtime
|
27
|
-
version_requirements: *id001
|
28
|
-
- !ruby/object:Gem::Dependency
|
29
|
-
name: activemodel
|
30
25
|
prerelease: false
|
31
|
-
|
26
|
+
version_requirements: *70301574351660
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activemodel
|
29
|
+
requirement: &70301574350960 !ruby/object:Gem::Requirement
|
32
30
|
none: false
|
33
|
-
requirements:
|
34
|
-
- -
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version:
|
31
|
+
requirements:
|
32
|
+
- - ! '>='
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
37
35
|
type: :runtime
|
38
|
-
version_requirements: *id002
|
39
|
-
- !ruby/object:Gem::Dependency
|
40
|
-
name: rspec
|
41
36
|
prerelease: false
|
42
|
-
|
37
|
+
version_requirements: *70301574350960
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
name: rspec
|
40
|
+
requirement: &70301574349740 !ruby/object:Gem::Requirement
|
43
41
|
none: false
|
44
|
-
requirements:
|
45
|
-
- -
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version:
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
48
46
|
type: :development
|
49
|
-
version_requirements: *id003
|
50
|
-
- !ruby/object:Gem::Dependency
|
51
|
-
name: bundler
|
52
47
|
prerelease: false
|
53
|
-
|
48
|
+
version_requirements: *70301574349740
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: bundler
|
51
|
+
requirement: &70301574348040 !ruby/object:Gem::Requirement
|
54
52
|
none: false
|
55
|
-
requirements:
|
56
|
-
- -
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
version:
|
53
|
+
requirements:
|
54
|
+
- - ! '>='
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
59
57
|
type: :development
|
60
|
-
version_requirements: *id004
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: jeweler
|
63
58
|
prerelease: false
|
64
|
-
|
59
|
+
version_requirements: *70301574348040
|
60
|
+
- !ruby/object:Gem::Dependency
|
61
|
+
name: jeweler
|
62
|
+
requirement: &70301574346200 !ruby/object:Gem::Requirement
|
65
63
|
none: false
|
66
|
-
requirements:
|
67
|
-
- -
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version:
|
64
|
+
requirements:
|
65
|
+
- - ! '>='
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
70
68
|
type: :development
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: *70301574346200
|
71
|
+
description: After you run assets:precompile your compiled assets will be synchronised
|
72
|
+
with your S3 bucket.
|
73
|
+
email:
|
74
74
|
- shamilton@rumblelabs.com
|
75
75
|
- me@davidjrice.co.uk
|
76
76
|
- pmcclure@rumblelabs.com
|
77
77
|
executables: []
|
78
|
-
|
79
78
|
extensions: []
|
80
|
-
|
81
79
|
extra_rdoc_files: []
|
82
|
-
|
83
|
-
files:
|
80
|
+
files:
|
84
81
|
- .gitignore
|
85
82
|
- Gemfile
|
86
83
|
- README.md
|
@@ -104,34 +101,33 @@ files:
|
|
104
101
|
- spec/spec_helper.rb
|
105
102
|
homepage: https://github.com/rumblelabs/asset_sync
|
106
103
|
licenses: []
|
107
|
-
|
108
104
|
post_install_message:
|
109
105
|
rdoc_options: []
|
110
|
-
|
111
|
-
require_paths:
|
106
|
+
require_paths:
|
112
107
|
- lib
|
113
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
108
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
114
109
|
none: false
|
115
|
-
requirements:
|
116
|
-
- -
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
version:
|
119
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - ! '>='
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: '0'
|
114
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
115
|
none: false
|
121
|
-
requirements:
|
122
|
-
- -
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version:
|
116
|
+
requirements:
|
117
|
+
- - ! '>='
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
125
120
|
requirements: []
|
126
|
-
|
127
121
|
rubyforge_project: asset_sync
|
128
122
|
rubygems_version: 1.8.10
|
129
123
|
signing_key:
|
130
124
|
specification_version: 3
|
131
|
-
summary: Synchronises Assets in a Rails 3 application and Amazon S3/Cloudfront and
|
132
|
-
|
125
|
+
summary: Synchronises Assets in a Rails 3 application and Amazon S3/Cloudfront and
|
126
|
+
Rackspace Cloudfiles
|
127
|
+
test_files:
|
133
128
|
- spec/asset_sync_spec.rb
|
134
129
|
- spec/aws_with_yml/config/asset_sync.yml
|
135
130
|
- spec/rackspace_spec.rb
|
136
131
|
- spec/rackspace_with_yml/config/asset_sync.yml
|
137
132
|
- spec/spec_helper.rb
|
133
|
+
has_rdoc:
|