Does Rake have anything built in for replacing strings inside files and such or is it best to use bash commands inside ‘sh’, or use Ruby’s own file manipulation functionality?
Regards,
Chris
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Rake doesn’t provide anything special in regards to string replacement, but it’s a Ruby script; you can use anything you could in any other script. Whether doing it in Ruby is better than using other tools is a matter of picking the best tool for the job.
Keep in mind, though, that if you plan to distribute your source and you use external tools, then those tools become dependencies for your software. If you’re requiring something uncommon just for the build, it might be worth rewriting it yourself.