Since Redmine’s codebase was in a pretty poor shape I started a daily series to refactor it and show how I did it. This series ended up being used as the source for Refactoring Redmine (after a bunch of editing).
- Daily Refactor #1: Extract Method in the BulkTimeEntriesController – saving a new TimeEntry
- Daily Refactor #2: Move Method in the BulkTimeEntriesController – saving a new TimeEntry
- Daily Refactor #3: Behavior Change in the Bulk Time Entry patch
- Daily Refactor #4: Extract Method in the BulkTimeEntriesHelper – options generator
- Daily Refactor #5: Remove iteration by using Enumerable
- Daily Refactor #6: Move recipients method to acts_as_event
- Daily Refactor #7: Extract method in fetch_changesets
- Daily Refactor #8: Move method in the ReportsController
- Daily Refactor #9: Move Issue#by methods
- Daily Refactor #10: Pull up the #find_project method to the ApplicationController
- Daily Refactor #11: Extract action in ReportsController
- Daily Refactor #12: Extract rendering in the case statement
- Daily Refactor #13: Inline utility methods in ReportsController
- Daily Refactor #14: Extract method to before_filter in ReportsController
- Daily Refactor #15: Rename method in IssueStatusesController
- Daily Refactor #16: Rename method in RolesController
- Daily Refactor #17: Extract method in AuthSourceLdap
- Daily Refactor #18: Extract method in AuthSourceLdap
- Daily Refactor #19: Cleanup in AuthSourceLdap#authenticate
- Daily Refactor #20: Extract Method in AuthSourceLdap
- Daily Refactor #20.1: Bonus Extract Method in AuthSourceLdap
- Daily Refactor #21: Move methods in the RoutingTest
- Daily Refactor #22: Move method in IssuesController#bulk_edit
- Daily Refactor #23: Extract method in IssuesController#edit
- Daily Refactor #24: Extract method body in IssuesController#edit
- Daily Refactor #25: Extract method in IssuesController#update
- Daily Refactor #26: Convert Procedural Design to Objects in #issue_update
- Daily Refactor #27: Move Method to the Attachment Model
- Daily Refactor #28: Decouple flash messages from Attachment#attach_files
- Daily Refactor #29: Replace Temp with Query in IssuesController#issue_update
- Daily Refactor #30: Move Method into Issue
- Daily Refactor #31: Extract Method in IssuesHelper#show_detail
- Daily Refactor #32: Inline Method in IssuesHelper#show_detail
- Daily Refactor #33: Extract Method in IssuesController
- Daily Refactor #34: Split Methods in the controllers
- Daily Refactor #35: Pull up method for finding a controller’s model object
- Daily Refactor #36: Extract Method to the Member model
- Daily Refactor #37: Extract Method to Query#sortable_columns
- Daily Refactor #38: Extract Method in StuffToDo
- Daily Refactor #39: Substitute Algorithm for Checking the Settings
- Daily Refactor #40: Extract Method in StuffToDo#available
- Daily Refactor #41: Consolidate Duplicate Conditional Fragments in StuffToDo
- Daily Refactor #42: Consolidate Conditionals in StuffToDo#available
- Daily Refactor #43: Extract Method in StuffToDoController
- Daily Refactor #44: Extract Method in Kanban.
- Daily Refactor #45: Extract Method for Kanban panes – Part 1
- Daily Refactor #46: Extract Method for Kanban panes – Part 2
- Daily Refactor #47: Extract Method for Kanban panes – Part 3
- Daily Refactor #48: Consolidate Duplicate Conditional Fragments in Kanban
- Daily Refactor #49: Replace Incoming Pane’s Data Value with Object
- Daily Refactor #50: Remove Middle Man methods in Kanban
- Daily Refactor #51: Lazy Load Issues in Kanban
- Daily Refactor #52: Remove Middle Man Kanban#find
- Daily Refactor #53: Move Method to KanbanPane
- Daily Refactor #54: Move Method to KanbanPane
- Daily Refactor #55: Move Pane Configuration To KanbanPane
- Daily Refactor #56: Replace Accumulator with Inject
- Daily Refactor #57: Extract Class to CustomFieldFormat
- Daily Refactor #58: Move Method to Query Model
- Daily Refactor #59: Move Routing Tests
- Daily Refactor #60: Move Routing Tests – Part Two
- Daily Refactor #61: Extract Method in IssuesController for REST
- Daily Refactor #62: Extract Method in IssuesController
- Daily Refactor #63: Extract Method to before_filter in IssuesController
- Daily Refactor #64: Move Method to QueriesHelper
- Daily Refactor #65: Extract Gantt to a new controller
- Daily Refactor #66: Pull Up Method to ApplicationController
- Daily Refactor #67: Pull Up Method to ApplicationController
- Daily Refactor #68: Extract Class to New Controller
- Daily Refactor #69: Inline Temp in SourceNews#migrate
- Daily Refactor #70: Inline Temp in SourceVersion#migrate
- Daily Refactor #71: Extract Method in KanbansController to before_filter
- Daily Refactor #72: Move Method in KanbansController
- Daily Refactor #73: Move Method to before_filter in InvoiceController
- Daily Refactor #74: Extract Method in Invoice
- Daily Refactor #75: Inline Temp in Invoices#outstanding
- Daily Refactor #76: Replace Temp with Query in Invoice#fully_paid?
- Daily Refactor #77: Extract and Move Method in InvoiceController
- Daily Refactor #78: Replace Data Value in InvoiceController with Object
- Daily Refactor #79: Convert Controller to REST Controller
- Daily Refactor #80: Convert PaymentsController to REST Controller
- Daily Refactor #81: Move last_invoice_number to Model
- Redmine Refactor #82: Extract Method to shoulda Macro in AccountControllerTest
- Redmine Refactor #83: Self Encapsulate Field in User
- Redmine Refactor #84: Extract Method in IssuesController#context_menu
- Redmine Refactor #85: Extract Method in IssuesController#move
- Redmine Refactor #86: Extract Method to split IssuesController#move into two actions
- Redmine Refactor #87: Extract Method Body to IssuesController#perform_move“
- Redmine Refactor #88: Extract Method from move and perform_move
- Redmine Refactor #89: Extract Controller: IssueMovesController
- Redmine Refactor #90: Pull Up Method to ApplicationController
- Redmine Refactor #91: Pull Up set_flash_from_bulk_issue_save to ApplicationController
- Redmine Refactor #92: Move Method #reply to JournalsController
- Redmine Refactor #93: Extract Controller from IssuesController
- Redmine Refactor #94: Extract PreviewsController from IssuesController
- Redmine Refactor #95: Extract ContextMenusController from IssuesController
- Redmine Refactor #96: Merge Method in IssuesController
- Redmine Refactor #97: Move method from IssuesController to JournalsController
- Redmine Refactor #98: Extract method from IssuesController#bulk_edit
- Redmine Refactor #99: Extract method from IssuesController#bulk_update
- Redmine Refactor #100: Convert Issue Routes to REST Resources
- Redmine Refactor #101: Extract activity from ProjectsController to a new controller
- Redmine Refactor #102: Move method from ProjectsController#roadmap to VersionsController#index
- Redmine Refactor #103: Move method from ProjectsController#list_files to FilesController#index
- Redmine Refactor #104: Move method from ProjectsController#add_file to FilesController#new
- Redmine Refactor #105: Move method from ProjectsController#save_activities to ProjectEnumerationsController#save
- Redmine Refactor #106: Move method from ProjectsController#reset_activities to ProjectEnumerationsController#destroy
- Redmine Refactor #107: Extract method #create from ProjectsController#add
- Redmine Refactor #108: Rename method ProjectsController#add to #new
- Redmine Refactor #109: Extract method ProjectsController#edit to #update
- Redmine Refactor #110: Convert ProjectsController’s routes to resources
- Redmine Refactor #111: Convert ProjectEnumerations to resource
- Redmine Refactor #112: Split Method in FilesController
- Redmine Refactor #113: Convert FilesController to resource
- Redmine Refactor #114: Split Method in VersionsController
- Redmine Refactor #115: Split Method in VersionsController
- Redmine Refactor #116: Convert VersionsController to resource
- Redmine Refactor #117: Split New Method in NewsController
- Redmine Refactor #118: Split Edit Method in NewsController
- Redmine Refactor #119: Extract Class from NewsController
- Redmine Refactor #120: Move Method from NewsController to CommentsController“
- Redmine Refactor #121: Move Method from NewsController to PreviewsController
- Redmine Refactor #122: Convert NewsController to REST resource
- Redmine Refactor #123: Split #add method in UsersController to #add and #create
- Redmine Refactor #124: Rename Method UsersController#add
- Redmine Refactor #125: Split UsersController#edit into #edit and #update
- Redmine Refactor #126: Convert UsersController to Resource
- Redmine Refactor #127: Extract TimelogController#report to new TimeEntryReportsController
- Redmine Refactor #128: Rename method TimelogController#details to #index
- Redmine Refactor #129: Extract Method TimelogController#edit to TimelogController#new
- Redmine Refactor #130: Extract Method TimelogController#edit to TimelogController#new
- Redmine Refactor #131: Extract Method TimelogController#edit to TimelogController#update
- Redmine Refactor #132: Convert Timelogs to REST Resource
- Redmine Refactor #133: Extract Method in WikiController#special
- Redmine Refactor #134: Extract Method in WikiController#special to utility method
- Redmine Refactor #135: Extract Method page_index in WikiController#special
- Redmine Refactor #136: Extract Method date_index in WikiController#special
- Redmine Refactor #137: Remove Method WikiController#special
- Redmine Refactor #138: Unify Interfaces
- Redmine Refactor #139: Rename WikiController#index method to WikiController#show
- Redmine Refactor #140: Extract Method WikiController#edit to #update
- Redmine Refactor #141: Rename Method WikiController#page_index
- Redmine Refactor #142: Convert WikiController#destroy to use HTTP DELETE
- Redmine Refactor #143: Convert WikiController to use :id params
- Redmine Refactor #144: Convert WikiController to a REST resource
- Redmine API: Testing for the Authentication Key
- Redmine API: Testing for HTTP Basic auth refactoring
- Redmine API: Testing for HTTP Basic auth with an API Token
- Redmine API: Changing API Tests for Issues #index and #show
- Redmine API: Adding Key Authentication for Issues#create