Skip to content

Freelancing Digest

Menu
  • Past Issues
  • Articles
  • About Me
    • Hire Me
    • Contact Me

Daily Refactor #21: Move methods in the RoutingTest

I tried to start this week’s refactorings with some major changes to one of the worst areas of Redmine, the IssuesController. Weighing in at over 576 lines and 20 actions, it is full of really bad smells and hasn’t getting any better over time. But after spending two hours on it, I was getting nowhere …

Read more

  • move-method
  • redmine
  • refactoring
  • ruby
  • testing

What I’ve been working on – February 2010

Since I’m working so much with Redmine and Open Source, I wanted to take a few minutes and post an update about some of the major things I’ve been working on recently. Redmine LDAP integration I’ve been working with a client on several new features for Redmine’s LDAP integration. He’s wanting to add a lot …

Read more

  • business
  • ldap
  • redmine
  • seeprojectrun

Daily Refactor #20: Extract Method in AuthSourceLdap

The Refactoring I mentioned yesterday that I wanted to refactor the ternary operation in the ldap_con#search call so today I used extract method to pull it out. Before 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 # app/models/auth_source_ldap.rb class AuthSourceLdap self.base_dn, :filter => object_filter …

Read more

  • extract-method
  • redmine
  • refactoring
  • ruby

Daily Refactor #20.1: Bonus Extract Method in AuthSourceLdap

Right after publishing the final refactoring for AuthSourceLdap, another really good one jumped out at me and I couldn’t wait until next week to fix it. The Refactoring Before 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 # app/models/auth_source_ldap.rb class AuthSourceLdap self.base_dn, :filter => object_filter …

Read more

  • extract-method
  • redmine
  • refactoring
  • ruby

Daily Refactor #19: Cleanup in AuthSourceLdap#authenticate

With the help of Nate Sutton I’ve done two small refactorings to AuthSourceLdap#authenticate and #authenticate_dn. The Refactoring – One This refactoring moved the check for an empty DN into the #authenticate_dn method. It makes sense to have all of the business logic and data validations for authenticating in one method. Before 1 2 3 4 …

Read more

  • redmine
  • refactoring
  • ruby
Posts navigation
Newer posts
Older posts

About Eric | Twitter | Google Plus
Best of Eric Davis | Best of Freelancing | Best of Product Business | Best of Ruby and Rails Programming
Privacy Policy | Terms of Use | A Little Stream Software website

Want to transition from coder to consultant? Learn more: