Rails ships with an easy way to get some quick code metrics about your application’s code and test coverage. For instance, running bin/rails stats will provide you with some important bits of information about the status and health of your project: +———————-+——–+——–+———+———+—–+——-+ | Name | Lines | LOC | Classes | Methods | M/C | … Continue reading Extend Rails code metrics
Tag: rake
When developing using Ruby on Rails, you probably already used Rake. Rake is a simple ruby build program. Basically, rake offers somewhat of the same capabilities that make does. Using rails, you probably already used tasks like db:migrate, db:seed, etc In this post, I’ll try to cover the most used features of rake, or at … Continue reading Rake & ruby: some basics to get you started
Creating a command-line app in ruby might be fun, being able to test them is just as important as testing any other web application. But you can do this with Aruba. Aruba is a Cucumber extension for testing command-line applications written in any language. Passing arguments, interacting with the file system, capturing exist codes en mimicking … Continue reading Testing your ruby command-line tools
In some cases you might need a simple command-line tool. But one of the problems writing those scripts is finding a descent way to manage and distribute them. One way is to bundle your command-line tool into a ruby gem. I already described in a previous post how to create a ruby gem, so I … Continue reading A simple Ruby command-line tool
There are different tools out there for creating gems. Back in the time, you could achieve this by using tools like Echoe or Jeweler. But you can do the same by using Bundler. Bundler is mostly use as a way of managing dependencies, but not a lot of people know you can use it to … Continue reading Create a ruby gem