lib/packwerk/generators/application_validation.rb in packwerk-1.0.0 vs lib/packwerk/generators/application_validation.rb in packwerk-1.0.1
- old
+ new
@@ -33,11 +33,11 @@
if File.exist?(File.join(destination_file_path, "packwerk"))
@out.puts("⚠️ Packwerk application validation bin script already exists.")
return true
end
- source_file_path = File.expand_path("../templates/packwerk", __FILE__)
+ source_file_path = File.expand_path("templates/packwerk", __dir__)
FileUtils.cp(source_file_path, destination_file_path)
@out.puts("✅ Packwerk application validation bin script generated in #{destination_file_path}")
true
end
@@ -49,10 +49,10 @@
if File.exist?(File.join(destination_file_path, "packwerk_validator_test.rb"))
@out.puts("⚠️ Packwerk application validation test already exists.")
return true
end
- source_file_path = File.expand_path("../templates/packwerk_validator_test.rb", __FILE__)
+ source_file_path = File.expand_path("templates/packwerk_validator_test.rb", __dir__)
FileUtils.cp(source_file_path, destination_file_path)
@out.puts("✅ Packwerk application validation test generated in #{destination_file_path}")
true
end