sumodev_deploy 0.5.4 → 0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 38dd5a64b8dd200472b4d6341211939a5ce56ee4
4
- data.tar.gz: 71de1729f0b69dc2dc34da9a36b59ff2e006a7ae
3
+ metadata.gz: 11088724c588a8ad5948447e2c562089ffffdd72
4
+ data.tar.gz: cbe5dbb6134e2d3f637eed55db8d96746ccc3483
5
5
  SHA512:
6
- metadata.gz: b00ab14a93f7efd2a04ed6ec24c1cc616a8591711361fe2bebfc997e940e9fef5a57c72d6e78968f50281890a7938e6f31ff53dedb4951af8bffa42314b9c800
7
- data.tar.gz: 69a838e92845ce717b09cde894c3e2e1120343c8f4a0fe41316704c1535018f318c2e13e619458f678de8e91deda1c45cc70adc48a6ddc7695101a2320d45afe
6
+ metadata.gz: 6a2360d1b4375b6996c13e746000202308784e3c408cd0b14decd29ae3452413a851afbd6fa9023d6b4e5d9f594d418863373c37d74b4137926a4d2bded02221
7
+ data.tar.gz: 9a82fada7df6401b6389f2e91c85ba3e8da2da2fcb04e0a0f635881cf656e7d7932e597a1e8e123ede6d645c61d9abc052259be7454bcc0ac87d55a68f333aa2
@@ -2,75 +2,12 @@ Capistrano::Configuration.instance.load do
2
2
  namespace :assets do
3
3
  desc "Compile and upload the assets"
4
4
  task :precompile do
5
- precompile_js
6
- precompile_css
7
- end
8
- desc "Compile and upload the JS files"
9
- task :precompile_js do
10
- coffee_folders = fetch(:coffee_folders, Dir.glob('**/*.coffee'))
11
- unique_coffee_folders = coffee_folders.map do |file|
12
- File.dirname(file)
13
- end.uniq
14
-
15
- asset_path = fetch(:asset_cache_dir, Dir.pwd + "/cache/cached_assets")
16
-
17
- unique_coffee_folders.each do |path|
18
- dir_chunks = path.split('/')
19
- last_chunk = dir_chunks.last
20
- watch_dir = dir_chunks[0...-1].join('/')
21
- remote_path = "#{watch_dir}/js"
22
-
23
- run_locally "rm -rf #{asset_path} && mkdir -p #{asset_path}"
24
- run_locally "cd #{watch_dir} && coffee -c -o #{asset_path} #{last_chunk}"
25
-
26
- assets = Dir.glob(asset_path + '/**/*').map {|f| [f, f.gsub(asset_path, '')] }
27
- (assets).each do |file, filepath|
28
- if File.directory?(file)
29
- run "mkdir -p #{latest_release.shellescape}/#{remote_path}/#{filepath}"
30
- else
31
- upload file, "#{latest_release.shellescape}/#{remote_path}#{filepath}"
32
- end
33
- end
34
- end
35
-
36
- run_locally "rm -rf #{asset_path}"
37
- end
38
- desc "Compile and upload the CSS files"
39
- task :precompile_css do
40
- require 'compass'
41
-
42
- compass = fetch(:compass_command) do
43
- if File.exists?("Gemfile.lock")
44
- "bundle exec compass"
45
- else
46
- "compass"
47
- end
48
- end
49
- compass_folders = fetch(:compass_folders, Dir.glob('**/config.rb'))
50
- asset_path = fetch(:asset_cache_dir, Dir.pwd + "/cache/cached_assets")
51
- output_style = fetch(:compass_output, :compressed)
52
-
53
- compass_folders.each do |config|
54
- path = File.dirname(config)
55
- Compass.add_project_configuration(config)
56
-
57
- run_locally "rm -rf #{asset_path} && mkdir -p #{asset_path}" # Cleanup
58
- 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}"
59
-
60
- assets = Dir.glob(asset_path + '/**/*').map {|f| [f, f.gsub(asset_path, '')] }
61
- sprites = Dir.glob(path + "/images/**/*").grep(/-[0-9a-z]{11}.(png|jpg)/).map {|f| [f, f.gsub(path, '')] }
62
-
63
- (assets + sprites).each do |file, filepath|
64
- if File.directory?(file)
65
- run "mkdir -p #{latest_release.shellescape}/#{path}/#{filepath}"
66
- else
67
- upload file, "#{latest_release.shellescape}/#{path}#{filepath}"
68
- end
69
- end
70
-
71
- run_locally "rm -rf #{asset_path}"
72
- Compass.reset_configuration!
73
- end
5
+ run_locally "grunt build"
6
+ run %{
7
+ rm -rf #{latest_release.shellescape}/src/Frontend/Themes/#{theme}/Core &&
8
+ mkdir -p #{latest_release.shellescape}/src/Frontend/Themes/#{theme}/Core
9
+ }
10
+ upload "./src/Frontend/Themes/#{theme}/Core", "#{latest_release.shellescape}/src/Frontend/Themes/#{theme}/Core"
74
11
  end
75
12
  end
76
13
  end
@@ -32,9 +32,9 @@ Capistrano::Configuration.instance.load do
32
32
 
33
33
  desc "Sync all remote files to your local install"
34
34
  task :get, :roles => :app do
35
- path = find_folder_in_parents('frontend/files')
35
+ path = find_folder_in_parents('src/Frontend/Files')
36
36
  if !path
37
- abort "No frontend/files folder found in this or upper folders. Are you sure you're in a Fork project?"
37
+ abort "No src/Frontend/Files folder found in this or upper folders. Are you sure you're in a Fork project?"
38
38
  else
39
39
  rsync :down, shared_files_path, path, :once => true
40
40
  end
@@ -46,9 +46,9 @@ Capistrano::Configuration.instance.load do
46
46
  run %{cd #{shared_path} && tar -czf #{current_path}/backup_files.tgz files}
47
47
 
48
48
  # check if folder exists
49
- path = find_folder_in_parents('frontend/files')
49
+ path = find_folder_in_parents('src/Frontend/Files')
50
50
  if !path
51
- abort "No frontend/files folder found in this or upper folders. Are you sure you're in a Fork project?"
51
+ abort "No src/Frontend/Files folder found in this or upper folders. Are you sure you're in a Fork project?"
52
52
  else
53
53
  rsync :up, "#{path}/", shared_files_path
54
54
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "sumodev_deploy"
5
- s.version = "0.5.4"
5
+ s.version = "0.6"
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.5.4
4
+ version: '0.6'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan De Poorter