sumodev_deploy 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 249964d237ea0119d27949056e42dd7a5f388051
4
- data.tar.gz: 9a6e09b71373c47ad0c2e6d3c0f52ecf5a3511cd
3
+ metadata.gz: c56190b60427c229c251d3107b67870bfd76b096
4
+ data.tar.gz: 6361cff6120e976caa2ff65a0b43c22d1f2e6ea5
5
5
  SHA512:
6
- metadata.gz: 848d4d058e86d3b099eee1b3f52068d980ed89763fba5b3f2dfda542fd42b869941910106f3ccbcdcfbabcc8fd0dcd929f8de744e3d6c92cd163265b238c586e
7
- data.tar.gz: 0afc9e2f2cdc43f2dcf7aec70c6a35e19a4ea490bf4f47885a73bc53ee4526be3af1ff213ef6d1b2a0beebb9b84893e952ef18084a29e939ecfbf1eaf353113d
6
+ metadata.gz: f68798cc73273266f02e7daa76100cc4826b7723779f6b500a37187dfd4ce95b371a51681e8561433e5db8612a22f46603b76d54b343143d87c3da28ac1cd90f
7
+ data.tar.gz: 54a8d779bb249382d3b054417f168bce761be40247957649d76e1b44b52a9cd4b2675f0c4c47999996831dfb0b2c7e4738291b4c41da4275d65c374c180fdfed
@@ -18,6 +18,11 @@ Capistrano::Configuration.instance.load do
18
18
  upload "./src/Frontend/Themes/#{theme}/Core", "#{latest_release.shellescape}/src/Frontend/Themes/#{theme}/Core"
19
19
  else
20
20
  logger.important "No Gruntfile.coffee or gulpfile.js found"
21
+
22
+ compass_folders = fetch(:compass_folders, Dir.glob('**/config.rb'))
23
+ if not compass_folders.empty?
24
+ assets.compile_with_compass
25
+ end
21
26
  end
22
27
  if File.exists?("package.json")
23
28
  run_locally "rm -rf temporary_node_modules && mkdir temporary_node_modules && cp package.json temporary_node_modules && cd temporary_node_modules && npm install --production"
@@ -25,5 +30,43 @@ Capistrano::Configuration.instance.load do
25
30
  run_locally "rm -rf temporary_node_modules"
26
31
  end
27
32
  end
33
+
34
+ desc "Compass compile"
35
+ task :compile_with_compass do
36
+ require 'compass'
37
+
38
+ compass = fetch(:compass_command) do
39
+ if File.exists?("Gemfile.lock")
40
+ "bundle exec compass"
41
+ else
42
+ "compass"
43
+ end
44
+ end
45
+ compass_folders = fetch(:compass_folders, Dir.glob('**/config.rb'))
46
+ asset_path = fetch(:asset_cache_dir, Dir.pwd + "/cache/cached_assets")
47
+ output_style = fetch(:compass_output, :compressed)
48
+
49
+ compass_folders.each do |config|
50
+ path = File.dirname(config)
51
+ Compass.add_project_configuration(config)
52
+
53
+ run_locally "rm -rf #{asset_path} && mkdir -p #{asset_path}" # Cleanup
54
+ run_locally "cd #{path} && #{compass} clean --css-dir #{asset_path}/#{Compass.configuration.css_dir}"
55
+ run_locally "cd #{path} && #{compass} compile -s #{output_style} --css-dir #{asset_path}/#{Compass.configuration.css_dir}"
56
+
57
+ assets = Dir.glob(asset_path + '/**/*').map {|f| [f, f.gsub(asset_path, '')] }
58
+ sprites = Dir.glob(path + "/images/**/*").grep(/-[0-9a-z]{11}.(png|jpg)/).map {|f| [f, f.gsub(path, '')] }
59
+
60
+ (assets + sprites).each do |file, filepath|
61
+ if File.directory?(file)
62
+ run "mkdir -p #{latest_release.shellescape}/#{path}/#{filepath}"
63
+ else
64
+ upload file, "#{latest_release.shellescape}/#{path}#{filepath}"
65
+ end
66
+ end
67
+
68
+ run_locally "rm -rf #{asset_path}"
69
+ Compass.reset_configuration!
70
+ end end
28
71
  end
29
72
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "sumodev_deploy"
5
- s.version = "0.9.1"
5
+ s.version = "0.9.2"
6
6
 
7
7
  s.authors = ["Jan De Poorter"]
8
8
  s.date = "2012-04-18"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sumodev_deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan De Poorter