Guest User

Untitled

a guest
Jul 21st, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. var XibsToConvert = ["FlickrWindow", "FacebookWindow", "TwitterWindow",
  2. "YouTubeWindow", "LinkTEProperties", "HighlightTEProperties",
  3. "ImageTEProperties", "TwitterFeedTEProperties","TextTEProperties"];
  4.  
  5. task( "nibs", function()
  6. {
  7. // Tried using JAKE.file but that didn't not want to work with subdirectories,
  8. // i.e. Resources/
  9. for ( var idx = 0; idx < XibsToConvert.length; idx++ ) {
  10. var filenameXib = "Resources/../Xibs/" + XibsToConvert[idx] + ".xib";
  11. var filenameCib = "Resources/" + XibsToConvert[idx] + ".cib";
  12. if ( !FILE.exists(filenameCib) || FILE.mtime(filenameXib) > FILE.mtime(filenameCib) ) {
  13. print("Converting to cib: " + filenameXib);
  14. OS.system(["nib2cib", filenameXib, filenameCib]);
  15. } else {
  16. print("Ignoring " + filenameXib + " -> has been converted");
  17. }
  18. }
  19. });
  20.  
  21. task("test", function()
  22. {
  23. print("============> WARNING");
  24. print("Ensure that test filenames are the same as the class that is defined");
  25. print("E.g. TweetTest.j for TweetTest and not tweet_test.j (i.e. rails style)");
  26. print("Otherwise you'll get a strange error: >>objj [warn]: unable to get tests<<");
  27. print("============> END WARNING");
  28.  
  29. var tests = new FileList('Test/**/*Test.j');
  30. var moretests = new FileList('Test/**/*_test.j');
  31. var cmd = ["ojtest"].concat(tests.items()).concat(moretests.items());
  32. //print( cmd.map(OS.enquote).join(" ") );
  33. var cmdString = cmd.map(OS.enquote).join(" ");
  34.  
  35. var code = OS.system(cmdString);
  36. if (code !== 0)
  37. OS.exit(code);
  38. });
Add Comment
Please, Sign In to add comment