Today Devver team showed me a new feature they added to their Caliper project, the flay code view. I liked it so much I used it on today’s BulkTimeEntry plugin refactoring. The Refactoring Flay is a tool that checks for duplicated Ruby code. The BulkTimeEntry plugin only showed one piece of code that was duplicated …
Tag: ruby
Daily Refactor #3: Behavior Change in the Bulk Time Entry patch
Today’s “refactoring” isn’t a refactoring in the classic sense, since it includes a behavior change. But if you squint your eyes enough to only see the Controller as the “public interface”, then we can call it a refactor. The Refactoring Yesterday I moved the create_bulk_time_entry into the TimeEntry class where it fit better. Today I …
Daily Refactor #2: Move Method in the BulkTimeEntriesController – saving a new TimeEntry
The Refactoring Following up to yesterday’s refactoring, today I kept refactoring the Bulk Time Entry plugin’s controller. The save_time_entry_from_params method I extracted yesterday only uses the TimeEntry class, so it would be perfect to move the method to the TimeEntry class. Since the TimeEntry class is defined by Redmine, I had to monkey-patch that class. …
Daily Refactor #1: Extract Method in the BulkTimeEntriesController – saving a new TimeEntry
I’m having two problems right now: Not enough time to write to my blogs Not enough time to keep my Redmine plugins maintained To try and fix both of these problems, I’m going to try and start something new here: a daily refactoring. I’m going do a small refactoring to my Redmine plugins or Redmine …
Rails Testing Optimization – Benchmark your tests
I’m a big believer in writing automated tests for applications. Whether it’s before coding or after, tests keep the application working and easy to maintain. But what can you do when the application and test suite grow and start taking a longer and longer to run? Redmine is starting to be affected by this problem, …