This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 1321dbc tool to help with building a whimsy.local version of
whimsy.conf
1321dbc is described below
commit 1321dbcc9f06b1b1939a8cd662a273ea60751dcb
Author: Sam Ruby <[email protected]>
AuthorDate: Thu May 4 09:34:50 2017 -0400
tool to help with building a whimsy.local version of whimsy.conf
---
tools/mkconf.rb | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/tools/mkconf.rb b/tools/mkconf.rb
new file mode 100644
index 0000000..bf18432
--- /dev/null
+++ b/tools/mkconf.rb
@@ -0,0 +1,37 @@
+#
+# Generate a whimsy.local version of the deployed whimsy configuration
+#
+
+require 'rbconfig'
+
+conf = `ssh whimsy-vm4.apache.org cat \
+ /etc/apache2/sites-enabled/*-whimsy-vm-443.conf`
+
+conf.sub! 'VirtualHost *:443', 'VirtualHost *:80'
+conf.sub! 'ServerName whimsy.apache.org', 'ServerName whimsy.local'
+
+conf.gsub! /\n\s*RemoteIPHeader.*/, ''
+
+conf.gsub! /\n\s*PassengerDefault.*/, ''
+
+conf.gsub! /\n\s*SSL.*/, ''
+conf.gsub! /\n\s*## SSL.*/, ''
+conf.gsub! "SetEnv HTTPS", "# SetEnv HTTPS"
+
+conf.gsub! '/x1/srv/whimsy', File.expand_path('../..', __FILE__)
+
+conf.sub! /^SetEnv PATH .*/ do |line|
+ line[/PATH\s+(\/.*?):/, 1] = '/usr/local/bin'
+
+ line
+end
+
+conf.sub! 'wss://', 'ws://'
+
+if ARGV.empty?
+ puts conf
+else
+ ARGV.each do |arg|
+ File.write arg, conf
+ end
+end
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].