web_server_config_generator 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/bin/web_server_setup
CHANGED
@@ -273,7 +273,7 @@ module WebServerSetup
|
|
273
273
|
def symlink(link_target, link_name)
|
274
274
|
if File.exist?(link_name)
|
275
275
|
if FileTest.symlink?(link_name)
|
276
|
-
unless
|
276
|
+
unless Pathname.new(link_name).realpath == Pathname.new(link_target).realpath
|
277
277
|
puts "symlink '#{link_name}' exists, but doesn't appear to link to the correct place"
|
278
278
|
end
|
279
279
|
else
|
@@ -285,13 +285,10 @@ module WebServerSetup
|
|
285
285
|
end
|
286
286
|
|
287
287
|
def setup_webserver_links_dir
|
288
|
-
|
289
|
-
|
290
|
-
web_server_links_dir
|
291
|
-
|
292
|
-
link_name = web_server_links_dir + e
|
293
|
-
symlink(link_target, link_name)
|
294
|
-
end
|
288
|
+
web_server_links_dir.mkpath
|
289
|
+
environments.each do |e|
|
290
|
+
link_name = web_server_links_dir + e
|
291
|
+
symlink(projects_dir, link_name)
|
295
292
|
end
|
296
293
|
end
|
297
294
|
|
@@ -409,7 +406,11 @@ module WebServerSetup
|
|
409
406
|
return
|
410
407
|
end
|
411
408
|
|
412
|
-
|
409
|
+
[
|
410
|
+
Dir[File.join(projects_dir, "*", ".webconfig.yml")],
|
411
|
+
Dir[File.join(projects_dir, "*", "*", ".webconfig.yml")],
|
412
|
+
Dir[File.join(projects_dir, "*", "*", "*", ".webconfig.yml")],
|
413
|
+
].flatten.each do |webconfig_path|
|
413
414
|
@app_projects << WebServerConfigGenerator::ProjectDirectory.new(File.dirname(webconfig_path), self)
|
414
415
|
end
|
415
416
|
end
|
Binary file
|