Skip to content
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

chore(deps): bump ransack from 3.0.1 to 4.0.0 #1886

Merged
merged 4 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
["3.0.3", "3.2.2"].each do |ruby_version|
["6.0", "6.1", "7.0"].each do |rails_version|
appraise "rails-6.0-ruby-#{ruby_version}" do
gem "rails", "~> 6.0.0"
gem "ransack", "~> 3.1.0"
end
end

["3.0.3", "3.2.2"].each do |ruby_version|
["6.1", "7.0"].each do |rails_version|
appraise "rails-#{rails_version}-ruby-#{ruby_version}" do
gem "rails", "~> #{rails_version}.0"
gem "ransack", "~> 3.1.0"
gem "ransack", "~> 4.0.0"
end
end
end
12 changes: 6 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ GEM
mini_magick (4.12.0)
mini_mime (1.1.2)
mini_portile2 (2.8.2)
minitest (5.18.1)
minitest (5.19.0)
msgpack (1.5.6)
multi_xml (0.6.0)
net-imap (0.3.6)
Expand Down Expand Up @@ -328,9 +328,9 @@ GEM
thor (~> 1.0)
rainbow (3.1.1)
rake (13.0.6)
ransack (3.0.1)
activerecord (>= 6.0.4)
activesupport (>= 6.0.4)
ransack (4.0.0)
activerecord (>= 6.1.5)
activesupport (>= 6.1.5)
i18n
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
Expand Down Expand Up @@ -446,7 +446,7 @@ GEM
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.8)
zeitwerk (2.6.11)

PLATFORMS
ruby
Expand Down Expand Up @@ -524,4 +524,4 @@ DEPENDENCIES
zeitwerk

BUNDLED WITH
2.3.24
2.4.14
3 changes: 2 additions & 1 deletion gemfiles/rails_6.0_ruby_3.0.3.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ GEM
zeitwerk (2.6.7)

PLATFORMS
arm64-darwin-21
arm64-darwin-22
x86_64-linux

Expand Down Expand Up @@ -518,4 +519,4 @@ DEPENDENCIES
zeitwerk

BUNDLED WITH
2.3.24
2.4.14
3 changes: 2 additions & 1 deletion gemfiles/rails_6.0_ruby_3.2.2.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ GEM
zeitwerk (2.6.7)

PLATFORMS
arm64-darwin-21
arm64-darwin-22
x86_64-linux

Expand Down Expand Up @@ -518,4 +519,4 @@ DEPENDENCIES
zeitwerk

BUNDLED WITH
2.3.24
2.4.14
2 changes: 1 addition & 1 deletion gemfiles/rails_6.1_ruby_3.0.3.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ gem "addressable"
gem "appraisal"
gem "meta-tags"
gem "manifester"
gem "ransack", "~> 3.1.0"
gem "ransack", "~> 4.0.0"
gem "friendly_id", "~> 5.4.0"
gem "aws-sdk-s3", require: false
gem "net-smtp", require: false
Expand Down
11 changes: 6 additions & 5 deletions gemfiles/rails_6.1_ruby_3.0.3.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ GEM
thor (~> 1.0)
rainbow (3.1.1)
rake (13.0.6)
ransack (3.1.0)
activerecord (>= 6.0.4)
activesupport (>= 6.0.4)
ransack (4.0.0)
activerecord (>= 6.1.5)
activesupport (>= 6.1.5)
i18n
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
Expand Down Expand Up @@ -446,6 +446,7 @@ GEM
zeitwerk (2.6.7)

PLATFORMS
arm64-darwin-21
arm64-darwin-22
x86_64-linux

Expand Down Expand Up @@ -500,7 +501,7 @@ DEPENDENCIES
pundit
rails (~> 6.1.0)
rails-controller-testing
ransack (~> 3.1.0)
ransack (~> 4.0.0)
redis (~> 4.0)
rspec-rails (~> 4.0.0)
rubocop
Expand All @@ -521,4 +522,4 @@ DEPENDENCIES
zeitwerk

BUNDLED WITH
2.3.24
2.4.14
2 changes: 1 addition & 1 deletion gemfiles/rails_6.1_ruby_3.2.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ gem "addressable"
gem "appraisal"
gem "meta-tags"
gem "manifester"
gem "ransack", "~> 3.1.0"
gem "ransack", "~> 4.0.0"
gem "friendly_id", "~> 5.4.0"
gem "aws-sdk-s3", require: false
gem "net-smtp", require: false
Expand Down
11 changes: 6 additions & 5 deletions gemfiles/rails_6.1_ruby_3.2.2.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ GEM
thor (~> 1.0)
rainbow (3.1.1)
rake (13.0.6)
ransack (3.1.0)
activerecord (>= 6.0.4)
activesupport (>= 6.0.4)
ransack (4.0.0)
activerecord (>= 6.1.5)
activesupport (>= 6.1.5)
i18n
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
Expand Down Expand Up @@ -446,6 +446,7 @@ GEM
zeitwerk (2.6.7)

PLATFORMS
arm64-darwin-21
arm64-darwin-22
x86_64-linux

Expand Down Expand Up @@ -500,7 +501,7 @@ DEPENDENCIES
pundit
rails (~> 6.1.0)
rails-controller-testing
ransack (~> 3.1.0)
ransack (~> 4.0.0)
redis (~> 4.0)
rspec-rails (~> 4.0.0)
rubocop
Expand All @@ -521,4 +522,4 @@ DEPENDENCIES
zeitwerk

BUNDLED WITH
2.3.24
2.4.14
2 changes: 1 addition & 1 deletion gemfiles/rails_7.0_ruby_3.0.3.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ gem "addressable"
gem "appraisal"
gem "meta-tags"
gem "manifester"
gem "ransack", "~> 3.1.0"
gem "ransack", "~> 4.0.0"
gem "friendly_id", "~> 5.4.0"
gem "aws-sdk-s3", require: false
gem "net-smtp", require: false
Expand Down
11 changes: 6 additions & 5 deletions gemfiles/rails_7.0_ruby_3.0.3.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,9 @@ GEM
zeitwerk (~> 2.5)
rainbow (3.1.1)
rake (13.0.6)
ransack (3.1.0)
activerecord (>= 6.0.4)
activesupport (>= 6.0.4)
ransack (4.0.0)
activerecord (>= 6.1.5)
activesupport (>= 6.1.5)
i18n
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
Expand Down Expand Up @@ -452,6 +452,7 @@ GEM
zeitwerk (2.6.7)

PLATFORMS
arm64-darwin-21
arm64-darwin-22
x86_64-linux

Expand Down Expand Up @@ -506,7 +507,7 @@ DEPENDENCIES
pundit
rails (~> 7.0.0)
rails-controller-testing
ransack (~> 3.1.0)
ransack (~> 4.0.0)
redis (~> 4.0)
rspec-rails (~> 4.0.0)
rubocop
Expand All @@ -527,4 +528,4 @@ DEPENDENCIES
zeitwerk

BUNDLED WITH
2.3.24
2.4.14
2 changes: 1 addition & 1 deletion gemfiles/rails_7.0_ruby_3.2.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ gem "addressable"
gem "appraisal"
gem "meta-tags"
gem "manifester"
gem "ransack", "~> 3.1.0"
gem "ransack", "~> 4.0.0"
gem "friendly_id", "~> 5.4.0"
gem "aws-sdk-s3", require: false
gem "net-smtp", require: false
Expand Down
11 changes: 6 additions & 5 deletions gemfiles/rails_7.0_ruby_3.2.2.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,9 @@ GEM
zeitwerk (~> 2.5)
rainbow (3.1.1)
rake (13.0.6)
ransack (3.1.0)
activerecord (>= 6.0.4)
activesupport (>= 6.0.4)
ransack (4.0.0)
activerecord (>= 6.1.5)
activesupport (>= 6.1.5)
i18n
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
Expand Down Expand Up @@ -452,6 +452,7 @@ GEM
zeitwerk (2.6.7)

PLATFORMS
arm64-darwin-21
arm64-darwin-22
x86_64-linux

Expand Down Expand Up @@ -506,7 +507,7 @@ DEPENDENCIES
pundit
rails (~> 7.0.0)
rails-controller-testing
ransack (~> 3.1.0)
ransack (~> 4.0.0)
redis (~> 4.0)
rspec-rails (~> 4.0.0)
rubocop
Expand All @@ -527,4 +528,4 @@ DEPENDENCIES
zeitwerk

BUNDLED WITH
2.3.24
2.4.14
4 changes: 4 additions & 0 deletions spec/dummy/app/models/city.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ def random_image
"https://source.unsplash.com/random"
end

def self.ransackable_attributes(auth_object = nil)
%w(name)
end

# Alternative to stored_as location field
# def coordinates
# [latitude, longitude]
Expand Down
4 changes: 4 additions & 0 deletions spec/dummy/app/models/comment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ class Comment < ApplicationRecord

scope :starts_with, ->(prefix) { where("LOWER(body) LIKE ?", "#{prefix}%") }

def self.ransackable_attributes(auth_object = nil)
%w(id body)
end

def tiny_name
ActionView::Base.full_sanitizer.sanitize(body.to_s).truncate 60
end
Expand Down
4 changes: 4 additions & 0 deletions spec/dummy/app/models/course.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,8 @@ def self.cities
Thailand: ["Chiang Mai", "Bangkok", "Phuket"]
}
end

def self.ransackable_attributes(auth_object = nil)
%w(id name)
end
end
4 changes: 4 additions & 0 deletions spec/dummy/app/models/course/link.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ class Course::Link < ApplicationRecord
acts_as_list
default_scope -> { order(position: :asc) }

def self.ransackable_attributes(auth_object = nil)
%w(id link)
end

def self.table_name_prefix
"course_"
end
Expand Down
5 changes: 5 additions & 0 deletions spec/dummy/app/models/fish.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,9 @@ def information=(value)
# properties should be a hash
puts ["information in the Fish model->", value].inspect unless Rails.env.test?
end

def self.ransackable_attributes(auth_object = nil)
%w(id name)
end

end
4 changes: 4 additions & 0 deletions spec/dummy/app/models/post.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,8 @@ def self.find(input)
def update_slug
self.slug = name.parameterize
end

def self.ransackable_attributes(auth_object = nil)
%w(id name body)
end
end
4 changes: 4 additions & 0 deletions spec/dummy/app/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,8 @@ class Project < ApplicationRecord
has_and_belongs_to_many :users

default_scope { order(name: :asc) }

def self.ransackable_attributes(auth_object = nil)
%w(id name country)
end
end
4 changes: 4 additions & 0 deletions spec/dummy/app/models/sibling.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@
#
class Sibling < Person
has_many :spouses, foreign_key: :person_id

def self.ransackable_attributes(auth_object = nil)
%w(id name)
end
end
3 changes: 3 additions & 0 deletions spec/dummy/app/models/spouse.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@
# person_id :bigint
#
class Spouse < Person
def self.ransackable_attributes(auth_object = nil)
%w(id name)
end
end
4 changes: 4 additions & 0 deletions spec/dummy/app/models/team.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ class Team < ApplicationRecord
has_one :admin, through: :admin_membership, source: :user, inverse_of: :teams

has_many :reviews, as: :reviewable

def self.ransackable_attributes(auth_object = nil)
%w(id name)
end
end
5 changes: 5 additions & 0 deletions spec/dummy/app/models/team_membership.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ class TeamMembership < ApplicationRecord
belongs_to :team
belongs_to :user

def self.ransackable_attributes(auth_object = nil)
%w(id)
end


def name
"#{team&.name} - #{user&.name}"
end
Expand Down
4 changes: 4 additions & 0 deletions spec/dummy/app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,8 @@ def avatar
def avo_title
is_admin? ? "Admin" : "Member"
end

def self.ransackable_attributes(auth_object = nil)
%w(id first_name last_name created_at)
end
end
Loading