Top Level Namespace

Defined Under Namespace

Modules: Vlad Classes: String

Instance Method Summary collapse

Instance Method Details

#nowObject

used by update, out here so we can ensure all threads have the same value



5
6
7
# File 'lib/vlad/core.rb', line 5

def now
  @now ||= Time.now.utc.strftime("%Y%m%d%H%M.%S")
end

#vladObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/vlad/maintenance.rb', line 10

namespace :vlad do
  namespace :maintenance do

    desc "Turn on the maintenance web page"

    remote_task :on, :roles => [:web] do
      run "cp -f #{shared_path}/config/maintenance.html #{shared_path}/system/"
    end

    desc "Turn off the maintenance web page"

    remote_task :off, :roles => [:web] do
      run "rm -f #{shared_path}/system/maintenance.html"
    end
  end
end