forked from thoughtbot/administrate
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix backward compatible Pundit include (thoughtbot#2383)
This commit fixes thoughtbot#2378 by adding a conditional that includes Pundit::Authorization when it is defined else it includes Pundit. This change ensures that we remain compatible with Pundit < 2.2.0 To test with Pundit "~> 2.1.0", we run: ``` bundle exec appraisal pundit21 rspec spec/controllers/concerns/administrate/punditize_spec.rb ``` See: thoughtbot#2141 See: thoughtbot#1068
- Loading branch information
Showing
4 changed files
with
76 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,7 @@ end | |
appraise "rails70" do | ||
gem "rails", "~> 6.1" | ||
end | ||
|
||
appraise "pundit21" do | ||
gem "pundit", "~> 2.1.0" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
ruby "3.2.2" | ||
|
||
gem "administrate-field-image" | ||
gem "faker" | ||
gem "front_matter_parser" | ||
gem "globalid" | ||
gem "kaminari-i18n" | ||
gem "pg" | ||
gem "pundit", "~> 2.1.0" | ||
gem "redcarpet" | ||
gem "sentry-raven" | ||
gem "unicorn" | ||
|
||
group :development, :test do | ||
gem "appraisal" | ||
gem "awesome_print" | ||
gem "byebug" | ||
gem "dotenv-rails" | ||
gem "factory_bot_rails" | ||
gem "i18n-tasks", "1.0.12" | ||
gem "pry" | ||
gem "yard" | ||
end | ||
|
||
group :test do | ||
gem "ammeter" | ||
gem "capybara" | ||
gem "database_cleaner" | ||
gem "formulaic" | ||
gem "launchy" | ||
gem "selenium-webdriver" | ||
gem "shoulda-matchers" | ||
gem "timecop" | ||
gem "webdrivers" | ||
gem "webmock" | ||
gem "webrick" | ||
gem "xpath", "3.2.0" | ||
end | ||
|
||
group :staging, :production do | ||
gem "rack-timeout" | ||
gem "uglifier" | ||
end | ||
|
||
gemspec path: "../" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters