The Refactoring Working on the flay report for StuffToDo I tackled the #available method this morning. Before 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 # app/models/stuff_to_do.rb class StuffToDo :status, :conditions => ["assigned_to_id = ? AND …
Tag: redmine
Daily Refactor #39: Substitute Algorithm for Checking the Settings
Since I’m planning to release an update to my StuffToDo plugin next, I decided it could use a week of refactoring in order to clean it up. The Refactoring Today I did the second part of the refactoring from yesterday to clean up the StuffToDo plugin’s #using_projects_as_items? and #using_issues_as_items? methods. This time I used “substitute …
Daily Refactor #38: Extract Method in StuffToDo
Since I’m planning to release an update to my StuffToDo plugin next, I decided it could use a week of refactoring in order to clean it up. The Refactoring Since this plugin doesn’t have a lot of code (349 lines), there aren’t as many code smells as in the Redmine core. But according to Caliper …
Daily Refactor #37: Extract Method to Query#sortable_columns
The Refactoring I’m still going off of the flay report for today, this time I’m tackling some duplication in the IssuesController. Before 1 2 3 4 5 6 7 8 9 10 11 12 13 # app/controller/issues_controller.rb class IssuesController "#{Issue.table_name}.id"}.merge(@query.available_columns.inject({}) {|h, c| h[c.name.to_s] = c.sortable; h})) # ... end def changes retrieve_query sort_init 'id', …
Redmine Timesheet plugin v0.5.0 released
A new release of the Redmine Timesheet plugin has been tested and is ready for download. This release includes over 30 changes since the last release including 17 bug fixes and some new features like the CSV export. This will be the final version that is supported on Redmine 0.8, the next versions will require …