Skip to content

Commit 103d395

Browse files
Derek WheeliNecas
Derek Wheel
authored andcommitted
Update gemfiles with test engine and refactor
1 parent c768433 commit 103d395

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

Gemfile.rails50

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ gem 'rails', '~> 5.0.0'
66
gem 'mime-types', '~> 2.99.3'
77
gem 'rails-controller-testing'
88

9+
gem 'test_engine', path: 'spec/dummy/components/test_engine', group: :test

Gemfile.rails51

+2
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ gemspec
55
gem 'rails', '~> 5.1.0.rc1'
66
gem 'mime-types', '~> 2.99.3'
77
gem 'rails-controller-testing'
8+
9+
gem 'test_engine', path: 'spec/dummy/components/test_engine', group: :test

Gemfile.rails60

+2
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ gem 'rspec-core', git: 'https://github.com/rspec/rspec-core'
1010
gem 'rspec-mocks', git: 'https://github.com/rspec/rspec-mocks'
1111
gem 'rspec-support', git: 'https://github.com/rspec/rspec-support'
1212
gem 'rspec-expectations', git: 'https://github.com/rspec/rspec-expectations'
13+
14+
gem 'test_engine', path: 'spec/dummy/components/test_engine', group: :test

lib/apipie/core_ext/route.rb

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
begin
2-
# Rails 4
3-
ActionDispatch::Journey
4-
rescue NameError
5-
# Rails 3
6-
require 'journey'
7-
Journey
8-
end::Route.class_eval do
9-
attr_accessor :base_url
1+
module Apipie
2+
module BaseUrlExtension
3+
attr_accessor :base_url
4+
end
5+
end
6+
7+
class ActionDispatch::Journey::Route
8+
include Apipie::BaseUrlExtension
109
end

0 commit comments

Comments
 (0)