Shopify / measured

Encapsulate measurements and their units in Ruby and Ruby on Rails.
MIT License
337 stars 28 forks source link

Implements new class Measured::CaseSensitiveMeasurable to inherit from. #23

Closed AnthonyBobsin closed 9 years ago

AnthonyBobsin commented 9 years ago

This class defines case sensitivity for unit names and aliases at the system level. If you would like to create a completely case sensitive unit, you would inherit from Measured::CaseSensitiveMeasurable on creation instead of Measured::Measurable.

AnthonyBobsin commented 9 years ago

@kmcphillips not sure if you saw the request. Let me know if you have any questions about the implementation

kmcphillips commented 9 years ago

Great test coverage.

Implementation looks pretty good. Though with_case_sensitivity(case_sensitive, comparison) is pretty confusing and could deal with a little refactor.

Can you rebase master over this to fix conflicts?

Have you checked out measured-rails, and ran its tests with this branch of measured? That's what broke least time we took a stab at this.

Sorry for the delay in response. I'm back around now.

AnthonyBobsin commented 9 years ago

@kmcphillips Thanks for the feedback. I'll refactor, make those additions and rebase then push. I haven't actually, that's a great idea, i'll double check to make sure it passes those tests as well.

AnthonyBobsin commented 9 years ago

@kmcphillips all changes have been made, and is tested with measured-rails as well :+1:

kmcphillips commented 9 years ago

Released both measured and measured-rails 1.2.0