Skip to content

Commit

Permalink
Update gemfiles with test engine and refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Derek Wheel authored and iNecas committed Sep 24, 2019
1 parent c768433 commit 103d395
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions Gemfile.rails50
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions Gemfile.rails51
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions Gemfile.rails60
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 8 additions & 9 deletions lib/apipie/core_ext/route.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 103d395

Please sign in to comment.