inossidabile / protector

Comfortable (seriously) white-list security restrictions for models on a field level
MIT License
270 stars 31 forks source link

Travis support for rails/ar 4.0, 4.1 and 4.2 #63

Open toxix opened 9 years ago

toxix commented 9 years ago

This adds sepperate gemfiles for all actualy released versions of rails 4 and active record 4. It also support ruby 2.2.

you may prefere merging this over the minor changes from https://github.com/inossidabile/protector/pull/62 or https://github.com/inossidabile/protector/pull/61

toxix commented 9 years ago

Don't know wat to do with the failing installation of gems when activrecord/rails is used with jruby-19mode

ryedog commented 9 years ago

the issue is the new statement cache in ActiveRecord 4.2.

It doesn't ask for a scope unless skip_statement_cache? returns true and skip_statement_cache? returns false unless there is already a scope but since protector is dynamically adding the scope on request of the scope there is not scope at the time skip_statement_cache? is called.

there's a simple fix (although a little rough to hunt down) https://github.com/Updater/protector/pull/2/files