* Since Bcrypt::Password#hash is defined to return a String, any code that creates a hash that is a composite of several values (for use in Hash or Set) using the normal approach of xor'ing them together, would throw an exception. More detail on bug can be found here: http://github.com/codahale/bcrypt-ruby/issues#issue/1
* The master branch is the default branch anyway, so specifying this explicitly was redundant.
* Methods involved in hooks may not always be testable using this method, and it is better to test for the side effect of the method rather than if a specific method was called.
Since this change has the potential to completely break community plugins that rely on doing stuff like DataMapper.const_defined?('Validate'), we still provide a constant alias for the time being. DataMapper::Validate will continue to work for some time but will not be supported once we hit 1.0. The release notes for the next release will include a warning that this namespace is deprecated and DataMapper::Validations should be used instead. In fact, we might add API to dm-validations that will allow to check for its presence without the need of doing const_defined? checks. Big thanks to hipe on IRC, for totally helping me out with the search/replace regex that made this refactoring bearable. search: \b(Validate)($|:) replace: Validations$2 While it didn't catch *all* occurrences, it only left out 3 places in the whole of dm-more. Note that it didn't touch comments that started with # Validate something for some reason
In order to be more compliant with the interfaces provided by the ActiveModel::Validations validators we're updating the DM validators to use similar names and conventions. The eventual goal is for dm-validations to be a drop in replacement that supports all of the validator methods defined in ActiveModel::Validations. Note that there are no plans to actually use the AMo implementation. All we want to do is provide the same interface, so that DM can be used with rails plugins that rely on establishing validations on ORM objects. The following methods have been renamed: validates_length -> validates_length_of validates_present -> validates_presence_of validates_is_accepted -> validates_acceptance_of validates_is_confirmed -> validates_confirmation_of validates_format -> validates_format_of validates_is_number -> validates_numericality_of validates_is_unique -> validates_uniqueness_of Using the old validator names will still work but will issue deprecation warnings.
* Toplevel rake tasks now use bundle exec - Added rake gemspec - Added rake bundle:install - use that for running specs with extlib - Added rake bundle:install:quality - use that for running metric_fu tasks * Recognize ENV['EXCLUDE] containing a comma separated list of gems to exclude, useful in spec runs for example.
This will make sure that all the gems require everything they need to be fully functional.
1) This is a workaround for current bundler which doesn't yet respect the order in which the gems have been declared in the Gemfile, when doing a Bundler.require 2) Actually I also think it's good style to require all the code that we need in order to perform a task. Even if most applications will always require dm-core before requiring any of its plugins, it still doesn't hurt to be explicit and to avoid possible bugs in the first place.