diff --git a/Gemfile.rails50 b/Gemfile.rails50 index 446aee867..20722c29e 100644 --- a/Gemfile.rails50 +++ b/Gemfile.rails50 @@ -6,3 +6,4 @@ gem 'rails', '~> 5.0.0' gem 'mime-types', '~> 2.99.3' gem 'rails-controller-testing' +gem 'test_engine', path: 'spec/dummy/components/test_engine', group: :test diff --git a/Gemfile.rails51 b/Gemfile.rails51 index e6bb1ed06..3cd8223c7 100644 --- a/Gemfile.rails51 +++ b/Gemfile.rails51 @@ -5,3 +5,5 @@ gemspec gem 'rails', '~> 5.1.0.rc1' gem 'mime-types', '~> 2.99.3' gem 'rails-controller-testing' + +gem 'test_engine', path: 'spec/dummy/components/test_engine', group: :test diff --git a/Gemfile.rails60 b/Gemfile.rails60 index a762038eb..ec336aae1 100644 --- a/Gemfile.rails60 +++ b/Gemfile.rails60 @@ -10,3 +10,5 @@ gem 'rspec-core', git: 'https://github.com/rspec/rspec-core' gem 'rspec-mocks', git: 'https://github.com/rspec/rspec-mocks' gem 'rspec-support', git: 'https://github.com/rspec/rspec-support' gem 'rspec-expectations', git: 'https://github.com/rspec/rspec-expectations' + +gem 'test_engine', path: 'spec/dummy/components/test_engine', group: :test diff --git a/lib/apipie/core_ext/route.rb b/lib/apipie/core_ext/route.rb index 8221be955..0a52f98dc 100644 --- a/lib/apipie/core_ext/route.rb +++ b/lib/apipie/core_ext/route.rb @@ -1,10 +1,9 @@ -begin - # Rails 4 - ActionDispatch::Journey -rescue NameError - # Rails 3 - require 'journey' - Journey -end::Route.class_eval do - attr_accessor :base_url +module Apipie + module BaseUrlExtension + attr_accessor :base_url + end +end + +class ActionDispatch::Journey::Route + include Apipie::BaseUrlExtension end