sumodev_deploy 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -2,15 +2,18 @@ Capistrano::Configuration.instance.load do
|
|
2
2
|
namespace :assets do
|
3
3
|
desc "Compile and upload the CSS files"
|
4
4
|
task :precompile do
|
5
|
+
require 'compass'
|
6
|
+
|
5
7
|
compass_folders = fetch(:compass_folders, Dir.glob('**/config.rb'))
|
6
8
|
asset_path = fetch(:asset_cache_dir, Dir.pwd + "/cache/cached_assets")
|
7
9
|
output_style = fetch(:compass_output, :compressed)
|
8
10
|
|
9
11
|
compass_folders.each do |config|
|
10
12
|
path = File.dirname(config)
|
13
|
+
Compass.add_project_configuration(config)
|
11
14
|
|
12
15
|
run_locally "rm -rf #{asset_path} && mkdir -p #{asset_path}" # Cleanup
|
13
|
-
run_locally "cd #{path} && compass clean --css-dir #{asset_path}
|
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}"
|
14
17
|
|
15
18
|
assets = Dir.glob(asset_path + '/*/*').map {|f| [f, f.gsub(asset_path, '')] }
|
16
19
|
sprites = Dir.glob(path + "/images/**/*").grep(/-[0-9a-z]{11}.(png|jpg)/).map {|f| [f, f.gsub(path, '')] }
|
@@ -20,6 +23,7 @@ Capistrano::Configuration.instance.load do
|
|
20
23
|
end
|
21
24
|
|
22
25
|
run_locally "rm -rf #{asset_path}"
|
26
|
+
Compass.reset_configuration!
|
23
27
|
end
|
24
28
|
end
|
25
29
|
end
|
@@ -9,6 +9,7 @@ Capistrano::Configuration.instance.load do
|
|
9
9
|
task :update_api_key, :roles => :app do
|
10
10
|
next if fetch(:production_errbit_api_key, "").empty?
|
11
11
|
run "if [ -f #{shared_path}/config/library/globals.php ]; then sed -i \"s/define('ERRBIT_API_KEY', '.*');/define('ERRBIT_API_KEY', '#{production_errbit_api_key}');/\" #{shared_path}/config/library/globals.php; fi"
|
12
|
+
run "if [ -f #{shared_path}/config/parameters.yml ]; then sed -i \"s/sumo.errbit_api_key:.*/sumo.errbit_api_key: #{production_errbit_api_key}/\" #{shared_path}/config/parameters.yml; fi"
|
12
13
|
end
|
13
14
|
desc "Notify Errbit about a dqeploy"
|
14
15
|
task :notify, :roles => :app do
|
data/sumodev_deploy.gemspec
CHANGED