A simple command-line utility for creating new projects in Ruby. Creates a
bin folder and stub, a
lib folder with a module
version.rb file, and a
test folder with a default test. It also creates a Rakefile set up to run tests with Minitest.
As this is a command-line tool, install globally with
$ gem install rubynew
rubynew command and pass it the name of the project you want to create. The project
name will be converted to a constant for use as a module name and a class name, similar to how
Bundler works when creating a gem.
$ rubynew tip_calculator
It creates the following structure and files:
tip_calculator/ ├── Gemfile ├── Rakefile ├── README.md ├── LICENSE ├── bin │ └── tip_calculator ├── lib │ ├── tip_calculator │ │ └── version.rb │ └── tip_calculator.rb └── test └── test_helper.rb └── tip_calculator_test.rb
If you don't need the
bin folder, simply delete it.
Please contribute. I'm interested in discussing features, such as providing options for alternative frameworks for testing. However, the default will always be what Ruby's default is. I want this to be simple for beginners, so the defaults will do whatever Ruby does by default. Right now that's Rake and Minitest.
- Fork it ( https://github.com/napcs/rubynew/fork )
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create a new Pull Request
test/test_helper.rbfor tests to use as their setup instead of directly loading
minitest/reportersgem and added configuration to
test_helperso test reports are colorized.
binprogram now displays name and version
- More detailed help message for
rubynewwhen no options are passed
rubynewno longer crashes when you use a folder that already exists. This behavior is no longer allowed.
binfolder and default bin file.
- Initial version
MIT. See LICENSE.txt.