In yesterday’s post I used Replace Data Value with Object to start converting much of the Kanban plugin’s code to be more object oriented. I finished up that refactoring in some other commits if you’re interested in how it went. The Refactoring As a result of this refactoring, I was left with a bunch of …
Tag: ruby
Daily Refactor #49: Replace Incoming Pane’s Data Value with Object
I’ve made a mistake. The last few refactorings I’ve been doing to the Kanban plugin have been useful but they haven’t really been improving the design of the plugin. I thought about it yesterday and discovered that I was just swapping out bits of procedural code for more procedural code. Once I saw this, I …
Daily Refactor #48: Consolidate Duplicate Conditional Fragments in Kanban
The Refactoring In order to remove the duplication in Kanban#get_issues_for_pane, I need to first consolidate some of the duplication in each case statement. This refactoring pulls the ActiveRecord conditions out of the finder and into the ARCondition object. Before 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 …
Daily Refactor #47: Extract Method for Kanban panes – Part 3
Here is the third refactoring to clean up how the Kanban class gets it’s pane data. The Refactoring This refactoring is brutal to read through but it’s just moving the body of #get_incoming_issues, #get_backlog_issues, and #get_quick_issues into #get_issues_for_pane. Before 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 …
Testing Rails Plugins on All Cores with parallel_tests
About 90% of my development is done on Redmine and well over half of that is done on Redmine plugins. That means that I write tests; a lot of tests. Over time though, they get slower and slower and start to become a drain on productivity (“5 minutes to run the tests on a feature …