lib/rtml/dependencies.rb in rtml-2.0.3 vs lib/rtml/dependencies.rb in rtml-2.0.4
- old
+ new
@@ -1,21 +1,26 @@
-unless defined?(Gem) && defined?(ActiveSupport::Dependencies) && defined?(ActionController::Base)
- require 'rubygems'
- gem 'hpricot', ">= 0.8.2"
- gem 'sc-core-ext', ">= 1.1.1"
- gem 'activesupport', '>= 2.3.5'
- gem 'actionpack', '>= 2.3.5'
- gem 'activerecord', '>= 2.3.5'
+if defined?(Rails)
+ Rails.configuration.gem 'hpricot', '>= 0.8.2'
+ Rails.configuration.gem 'sc-core-ext', '>= 1.1.1'
+else
+ unless defined?(Gem) && defined?(ActiveSupport::Dependencies) && defined?(ActionController::Base)
+ require 'rubygems'
+ gem 'hpricot', ">= 0.8.2"
+ gem 'sc-core-ext', ">= 1.1.1"
+ gem 'activesupport', '>= 2.3.5'
+ gem 'actionpack', '>= 2.3.5'
+ gem 'activerecord', '>= 2.3.5'
+
+ require 'active_support'
+ require 'action_controller'
+ require 'action_view'
+ require 'active_record'
+ require 'active_resource'
+ end
- require 'active_support'
- require 'action_controller'
- require 'action_view'
- require 'active_record'
- require 'active_resource'
+ require 'hpricot'
+ require 'sc-core-ext'
end
-
-require 'hpricot'
-require 'sc-core-ext'
path = File.expand_path(File.join(File.dirname(__FILE__), '../..'))
%w(lib
builtin/controllers
builtin/models