-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Datamapper support #472
Datamapper support #472
Conversation
gem 'data_mapper' | ||
gem 'dm-sqlite-adapter' | ||
gem 'dm-mysql-adapter' | ||
gem 'dm-redis-adapter' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need redis adapter here?
As mysql database is created on Travis, do we need dm-sqlite as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The adapters for redis and sqlite are there because I was using them for testing during development, I left the redis setup commented out in spec/orm/datamapper.rb just in case somebody wanted to use it.
We can remove them.
Now it's better 😉 What do you think about writing method like update_many_attributes (which is especially to be capable with all ORMs), but for saving without validation? |
Something like this ? # lib/sorcery/model/adapters/datamapper.rb
def sorcery_save(mthd, options = {})
if options.key?(:validate) && ! options[:validate]
save!
else
save
end
end # other adapters
def sorcery_save(mthd, options = {})
self.send(mthd, options)
end |
I'm not sure we need |
Could you rebase it, please? |
Updated, expected to work with Rails 3, datamapper is not being actively developed. |
That means after merging Datamapper integration we'll always have red status on Travis. Any ideas how to avoid it? |
Added an exclusion filter to skip DM tests |
DataMapper Support
Passed tests with DM adapter: dm-mysql-adapter .
Please see notes in README file, code review and feedback appreciated.