web_server_config_generator 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
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 File.readlink(link_name) == link_target
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
- FileUtils.cd projects_dir do
289
- link_target = File.join "..", ".."
290
- web_server_links_dir.mkpath
291
- environments.each do |e|
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
- Dir[File.join(projects_dir, "**", ".webconfig.yml")].each do |webconfig_path|
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
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
8
+ - 4
9
+ version: 0.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Expected Behavior