Instead of requiring dependency, only exe if defined
This commit is contained in:
Родитель
3f04883d51
Коммит
f43a46d92d
|
@ -1,5 +1,3 @@
|
|||
require 'active_support/dependencies'
|
||||
|
||||
# rails 3.1+
|
||||
if defined?(Rails::Railtie)
|
||||
module SecureHeaders
|
||||
|
@ -25,10 +23,12 @@ else
|
|||
end
|
||||
end
|
||||
|
||||
if ActiveSupport::Dependencies.autoload_paths
|
||||
ActiveSupport::Dependencies.autoload_paths << File.expand_path(File.join("..", "..", "..", "app", "controllers"), __FILE__)
|
||||
else
|
||||
ActiveSupport::Dependencies.autoload_paths = [File.expand_path(File.join("..", "..", "..", "app", "controllers"), __FILE__)]
|
||||
if defined?(ActiveSupport::Dependencies)
|
||||
if ActiveSupport::Dependencies.autoload_paths
|
||||
ActiveSupport::Dependencies.autoload_paths << File.expand_path(File.join("..", "..", "..", "app", "controllers"), __FILE__)
|
||||
else
|
||||
ActiveSupport::Dependencies.autoload_paths = [File.expand_path(File.join("..", "..", "..", "app", "controllers"), __FILE__)]
|
||||
end
|
||||
end
|
||||
|
||||
if defined? ActionController::Routing
|
||||
|
|
|
@ -19,6 +19,5 @@ Gem::Specification.new do |gem|
|
|||
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
||||
gem.require_paths = ["lib"]
|
||||
gem.add_dependency "brwsr", ">= 1.1.1"
|
||||
gem.add_dependency "activesupport", ">= 2.0"
|
||||
gem.add_development_dependency "rake"
|
||||
end
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
require 'rubygems'
|
||||
require 'spork'
|
||||
require 'active_support'
|
||||
|
||||
unless Spork.using_spork?
|
||||
require 'simplecov'
|
||||
|
|
Загрузка…
Ссылка в новой задаче