capistrano-lazy-assets 0.0.1 → 0.0.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.
@@ -1,7 +1,7 @@
1
1
  module Capistrano
2
2
  module Lazy
3
3
  module Assets
4
- VERSION = '0.0.1'
4
+ VERSION = '0.0.2'
5
5
  end
6
6
  end
7
7
  end
@@ -1,21 +1,20 @@
1
- require "capistrano-lazy-assets/version"
2
-
3
- module Capistrano
4
- module Lazy
5
- module Assets
6
- # Your code goes here...
7
- end
8
- end
9
- end
1
+ require 'capistrano-lazy-assets/version'
10
2
 
11
3
  configuration = Capistrano::Configuration.respond_to?(:instance) ?
12
4
  Capistrano::Configuration.instance(:must_exist) :
13
5
  Capistrano.configuration(:must_exist)
14
6
 
15
7
  configuration.load do
16
- namespace :example do
17
- task :test, :roles => :app do
18
- run 'ls -lah'
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'
16
+ end
17
+ end
19
18
  end
20
19
  end
21
20
  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.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: