Sha256: b78f26fae2a12cbc0a3e43be1f247b1cf971dc2fce5e65cbdd3d8c201737e81a

Contents?: true

Size: 595 Bytes

Versions: 14

Compression:

Stored size: 595 Bytes

Contents

Capistrano::Configuration.instance(:must_exist).load do
  
  def look_for_db_changes
    fetch(:db_changed?, nil) || set(:db_changed?) { check_for_changes('db/migrate') }
  end
  
  def look_for_stylesheet_changes
    fetch(:stylesheets_changed?, nil) || set(:stylesheets_changed?) { check_for_changes('public/stylesheets') }
  end
  
  def check_for_changes(dir)
    result = capture("cd #{current_release} && git diff-tree `cat #{previous_release}/REVISION` #{branch} -- #{dir} | wc -l").to_i > 0
    puts "Looking for changes in #{dir}... [ #{result ? 'yes' : 'no'} ]"
    result
  end
  
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fdlcap-0.4.17 lib/fdlcap/extensions/check_for_changes.rb
fdlcap-0.4.15 lib/fdlcap/extensions/check_for_changes.rb
fdlcap-0.4.14 lib/fdlcap/extensions/check_for_changes.rb
fdlcap-0.4.13 lib/fdlcap/extensions/check_for_changes.rb
fdlcap-0.4.12 lib/fdlcap/extensions/check_for_changes.rb
fdlcap-0.4.11 lib/fdlcap/extensions/check_for_changes.rb
fdlcap-0.4.10 lib/fdlcap/extensions/check_for_changes.rb
fdlcap-0.4.9 lib/fdlcap/extensions/check_for_changes.rb
fdlcap-0.4.7 lib/fdlcap/extensions/check_for_changes.rb
fdlcap-0.4.6 lib/fdlcap/extensions/check_for_changes.rb
fdlcap-0.4.5 lib/fdlcap/extensions/check_for_changes.rb
fdlcap-0.4.4 lib/fdlcap/extensions/check_for_changes.rb
fdlcap-0.4.3 lib/fdlcap/extensions/check_for_changes.rb
fdlcap-0.4.2 lib/fdlcap/extensions/check_for_changes.rb