diff --git a/CHANGELOG.md b/CHANGELOG.md index 83c8c93df9..45b5a8fe0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ * [#2410](https://github.com/ruby-grape/grape/pull/2410): Gem deprecations will raise a DeprecationWarning in specs - [@ericproulx](https://github.com/ericproulx). * [#2389](https://github.com/ruby-grape/grape/pull/2389): Remove rack-accept dependency - [@ericproulx](https://github.com/ericproulx). * [#2426](https://github.com/ruby-grape/grape/pull/2426): Drop support for rack 1.x series - [@ericproulx](https://github.com/ericproulx). +* [#2427](https://github.com/ruby-grape/grape/pull/2427): Use `rack-contrib` jsonp instead of rack-jsonp - [@ericproulx](https://github.com/ericproulx). * Your contribution here. #### Fixes diff --git a/Gemfile b/Gemfile index 544c59d3d4..2ac129f2fa 100644 --- a/Gemfile +++ b/Gemfile @@ -27,7 +27,7 @@ end group :test do gem 'grape-entity', '~> 0.6', require: false - gem 'rack-jsonp', require: 'rack/jsonp' + gem 'rack-contrib', require: false gem 'rack-test', '< 2.1' gem 'rspec', '< 4' gem 'ruby-grape-danger', '~> 0.2.0', require: false diff --git a/gemfiles/multi_json.gemfile b/gemfiles/multi_json.gemfile index b2b48aa270..894d95e0a9 100644 --- a/gemfiles/multi_json.gemfile +++ b/gemfiles/multi_json.gemfile @@ -27,7 +27,7 @@ end group :test do gem 'grape-entity', '~> 0.6', require: false - gem 'rack-jsonp', require: 'rack/jsonp' + gem 'rack-contrib', require: false gem 'rack-test', '< 2.1' gem 'rspec', '< 4' gem 'ruby-grape-danger', '~> 0.2.0', require: false diff --git a/gemfiles/multi_xml.gemfile b/gemfiles/multi_xml.gemfile index 26cd081fdb..38de241d84 100644 --- a/gemfiles/multi_xml.gemfile +++ b/gemfiles/multi_xml.gemfile @@ -27,7 +27,7 @@ end group :test do gem 'grape-entity', '~> 0.6', require: false - gem 'rack-jsonp', require: 'rack/jsonp' + gem 'rack-contrib', require: false gem 'rack-test', '< 2.1' gem 'rspec', '< 4' gem 'ruby-grape-danger', '~> 0.2.0', require: false diff --git a/gemfiles/no_dry_validation.gemfile b/gemfiles/no_dry_validation.gemfile index 46f2c2c0b6..08c74247a2 100644 --- a/gemfiles/no_dry_validation.gemfile +++ b/gemfiles/no_dry_validation.gemfile @@ -24,7 +24,7 @@ end group :test do gem 'grape-entity', '~> 0.6', require: false - gem 'rack-jsonp', require: 'rack/jsonp' + gem 'rack-contrib', require: false gem 'rack-test', '< 2.1' gem 'rspec', '< 4' gem 'ruby-grape-danger', '~> 0.2.0', require: false diff --git a/gemfiles/rack_2_0.gemfile b/gemfiles/rack_2_0.gemfile index 04f3fe9479..6f3f9af224 100644 --- a/gemfiles/rack_2_0.gemfile +++ b/gemfiles/rack_2_0.gemfile @@ -27,7 +27,7 @@ end group :test do gem 'grape-entity', '~> 0.6', require: false - gem 'rack-jsonp', require: 'rack/jsonp' + gem 'rack-contrib', require: false gem 'rack-test', '< 2.1' gem 'rspec', '< 4' gem 'ruby-grape-danger', '~> 0.2.0', require: false diff --git a/gemfiles/rack_3_0.gemfile b/gemfiles/rack_3_0.gemfile index 6b4712c226..83df47ca6c 100644 --- a/gemfiles/rack_3_0.gemfile +++ b/gemfiles/rack_3_0.gemfile @@ -27,7 +27,7 @@ end group :test do gem 'grape-entity', '~> 0.6', require: false - gem 'rack-jsonp', require: 'rack/jsonp' + gem 'rack-contrib', require: false gem 'rack-test', '< 2.1' gem 'rspec', '< 4' gem 'ruby-grape-danger', '~> 0.2.0', require: false diff --git a/gemfiles/rack_edge.gemfile b/gemfiles/rack_edge.gemfile index a58b7238f0..c64d8488dc 100644 --- a/gemfiles/rack_edge.gemfile +++ b/gemfiles/rack_edge.gemfile @@ -27,7 +27,7 @@ end group :test do gem 'grape-entity', '~> 0.6', require: false - gem 'rack-jsonp', require: 'rack/jsonp' + gem 'rack-contrib', require: false gem 'rack-test', '< 2.1' gem 'rspec', '< 4' gem 'ruby-grape-danger', '~> 0.2.0', require: false diff --git a/gemfiles/rails_6_0.gemfile b/gemfiles/rails_6_0.gemfile index 0a9d4ffdc6..15fd21e326 100644 --- a/gemfiles/rails_6_0.gemfile +++ b/gemfiles/rails_6_0.gemfile @@ -27,7 +27,7 @@ end group :test do gem 'grape-entity', '~> 0.6', require: false - gem 'rack-jsonp', require: 'rack/jsonp' + gem 'rack-contrib', require: false gem 'rack-test', '< 2.1' gem 'rspec', '< 4' gem 'ruby-grape-danger', '~> 0.2.0', require: false diff --git a/gemfiles/rails_6_1.gemfile b/gemfiles/rails_6_1.gemfile index c1121bf807..de78e0dabd 100644 --- a/gemfiles/rails_6_1.gemfile +++ b/gemfiles/rails_6_1.gemfile @@ -27,7 +27,7 @@ end group :test do gem 'grape-entity', '~> 0.6', require: false - gem 'rack-jsonp', require: 'rack/jsonp' + gem 'rack-contrib', require: false gem 'rack-test', '< 2.1' gem 'rspec', '< 4' gem 'ruby-grape-danger', '~> 0.2.0', require: false diff --git a/gemfiles/rails_7_0.gemfile b/gemfiles/rails_7_0.gemfile index 17b375975c..19d4d581fb 100644 --- a/gemfiles/rails_7_0.gemfile +++ b/gemfiles/rails_7_0.gemfile @@ -27,7 +27,7 @@ end group :test do gem 'grape-entity', '~> 0.6', require: false - gem 'rack-jsonp', require: 'rack/jsonp' + gem 'rack-contrib', require: false gem 'rack-test', '< 2.1' gem 'rspec', '< 4' gem 'ruby-grape-danger', '~> 0.2.0', require: false diff --git a/gemfiles/rails_7_1.gemfile b/gemfiles/rails_7_1.gemfile index 5f3452444e..637efd85f7 100644 --- a/gemfiles/rails_7_1.gemfile +++ b/gemfiles/rails_7_1.gemfile @@ -27,7 +27,7 @@ end group :test do gem 'grape-entity', '~> 0.6', require: false - gem 'rack-jsonp', require: 'rack/jsonp' + gem 'rack-contrib', require: false gem 'rack-test', '< 2.1' gem 'rspec', '< 4' gem 'ruby-grape-danger', '~> 0.2.0', require: false diff --git a/gemfiles/rails_edge.gemfile b/gemfiles/rails_edge.gemfile index 4462cd7347..e2dc809b8f 100644 --- a/gemfiles/rails_edge.gemfile +++ b/gemfiles/rails_edge.gemfile @@ -27,7 +27,7 @@ end group :test do gem 'grape-entity', '~> 0.6', require: false - gem 'rack-jsonp', require: 'rack/jsonp' + gem 'rack-contrib', require: false gem 'rack-test', '< 2.1' gem 'rspec', '< 4' gem 'ruby-grape-danger', '~> 0.2.0', require: false diff --git a/spec/grape/entity_spec.rb b/spec/grape/entity_spec.rb index d5eaf367fe..bb422414db 100644 --- a/spec/grape/entity_spec.rb +++ b/spec/grape/entity_spec.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require 'grape_entity' +require 'rack/contrib/jsonp' describe Grape::Entity do subject { Class.new(Grape::API) }