nsweb_deployment 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module NswebDeployment
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.2"
3
3
  end
@@ -61,6 +61,17 @@ configuration.load do
61
61
  task :update_vhost, :roles => :web do
62
62
  run "cp #{File.join(current_path, 'config', 'vhosts', "#{rails_env}.vhost")} #{File.join(shared_path, 'system', "#{fetch(:application)}.vhost")}"
63
63
  end
64
+
65
+ namespace :assets do
66
+ task :precompile, :roles => :web, :except => { :no_release => true } do
67
+ from = source.next_revision(current_revision)
68
+ if releases.length <= 1 || capture("cd #{latest_release} && #{source.local.log(source.next_revision(current_revision))} vendor/assets app/assets lib/assets | wc -l").to_i > 0
69
+ run %Q{cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile}
70
+ else
71
+ logger.info "Skipping asset pre-compilation because there were no asset changes."
72
+ end
73
+ end
74
+ end
64
75
  end
65
76
 
66
77
  namespace :nsweb do
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: nsweb_deployment
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.0.1
5
+ version: 2.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Josh Williams
@@ -75,7 +75,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
75
75
  requirements:
76
76
  - - ">="
77
77
  - !ruby/object:Gem::Version
78
- hash: -603557553
78
+ hash: 145141233
79
79
  segments:
80
80
  - 0
81
81
  version: "0"
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  requirements:
85
85
  - - ">="
86
86
  - !ruby/object:Gem::Version
87
- hash: -603557553
87
+ hash: 145141233
88
88
  segments:
89
89
  - 0
90
90
  version: "0"