From af261c163037b708c095dd331eb37eccb0655f4c Mon Sep 17 00:00:00 2001
From: Alex Reisner <alex@alexreisner.com>
Date: Tue, 5 Apr 2011 23:50:20 -0400
Subject: [PATCH] Change Geocoder::Orm to Geocoder::Store.

Mongoid is not technically an ORM (they call it an "Object Document
Mapper"), and we might support other such storage mechanisms in the
future.
---
 lib/geocoder/models/base.rb                           | 6 +++---
 lib/geocoder/{orms => stores}/active_record.rb        | 6 +++---
 lib/geocoder/{orms => stores}/active_record_legacy.rb | 2 +-
 lib/geocoder/{orms => stores}/base.rb                 | 2 +-
 lib/geocoder/{orms => stores}/mongoid.rb              | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)
 rename lib/geocoder/{orms => stores}/active_record.rb (98%)
 rename lib/geocoder/{orms => stores}/active_record_legacy.rb (98%)
 rename lib/geocoder/{orms => stores}/base.rb (99%)
 rename lib/geocoder/{orms => stores}/mongoid.rb (97%)

diff --git a/lib/geocoder/models/base.rb b/lib/geocoder/models/base.rb
index aeaf4d9d..94935420 100644
--- a/lib/geocoder/models/base.rb
+++ b/lib/geocoder/models/base.rb
@@ -26,15 +26,15 @@ module Geocoder
       def geocoder_init(options)
         unless geocoder_initialized?
           @geocoder_options = {}
-          require "geocoder/orms/#{geocoder_file_name}"
-          include eval("Geocoder::Orm::" + geocoder_module_name)
+          require "geocoder/stores/#{geocoder_file_name}"
+          include eval("Geocoder::Store::" + geocoder_module_name)
         end
         @geocoder_options.merge! options
       end
 
       def geocoder_initialized?
         begin
-          included_modules.include? eval("Geocoder::Orm::" + geocoder_module_name)
+          included_modules.include? eval("Geocoder::Store::" + geocoder_module_name)
         rescue NameError
           false
         end
diff --git a/lib/geocoder/orms/active_record.rb b/lib/geocoder/stores/active_record.rb
similarity index 98%
rename from lib/geocoder/orms/active_record.rb
rename to lib/geocoder/stores/active_record.rb
index 96e4a80f..dc4cd2d8 100644
--- a/lib/geocoder/orms/active_record.rb
+++ b/lib/geocoder/stores/active_record.rb
@@ -1,10 +1,10 @@
-require 'geocoder/orms/base'
-require 'geocoder/orms/active_record_legacy'
+require 'geocoder/stores/base'
+require 'geocoder/stores/active_record_legacy'
 
 ##
 # Add geocoding functionality to any ActiveRecord object.
 #
-module Geocoder::Orm
+module Geocoder::Store
   module ActiveRecord
     include Base
     include ActiveRecord::Legacy
diff --git a/lib/geocoder/orms/active_record_legacy.rb b/lib/geocoder/stores/active_record_legacy.rb
similarity index 98%
rename from lib/geocoder/orms/active_record_legacy.rb
rename to lib/geocoder/stores/active_record_legacy.rb
index e8db8bc7..6a28fd56 100644
--- a/lib/geocoder/orms/active_record_legacy.rb
+++ b/lib/geocoder/stores/active_record_legacy.rb
@@ -1,4 +1,4 @@
-module Geocoder::Orm::ActiveRecord
+module Geocoder::Store::ActiveRecord
   module Legacy
 
     ##
diff --git a/lib/geocoder/orms/base.rb b/lib/geocoder/stores/base.rb
similarity index 99%
rename from lib/geocoder/orms/base.rb
rename to lib/geocoder/stores/base.rb
index 1b98ae8e..e0f90942 100644
--- a/lib/geocoder/orms/base.rb
+++ b/lib/geocoder/stores/base.rb
@@ -1,5 +1,5 @@
 module Geocoder
-  module Orm
+  module Store
     module Base
 
       ##
diff --git a/lib/geocoder/orms/mongoid.rb b/lib/geocoder/stores/mongoid.rb
similarity index 97%
rename from lib/geocoder/orms/mongoid.rb
rename to lib/geocoder/stores/mongoid.rb
index 308324d7..9d1eabe0 100644
--- a/lib/geocoder/orms/mongoid.rb
+++ b/lib/geocoder/stores/mongoid.rb
@@ -1,6 +1,6 @@
-require 'geocoder/orms/base'
+require 'geocoder/stores/base'
 
-module Geocoder::Orm
+module Geocoder::Store
   module Mongoid
     include Base
 
-- 
GitLab