Ways to manage bot code for Ruby

I’ve had a lot of fun with bot coding challenges, but with the upcoming (PAC) challenge I’d really like to take my approach to the next level, namely, to move away from a single file of 1k+ lines, to a bona-fide project with a separate file for each class, and tests.

I use the plugin to sync a local file to codingame, and it is helpful, but it’s just one file.

Is there some method to sync a file (and have codingame execute some main.rb file that handles requires) I am not aware of, or should I write some script that concatenates the many files I’d have into a “build”?

Writing a script to merge multiple files into a single one is the way to go. When you search for “file bundler” on the forum, you will find some (but none for Ruby it seems).
Execute the script as a post-build event in your IDE and sync the output file.

2 Likes

I’ve cooked up a sandbox project that supports the two features I needed - ability to write tests and concatenate to final build. Feel free to fork from https://github.com/Epigene/codinbot