DataMapper 1.2.0.rc1 Released

65 views
Skip to first unread message

Piotr Solnica

unread,
Sep 9, 2011, 3:34:34 PM9/9/11
to DataMapper
Hi All,

I'm happy to announce that we have released DataMapper 1.2.0.rc1.

Installation instruction (assuming you're using postgres):

gem install datamapper dm-postgres-adapter --pre

This pre-release should work with latest Rails 3.1.0. It also comes
with many bug fixes, performance improvements and internal refactors.
Please feel free to test it and report any issues on Github:
https://github.com/dm-core/issues

Here's a list of the most important changes:

dm-core:

- STI queries no longer include the top-level class name
- UnderscoredAndPluralizedWithoutLeadingModule naming convention was
added
- belongs_to supports :unique option
- Validation of property names was improved
- Resource[] and Resource[]= no longer fail when property name is not
known
- Redundant usage of chainable was removed resulting in a better
performance
- Boolean property typecasting was refactored
- Various issues with setting default Property options were fixed
- Resource#attributes= no longer use public_method_defined? - this is
a security fix preventing possible DDOS attacks
- Problems with auto-migrations in multiple repositories were fixed

dm-adjust:

- Support for InMemoryAdapter
- Add COALESCE to default NULL columns to 0

dm-constraints:

- Total rewrite

dm-do-adapter:

- Warning from DO is gone now

dm-migrations:

- alter table is fixed for postgres
- Property options (such as :length) are now correctly used in
migrations
- Support to specify table options when creating a table was added
(for things like db engines in mysql etc.)

dm-rails:

- Support for Rails 3.1.0
- Storage create/drop tasks are by default noops in case an adapter
doesn't support it
- Support for field_naming_convention option
- Support for resource_naming_convention option
- You can now set a custom repository scope for the repository in the
IdentityMap middleware

dm-serializer:

- *Should* work with psych

dm-types:

- Support for Resource#dirty? upon indirect property mutation was
added (this is huge, more info here:
https://github.com/datamapper/dm-types/commit/3d96b1cd2b270a3843877a5eb542da808df7b986)
- Issues with Paranoid properties and STI were fixed
- JSON property uses multi_json now

dm-validations:

- #valid? is always called even if a resource is not dirty
- Issues with JRuby and unicode were fixed
- Massive internal clean-up towards future rewrite that will make
validations even more awesome

For a full list of all the commits you can check out this gist:
https://gist.github.com/1206542

It's probably worth to mention that the focus of development is slowly
changing towards DataMapper 2.0. We want to get 1.2.0 final released
as soon as possible and then continue working on the libraries that
will be a part of DataMapper 2.0. There's also a big rewrite of dm-
validations that will be included in the 1.3.0.

We will of course continue to support and maintain 1.x.x series. It's
hard to say how many 1.x releases will go out until 2.0 is ready
though.

If you are interested in the development of DataMapper 2.0 you can
read the roadmap that we're preparing: https://github.com/datamapper/dm-core/wiki/roadmap
And as always feel free to ask any questions in #datamapper IRC
channel.

Thank you to all of the contributors!

Cheers!

# solnic

Dan Kubb (dkubb)

unread,
Sep 10, 2011, 12:30:05 AM9/10/11
to DataMapper
Piotr,

> I'm happy to announce that we have released DataMapper 1.2.0.rc1.

BTW thanks for doing this RC release!

Just for everyone on the mailing list: this is the first release we've
done in several years where I didn't manage the gem release process
because we are trying to get more people involved so that I'm not a
bottleneck. Ideally we would like to have at least 3 people who can
release DataMapper if needed.

It might not seem very difficult, but coordinating the release of a
couple dozen gems all at one time is quite time consuming and complex.
I'm hoping that by having a few other people do the release we can
find ways to automate the process even further. The ultimate goal is
to be able to release every gem with a single command, but we're still
a little way from that.

For this RC I would highly encourage everyone in the community to try
to upgrade their apps and run the specs with these gems. It's always
been a requirement in 1.x that DataMapper.finalize is called before
using resource objects, but up until this release the system would
still somewhat function if you forgot. With this release lots of stuff
is probably going to break if you forget to finalize. I would
encourage you to run your specs so you can identify these problems in
the specs sooner rather than a few months from now when you forget
about this message and wonder why DM is blowing up on you.

--

Thanks,

Dan

Chris Corbyn

unread,
Sep 10, 2011, 9:15:43 AM9/10/11
to datam...@googlegroups.com
It looks like the 'Binary' property type is broken. It only works if I assign UTF-8 strings to it:

def password=(password)
self.password_salt = Random.new.bytes(3)
self.password_hash = hash_password(password)
end

#password_salt is a Binary field.

ArgumentError:
invalid byte sequence in UTF-8

If I change the password salt to ensure it is UTF-8 compatible, everything works, but I can't do that unfortunately. I'll delve into the source once I've resolved other bugs (I'm also moving to Rails 3.1).

> --
> You received this message because you are subscribed to the Google Groups "DataMapper" group.
> To post to this group, send email to datam...@googlegroups.com.
> To unsubscribe from this group, send email to datamapper+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/datamapper?hl=en.
>

Chris Corbyn

unread,
Sep 10, 2011, 10:01:48 AM9/10/11
to datam...@googlegroups.com
Actually, the problem I report with Binary only occurs in the context of Rails, and seemingly only when running the specs, I can't replicate it in a clean environment. It's probably nothing to do with DM :)

On 2011/09/10, at 14:30, Dan Kubb (dkubb) wrote:

Florian Gilcher

unread,
Sep 13, 2011, 10:40:39 AM9/13/11
to DataMapper
Hi,

first of all: great news and thank you for the hard work.

I have one question though: Are some of the plugins in unmaintained
status? For example, dm-is-versioned got a version bump although it
has severe incompatibilities with other plugins. I have a pull request
sitting in the repository since February...

Regards,
Florian

Piotr Solnica

unread,
Sep 13, 2011, 11:10:41 AM9/13/11
to datam...@googlegroups.com
Hi Florian!

On Sep 13, 2011, at 4:40 PM, Florian Gilcher wrote:

> Hi,
>
> first of all: great news and thank you for the hard work.

Thank you :)

> I have one question though: Are some of the plugins in unmaintained
> status?

Unfortunately yes. We support some of the plugins in a way that we only make sure the spec suites pass before making a new release. It's impossible for the core team to maintain over 30 gems and that's why we've decided to "give away" some of the plugins in the near future. Specifically DataMapper 1.3.0 suite will only include the most common gems (probably only what's inside the meta datamapper gem + DO adapters).

This means that over a dozen of DM plugins are looking for new maintainers.

> For example, dm-is-versioned got a version bump although it
> has severe incompatibilities with other plugins. I have a pull request

> sitting in the repository since February…

I'm sorry to hear that. I'll look at the pull request later today.

Cheers!

# solnic

Dominic Sisneros

unread,
Sep 13, 2011, 4:44:34 PM9/13/11
to datam...@googlegroups.com
> For example, dm-is-versioned got a version bump although it
> has severe incompatibilities with other plugins. I have a pull request
> sitting in the repository since February…

I'm sorry to hear that. I'll look at the pull request later today.


Can you pull the changes for dm-oracle-adapter also.  It doesn't run without
https://github.com/datamapper/dm-oracle-adapter/pull/7

thanks

Dominic

Emmanuel Gomez

unread,
Sep 13, 2011, 4:49:15 PM9/13/11
to datam...@googlegroups.com
Hi Dominic,

I merged in your pull request for dm-oracle-adapter.

Thanks!

—Emmanuel

Reply all
Reply to author
Forward
0 new messages