sumodev_deploy 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sumodev_deploy/tasks/assets.rb +14 -3
- data/sumodev_deploy.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab652bf83156b26445a928ddaa0195f631422458
|
4
|
+
data.tar.gz: 62a199b85cb9a5f0f3c3caddd7076a5290d0da15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d302aff0c3018e4c3cca23e0d0ab8ae16f8888c26c5fb5afcd3abb0aa4c86b220f3fb3d46f3f7ce3e5a35e9d8db2800264c18c78ad590b29bbcde946d9bd2af
|
7
|
+
data.tar.gz: ebf8a37ac3749b85d722fe48d32230e7438f09787018d1a3cea69f261934007899c39fcc85fce81ae6fe101f99e8dffd533294b4a5cb57b3915e3faa39716fe4
|
@@ -4,6 +4,13 @@ Capistrano::Configuration.instance.load do
|
|
4
4
|
task :precompile do
|
5
5
|
require 'compass'
|
6
6
|
|
7
|
+
compass = fetch(:compass_command) do
|
8
|
+
if File.exists?("Gemfile.lock")
|
9
|
+
"bundle exec compass"
|
10
|
+
else
|
11
|
+
"compass"
|
12
|
+
end
|
13
|
+
end
|
7
14
|
compass_folders = fetch(:compass_folders, Dir.glob('**/config.rb'))
|
8
15
|
asset_path = fetch(:asset_cache_dir, Dir.pwd + "/cache/cached_assets")
|
9
16
|
output_style = fetch(:compass_output, :compressed)
|
@@ -13,13 +20,17 @@ Capistrano::Configuration.instance.load do
|
|
13
20
|
Compass.add_project_configuration(config)
|
14
21
|
|
15
22
|
run_locally "rm -rf #{asset_path} && mkdir -p #{asset_path}" # Cleanup
|
16
|
-
run_locally "cd #{path} && compass clean --css-dir #{asset_path}/#{Compass.configuration.css_dir} && compass compile -s #{output_style} --css-dir #{asset_path}/#{Compass.configuration.css_dir}"
|
23
|
+
run_locally "cd #{path} && #{compass} clean --css-dir #{asset_path}/#{Compass.configuration.css_dir} && #{compass} compile -s #{output_style} --css-dir #{asset_path}/#{Compass.configuration.css_dir}"
|
17
24
|
|
18
|
-
assets = Dir.glob(asset_path + '
|
25
|
+
assets = Dir.glob(asset_path + '/**/*').map {|f| [f, f.gsub(asset_path, '')] }
|
19
26
|
sprites = Dir.glob(path + "/images/**/*").grep(/-[0-9a-z]{11}.(png|jpg)/).map {|f| [f, f.gsub(path, '')] }
|
20
27
|
|
21
28
|
(assets + sprites).each do |file, filepath|
|
22
|
-
|
29
|
+
if File.directory?(file)
|
30
|
+
run "mkdir -p #{latest_release.shellescape}/#{path}/#{filepath}"
|
31
|
+
else
|
32
|
+
upload file, "#{latest_release.shellescape}/#{path}#{filepath}"
|
33
|
+
end
|
23
34
|
end
|
24
35
|
|
25
36
|
run_locally "rm -rf #{asset_path}"
|
data/sumodev_deploy.gemspec
CHANGED