RSYNC_ARGS = [
'--verbose',
'--archive',
- '--delete',
'-z',
'--copy-links',
'--exclude=local/',
'--include=.git/'
]
+# This is a little weird, but we need to update
+require 'json'
+
+Dir.glob(".vagrant/machines/*/*/synced_folders").each do |filename|
+ synced_folders = JSON.parse(IO.read(filename))
+ synced_folder = synced_folders["rsync"]["/vagrant"]
+ dirty = false
+ %w( rsync__args args ).each do |key|
+ if RSYNC_ARGS != synced_folder[key]
+ dirty = true
+ synced_folder[key] = RSYNC_ARGS
+ end
+ if dirty
+ say "Updating #{filename} because it has old rsync args"
+ IO.write(filename + ".new", JSON.unparse(synced_folders))
+ end
+ end
+end
+
+
# All Vagrant configuration is done below. The '2' in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
export PERL5LIB=/vagrant/local/lib/perl5
export PATH=/vagrant/local/bin:$PATH
+export MOJO_LISTEN="http://*:80"
cd /vagrant
- name: copy re.pl
copy: src=re.pl dest=/usr/local/bin/re.pl mode=0755
+- name: copy start_morbo
+ copy: src=start_morbo dest=/usr/local/bin/start_morbo mode=0755
+
- name: copy use-nytprof
copy: src=use-nytprof dest=/usr/local/bin/use-nytprof mode=0755
group: root
mode: 0755
-- name: enable hypnotoad
- service: name=hypnotoad enabled=yes
+- name: disable hypnotoad
+ service: name=hypnotoad enabled=no
when: LAZY == 0
-- name: restart hypnotoad
- service: name=hypnotoad state=restarted
+- name: stop hypnotoad
+ service: name=hypnotoad state=stopped
--- /dev/null
+#!/usr/bin/env perl
+
+$ENV{PERL5LIB} = '/vagrant/local/lib/perl5';
+$ENV{PATH} = "/vagrant/local/bin:$ENV{PATH}";
+$ENV{MOJO_LISTEN} = 'http://*:80';
+
+my @files = ('Bugzilla.pm', 'Bugzilla', glob("*.cgi"), 'extensions', 'template');
+my @watch= map { ('-w' => $_) } (@files);
+
+system morbo => @watch, '-v', 'bugzilla.pl';