Sha256: 0e613bc7c76c6e9aaae61b0585565efecb1e06ada0c3987b6b0203374ffd6b13

Contents?: true

Size: 962 Bytes

Versions: 8

Compression:

Stored size: 962 Bytes

Contents

namespace :lacquer do
  namespace :varnishd do
    desc "Start varnishd daemon using Lacquer's settings"
    task :start => :environment do
      Lacquer::Varnishd.new.start
    end
    
    desc "Stop varnishd daemon using Lacquer's settings"
    task :stop => :environment do
      Lacquer::Varnishd.new.stop
    end
    
    desc "Running status of varnishd daemon using Lacquer's settings"
    task :status => :environment do
      if Lacquer::Varnishd.new.running?
        puts "Varnishd is running"
      else
        puts "Varnishd is not running"
      end
    end
    
    desc "Restart varnishd daemon using Lacquer's settings"
    task :restart => :environment do
      varnishd = Lacquer::Varnishd.new
      if varnishd.running?
        varnishd.stop
        sleep(1)
      end
      varnishd.start
    end
    
    desc "Purge ALL urls from Varnish"
    task :global_purge => :environment do
      Lacquer::Varnish.new.purge('.*')
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
lacquer-0.5.5 lib/lacquer/tasks.rb
lacquer-0.5.4 lib/lacquer/tasks.rb
lacquer-0.5.3 lib/lacquer/tasks.rb
lacquer-0.5.2 lib/lacquer/tasks.rb
lacquer-0.5.1 lib/lacquer/tasks.rb
lacquer-0.5.0.beta4 lib/lacquer/tasks.rb
lacquer-0.5.0.beta3 lib/lacquer/tasks.rb
lacquer-0.5.0.beta2 lib/lacquer/tasks.rb