capistrano-lazy-assets 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Capistrano::Lazy::Assets
2
2
 
3
- Receipt is given from http://www.bencurtis.com/2011/12/skipping-asset-compilation-with-capistrano/
3
+ Receipt is taken from http://www.bencurtis.com/2011/12/skipping-asset-compilation-with-capistrano/
4
4
 
5
5
  ## Installation
6
6
 
@@ -1,18 +1,16 @@
1
1
  require 'capistrano-lazy-assets/version'
2
2
 
3
- configuration = Capistrano::Configuration.respond_to?(:instance) ?
4
- Capistrano::Configuration.instance(:must_exist) :
5
- Capistrano.configuration(:must_exist)
6
-
7
- configuration.load do
8
- namespace :deploy do
9
- namespace :assets do
10
- task :precompile, :roles => :web, :except => { :no_release => true } do
11
- from = source.next_revision(current_revision)
12
- if capture("cd #{latest_release} && #{source.local.log(from)} app/assets/ | wc -l").to_i > 0
13
- run %Q{cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile}
14
- else
15
- logger.info 'Skipping asset pre-compilation because there were no asset changes'
3
+ if Capistrano::Configuration.instance
4
+ Capistrano::Configuration.instance.load do
5
+ namespace :deploy do
6
+ namespace :assets do
7
+ task :precompile, :roles => :web, :except => { :no_release => true } do
8
+ from = source.next_revision(current_revision)
9
+ if capture("cd #{latest_release} && #{source.local.log(from)} app/assets/ | wc -l").to_i > 0
10
+ run %Q{cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile}
11
+ else
12
+ logger.info 'Skipping asset pre-compilation because there were no asset changes'
13
+ end
16
14
  end
17
15
  end
18
16
  end
@@ -1,7 +1,7 @@
1
1
  module Capistrano
2
2
  module Lazy
3
3
  module Assets
4
- VERSION = '0.0.5'
4
+ VERSION = '0.0.6'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-lazy-assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-03 00:00:00.000000000 Z
12
+ date: 2012-10-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano