Skip to content

Commit acf56ac

Browse files
committed
Further refined pearl script.
1 parent 42aa73c commit acf56ac

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

rails_application/Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ ifeq ($(origin MUTANT_NODE_INDEX), environment)
4545
head -n 5 .node_files.tmp || echo "File .node_files.tmp is empty."; \
4646
echo "--- END DEBUG (awk) ---"; \
4747
echo "--- DEBUG: Attempting to derive subject names for this node... ---"; \
48-
DERIVED_NAMES=$$(cat .node_files.tmp | perl -ne 'chomp; s#^(app/(controllers|models|helpers|jobs|mailers|channels|client_panel)|lib)/##; s#\.rb$$##; my @parts = split /\//; my $$result = ""; foreach my $$part (@parts) { $$part =~ s#_([a-z])#uc($$1)#eg; $$result .= "::" . ucfirst($$part); } $$result =~ s/^:://; print "$$result\n"'); \
48+
DERIVED_NAMES=$$(cat .node_files.tmp | perl -ne 'chomp; s#^(app/(controllers|models|helpers|jobs|mailers|channels|client_panel|read_models|services)|lib)/##; s#\.rb$$##; my @parts = split /\//; my $$result = ""; foreach my $$part (@parts) { $$part =~ s#_([a-z])#uc($$1)#eg; $$result .= ucfirst($$part) . "::"; } $$result =~ s/::$$//; print "$$result\n"'); \
4949
PERL_EXIT_CODE=$$?; \
5050
if [ $$PERL_EXIT_CODE -ne 0 ]; then \
5151
echo "ERROR: Perl command failed with exit code $$PERL_EXIT_CODE"; \
@@ -54,11 +54,10 @@ ifeq ($(origin MUTANT_NODE_INDEX), environment)
5454
elif [ -z "$$DERIVED_NAMES" ]; then \
5555
echo "Perl command produced no output (expected if no files for node)."; \
5656
else \
57-
echo "$$DERIVED_NAMES" | sed 's/^:://'; \
57+
echo "$$DERIVED_NAMES"; \
5858
fi; \
5959
echo "--- END DEBUG (perl) ---"; \
60-
DERIVED_NAMES_FILTERED=$$(echo "$$DERIVED_NAMES" | sed 's/^:://'); \
61-
SUBJECT_ARGS=$$(echo "$$DERIVED_NAMES_FILTERED" | tr '\\n' ' '); \
60+
SUBJECT_ARGS=$$(echo "$$DERIVED_NAMES" | tr '\\n' ' '); \
6261
if [ -z "$$SUBJECT_ARGS" ]; then \
6362
echo "No subjects derived for this node. Skipping."; \
6463
else \
@@ -71,7 +70,6 @@ else
7170
@RAILS_ENV=test bundle exec mutant run
7271
endif
7372

74-
7573
.PHONY: help test db
7674
.DEFAULT_GOAL := help
7775

0 commit comments

Comments
 (0)