Sha256: e89b0127561f122739349424c6b8acea235dcdb5763c86ca455661e2d2b48285

Contents?: true

Size: 503 Bytes

Versions: 5

Compression:

Stored size: 503 Bytes

Contents

namespace :nginx do
  desc 'Generate sample config'
  task :generate do
    command = ARGV[1]

    ROOT   = Dir.pwd
    FOLDER = Dir.pwd.split('/').last

    conf  = Lux.fw_root.join('misc/nginx.conf').read
    conf = conf.gsub(/`([^`]+)`/) { `#{$1}`.chomp }
    conf = conf.gsub('$ROOT', ROOT)
    conf = conf.gsub('$FOLDER', FOLDER)
    puts conf
  end

  desc 'Edit nginx config'
  task :edit do
    folder = Dir.pwd.split('/').last

    run 'sudo vim /etc/sites-enabled/%s.conf' % folder
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
lux-fw-0.5.37 ./tasks/nginx.rake
lux-fw-0.5.36 ./tasks/nginx.rake
lux-fw-0.5.35 ./tasks/nginx.rake
lux-fw-0.5.34 ./tasks/nginx.rake
lux-fw-0.5.33 ./tasks/nginx.rake