Ruby Project Skeleton Generator on Gist!
Published on 26 Dec 2016
by Alexander Garber
Exercise 46 of Learn Ruby the Hard Way gives instructions for manually creating a project skeleton. So I decided to do what I have done many times before in BASH and Python, and
automate this task with a pretty Ruby script.
A few thoughts:
A few thoughts:
- Ruby's handling of files and folders is delightfully straightforward.
- Ruby handles strings elegantly.
- This was originally written as a straight script, but then I refactored it with object-oriented programming in mind:
- One Class (Project)
- The main components of the class broken down into methods.
- Names of folders and files are stored in an array and a hash.
- Blocks of text are stored using Squiggly HEREDOC
all tags
activerecord android annoyances api apt arch array artix atom az3w backend bash blog browser bug callback career cli cloud code coding config configuration cp crud css database db design devops django email erp filter fugitive gif gist git gnome grep hebrew http ide isbn-fetcher iso javascript job search js kanban kanban\ kindle koans linux logger manjaro map markdown microservices mobi mtp neovim nodejs packages pastbin patch post python rails reduce refactoring rest routes rspec ruby scripting security sed shell sql string_replacement study tdd terminal testing version_control vim walkthrough workflow