Skip to content

Commit

Permalink
Merge branch 'release/3.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
coorasse committed Apr 3, 2019
2 parents 1760baa + 7e24de1 commit e10c3c9
Show file tree
Hide file tree
Showing 71 changed files with 1,972 additions and 933 deletions.
10 changes: 2 additions & 8 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ Style/Documentation:
Style/NonNilCheck:
IncludeSemanticChanges: true

Style/FrozenStringLiteralComment:
Enabled: false

Style/EmptyMethod:
Enabled: false

Expand All @@ -27,7 +24,7 @@ Metrics/BlockLength:
# NamePrefix: is_, has_, have_
# NamePrefixBlacklist: is_, has_, have_
# NameWhitelist: is_a?
Style/PredicateName:
Naming/PredicateName:
Exclude:
- 'spec/**/*'
- 'lib/cancan/ability.rb'
Expand All @@ -36,11 +33,8 @@ Style/PredicateName:
Lint/AmbiguousBlockAssociation:
Enabled: false


AllCops:
TargetRubyVersion: 2.2.0
Exclude:
- 'gemfiles/vendor/bundle/**/*'
- 'gemfiles/**/*'
- 'Appraisals'

inherit_from: .rubocop_todo.yml
Empty file removed .rubocop_todo.yml
Empty file.
51 changes: 33 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,49 @@
language: ruby
cache: bundler
sudo: false
addons:
postgresql: "9.6"
rvm:
- 2.3.5
- 2.4.2
- 2.5.0
- 2.5.1
- jruby-9.0.5.0
- 2.6.0
- ruby-head
- jruby-9.1.9.0
- jruby-9.2.5.0
- jruby-head

gemfile:
- gemfiles/activerecord_4.2.gemfile
- gemfiles/activerecord_4.2.0.gemfile
- gemfiles/activerecord_5.0.2.gemfile
- gemfiles/activerecord_5.1.0.gemfile
- gemfiles/activerecord_5.2.0.gemfile
services:
- mongodb
- gemfiles/activerecord_5.2.2.gemfile
- gemfiles/activerecord_6.0.0.gemfile
env:
- DB=sqlite
- DB=postgres

matrix:
fast_finish: true
exclude:
- rvm: jruby-9.0.5.0
gemfile: gemfiles/activerecord_5.0.2.gemfile
- rvm: jruby-9.1.9.0
gemfile: gemfiles/activerecord_5.0.2.gemfile
- rvm: jruby-9.0.5.0
gemfile: gemfiles/activerecord_5.1.0.gemfile
- rvm: jruby-9.1.9.0
gemfile: gemfiles/activerecord_5.1.0.gemfile
- rvm: jruby-9.0.5.0
gemfile: gemfiles/activerecord_5.2.0.gemfile
- rvm: jruby-9.1.9.0
gemfile: gemfiles/activerecord_5.2.0.gemfile
- rvm: 2.2.6
gemfile: gemfiles/activerecord_6.0.0.gemfile
- rvm: 2.3.5
gemfile: gemfiles/activerecord_6.0.0.gemfile
- rvm: 2.4.2
gemfile: gemfiles/activerecord_6.0.0.gemfile
- rvm: jruby-9.1.9.0
gemfile: gemfiles/activerecord_5.0.2.gemfile
- rvm: jruby-9.1.9.0
gemfile: gemfiles/activerecord_6.0.0.gemfile
- rvm: jruby-9.2.5.0
gemfile: gemfiles/activerecord_5.0.2.gemfile
- rvm: jruby-9.2.5.0
gemfile: gemfiles/activerecord_6.0.0.gemfile
allow_failures:
- rvm: ruby-head
- rvm: jruby-head

notifications:
email:
recipients:
Expand All @@ -38,5 +52,6 @@ notifications:
on_failure: change
before_install:
- gem update --system
- gem install bundler
script:
- bundle exec rubocop && bundle exec rake
39 changes: 30 additions & 9 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appraise 'activerecord_4.2' do
appraise 'activerecord_4.2.0' do
gem 'activerecord', '~> 4.2.0', require: 'active_record'
gem 'activesupport', '~> 4.2.0', require: 'active_support/all'
gem 'actionpack', '~> 4.2.0', require: 'action_pack'
Expand All @@ -7,10 +7,11 @@ appraise 'activerecord_4.2' do
gemfile.platforms :jruby do
gem 'activerecord-jdbcsqlite3-adapter', '~> 1.3.24'
gem 'jdbc-sqlite3'
gem 'jdbc-postgres'
end

gemfile.platforms :ruby, :mswin, :mingw do
gem 'sqlite3'
gem 'sqlite3', '~> 1.3.0'
gem 'pg', '~> 0.21'
end
end
Expand All @@ -23,10 +24,11 @@ appraise 'activerecord_5.0.2' do
gemfile.platforms :jruby do
gem 'activerecord-jdbcsqlite3-adapter'
gem 'jdbc-sqlite3'
gem 'jdbc-postgres'
end

gemfile.platforms :ruby, :mswin, :mingw do
gem 'sqlite3'
gem 'sqlite3', '~> 1.3.0'
gem 'pg', '~> 0.21'
end
end
Expand All @@ -39,26 +41,45 @@ appraise 'activerecord_5.1.0' do
gemfile.platforms :jruby do
gem 'activerecord-jdbcsqlite3-adapter'
gem 'jdbc-sqlite3'
gem 'jdbc-postgres'
end

gemfile.platforms :ruby, :mswin, :mingw do
gem 'sqlite3'
gem 'sqlite3', '~> 1.3.0'
gem 'pg', '~> 0.21'
end
end

appraise 'activerecord_5.2.0' do
gem 'activerecord', '~> 5.2.0', require: 'active_record'
gem 'activesupport', '~> 5.2.0', require: 'active_support/all'
gem 'actionpack', '~> 5.2.0', require: 'action_pack'
appraise 'activerecord_5.2.2' do
gem 'activerecord', '~> 5.2.2', require: 'active_record'
gem 'activesupport', '~> 5.2.2', require: 'active_support/all'
gem 'actionpack', '~> 5.2.2', require: 'action_pack'

gemfile.platforms :jruby do
gem 'activerecord-jdbcsqlite3-adapter'
gem 'jdbc-sqlite3'
gem 'jdbc-postgres'
end

gemfile.platforms :ruby, :mswin, :mingw do
gem 'sqlite3'
gem 'sqlite3', '~> 1.3.0'
gem 'pg', '~> 0.21'
end
end

appraise 'activerecord_6.0.0' do
gem 'actionpack', '~> 6.0.0.beta3', require: 'action_pack'
gem 'activerecord', '~> 6.0.0.beta3', require: 'active_record'
gem 'activesupport', '~> 6.0.0.beta3', require: 'active_support/all'

platforms :jruby do
gem 'activerecord-jdbcsqlite3-adapter'
gem 'jdbc-sqlite3'
gem 'jdbc-postgres'
end

platforms :ruby, :mswin, :mingw do
gem 'pg', '~> 1.1.4'
gem 'sqlite3', '~> 1.3.0'
end
end
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## 3.0.0

* [#560](https://github.com/CanCanCommunity/cancancan/pull/560): Add support for Rails 6.0. ([@coorasse][])
* [#489](https://github.com/CanCanCommunity/cancancan/pull/489): Drop support for actions without a subject. ([@andrew-aladev][])
* [#474](https://github.com/CanCanCommunity/cancancan/pull/474): Allow to add attribute-level rules. ([@phaedryx][])
* [#512](https://github.com/CanCanCommunity/cancancan/pull/512): Removed automatic eager loading of associations for ActiveRecord >= 5.0. ([@kaspernj][])
* [#575](https://github.com/CanCanCommunity/cancancan/pull/575): Use the rules compressor when generating joins in accessible_by. ([@coorasse][])

* [#444](https://github.com/CanCanCommunity/cancancan/issues/444): Allow to use symbols when defining conditions over enums. ([@s-mage][])
* [#538](https://github.com/CanCanCommunity/cancancan/issues/538): Merge alias actions when merging abilities. ([@Jcambass][])
* [#462](https://github.com/CanCanCommunity/cancancan/issues/462): Add support to translate the model name in messages. ([@nyamadori][])
* [#567](https://github.com/CanCanCommunity/cancancan/issues/567): Extensively run tests on different databases (sqlite and postgres). ([@coorasse][])
* [#566](https://github.com/CanCanCommunity/cancancan/issues/566): Avoid queries on session dumps (speed up error pages). ([@coorasse][])
* [#568](https://github.com/CanCanCommunity/cancancan/issues/568): Automatically freeze strings in all files. ([@coorasse][])
* [#577](https://github.com/CanCanCommunity/cancancan/pull/577): Normalise rules traversing associations to reduce the number of joins. ([@coorasse][])

Please read the [guide on migrating from CanCanCan 2.x to 3.0](https://github.com/CanCanCommunity/cancancan/wiki/Migrating-from-CanCanCan-2.x-to-3.0)

## 2.3.0 (Sep 16th, 2018)

* [#528](https://github.com/CanCanCommunity/cancancan/issues/528): Compress irrelevant rules before generating a query to optimize performances. ([@coorasse][])
Expand Down Expand Up @@ -615,3 +633,9 @@
[@oliverklee]: https://github.com/oliverklee
[@gingray]: https://github.com/gingray
[@timraymond]: https://github.com/timraymond
[@s-mage]: https://github.com/s-mage
[@Jcambass]: https://github.com/Jcambass
[@nyamadori]: https://github.com/nyamadori
[@andrew-aladev]: https://github.com/andrew-aladev
[@phaedryx]: https://github.com/phaedryx
[@kaspernj]: https://github.com/kaspernj
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

source 'https://rubygems.org'

gemspec

0 comments on commit e10c3c9

Please sign in to comment.