Skip to content
This repository
Browse code

resolving conflict

  • Loading branch information...
commit 6f59a65e201a6a463d1a7b9b761cdc66bb8b928c 2 parents 43c8492 + 7450046
PRXci authored October 06, 2010
3  .gitignore
@@ -12,4 +12,5 @@ build/*
12 12
 *.mode1v3
13 13
 .svn
14 14
 profile
15  
-spec/active_record/test.db
  15
+spec/active_record/test.db
  16
+.bundle
2  Gemfile
@@ -14,5 +14,5 @@ group :development do
14 14
   gem "jeweler", "~> 1.5.0.pre2"
15 15
   gem "rcov", ">= 0"
16 16
   gem "actionpack", '~> 2.3.8'
17  
-  gem 'activerecord', "~> 2.3.8"
  17
+  gem 'activerecord', "~> 2.3.8", :require => 'active_record'
18 18
 end
16  lib/apn_on_rails/apn_on_rails.rb
@@ -66,6 +66,16 @@ def initialize
66 66
   path = File.join(File.dirname(__FILE__), 'app', dir)
67 67
   $LOAD_PATH << path 
68 68
   # puts "Adding #{path}"
69  
-  ActiveSupport::Dependencies.load_paths << path 
70  
-  ActiveSupport::Dependencies.load_once_paths.delete(path) 
71  
-end
  69
+  begin
  70
+    if ActiveSupport::Dependencies.respond_to? :autoload_paths
  71
+      ActiveSupport::Dependencies.autoload_paths << path
  72
+      ActiveSupport::Dependencies.autoload_once_paths.delete(path)
  73
+    else
  74
+      ActiveSupport::Dependencies.load_paths << path 
  75
+      ActiveSupport::Dependencies.load_once_paths.delete(path) 
  76
+    end
  77
+  rescue NameError
  78
+    Dependencies.load_paths << path 
  79
+    Dependencies.load_once_paths.delete(path) 
  80
+  end
  81
+end
2  spec/active_record/setup_ar.rb
... ...
@@ -1,5 +1,5 @@
1 1
 require 'rubygems'
2  
-require 'activerecord'
  2
+require 'active_record'
3 3
 
4 4
 logger = Logger.new(STDOUT)
5 5
 logger.level = Logger::INFO

0 notes on commit 6f59a65

Please sign in to comment.
Something went wrong with that request. Please try again.