sumodev_deploy 0.5.3 → 0.5.4

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: ab652bf83156b26445a928ddaa0195f631422458
4
- data.tar.gz: 62a199b85cb9a5f0f3c3caddd7076a5290d0da15
3
+ metadata.gz: 38dd5a64b8dd200472b4d6341211939a5ce56ee4
4
+ data.tar.gz: 71de1729f0b69dc2dc34da9a36b59ff2e006a7ae
5
5
  SHA512:
6
- metadata.gz: 4d302aff0c3018e4c3cca23e0d0ab8ae16f8888c26c5fb5afcd3abb0aa4c86b220f3fb3d46f3f7ce3e5a35e9d8db2800264c18c78ad590b29bbcde946d9bd2af
7
- data.tar.gz: ebf8a37ac3749b85d722fe48d32230e7438f09787018d1a3cea69f261934007899c39fcc85fce81ae6fe101f99e8dffd533294b4a5cb57b3915e3faa39716fe4
6
+ metadata.gz: b00ab14a93f7efd2a04ed6ec24c1cc616a8591711361fe2bebfc997e940e9fef5a57c72d6e78968f50281890a7938e6f31ff53dedb4951af8bffa42314b9c800
7
+ data.tar.gz: 69a838e92845ce717b09cde894c3e2e1120343c8f4a0fe41316704c1535018f318c2e13e619458f678de8e91deda1c45cc70adc48a6ddc7695101a2320d45afe
@@ -1,7 +1,42 @@
1
1
  Capistrano::Configuration.instance.load do
2
2
  namespace :assets do
3
- desc "Compile and upload the CSS files"
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
5
40
  require 'compass'
6
41
 
7
42
  compass = fetch(:compass_command) do
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "sumodev_deploy"
5
- s.version = "0.5.3"
5
+ s.version = "0.5.4"
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.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan De Poorter
@@ -14,28 +14,28 @@ dependencies:
14
14
  name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: capistrano
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  description: Deploy to Sumocoders Dev server
@@ -44,14 +44,14 @@ executables: []
44
44
  extensions: []
45
45
  extra_rdoc_files: []
46
46
  files:
47
+ - sumodev_deploy.gemspec
47
48
  - lib/sumodev_deploy.rb
48
49
  - lib/sumodev_deploy/tasks/assets.rb
49
- - lib/sumodev_deploy/tasks/browse.rb
50
50
  - lib/sumodev_deploy/tasks/db.rb
51
51
  - lib/sumodev_deploy/tasks/errbit.rb
52
52
  - lib/sumodev_deploy/tasks/files.rb
53
53
  - lib/sumodev_deploy/tasks/redirect.rb
54
- - sumodev_deploy.gemspec
54
+ - lib/sumodev_deploy/tasks/browse.rb
55
55
  homepage: https://github.com/sumocoders/sumodev_deploy
56
56
  licenses: []
57
57
  metadata: {}
@@ -61,17 +61,17 @@ require_paths:
61
61
  - lib
62
62
  required_ruby_version: !ruby/object:Gem::Requirement
63
63
  requirements:
64
- - - ">="
64
+ - - '>='
65
65
  - !ruby/object:Gem::Version
66
66
  version: '0'
67
67
  required_rubygems_version: !ruby/object:Gem::Requirement
68
68
  requirements:
69
- - - ">="
69
+ - - '>='
70
70
  - !ruby/object:Gem::Version
71
71
  version: '0'
72
72
  requirements: []
73
73
  rubyforge_project:
74
- rubygems_version: 2.2.2
74
+ rubygems_version: 2.0.2
75
75
  signing_key:
76
76
  specification_version: 4
77
77
  summary: Deployment for Fork 3.x.x with Capistrano